/* 基础样式和重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #F3EDE0;   
    --text-color: #7F6346;
    --border-color:#FCFAF0;
}

/* 禁用浏览器强制字体缩放 */
html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: white; 
    max-width: 750px;
    margin: 0 auto;
    position: relative;
    min-height: 100vh;
    padding-bottom: 60px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* 响应式容器 */
.container {
    width: 100%;
    padding: 0 15px;
    margin: 0 auto;
}

/* 头部横幅样式 */
.header-banner {
    background: url('../images/header-bg.jpg') no-repeat center center;
    background-size: cover;
    color: var(--text-color);
    padding: 30px 20px;
    text-align: center;
    position: relative;
    margin: -15px -15px 25px -15px;
    height: 200px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.header-content {
    margin-bottom: 0;
}

.header-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--text-color);
}

.header-subtitle {
    font-size: 16px;
    opacity: 0.9;
    line-height: 1.4;
    color: var(--text-color);
}

.header-icon {
    position: absolute;
    top: 20px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* 图标位置 */
.share-icon {
    right: 60px;
}

.feedback-icon {
    right: 20px; /* 距离右侧20px */
}

/* 搜索区域 */
.search-section {
    background: transparent;
    padding: 15px 0;
    margin: 10px 0;
    border-radius: 0;
    box-shadow: none;
}

.search-box {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-direction: row; /* 确保水平排列 */
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #E7D7BD;;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

/* 输入框获得焦点时的样式 */
.search-input:focus {
    border-color: #729866;  /* 点击输入时边框变为绿色 */
}

/* 分类标签 */
.tabs {
    display: flex;
    gap: 15px;
    margin: 20px 0 25px 0;
    overflow-x: visible;
    padding: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.tab {
    padding: 8px 80px;
    border: 2px solid transparent;
    border-radius: 40px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: white;
}

/* 为每个标签设置不同的背景色 */
.tab[data-category="all"] {
    background: #729866;
}

.tab[data-category="fun"] {
    background: #D4BA89;
}

.tab[data-category="standard"] {
    background: #FCFAF0;
    color: #7F6346;  /* 专业标签文字颜色深一些，因为背景较浅 */
}

/* 选中效果 - 同色系深色边框 */
.tab.active {
    border: 2px solid;
    transform: scale(1.02);
}

.tab[data-category="all"].active {
    border-color: #5D7A5B;  /* #87A385 的深色版本 */
}

.tab[data-category="fun"].active {
    border-color: #B89E6F;  /* #D4BA89 的深色版本 */
}

.tab[data-category="standard"].active {
    border-color: #C9B49A;  /* #FCFAF0 的深色版本 */
}

/* 移动端适配 */
@media (max-width: 480px) {
    .tab {
        padding: 8px 32px;  /* 移动端稍小一点 */
        font-size: 14px;
    }
}

/* 测试卡片 */
.section-title {
    font-size: 18px;
    font-weight: bold;
    margin: 20px 0 15px 0;
}

.featured-tests {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.featured-tests .test-card .test-btn {
    display: none;
}

.featured-tests .test-card .test-content {
    padding-bottom: 15px;
    background: none !important;  /* 强制透明 */
}

.test-card {
    background: transparent;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.test-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.test-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.test-content {
    padding: 10px;
    /* background: rgba(249, 246, 232, 0.5); */
}

.test-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
}

.test-btn {
    width: 70px;           /* 固定宽度，更像椭圆 */
    padding: 6px 0;        /* 调整内边距 */
    background: #729866;   /* 绿色背景 */
    color: white;
    border: none;
    border-radius: 30px;   /* 大圆角形成椭圆 */
    font-size: 13px;       /* 稍微增大字体 */
    font-weight: 500;      /* 中等字重 */
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;  /* 改为行内块级元素 */
    text-align: center;
    margin: 0 auto;        /* 居中显示 */
    letter-spacing: 0.5px; /* 轻微字间距 */
    box-shadow: 0 2px 6px rgba(114, 152, 102, 0.3); /* 添加轻微阴影 */
}

.test-btn:hover {
    background: #5f8263;   /* 悬停时稍微加深 */
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(114, 152, 102, 0.4);
}

/* 测试列表项新样式 */
.test-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 80px;
}

.test-list-item {
    display: flex;
    align-items: center;
    background: #F9F5E9;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    gap: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.test-thumb {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.test-info {
    flex: 1;
}

.test-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 4px;
    color: #7F6346;
}

.test-desc {
    font-size: 13px;
    color: #7F6346;
    line-height: 1.4;
}

/* 小按钮 - 用于测试列表项 */
.small-btn {
    background: #729866;    /* 绿色背景 */
    color: white;
    border: none;
    padding: 6px 18px;      /* 调整内边距 */
    border-radius: 30px;     /* 椭圆形状 */
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(114, 152, 102, 0.3);
}

.small-btn:hover {
    background: #5f8263;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(114, 152, 102, 0.4);
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    max-width: 750px;
    margin: 0 auto;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    border-top: 1px solid rgba(127, 99, 70, 0.1);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    color: #7F6346;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 10px;
}

.nav-item.active {
    color: #729866;  /* 选中状态文字颜色改为绿色 */
    background: rgba(114, 152, 102, 0.15);  /* 浅绿色半透明背景 */
}


/* 底部导航图标样式 */
.nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    z-index: 2000;
    display: none;
}

.toast.show {
    display: block;
    animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    20%, 80% { opacity: 1; }
}

/* 进度条 */
.progress-bar {
    background: #e0e0e0;
    height: 4px;
    border-radius: 2px;
    margin: 15px 0;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

/* 答题选项 */
.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option {
    padding: 15px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option.selected {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
}

/* 壁纸网格 */
.wallpaper-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 60px;
}

.wallpaper-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wallpaper-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.wallpaper-item:hover .wallpaper-img {
    transform: scale(1.05);
}

/* 全屏预览 */
.preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 3000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.preview-overlay.show {
    display: flex;
}

.preview-image {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
}

.download-btn {
    position: fixed;
    bottom: 30px;
    background: #729866;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
}

/* 分类标签位置调整 */
.tabs-section {
    margin: 15px 0 20px 0;
}

/* 发现页标签样式调整 */
.zodiac-tabs-section {
    background: none; /* 移除背景 */
    padding: 10px 0; /* 减少内边距 */
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); /* 更轻的阴影 */
}

.zodiac-tabs {
    display: flex;
    gap: 6px;
    padding: 0 15px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    background: none; /* 确保没有背景 */
}

.zodiac-tabs .tab {
    flex-shrink: 0;
    padding: 6px 12px; /* 更小的内边距 */
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px; /* 更小的字体 */
}

.zodiac-tabs .tab.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: var(--primary-color);
}

/* 反馈页面样式 */
.feedback-section {
    background: white;
    margin: 15px 0;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.feedback-header {
    background: #F9F5E9;
    color: #7F6346;
    padding: 25px 20px;
    text-align: center;
}

.feedback-header h1 {
    margin: 0 0 10px 0;
    font-size: 24px;
}

.feedback-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.feedback-form {
    padding: 20px;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
    font-size: 16px;
}

.required {
    color: #ff4757;
}

.form-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.form-textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.char-count {
    text-align: right;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.form-actions {
    margin-top: 30px;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: #D4BA89;
    color: #7F6346;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.submit-btn:hover:not(:disabled) {
    opacity: 0.9;
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 防止页面闪烁 */
.test-cover,
.basic-info-section,
.test-description,
.theory-section,
.requirements-section,
.report-example-section,
.action-section {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.content-loaded .test-cover,
.content-loaded .basic-info-section, 
.content-loaded .test-description,
.content-loaded .theory-section,
.content-loaded .requirements-section,
.content-loaded .report-example-section,
.content-loaded .action-section {
    opacity: 1;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .featured-tests {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .search-box {
        flex-direction: row;
    }
    
    .test-title {
        font-size: 12px;
    }
    
    .tab {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .header-banner {
        height: 180px; /* 🔧 移动端稍矮 */
        min-height: 180px;
        padding: 25px 15px;
    }
    
    .header-title {
        font-size: 28px;
        margin-bottom: 6px;
    }

    .header-subtitle {
        font-size: 14px; 
    }

    .header-icon {
        top: 15px;
        width: 28px;  /* 移动端稍小 */
        height: 28px;
        padding: 5px;
    }
    
    .header-icon img {
        width: 18px;
        height: 18px;
    }
    
    .share-icon {
        right: 50px; /* 移动端间距调整 */
    }
    
    .feedback-icon {
        right: 15px;
    }    
}

@media (max-width: 375px) {
    .header-icon {
        width: 26px;
        height: 26px;
        padding: 4px;
    }
    
    .header-icon img {
        width: 16px;
        height: 16px;
    }
    
    .share-icon {
        right: 48px;
    }
    
    .feedback-icon {
        right: 12px;
    }
}

@media (min-width: 768px) {
    .featured-tests {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 滚动条样式 */
.tabs::-webkit-scrollbar {
    height: 4px;
}

.tabs::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.tabs::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

/* 全局页脚 */
.global-footer {
    text-align: center;
    padding: 20px;
    color: #7F6346;
    font-size: 12px;
    line-height: 1.6;
    padding-bottom: 45px;
    margin-bottom: 0;
}

/* 容器底部留白调整 */
.container {
    width: 100%;
    padding: 0 15px;
    margin: 0 auto;
    min-height: 100vh;  /* 确保容器至少占满整个视口高度 */
    position: relative;
    padding-bottom: 0;  /* 移除可能的内边距 */
}

/* 移动端适配 - 在文件末尾的媒体查询中添加 */
@media (max-width: 480px) {
    .global-footer {
        padding: 20px 15px 25px;  /* 移动端稍微减小底部内边距 */
        margin-bottom: 65px;  /* 移动端稍微减小外边距 */
        font-size: 11px;  /* 移动端字体稍微小一点 */
    }
}

@media (max-width: 375px) {
    .global-footer {
        padding: 15px 10px 20px;
        margin-bottom: 60px;
    }
}

/* SCL-90 专用样式 - 专业心理健康测试 */
.scl90-factor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.scl90-factor-card {
    background: white;
    border: 2px solid #e8f4fd;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.scl90-factor-card.high-risk {
    border-color: #ff4757;
    background: #fff5f5;
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.1);
}

.scl90-factor-card.medium-risk {
    border-color: #ffa502;
    background: #fff9e6;
    box-shadow: 0 4px 12px rgba(255, 165, 2, 0.1);
}

.scl90-factor-card.low-risk {
    border-color: #2ed573;
    background: #f1fff7;
    box-shadow: 0 4px 12px rgba(46, 213, 115, 0.1);
}

.scl90-factor-name {
    font-weight: bold;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
}

.scl90-factor-score {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
}

.scl90-factor-score.high {
    color: #ff4757;
}

.scl90-factor-score.medium {
    color: #ffa502;
}

.scl90-factor-score.low {
    color: #2ed573;
}

.scl90-factor-desc {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

/* 临床评估指示器 */
.clinical-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    margin: 10px 0;
    border-left: 4px solid #667eea;
}

.clinical-level {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 8px;
}

.clinical-level.critical {
    background: #ff4757;
    color: white;
}

.clinical-level.warning {
    background: #ffa502;
    color: white;
}

.clinical-level.attention {
    background: #ffd32a;
    color: #333;
}

.clinical-level.normal {
    background: #2ed573;
    color: white;
}

/* 症状严重程度指示条 */
.symptom-severity {
    margin: 15px 0;
}

.severity-scale {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 11px;
    color: #666;
}

.severity-bar {
    height: 8px;
    background: linear-gradient(90deg, #2ed573, #ffd32a, #ffa502, #ff4757);
    border-radius: 4px;
    position: relative;
    margin-bottom: 5px;
}

.severity-marker {
    position: absolute;
    top: -2px;
    width: 12px;
    height: 12px;
    background: #333;
    border-radius: 50%;
    transform: translateX(-50%);
}

/* 因子对比图表 */
.factor-comparison {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.comparison-bar {
    display: flex;
    align-items: center;
    margin: 12px 0;
}

.comparison-label {
    width: 120px;
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

.comparison-track {
    flex: 1;
    height: 20px;
    background: #f1f2f6;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.comparison-value {
    height: 100%;
    border-radius: 10px;
    transition: width 0.8s ease;
}

.comparison-score {
    width: 40px;
    text-align: right;
    font-size: 13px;
    font-weight: bold;
    margin-left: 10px;
}

/* 专业建议卡片 */
.professional-advice {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.advice-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.advice-title:before {
    content: "💡";
    margin-right: 8px;
}

.advice-list {
    list-style: none;
    padding: 0;
}

.advice-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    position: relative;
    padding-left: 20px;
}

.advice-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #ffd32a;
}

.advice-list li:last-child {
    border-bottom: none;
}

/* 人格维度分析样式 */
.dimensions-detail {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dimension-card {
    background: white;
    padding: 18px;
    border-radius: 12px;
    border-left: none !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.dimension-card.high {
    background: white !important;
    border-left: none !important;
}

.dimension-card.medium-high {
    background: white !important;
    border-left: none !important;
}

.dimension-card.medium {
    background: white !important;
    border-left: none !important;
}

.dimension-card.low {
    background: white !important;
    border-left: none !important;
}

.dimension-card.very-low {
    background: white !important;
    border-left: none !important;
}

.dimension-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.dimension-title h4 {
    margin: 0 0 4px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.dimension-desc {
    color: #666;
    font-size: 13px;
}

.dimension-score-display {
    text-align: right;
    flex-shrink: 0;
}

.score {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    display: block;
}

.score small {
    font-size: 12px;
    color: #999;
    font-weight: normal;
}

.level-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    margin-top: 4px;
    text-align: center;
    min-width: 35px;
    background: transparent !important;
    color: #666;
    border: 1px solid #e0e0e0;
}

.level-badge.high {
    color: #ff4757 !important;
    border-color: #ff4757;
}

.level-badge.medium-high {
    color: #ffa502 !important;
    border-color: #ffa502;
}

.level-badge.medium {
    color: #ffd32a !important;
    border-color: #ffd32a;
}

.level-badge.low {
    color: #2ed573 !important;
    border-color: #2ed573;
}

.level-badge.very-low {
    color: #a4b0be !important;
    border-color: #a4b0be;
}

.dimension-analysis {
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
    border-left: 0;
    margin-top: 10px;
}

/* 精神需求测试专用样式 */
.dimensions-legend {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.legend-name {
    flex: 1;
    color: #333;
}

.legend-score {
    font-weight: bold;
    color: #667eea;
}

.top-dimensions-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dimension-card {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.dimension-rank {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.dimension-info {
    flex: 1;
}

.dimension-info h4 {
    margin: 0 0 5px 0;
    color: #333;
}

.dimension-score {
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 8px;
}

.dimension-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

.dimension-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.dimension-detail h4 {
    margin-bottom: 8px;
    font-size: 16px;
}

.dimension-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.strength-bar {
    flex: 1;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1s ease;
}

.improvement-areas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.improvement-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.improvement-item h4 {
    margin-bottom: 10px;
}

.suggestions {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

.suggestions li {
    padding: 5px 0;
    position: relative;
    padding-left: 15px;
    font-size: 14px;
    color: #666;
}

.suggestions li:before {
    content: "•";
    color: #667eea;
    position: absolute;
    left: 0;
}

/* 动物人格测试专用样式优化 */
.animal-score-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8E8E93, #AEAEB2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    margin: 0 auto 10px;
    border: 3px solid #F0F0F0;
    box-shadow: 0 4px 15px rgba(142, 142, 147, 0.3);
}

/* 精神需求测试专用样式优化 */
.spiritual-header-compact {
    height: 160px !important;
    min-height: 160px !important;
    padding: 25px 15px !important;
}

/* 统一的头部高度调整 */
.result-header {
    transition: all 0.3s ease;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .scl90-factor-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .scl90-factor-card {
        padding: 12px;
    }
    
    .clinical-indicator {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .comparison-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .comparison-label {
        width: 100%;
    }
    
    .comparison-track {
        width: 100%;
    }

    .dimension-header {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .dimension-score-display {
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    .dimension-card {
        padding: 15px;
    }

    .score {
        font-size: 18px;
    }
    
    .progress-labels {
        font-size: 10px;
    }

    .dimensions-legend {
        grid-template-columns: 1fr;
    }
    
    .improvement-areas {
        grid-template-columns: 1fr;
    }
    
    .dimension-card {
        flex-direction: column;
        text-align: center;
    }

    .animal-score-circle {
        width: 80px;
        height: 80px;
        font-size: 24px;
    }
    
    .spiritual-header-compact {
        height: 140px !important;
        min-height: 140px !important;
        padding: 20px 15px !important;
    }
}

@media (max-width: 375px) {
    .dimension-header {
        flex-direction: column;
    }
    
    .dimension-score-display {
        width: 100%;
        justify-content: space-between;
    }
    
    .dimension-title, .dimension-score-display {
        width: 100%;
    }
}

/* 打印优化 */
@media print {
    .scl90-factor-card {
        break-inside: avoid;
        border: 1px solid #ccc !important;
        background: white !important;
        box-shadow: none !important;
    }
    
    .professional-advice {
        background: #f8f9fa !important;
        color: #333 !important;
        border: 1px solid #667eea;
    }
}

/* 推荐测试缩略图样式优化 */
.recommendations .test-thumb {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f0f0; /* 备用背景色 */
    position: relative;
}

.recommendations .test-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recommendations .test-list-item:hover .test-thumb img {
    transform: scale(1.05);
}

/* 推荐测试描述样式优化 */
.recommendations .test-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 无推荐时的样式 */
.no-recommendations {
    text-align: center;
    color: #666;
    padding: 20px;
    font-size: 14px;
}

/* === 心灵气象图测评专用样式 === */

/* 横向柱状图样式 - 用于维度分析 */
.horizontal-bars-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.bar-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bar-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.bar-label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    flex-shrink: 0;
}

.bar-score {
    font-weight: bold;
    color: #333;
    font-size: 14px;
    flex-shrink: 0;
}

.bar-track {
    width: 100%;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 维度项目样式 */
.dimension-bar-item {
    margin-bottom: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.dimension-bar-item:last-child {
    margin-bottom: 0;
}

/* 心灵气象图头部优化 */
.weather-result-header {
    background: linear-gradient(135deg, #00B894, #00CEC9) !important;
    padding: 25px 20px !important;
    height: 160px !important;
    min-height: 160px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.weather-result-header .result-content {
    text-align: center;
}

.weather-result-header .result-text {
    font-size: 26px !important;
    margin: 8px 0;
}

.weather-result-header .score-label {
    font-size: 14px;
    opacity: 0.9;
}

/* 城市解读卡片样式 */
.city-interpretation {
    background: white;
    padding: 20px;
    margin: 15px 0;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.city-interpretation h3 {
    color: #333;
    margin-bottom: 15px;
    border-left: 4px solid #00B894;
    padding-left: 10px;
    font-size: 18px;
}

/* 情绪特质标签 */
.emotion-tag {
    display: inline-block;
    padding: 4px 8px;
    background: rgba(0, 184, 148, 0.1);
    color: #00B894;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 8px;
}

/* 气候标签样式 */
.climate-tag {
    display: inline-block;
    padding: 4px 8px;
    background: rgba(0, 206, 201, 0.1);
    color: #00CEC9;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    margin: 0 4px;
}

/* 核心气质标识 */
.core-temperament {
    display: inline-block;
    padding: 4px 8px;
    background: linear-gradient(135deg, #00B894, #00CEC9);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    margin: 0 4px;
}

/* 旅行建议特殊样式 */
.weather-advice {
    background: linear-gradient(135deg, #00B894, #00CEC9) !important;
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.weather-advice .advice-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.weather-advice .advice-title:before {
    content: "✈️";
    margin-right: 8px;
}

.weather-advice .advice-list {
    list-style: none;
    padding: 0;
}

.weather-advice .advice-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    position: relative;
    padding-left: 20px;
}

.weather-advice .advice-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #ffd32a;
}

.weather-advice .advice-list li:last-child {
    border-bottom: none;
}

/* 城市特色图标 */
.city-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
    padding: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
}

.city-feature-icon {
    font-size: 16px;
}

.city-feature-text {
    font-size: 14px;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .weather-result-header {
        height: 140px !important;
        min-height: 140px !important;
        padding: 20px 15px !important;
    }
    
    .weather-result-header .result-text {
        font-size: 22px !important;
    }
    
    .bar-info {
        flex-direction: row;
    }
    
    .bar-label {
        font-size: 13px;
    }
    
    .bar-score {
        font-size: 13px;
    }
    
    .bar-track {
        height: 16px;
    }
    
    .city-interpretation {
        padding: 15px;
    }
    
    .city-interpretation h3 {
        font-size: 16px;
    }
}

@media (max-width: 375px) {
    .bar-info {
        flex-direction: row;
        align-items: center;
    }
    
    .bar-label {
        width: auto;
        margin-right: 10px;
    }
    
    .weather-result-header .result-text {
        font-size: 20px !important;
    }
}

/* 心灵气象图动画效果 */
@keyframes weatherFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.weather-result-header,
.city-interpretation,
.weather-advice {
    animation: weatherFadeIn 0.6s ease;
}

/* 进度条颜色匹配 */
.weather-progress .progress {
    background: linear-gradient(90deg, #00B894, #00CEC9) !important;
}

/* 按钮样式匹配 */
.weather-btn {
    background: linear-gradient(135deg, #00B894, #00CEC9) !important;
    color: white !important;
    border: none !important;
}

.weather-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
}

/* 标签云样式 - 用于显示城市特色 */
.weather-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.weather-tag {
    padding: 6px 12px;
    background: rgba(0, 184, 148, 0.1);
    color: #00B894;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

/* 城市对比样式 */
.city-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.city-card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.city-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.city-card.current {
    border: 2px solid #00B894;
}

.city-emoji {
    font-size: 24px;
    margin-bottom: 8px;
}

.city-name {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.city-match {
    font-size: 12px;
    color: #00B894;
    font-weight: bold;
}

/* === 异世界职业测评优化样式 === */

/* 口号样式 */
.slogan-content {
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.05), rgba(0, 206, 201, 0.05));
    border-radius: 10px;
    margin: 10px 0;
}

/* 特质标签样式 */
.traits-container {
    margin: 15px 0;
}

.trait-tag {
    transition: all 0.3s ease;
}

.trait-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.2);
}

/* 异世界剧本特殊样式 */
.analysis-content p {
    text-indent: 2em;
}

/* 主导维度标识 */
.dominant-indicator {
    color: #00B894;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* 响应式调整 */
@media (max-width: 480px) {
    .slogan-text {
        font-size: 16px !important;
    }
    
    .traits-container {
        justify-content: center;
    }
}

/* 关系舒适区专用样式 */
.character-display {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.character-avatar {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00B894, #00CEC9);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.character-info h4 {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: #333;
}

.character-desc {
    margin: 0;
    line-height: 1.6;
    color: #666;
    font-size: 15px;
    text-align: left;
}

/* 沟通偏好网格 */
.preference-grid {
    display: grid;
    gap: 12px;
}

.preference-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.pref-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
    margin-top: 2px; /* 微调图标垂直位置 */
}

.pref-content h5 {
    margin: 0 0 6px 0;
    font-size: 15px;
    color: #333;
    display: inline; /* 改为行内元素，与图标同行 */
    vertical-align: middle; /* 垂直居中 */
}

.pref-content p {
    margin: 4px 0 0 0; /* 减少上边距 */
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* 关系舒适区测试移动端优化 */
.preference-grid-mobile {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preference-item-mobile {
    background: white;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-left: 4px solid #00B894;
}

.pref-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.pref-header h5 {
    margin: 0;
    font-size: 15px;
    color: #333;
}

.preference-item-mobile p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* 移除原有样式中的图片相关部分 */
.character-display-simple {
    display: block;
}

.character-avatar-simple {
    display: none;
}

/* 兼容性列表 */
.compatibility-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.compat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

.compat-item.ideal {
    background: rgba(0, 184, 148, 0.05);
    border-color: rgba(0, 184, 148, 0.2);
}

.compat-item.good {
    background: rgba(255, 193, 7, 0.05);
    border-color: rgba(255, 193, 7, 0.2);
}

.compat-item.challenge {
    background: rgba(108, 117, 125, 0.05);
    border-color: rgba(108, 117, 125, 0.2);
}

.compat-avatar {
    font-size: 24px;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}

.compat-info {
    flex: 1;
}

.compat-info h5 {
    margin: 0 0 4px 0;
    font-size: 16px;
    color: #333;
}

.compat-rating {
    font-size: 14px;
    color: #ffc107;
    margin-bottom: 4px;
}

.compat-desc {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* 成长建议 */
.advice-content {
    background: rgba(0, 184, 148, 0.05);
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #00B894;
}

.advice-content p {
    margin: 0;
    line-height: 1.6;
    color: #333;
    font-size: 15px;
}

/* 区块头部 */
.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.section-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.section-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

/* 移动端适配 */
@media (max-width: 480px) {
    .character-display {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .character-avatar {
        align-self: center;
    }
    
    .preference-item {
        padding: 12px;
        flex-direction: row; /* 确保在480px下仍然是行布局 */
        align-items: flex-start;
    }
    
    .preference-item-mobile {
        padding: 12px;
    }
    
    .compat-item {
        padding: 12px;
    }
    
    .section-header {
        gap: 10px;
        margin-bottom: 16px;
    }
    
    .section-header h3 {
        font-size: 17px;
    }
    
    .pref-header {
        gap: 8px;
    }
    
    .pref-header h5 {
        font-size: 14px;
    }
    
    .preference-item-mobile p {
        font-size: 13px;
    }

    /* 新增：确保图标和标题在同一行 */
    .pref-content h5 {
        display: inline;
        vertical-align: middle;
        margin-bottom: 4px; /* 减少下边距 */
    }
    
    .pref-content p {
        font-size: 13px;
        margin-top: 4px;
    }
}

@media (max-width: 375px) {
    .character-avatar {
        width: 50px;
        height: 50px;
        font-size: 28px;
    }
    
    .preference-item {
        flex-direction: row; /* 改为行布局，不要列布局 */
        text-align: left; /* 改为左对齐 */
        gap: 10px;
        padding: 10px;
        align-items: flex-start; /* 顶部对齐 */
    }
    
    .pref-icon {
        align-self: flex-start; /* 图标顶部对齐 */
        margin-top: 2px;
        flex-shrink: 0;
    }
    
    .preference-grid-mobile {
        gap: 10px;
    }
    
    .preference-item-mobile {
        padding: 10px;
    }

    .pref-content h5 {
        font-size: 14px;
        display: inline;
        vertical-align: middle;
    }
    
    .pref-content p {
        font-size: 12px;
        line-height: 1.4;
    }
}

/* === 突出显示样式 === */
.highlight-text {
    color: #729866;
    font-weight: bold;
    background: rgba(114, 152, 102, 0.15);
    padding: 2px 4px;
    border-radius: 4px;
    margin: 0 1px;
}

/* === 桌面端统一居中样式 === */
@media (min-width: 769px) {
    body {
        display: block;
        justify-content: initial;
        align-items: initial;
        background: white;
        padding: 0;
        max-width: none !important;
        margin: 0 !important;
        min-height: 100vh;
        height: 100vh;
        overflow-y: auto;
    }
    
    .container {
        max-width: 750px;
        width: 100%;
        min-height: 100vh;  /* 最小高度占满视口 */
        height: auto;
        max-height: none;
        border-radius: 0;
        overflow: visible;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        background: transparent;
        margin: 0 auto;
        padding: 0 15px;  /* 保留左右内边距用于内容 */
    }

    .bottom-nav {
        max-width: 750px;
        width: 100%;  /* 改为100%跟随容器宽度 */
        border-radius: 0;
        position: fixed;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);  /* 水平居中 */
        background: white;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        border-top: 1px solid rgba(127, 99, 70, 0.1);
        margin: 0;
    }
}

/* 确保移动端正常 */
@media (max-width: 768px) {
    body {
        display: block;
        padding: 0;
        margin: 0;
        min-height: 100vh;
        height: 100vh;
        overflow-y: auto;
    }
    
    .container {
        max-width: 100%;
        width: 100%;
        min-height: 100vh;
        height: auto;
        border-radius: 0;
        box-shadow: none;
        overflow: visible;
        padding: 0 15px;  /* 只保留左右内边距 */
        margin: 0;
    }

    .bottom-nav {
        border-radius: 0;  /* 移动端也移除圆角 */
        width: 100%;
        left: 0;
        transform: none;  /* 移动端不需要居中变换 */
    }
}
