* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "楷体", "宋体", "Microsoft YaHei", sans-serif;
}
html, body {
    overflow-x: hidden;
}
html {
    background-color: #f5f0e6;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23b8a99e' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M85.382 200c-25.803 0-46.794-20.991-46.794-46.794 0-15.765 7.364-29.697 18.738-38.412C63.735 99.815 80.333 80 100 80c19.667 0 36.265 19.815 42.074 34.794 11.374 8.715 18.738 22.647 18.738 38.412 0 25.803-20.991 46.794-46.794 46.794H85.382zm-65.382-46.794C20 131.317 0 111.317 0 85.513 0 59.709 20 39.709 40 39.709c15.518 0 28.864 9.941 34.522 23.276C57.162 82.312 40 101.266 40 125.206zm120-75.497c20 0 40 19.999 40 45.804 0 25.804-20 45.804-40 45.804-15.518 0-28.864-9.941-34.522-23.276 14.66-11.054 32.522-30.008 32.522-54.932 0-24.924-17.862-43.878-34.522-54.932C128.864 49.65 142.21 40 158 40z' fill='%238c8276' fill-opacity='0.05'/%3E%3C/svg%3E");
    min-height: 100%;
}
body {
    line-height: 1.8;
    color: #332b20;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    padding-top: 60px;
}

/* 通宽导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: rgba(139, 90, 43, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-bottom: 2px solid rgba(107, 79, 65, 0.3);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

.navbar-icon {
    width: 24px;
    height: 24px;
    color: #fff;
}

.navbar-title {
    color: #fff;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 15px;
    margin: 0;
    padding: 0;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.navbar-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.navbar-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.15);
}

.navbar-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 12px;
    right: 12px;
    height: 2px;
    background-color: #fff;
    border-radius: 2px 2px 0 0;
}

/* 移动端菜单按钮 */
.navbar-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.navbar-toggle-line {
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.navbar-toggle.active .navbar-toggle-line:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.navbar-toggle.active .navbar-toggle-line:nth-child(2) {
    opacity: 0;
}

.navbar-toggle.active .navbar-toggle-line:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

@media (max-width: 768px) {
    .navbar-container {
        padding: 0 15px;
        position: relative;
    }
    
    .navbar-toggle {
        display: flex;
    }
    
    .navbar-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        width: 100%;
        background-color: rgba(139, 90, 43, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        gap: 0;
        padding: 20px 0;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }
    
    .navbar-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .navbar-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar-link {
        display: block;
        width: 100%;
        padding: 15px 20px;
        font-size: 1rem;
        text-align: left;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar-link:last-child {
        border-bottom: none;
    }
    
    .navbar-link:hover {
        background-color: rgba(255, 255, 255, 0.15);
    }
    
    .navbar-link.active {
        background-color: rgba(255, 255, 255, 0.2);
    }
    
    .navbar-link.active::after {
        display: none;
    }
    
    .navbar-title {
        font-size: 1rem;
    }
    
    body {
        padding-top: 100px;
    }
    
    .header {
        margin-top: 0;
        padding-top: 20px;
    }
    
    /* 菜单打开时禁止背景滚动 */
    body.menu-open {
        overflow: hidden;
    }
}
.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    padding-top: 20px;
    border-bottom: 2px solid #d4c8b8;
}
.header h1 {
    font-size: 2.5rem;
    color: #6b4f41;
    font-weight: bold;
}
.header .base-info {
    font-size: 1.1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}
.header .notice {
    color: #6b4f41;
    font-size: 1rem;
    line-height: 1.8;
    margin-top: 15px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
.palace-tip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 20px auto;
    padding: 12px 20px;
    background-color: rgba(139, 90, 43, 0.1);
    border: 1px solid rgba(139, 90, 43, 0.3);
    border-radius: 8px;
    max-width: 1200px;
    color: #6b4f41;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}
.palace-tip:hover {
    background-color: rgba(139, 90, 43, 0.15);
    border-color: rgba(139, 90, 43, 0.4);
}
.tip-icon {
    font-size: 1.2rem;
    line-height: 1;
}
.tip-text {
    font-weight: 500;
}
.ziwei-pan {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto 30px;

}
.center-palace {
    width: 100%;
    height: 100%;
    min-height: 160px;
    background-color: rgba(255, 253, 248, 0.95);
    border: 2px solid #8b5a2b;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 6px 12px rgba(107, 79, 65, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}
.center-palace:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(107, 79, 65, 0.3);
}
.outer-palace {
    width: 100%;
    height: 100%;
    min-height: 130px;
    background-color: rgba(255, 253, 248, 0.9);
    border: 2px solid #8b5a2b;
    border-radius: 6px;
    padding: 8px;
    box-shadow: 0 4px 8px rgba(107, 79, 65, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}
.outer-palace:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(107, 79, 65, 0.2);
}
.palace-detail-card.highlight {
    border: 2px solid #8b5a2b;
    box-shadow: 0 8px 16px rgba(107, 79, 65, 0.3);
    animation: highlightPulse 2s ease-in-out;
}
@keyframes highlightPulse {
    0%, 100% {
        box-shadow: 0 8px 16px rgba(107, 79, 65, 0.3);
    }
    50% {
        box-shadow: 0 12px 24px rgba(107, 79, 65, 0.5);
    }
}
.palace-zinu {
    grid-column: 1;
    grid-row: 1;
}
.palace-fuqi {
    grid-column: 2;
    grid-row: 1;
}
.palace-xiongdi {
    grid-column: 3;
    grid-row: 1;
}
.palace-ming {
    grid-column: 4;
    grid-row: 1;
}
.palace-caibo {
    grid-column: 1;
    grid-row: 2;
}
.palace-fu {
    grid-column: 4;
    grid-row: 2;
}
[class*="palace-ji'e"] {
    grid-column: 1;
    grid-row: 3;
}
.palace-fude {
    grid-column: 4;
    grid-row: 3;
}
.palace-qianyi {
    grid-column: 1;
    grid-row: 4;
}
.palace-nupu {
    grid-column: 2;
    grid-row: 4;
}
.palace-guanlu {
    grid-column: 3;
    grid-row: 4;
}
.palace-tianzhai {
    grid-column: 4;
    grid-row: 4;
}
.base-info-card {
    grid-column: 2 / 4;
    grid-row: 2 / 4;
    background-color: rgba(255, 253, 248, 0.95);
    border: 2px solid #8b5a2b;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 6px 12px rgba(107, 79, 65, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.base-info-card .card-title {
    font-size: 1.3rem;
    color: #6b4f41;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #d4c8b8;
    text-align: center;
    font-weight: bold;
}
.base-info-card .info-item {
    font-size: 0.9rem;
    margin-bottom: 6px;
    line-height: 1.5;
    color: #332b20;
}
.base-info-card .info-item strong {
    color: #8b5a2b;
    font-weight: 600;
    margin-right: 5px;
}
.info-grid-3x3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, auto);
    gap: 6px;
    margin-bottom: 6px;
}
.info-grid-3x3 .grid-item {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #332b20;
}
.info-grid-3x3 .grid-item strong {
    color: #8b5a2b;
    font-weight: 600;
    margin-right: 5px;
}
.info-grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 6px;
    margin-bottom: 6px;
}
.info-grid-2x2 .grid-item {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #332b20;
}
.info-grid-2x2 .grid-item strong {
    color: #8b5a2b;
    font-weight: 600;
    margin-right: 5px;
}
.info-grid-2x3 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, auto);
    gap: 6px;
    margin-bottom: 6px;
}
.info-grid-2x3 .grid-item {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #332b20;
}
.info-grid-2x3 .grid-item strong {
    color: #8b5a2b;
    font-weight: 600;
    margin-right: 5px;
}
.palace-title {
    font-size: 1.2rem;
    color: #6b4f41;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px dashed #d4c8b8;
    text-align: center;
    font-weight: bold;
}
.palace-info {
    font-size: 0.875rem;
}
.palace-info p {
    margin-bottom: 2px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(212, 200, 184, 0.2);
    padding-bottom: 1px;
    white-space: nowrap;
}
.palace-info span:first-child {
    color: #8b5a2b;
    font-weight: 500;
    width: 60px;
    text-align: left;
    flex-shrink: 0;
}
.palace-info span:last-child {
    text-align: right;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}
.palace-detail-container {
    display: none;
}
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}
.modal-overlay.show {
    display: flex;
}
.modal-content {
    background-color: rgba(255, 253, 248, 0.98);
    border: 2px solid #8b5a2b;
    border-radius: 12px;
    padding: 30px;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(107, 79, 65, 0.4);
    position: relative;
    width: 100%;
}
.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #8b5a2b;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}
.modal-close:hover {
    background-color: rgba(139, 90, 43, 0.1);
    transform: rotate(90deg);
}
.modal-content .palace-title {
    font-size: 2rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #d4c8b8;
}
.modal-content .star-desc {
    margin-bottom: 20px;
    padding: 15px;
    background-color: rgba(245, 240, 230, 0.7);
    border-radius: 8px;
    border-left: 4px solid #c9b8a6;
}
.modal-content .star-desc h4 {
    font-size: 1.3rem;
    color: #7d5a3f;
    margin-bottom: 12px;
    font-weight: bold;
}
.modal-content .star-desc p {
    font-size: 1rem;
    text-align: justify;
    line-height: 1.8;
}
.palace-detail-card {
    background-color: rgba(255, 253, 248, 0.9);
    border: 1px solid #d4c8b8;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(107, 79, 65, 0.1);
    min-height: 400px;
}
.palace-detail-card .palace-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
}
.star-desc {
    margin-bottom: 12px;
    padding: 10px;
    background-color: rgba(245, 240, 230, 0.7);
    border-radius: 6px;
    border-left: 3px solid #c9b8a6;
}
.star-desc h4 {
    font-size: 1.1rem;
    color: #7d5a3f;
    margin-bottom: 8px;
    font-weight: bold;
}
.star-desc p {
    font-size: 0.95rem;
    text-align: justify;
}
@media (max-width: 900px) {
    .ziwei-pan {
        max-width: 800px;
        gap: 10px;
        padding: 15px;
    }
    .center-palace {
        min-height: 150px;
        padding: 10px;
    }
    .outer-palace {
        min-height: 120px;
        padding: 8px;
    }
    .base-info-card {
        padding: 15px;
    }
    .base-info-card .card-title {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    .base-info-card .info-item {
        font-size: 0.875rem;
        margin-bottom: 6px;
    }
    .info-grid-3x3 {
        gap: 6px;
    }
    .info-grid-3x3 .grid-item {
        font-size: 0.875rem;
    }
    .info-grid-2x2 {
        gap: 6px;
    }
    .info-grid-2x2 .grid-item {
        font-size: 0.875rem;
    }
    .palace-title {
        font-size: 1rem;
    }
    .palace-info {
        font-size: 0.875rem;
    }
}
@media (max-width: 768px) {
    .ziwei-pan {
        display: none;
    }
    .palace-tip {
        display: none; /* 移动端隐藏提示，因为不显示12宫网格 */
    }
    .header {
        margin-top: 20px;
        padding-top: 60px;
    }
    .header h1 {
        font-size: 2rem;
        margin-top: 0;
    }
    .header .base-info {
        gap: 10px;
        font-size: 1rem;
    }
    .footer p:not(.copyright) {
        font-size: 0.875em;
    }
    .palace-detail-container {
        grid-template-columns: 1fr;
    }
    .palace-detail-card {
        padding: 15px;
        min-height: auto;
    }
    .modal-content {
        max-width: 95%;
        padding: 20px;
        max-height: 85vh;
    }
    .modal-content .palace-title {
        font-size: 1.5rem;
    }
    .modal-content .star-desc {
        padding: 12px;
    }
    .modal-content .star-desc h4 {
        font-size: 1.1rem;
    }
    .modal-content .star-desc p {
        font-size: 0.9rem;
    }
    body {
        max-width: 100%;
        padding: 10px;
    }
}
.mobile-base-info {
    display: none;
    margin-bottom: 20px;
}
.mobile-base-info .base-info-card {
    position: static;
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    max-width: 100%;
}
@media (max-width: 768px) {
    .mobile-base-info .info-grid-3x3 {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, auto);
    }
}
.mobile-palace-list {
    display: none;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}
.mobile-palace-tip {
    display: none; /* 默认隐藏，移动端显示 */
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 15px auto;
    padding: 12px 20px;
    background-color: rgba(139, 90, 43, 0.1);
    border: 1px solid rgba(139, 90, 43, 0.3);
    border-radius: 8px;
    max-width: 100%;
    color: #6b4f41;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}
.mobile-palace-tip .tip-icon {
    font-size: 1.1rem;
    line-height: 1;
}
.mobile-palace-tip .tip-text {
    font-weight: 500;
}
.mobile-palace-item {
    background-color: rgba(255, 253, 248, 0.9);
    border: 2px solid #8b5a2b;
    border-radius: 6px;
    padding: 15px;
    transition: all 0.3s ease;
}
.mobile-palace-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(107, 79, 65, 0.2);
}
.back-to-top {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #8b5a2b;
    color: #fff;
    border: 2px solid #8b5a2b;
    border-radius: 50%;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(107, 79, 65, 0.3);
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
}
.back-to-top:hover {
    background-color: #6b4f41;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(107, 79, 65, 0.4);
}
.back-to-top.show {
    display: flex;
}

/* AI智能解析卡片样式 */
.ai-analysis-container {
    max-width: 1200px;
    margin: 40px auto;
}

.ai-analysis-title {
    font-size: 1.8rem;
    color: #6b4f41;
    text-align: center;
    margin-bottom: 30px;
    font-weight: bold;
}

.ai-analysis-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.ai-btn {
    background-color: rgba(255, 253, 248, 0.95);
    border: 2px solid #8b5a2b;
    border-radius: 8px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: #6b4f41;
    font-weight: 500;
}

.ai-btn:hover {
    background-color: #8b5a2b;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(107, 79, 65, 0.3);
}

.ai-btn.active {
    background-color: #6b4f41;
    color: #fff;
    border-color: #6b4f41;
}

.ai-btn:disabled {
    background-color: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    transform: none;
}

.ai-btn-icon {
    font-size: 2rem;
    line-height: 1;
}

.ai-btn-text {
    font-size: 0.9rem;
}

.ai-analysis-card {
    background-color: rgba(255, 253, 248, 0.95);
    border: 2px solid #8b5a2b;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 6px 12px rgba(107, 79, 65, 0.2);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.ai-analysis-card:hover {
    box-shadow: 0 8px 16px rgba(107, 79, 65, 0.3);
}

.ai-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #d4c8b8;
}

.ai-card-icon {
    font-size: 2rem;
    line-height: 1;
}

.ai-card-title {
    font-size: 1.3rem;
    color: #6b4f41;
    margin: 0;
    font-weight: bold;
}

.ai-card-content {
    flex: 1;
    color: #5a4a3a;
    line-height: 1.8;
    font-size: 0.95rem;
    min-height: 300px;
    overflow-y: auto;
}

/* Markdown渲染后的样式 */
.ai-analysis-result {
    color: #5a4a3a;
    line-height: 1.8;
}

.ai-analysis-result h1,
.ai-analysis-result h2,
.ai-analysis-result h3,
.ai-analysis-result h4,
.ai-analysis-result h5,
.ai-analysis-result h6 {
    color: #6b4f41;
    margin-top: 1.2em;
    margin-bottom: 0.8em;
    font-weight: bold;
}

.ai-analysis-result h1 {
    font-size: 1.5em;
    border-bottom: 2px solid #d4c8b8;
    padding-bottom: 0.3em;
}

.ai-analysis-result h2 {
    font-size: 1.3em;
    border-bottom: 1px solid #d4c8b8;
    padding-bottom: 0.3em;
}

.ai-analysis-result h3 {
    font-size: 1.1em;
}

.ai-analysis-result p {
    margin: 0.8em 0;
}

.ai-analysis-result ul,
.ai-analysis-result ol {
    margin: 0.8em 0;
    padding-left: 2em;
}

.ai-analysis-result li {
    margin: 0.4em 0;
}

.ai-analysis-result strong {
    color: #6b4f41;
    font-weight: bold;
}

.ai-analysis-result em {
    font-style: italic;
}

.ai-analysis-result code {
    background-color: #f1e8e0;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.ai-analysis-result pre {
    background-color: #f1e8e0;
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1em 0;
}

.ai-analysis-result pre code {
    background-color: transparent;
    padding: 0;
}

.ai-analysis-result blockquote {
    border-left: 4px solid #8b5a2b;
    padding-left: 1em;
    margin: 1em 0;
    color: #6b4f41;
    font-style: italic;
}

.ai-analysis-result hr {
    border: none;
    border-top: 1px solid #d4c8b8;
    margin: 1.5em 0;
}

.ai-card-content::-webkit-scrollbar {
    width: 6px;
}

.ai-card-content::-webkit-scrollbar-track {
    background: #f1e8e0;
    border-radius: 3px;
}

.ai-card-content::-webkit-scrollbar-thumb {
    background: #8b5a2b;
    border-radius: 3px;
}

.ai-card-content::-webkit-scrollbar-thumb:hover {
    background: #6b4f41;
}

.ai-loading {
    color: #999;
    text-align: center;
    padding: 40px 20px;
    font-style: italic;
}

.ai-loading.active {
    color: #6b4f41;
}

/* AI加载模态框样式 */
#ai-loading-modal-overlay {
    z-index: 2000; /* 高于其他模态框 */
    background-color: rgba(0, 0, 0, 0.7); /* 更深的背景 */
    pointer-events: auto; /* 确保可以捕获点击事件 */
}

.ai-loading-modal-content {
    max-width: 400px;
    text-align: center;
    padding: 50px 40px;
    background-color: rgba(255, 253, 248, 0.98);
    border: 3px solid #8b5a2b;
}

.ai-loading-spinner {
    margin-bottom: 25px;
}

.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto;
    border: 5px solid #d4c8b8;
    border-top-color: #8b5a2b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ai-loading-text {
    font-size: 1.2rem;
    color: #6b4f41;
    font-weight: bold;
    margin-bottom: 10px;
}

.ai-loading-category {
    font-size: 1rem;
    color: #8b5a2b;
    font-style: italic;
}

/* 禁用AI加载模态框的点击关闭功能 */
#ai-loading-modal-overlay {
    cursor: default;
}

#ai-loading-modal-overlay .ai-loading-modal-content {
    pointer-events: auto;
    cursor: default;
}


@media (max-width: 768px) {
    .mobile-base-info {
        display: block;
    }
    .mobile-palace-list {
        display: flex;
    }
    .mobile-palace-tip {
        display: flex; /* 移动端显示提示 */
    }
    .ai-analysis-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .ai-btn {
        padding: 12px 15px;
    }
    .ai-btn-icon {
        font-size: 1.5rem;
    }
    .ai-btn-text {
        font-size: 0.85rem;
    }
    .ai-analysis-card {
        min-height: 300px;
        padding: 20px;
    }
    .ai-card-title {
        font-size: 1.1rem;
    }
    .ai-card-icon {
        font-size: 1.5rem;
    }
    .ai-card-content {
        min-height: 200px;
    }
    .ai-analysis-result ul {
        padding-left: 0;
    }
    .back-to-top {
        display: none;
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    .back-to-top.show {
        display: flex;
    }
}
@media (min-width: 769px) {
    .back-to-top {
        display: none !important;
    }
}
.footer {
    max-width: 1600px;
    background-color: transparent;
    border-top: 1px dashed #d4c8b8;
    padding: 30px 20px;
    text-align: center;
    color: #6b4f41;
    position: relative;
    box-sizing: border-box;
}
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 1px;
    background: linear-gradient(to right, transparent, #d4c8b8, transparent);
}
.footer p {
    margin: 8px 0;
    line-height: 1.8;
    font-style: italic;
}
.footer .copyright {
    color: #8b5a2b;
    font-weight: normal;
    font-style: normal;
    letter-spacing: 1px;
}
.footer .copyright::before,
.footer .copyright::after {
    content: '◆';
    color: #c9b8a6;
    margin: 0 8px;
    font-size: 0.875rem;
}