/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%; /* 防止iOS Safari调整字体大小 */
}

:root {
    --primary-color: #4a4a9c;
    --secondary-color: #6a6ac9;
    --accent-color: #FF6B6B;
    --text-primary: #333;
    --text-secondary: #666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-radius: 15px;
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

html {
    font-size: 16px; /* 设置基准字体大小 */
    overflow-x: hidden; /* 防止水平滚动 */
}

body {
    font-family: 'Poppins', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 15px;
    overflow-x: hidden; /* 防止水平滚动 */
    word-wrap: break-word; /* 长单词自动换行 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    width: 100%; /* 确保容器宽度为100% */
}

/* 首页样式 */
.home-page {
    padding: 25px 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: clamp(1.8rem, 5vw, 3rem); /* 响应式字体大小 */
    color: var(--primary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap; /* 允许换行 */
    gap: 10px;
}

.header .subtitle {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: var(--text-secondary);
    font-weight: 300;
    margin-top: 5px;
}

.intro-section {
    margin-bottom: 40px;
}

.intro-card {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 25px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    text-align: center;
    overflow: hidden; /* 防止内容溢出 */
}

.intro-icon {
    font-size: clamp(2rem, 8vw, 3rem);
    margin-bottom: 15px;
}

.intro-card h2 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    margin-bottom: 12px;
}

.intro-card p {
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    opacity: 0.9;
    max-width: 100%;
    margin: 0 auto;
    line-height: 1.5;
}

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

@media (max-width: 768px) {
    .features {
        grid-template-columns: 1fr; /* 移动端单列 */
        gap: 15px;
    }
}

.feature {
    text-align: center;
    padding: 20px 15px;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.feature:hover {
    transform: translateY(-8px);
}

.feature i {
    font-size: clamp(2rem, 6vw, 2.5rem);
    color: var(--primary-color);
    margin-bottom: 12px;
}

.feature h3 {
    font-size: clamp(1.2rem, 3vw, 1.4rem);
    margin-bottom: 8px;
    color: var(--text-primary);
}

.feature p {
    color: var(--text-secondary);
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    line-height: 1.4;
}

.intelligence-types {
    margin-bottom: 40px;
}

.intelligence-types h2 {
    text-align: center;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    color: var(--primary-color);
    margin-bottom: 25px;
    padding: 0 10px;
}

.types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

@media (max-width: 768px) {
    .types-grid {
        grid-template-columns: 1fr; /* 移动端单列 */
        gap: 12px;
    }
}

.type-card {
    padding: 20px 15px;
    border-radius: var(--border-radius);
    color: white;
    transition: var(--transition);
    cursor: pointer;
    word-break: break-word; /* 长单词换行 */
}

.type-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.type-card h3 {
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap; /* 允许图标和文字换行 */
}

.type-card p {
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    opacity: 0.9;
    line-height: 1.4;
}

/* 智能类型颜色 */
.type1 { background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%); }
.type2 { background: linear-gradient(135deg, #4ECDC4 0%, #6CE6DD 100%); }
.type3 { background: linear-gradient(135deg, #FFD166 0%, #FFE194 100%); }
.type4 { background: linear-gradient(135deg, #06D6A0 0%, #4CE4B8 100%); }
.type5 { background: linear-gradient(135deg, #118AB2 0%, #4AB5D6 100%); }
.type6 { background: linear-gradient(135deg, #073B4C 0%, #2A6375 100%); }
.type7 { background: linear-gradient(135deg, #7209B7 0%, #9D4EDD 100%); }
.type8 { background: linear-gradient(135deg, #F72585 0%, #FF5DA9 100%); }

.start-test-section {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--border-radius);
    margin-bottom: 35px;
    position: relative;
    overflow: hidden;
}

.start-test-section .floating-element {
    font-size: clamp(3rem, 10vw, 4rem);
    color: var(--primary-color);
    margin-bottom: 15px;
}

.start-test-section h2 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    color: var(--primary-color);
    margin-bottom: 12px;
    padding: 0 10px;
}

.start-test-section p {
    font-size: clamp(0.95rem, 3vw, 1.1rem);
    color: var(--text-secondary);
    max-width: 100%;
    margin: 0 auto 25px;
    line-height: 1.5;
    padding: 0 10px;
}

.name-input {
    width: 100%;
    max-width: 400px;
    padding: 14px 18px;
    font-size: clamp(1rem, 3vw, 1.1rem);
    border: 2px solid #ddd;
    border-radius: 10px;
    margin-bottom: 20px;
    transition: var(--transition);
    font-family: 'Poppins', 'Noto Sans SC', sans-serif;
}

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

.start-button {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    padding: 16px 35px;
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 300px;
    font-family: 'Poppins', 'Noto Sans SC', sans-serif;
    font-weight: 600;
}

.start-button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(74, 74, 156, 0.3);
}

.footer {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid #eee;
    color: #888;
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    line-height: 1.5;
    padding: 25px 15px 15px;
}

/* 测试页面样式 */
.test-page {
    padding: 20px 15px;
}

.test-header {
    margin-bottom: 25px;
}

.test-title {
    display: flex;
    flex-direction: column; /* 移动端改为垂直排列 */
    align-items: flex-start;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .test-title {
        flex-direction: row; /* 桌面端恢复水平排列 */
        justify-content: space-between;
        align-items: center;
    }
}

.test-title h1 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap; /* 允许图标和文字换行 */
}

.user-info {
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    color: var(--text-secondary);
    background: var(--bg-light);
    padding: 8px 15px;
    border-radius: 10px;
    align-self: flex-start; /* 移动端左对齐 */
}

@media (min-width: 768px) {
    .user-info {
        align-self: center; /* 桌面端居中 */
    }
}

.progress-section {
    background: var(--bg-light);
    padding: 15px;
    border-radius: var(--border-radius);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.progress-bar {
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
    transition: width 0.5s ease;
}

.question-container {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 25px 20px;
    margin-bottom: 25px;
}

.question-header {
    display: flex;
    flex-direction: column; /* 移动端垂直排列 */
    gap: 15px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .question-header {
        flex-direction: row; /* 桌面端水平排列 */
        justify-content: space-between;
        align-items: center;
    }
}

.question-type-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    align-self: flex-start; /* 移动端左对齐 */
    flex-wrap: wrap; /* 允许内容换行 */
}

.question-number {
    font-size: clamp(1rem, 3vw, 1.2rem);
    font-weight: 600;
    color: var(--text-secondary);
    background: white;
    padding: 6px 15px;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    align-self: flex-start; /* 移动端左对齐 */
}

@media (min-width: 768px) {
    .question-number {
        align-self: center; /* 桌面端居中 */
    }
}

.question-text h2 {
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    color: var(--text-primary);
    margin-bottom: 25px;
    line-height: 1.4;
    word-break: break-word; /* 长单词换行 */
}

.answer-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.answer-option {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 18px 15px;
    cursor: pointer;
    transition: var(--transition);
    width: 100%; /* 确保宽度100% */
}

.answer-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
}

.answer-option.selected {
    border-color: var(--primary-color);
    background-color: rgba(74, 74, 156, 0.05);
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(74, 74, 156, 0.1);
}

.answer-option input {
    display: none;
}

.option-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.option-icon {
    font-size: clamp(1.5rem, 4vw, 2rem);
    min-width: 50px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 50%;
    flex-shrink: 0; /* 防止图标被压缩 */
}

.answer-option:nth-child(1) .option-icon { color: #FF6B6B; }
.answer-option:nth-child(2) .option-icon { color: #FF9E6B; }
.answer-option:nth-child(3) .option-icon { color: #FFD166; }
.answer-option:nth-child(4) .option-icon { color: #4ECDC4; }
.answer-option:nth-child(5) .option-icon { color: #06D6A0; }

.option-text {
    flex: 1;
    min-width: 0; /* 防止文本溢出 */
}

.option-label {
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
    word-break: break-word; /* 长单词换行 */
}

.option-value {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    color: var(--text-secondary);
}

.navigation-buttons {
    display: flex;
    flex-direction: column; /* 移动端垂直排列 */
    gap: 15px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .navigation-buttons {
        flex-direction: row; /* 桌面端水平排列 */
        justify-content: space-between;
    }
}

.nav-button {
    padding: 14px 25px;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    border-radius: 10px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    transition: var(--transition);
    width: 100%; /* 移动端全宽按钮 */
    font-family: 'Poppins', 'Noto Sans SC', sans-serif;
}

@media (min-width: 768px) {
    .nav-button {
        width: auto; /* 桌面端自适应宽度 */
    }
}

.prev-button {
    background: var(--bg-light);
    color: var(--text-secondary);
    order: 2; /* 移动端将上一题按钮放在下面 */
}

@media (min-width: 768px) {
    .prev-button {
        order: 1; /* 桌面端恢复顺序 */
    }
}

.prev-button:hover {
    background: #e9ecef;
    transform: translateX(-5px);
}

.next-button {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    order: 1; /* 移动端将下一题按钮放在上面 */
}

@media (min-width: 768px) {
    .next-button {
        order: 2; /* 桌面端恢复顺序 */
    }
}

.next-button:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 15px rgba(74, 74, 156, 0.2);
}

.test-tips {
    background: rgba(255, 214, 102, 0.1);
    border-left: 4px solid #FFD166;
    padding: 15px;
    border-radius: 0 10px 10px 0;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.test-tips i {
    color: #FFD166;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin-top: 3px;
    flex-shrink: 0; /* 防止图标被压缩 */
}

.test-tips p {
    color: var(--text-secondary);
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    line-height: 1.4;
}

.intelligence-indicator {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px 15px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden; /* 防止内容溢出 */
}

.intelligence-indicator h3 {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: var(--primary-color);
    margin-bottom: 15px;
}

.indicators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

@media (max-width: 768px) {
    .indicators-grid {
        grid-template-columns: 1fr; /* 移动端单列 */
    }
}

.indicator-item {
    padding: 12px;
    border-radius: 10px;
    background: var(--bg-light);
    transition: var(--transition);
}

.indicator-item.current {
    background: rgba(74, 74, 156, 0.05);
    border: 2px solid rgba(74, 74, 156, 0.2);
}

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

.indicator-icon {
    min-width: 35px;
    min-height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    flex-shrink: 0; /* 防止图标被压缩 */
}

.indicator-info {
    flex: 1;
    min-width: 0; /* 防止文本溢出 */
}

.indicator-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    word-break: break-word; /* 长单词换行 */
}

.indicator-progress {
    font-size: clamp(0.75rem, 2vw, 0.85rem);
    color: var(--text-secondary);
}

.indicator-bar {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

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

/* 结果页面样式 */
.result-page {
    padding: 20px 15px;
}

.result-header {
    text-align: center;
    margin-bottom: 30px;
}

.result-header h1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--primary-color);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 10px;
}

.user-result-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 25px;
}

@media (max-width: 768px) {
    .user-result-info {
        grid-template-columns: 1fr; /* 移动端单列 */
    }
}

.user-info-card {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 20px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
}

.user-info-card:hover {
    transform: translateY(-5px);
}

.user-info-card i {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    color: var(--primary-color);
    flex-shrink: 0; /* 防止图标被压缩 */
}

.user-info-card h3 {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.user-info-card p {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    font-weight: 600;
    color: var(--text-primary);
}

.result-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin-bottom: 35px;
}

@media (min-width: 992px) {
    .result-main {
        grid-template-columns: 1fr 1fr; /* 桌面端两列 */
    }
}

.radar-chart-section, .top-intelligences {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px 15px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden; /* 防止内容溢出 */
}

.radar-chart-section h2, .top-intelligences h2 {
    font-size: clamp(1.3rem, 3.5vw, 1.8rem);
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap; /* 允许图标和文字换行 */
}

.chart-container {
    height: 300px;
    margin-bottom: 15px;
    position: relative;
    width: 100%;
}

@media (min-width: 768px) {
    .chart-container {
        height: 350px;
    }
}

@media (min-width: 992px) {
    .chart-container {
        height: 400px;
    }
}

.chart-legend {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

@media (max-width: 480px) {
    .chart-legend {
        grid-template-columns: 1fr; /* 超小屏幕单列 */
    }
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--bg-light);
    border-radius: 8px;
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
}

.legend-color {
    min-width: 12px;
    min-height: 12px;
    border-radius: 3px;
    flex-shrink: 0; /* 防止颜色块被压缩 */
}

.legend-score {
    margin-left: auto;
    font-weight: 600;
    color: var(--text-primary);
    flex-shrink: 0; /* 防止分数被压缩 */
}

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

.top-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
    position: relative;
}

.rank-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: white;
    color: var(--text-primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
}

.top-card.rank-1 .rank-badge {
    background: gold;
    color: #333;
}

.top-card.rank-2 .rank-badge {
    background: silver;
    color: #333;
}

.top-card.rank-3 .rank-badge {
    background: #cd7f32;
    color: white;
}

.top-card-header {
    padding: 18px 15px;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-card-header i {
    font-size: clamp(1.5rem, 4vw, 2rem);
    flex-shrink: 0; /* 防止图标被压缩 */
}

.top-card-header h3 {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    word-break: break-word; /* 长单词换行 */
}

.top-card-body {
    padding: 18px 15px;
    background: white;
}

.score-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.score-value {
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    font-weight: 700;
    color: var(--text-primary);
}

.score-percentage {
    font-size: clamp(1.2rem, 3.5vw, 1.5rem);
    font-weight: 600;
    color: var(--primary-color);
}

.score-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    margin-bottom: 12px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1.5s ease;
}

.level-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.level-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
}

.level-value {
    font-weight: 700;
    color: var(--text-primary);
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
}

.type-description {
    color: var(--text-secondary);
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    line-height: 1.4;
}

.detailed-scores {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px 15px;
    margin-bottom: 35px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
    overflow-x: auto; /* 表格水平滚动 */
}

.detailed-scores h2 {
    font-size: clamp(1.3rem, 3.5vw, 1.8rem);
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap; /* 允许图标和文字换行 */
}

/* 桌面端表格样式 */
.scores-table-desktop {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* iOS平滑滚动 */
}

.scores-table-desktop table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px; /* 确保表格最小宽度 */
}

.scores-table-desktop thead {
    background: var(--bg-light);
}

.scores-table-desktop th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid #e9ecef;
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    white-space: nowrap; /* 表头不换行 */
}

.scores-table-desktop tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.3s ease;
}

.scores-table-desktop tbody tr:hover {
    background-color: var(--bg-light);
}

.scores-table-desktop td {
    padding: 12px 10px;
    vertical-align: top;
}

.type-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap; /* 允许内容换行 */
}

.type-color {
    min-width: 12px;
    min-height: 12px;
    border-radius: 3px;
    flex-shrink: 0; /* 防止颜色块被压缩 */
}

.type-cell i {
    color: var(--text-secondary);
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    flex-shrink: 0; /* 防止图标被压缩 */
}

.type-cell span {
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    word-break: break-word; /* 长单词换行 */
}

.score-cell {
    font-weight: 600;
    color: var(--text-primary);
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    white-space: nowrap; /* 分数不换行 */
}

.percentage-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 150px; /* 确保百分比列有足够宽度 */
}

.percentage-bar {
    flex: 1;
    min-width: 80px; /* 进度条最小宽度 */
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.percentage-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1.5s ease;
}

.level-cell .level-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: clamp(0.75rem, 2.2vw, 0.9rem);
    white-space: nowrap; /* 水平标签不换行 */
}

.level-excellent {
    background: rgba(6, 214, 160, 0.1);
    color: #06D6A0;
}

.level-good {
    background: rgba(74, 205, 196, 0.1);
    color: #4ECDC4;
}

.level-average {
    background: rgba(255, 209, 102, 0.1);
    color: #FFD166;
}

.level-basic {
    background: rgba(255, 107, 107, 0.1);
    color: #FF6B6B;
}

.level-developing {
    background: rgba(115, 115, 115, 0.1);
    color: #737373;
}

.description-cell {
    color: var(--text-secondary);
    font-size: clamp(0.8rem, 2.2vw, 0.9rem);
    line-height: 1.4;
    min-width: 200px; /* 确保描述列有足够宽度 */
}

.recommendations-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px 15px;
    margin-bottom: 35px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
}

.recommendations-section h2 {
    font-size: clamp(1.3rem, 3.5vw, 1.8rem);
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap; /* 允许图标和文字换行 */
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

@media (max-width: 768px) {
    .recommendations-grid {
        grid-template-columns: 1fr; /* 移动端单列 */
        gap: 15px;
    }
}

.recommendation-card {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 20px 15px;
    transition: var(--transition);
}

.recommendation-card:hover {
    transform: translateY(-5px);
}

.recommendation-card h3 {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    color: var(--primary-color);
    margin-bottom: 12px;
    word-break: break-word; /* 长单词换行 */
}

.recommendation-card ul {
    list-style: none;
}

.recommendation-card li {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.recommendation-card li i {
    color: #4ECDC4;
    margin-top: 3px;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    flex-shrink: 0; /* 防止图标被压缩 */
}

.recommendation-card li span {
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    line-height: 1.4;
    word-break: break-word; /* 长单词换行 */
}

.result-summary {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px 15px;
    margin-bottom: 35px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
}

.result-summary h2 {
    font-size: clamp(1.3rem, 3.5vw, 1.8rem);
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap; /* 允许图标和文字换行 */
}

.summary-content {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 20px 15px;
}

.summary-content p {
    margin-bottom: 12px;
    color: var(--text-primary);
    line-height: 1.5;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    word-break: break-word; /* 长单词换行 */
}

.summary-content ul {
    margin: 15px 0 15px 20px;
}

.summary-content li {
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    line-height: 1.4;
}

.summary-content strong {
    color: var(--primary-color);
}

.action-buttons {
    display: flex;
    flex-direction: column; /* 移动端垂直排列 */
    gap: 15px;
    margin-bottom: 35px;
    align-items: center;
}

@media (min-width: 768px) {
    .action-buttons {
        flex-direction: row; /* 桌面端水平排列 */
        justify-content: center;
        flex-wrap: wrap; /* 允许按钮换行 */
    }
}

.action-button {
    padding: 14px 25px;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    border-radius: 10px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    transition: var(--transition);
    width: 100%;
    max-width: 300px;
    font-family: 'Poppins', 'Noto Sans SC', sans-serif;
    text-decoration: none;
}

@media (min-width: 768px) {
    .action-button {
        width: auto; /* 桌面端自适应宽度 */
        min-width: 180px;
    }
}

.retest-button {
    background: var(--bg-light);
    color: var(--text-primary);
}

.retest-button:hover {
    background: #e9ecef;
    transform: translateY(-5px);
}

.share-button {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.share-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(74, 74, 156, 0.2);
}

.print-button {
    background: linear-gradient(135deg, #06D6A0 0%, #4CE4B8 100%);
    color: white;
}

.print-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(6, 214, 160, 0.2);
}

.save-button {
    background: linear-gradient(135deg, #FFD166 0%, #FFE194 100%);
    color: #333;
}

.save-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(255, 209, 102, 0.2);
}

.result-footer {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid #eee;
    color: #888;
    font-size: clamp(0.8rem, 2.2vw, 0.9rem);
    line-height: 1.5;
    padding: 25px 15px 15px;
}

.result-footer .copyright {
    margin-top: 10px;
    font-size: clamp(0.75rem, 2vw, 0.8rem);
    color: #aaa;
}

/* 通用响应式调整 */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 12px;
    }
    
    .home-page, .test-page, .result-page {
        padding: 15px 10px;
    }
    
    .question-text h2 {
        font-size: clamp(1.2rem, 4vw, 1.5rem);
    }
    
    .option-label {
        font-size: clamp(1rem, 3.5vw, 1.2rem);
    }
    
    .nav-button {
        padding: 12px 20px;
    }
    
    .chart-container {
        height: 280px;
    }
}

/* 防止文本选中时的蓝色背景 */
::selection {
    background-color: rgba(74, 74, 156, 0.2);
    color: var(--text-primary);
}

/* 改善输入框在移动端的显示 */
input, button, textarea, select {
    font-size: 16px; /* 防止iOS Safari缩放 */
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .answer-option:hover {
        transform: none; /* 触摸设备移除悬停效果 */
    }
    
    .feature:hover, .type-card:hover, .top-card:hover {
        transform: none;
    }
    
    .answer-option.selected {
        transform: none; /* 选中状态也不移动 */
    }
}

/* 打印样式 */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .container {
        box-shadow: none;
        border-radius: 0;
    }
    
    .action-buttons, .result-footer, .url-share-section {
        display: none;
    }
    
    .result-main {
        display: block;
    }
    
    .radar-chart-section, .top-intelligences {
        break-inside: avoid; /* 防止打印时跨页 */
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 加载动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.container {
    animation: fadeIn 0.5s ease;
}