* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "Heiti SC", "SimSun", "PingFang SC", sans-serif;
}
body {
    background-color: #faf6f0;
    color: #333;
    line-height: 1.6;
    padding: 15px;
    padding-right: 110px; /* 为右侧导航栏预留空间 */
    position: relative;
    padding-bottom: 0;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    padding: 25px 15px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0e6dc;
}
/* 右侧固定导航栏样式 - 红色系协调配色（桌面端） */
.navbar {
    position: fixed;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #991b1b; /* 深暗红（呼应页脚强调色） */
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(153, 27, 27, 0.2); /* 红色系阴影 */
    z-index: 999;
    width: 80px;
}
.navbar ul {
    list-style: none;
    display: flex;
    flex-direction: column; /* 桌面端垂直排列 */
}
.navbar li {
    position: relative;
}
/* 桌面端显示所有导航项 */
.navbar li.nav-item-mobile-hidden,
.navbar li.nav-item-mobile-only {
    display: block;
}
/* 导航项分隔线 - 红色系浅色调 */
.navbar li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 15px;
    right: 15px;
    bottom: 0;
    height: 1px;
    background-color: #c22539; /* 中红分隔线 */
}
.navbar a {
    display: block;
    color: #fef3f4; /* 浅粉色文字（与红色背景协调） */
    text-decoration: none;
    padding: 14px 10px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.navbar a:hover {
    background-color: #b91c1c; /* 中红hover背景（呼应标题色） */
    color: #ffffff;
    transform: translateX(-3px);
}
.navbar a.active {
    background-color: #dc3545; /* 亮红激活色（与强调色一致） */
    color: #ffffff;
    font-weight: 600;
    box-shadow: inset 3px 0 6px rgba(127, 29, 29, 0.3); /* 暗红内阴影 */
}
/* 头部样式 - 保持原有红色主题 */
.header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #dc3545;
    position: relative;
}
.header::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: #b91c1c;
    margin: 8px auto 0;
    border-radius: 3px;
}
.header h1 {
    color: #dc3545;
    font-size: 1.8rem;
    margin-bottom: 8px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    letter-spacing: 0.5px;
}
.header p {
    color: #7f1d1d;
    font-size: 1rem;
}
/* 章节样式 - 保持原有红色主题 */
.section {
    margin-bottom: 25px;
    scroll-margin-top: 15px;
}
.section-title {
    color: #b91c1c;
    font-size: 1.4rem;
    margin-bottom: 15px;
    padding-left: 12px;
    border-left: 4px solid #dc3545;
    font-weight: 600;
    display: flex;
    align-items: center;
}
.section-title a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    width: 100%;
}
.section-title a:hover {
    color: #dc3545;
}
.section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, #dc3545, transparent);
    margin-left: 12px;
}
/* 内容区域样式 - 保持原有红色系辅助色 */
.detail-content {
    padding: 18px;
    background-color: #fefaf5;
    border-radius: 6px;
    margin-bottom: 18px;
    border: 1px solid #fee2e2;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.05);
}
.info-row {
    display: flex;
    flex-wrap: wrap;
    padding: 6px 0;
    border-bottom: 1px dashed #fee2e2;
    align-items: center;
}
.info-row:last-child {
    border-bottom: none;
}
.info-label {
    color: #7f1d1d;
    font-weight: 600;
    flex: 0 0 auto;
    font-size: 0.95rem;
}
.info-value {
    color: #374151;
    flex: 1;
    padding-left: 8px;
    font-size: 0.95rem;
}
.highlight {
    color: #dc3545;
    font-weight: 700;
    font-size: 0.98rem;
    text-shadow: 0 0 2px rgba(220, 38, 38, 0.1);
}
.sub-title {
    color: #b91c1c;
    font-size: 1.15rem;
    margin: 20px 0 10px;
    font-weight: 600;
    padding-bottom: 6px;
    border-bottom: 1px solid #fee2e2;
}
.text-block {
    margin-bottom: 15px;
    line-height: 1.7;
}
.text-block p {
    margin-bottom: 10px;
    color: #374151;
    text-align: justify;
    font-size: 0.95rem;
}
.text-block p:last-child {
    margin-bottom: 0;
}
.text-block strong {
    color: #b91c1c;
}
/* 页脚样式 - 保持红色系一致性 */
.footer {
    text-align: center;
    margin-top: 30px;
    padding: 15px 10px 0;
    border-top: 1px solid #fee2e2;
    color: #7f1d1d;
    font-size: 0.9rem;
}
.footer p {
    margin-bottom: 6px;
}
.footer p:last-child {
    margin-bottom: 0;
    color: #991b1b;
}
/* 加载动画 */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
/* 高级功能区块样式 */
.feature-category {
    margin-bottom: 30px;
}
.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}
.feature-card {
    background: #fff;
    border: 2px solid #fee2e2;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.05);
}
.feature-card:hover {
    border-color: #dc3545;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
    transform: translateY(-2px);
}
.feature-card:active {
    transform: translateY(0);
}
.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}
.feature-title {
    color: #b91c1c;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}
.feature-desc {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
}
.advanced-result {
    margin-top: 30px;
    background: #fff;
    border: 2px solid #dc3545;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #fee2e2;
}
.result-title {
    color: #dc3545;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}
.result-close {
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
}
.result-close:hover {
    background: #b91c1c;
    transform: scale(1.1);
}
.result-content {
    color: #374151;
    line-height: 1.8;
}
.result-content p {
    margin-bottom: 15px;
    text-align: justify;
}
.result-content ul, .result-content ol {
    margin: 15px 0;
    padding-left: 25px;
}
.result-content li {
    margin-bottom: 8px;
}
.chart-container {
    margin: 20px 0;
    position: relative;
    height: 300px;
}
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #fee2e2;
    border-top-color: #dc3545;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
/* 加载模态框样式 */
.loading-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.loading-modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 50px 60px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    min-width: 320px;
    max-width: 400px;
    border: 3px solid #dc3545;
}
.loading-modal-content .loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #fee2e2;
    border-top-color: #dc3545;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
}
.loading-text {
    margin-top: 0;
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}
.loading-subtext {
    color: #666;
    font-size: 0.95rem;
    margin-top: 8px;
}
@media (max-width: 768px) {
    .feature-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .feature-card {
        padding: 15px;
    }
    .feature-icon {
        font-size: 2rem;
    }
    .feature-title {
        font-size: 0.9rem;
    }
    .feature-desc {
        font-size: 0.8rem;
    }
}
/* 移动端专项优化 - 底部固定2×3网格导航（红色系协调） */
@media (max-width: 768px) {
    body {
        padding: 10px;
        padding-right: 10px;
        padding-bottom: 0;
        line-height: 1.55;
    }
    /* 移动端底部导航红色系配色 */
    .navbar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        transform: none;
        width: 100%;
        box-shadow: 0 -2px 12px rgba(153, 27, 27, 0.2); /* 红色系底部阴影 */
        padding: 0;
        background-color: #991b1b; /* 与桌面端一致的深暗红 */
        height: auto;
        min-height: 0;
    }
    .navbar ul {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 0;
        height: auto;
        min-height: 0;
        padding: 0;
        margin: 0;
    }
    /* 移动端隐藏其他导航项 */
    .navbar li.nav-item-mobile-hidden {
        display: none;
    }
    /* 移动端只显示高级功能 */
    .navbar li.nav-item-mobile-only {
        flex: none;
        min-width: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
    }
    .navbar li {
        flex: none;
        min-width: auto;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .navbar li:not(:last-child)::after {
        display: none;
    }
    .navbar a {
        padding: 12px 20px;
        font-size: 0.9rem;
        border-radius: 0;
        border-bottom: none;
        width: 100%;
        height: auto;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fef3f4; /* 浅粉色文字保持一致 */
    }
    .navbar a:hover {
        transform: none;
        background-color: #b91c1c; /* 中红hover背景 */
    }
    .navbar a.active {
        box-shadow: inset 0 2px 6px rgba(127, 29, 29, 0.3);
        background-color: #dc3545; /* 亮红激活色（与强调色统一） */
    }
    /* 移动端容器样式调整 */
    .container {
        padding: 15px 10px;
        margin-top: 0;
        border-radius: 8px;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    }
    .header {
        margin-bottom: 20px;
        padding-bottom: 12px;
    }
    .header h1 {
        font-size: 1.6rem;
    }
    .header p {
        font-size: 0.95rem;
    }
    .section {
        margin-bottom: 20px;
    }
    .section-title {
        font-size: 1.3rem;
        margin-bottom: 12px;
        padding-left: 10px;
    }
    .detail-content {
        padding: 15px;
        margin-bottom: 15px;
    }
    .info-row {
        flex-direction: column;
        margin-bottom: 10px;
        padding: 8px 0;
        align-items: flex-start;
    }
    .info-label {
        margin-bottom: 3px;
        color: #dc3545;
        font-size: 0.98rem;
        min-width: auto;
        width: 100%;
    }
    .info-value {
        padding-left: 0;
        width: 100%;
        font-size: 0.98rem;
        line-height: 1.5;
    }
    .info-value.highlight {
        font-size: 1.02rem;
        padding: 2px 0;
        display: inline-block;
    }
    .sub-title {
        font-size: 1.1rem;
        margin: 18px 0 8px;
    }
    .text-block p {
        font-size: 0.98rem;
        line-height: 1.6;
        margin-bottom: 8px;
        padding: 0 2px;
    }
    /* 移动端点击反馈（红色系） */
    .navbar a, .section-title a {
        -webkit-tap-highlight-color: rgba(220, 53, 69, 0.3);
    }
    .info-value:contains("|") {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    .footer {
        margin-top: 25px;
        padding: 15px 10px 65px; /* 移动端保留65px底部间距（单行导航） */
        font-size: 0.85rem;
    }
}
/* 小屏手机专项优化 */
@media (max-width: 375px) {
    .navbar a {
        font-size: 0.85rem;
        padding: 10px 15px;
        min-height: 45px;
    }
    .navbar ul {
        gap: 0;
        height: auto;
    }
    .container {
        padding: 12px 8px;
    }
    .header h1 {
        font-size: 1.45rem;
    }
    .section-title {
        font-size: 1.2rem;
    }
    .info-label, .info-value {
        font-size: 0.95rem;
    }
    .text-block p {
        font-size: 0.95rem;
    }
    .footer {
        padding-bottom: 60px; /* 小屏手机保留60px底部间距（单行导航） */
    }
    /* 移动端加载模态框优化 */
    .loading-modal-content {
        padding: 40px 30px;
        min-width: 280px;
        max-width: 90%;
    }
    .loading-modal-content .loading-spinner {
        width: 50px;
        height: 50px;
        border-width: 4px;
    }
    .loading-text {
        font-size: 1.1rem;
    }
    .loading-subtext {
        font-size: 0.9rem;
    }
    /* 移动端回到顶部按钮 */
    .back-to-top {
        bottom: 70px;
        right: 15px;
        width: 45px;
        height: 45px;
    }
    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #dc3545;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
    z-index: 998;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
}
.back-to-top.show {
    display: flex;
    opacity: 1;
    transform: scale(1);
}
.back-to-top:hover {
    background-color: #b91c1c;
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.6);
    transform: scale(1.1);
}
.back-to-top:active {
    transform: scale(0.95);
}
.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* 性格分析使用与八字测算详情报告相同的样式类，无需额外样式 */
