/* =========================================
   1. 全局变量与重置 (Variables & Reset)
   ========================================= */
:root {
    /* 品牌色：结合传统靛青与现代紫 */
    --primary-color: #667eea;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-color: #f5f7fa;
    --text-main: #2c3e50;
    --text-light: #7f8c8d;
    --accent-color: #ffb74d;
    
    /* 功能色 */
    --success-color: #56ab2f;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    
    /* 布局 */
    --card-radius: 16px;
    --btn-radius: 50px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    
    /* 动画 */
    --transition-speed: 0.3s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* =========================================
   2. 布局容器 (Layout)
   ========================================= */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    position: relative;
}

/* 页面切换逻辑 */
.page {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.page.active {
    display: block;
    opacity: 1;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   3. 头部与底部 (Header & Footer)
   ========================================= */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding-top: 20px;
}

.logo-area {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    margin-bottom: 15px;
    object-fit: cover;
    background: white;
    padding: 5px;
}

.header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.subtitle {
    font-size: 14px;
    color: var(--text-light);
}

.footer {
    text-align: center;
    padding: 30px 0;
    font-size: 12px;
    color: #bdc3c7;
    margin-top: auto;
}

/* =========================================
   4. 通用组件 (Components)
   ========================================= */
/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    border-radius: var(--btn-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition-speed) ease;
    outline: none;
    user-select: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(100%);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(1px);
}

.btn-secondary {
    background: white;
    color: var(--text-main);
    border: 1px solid #e0e0e0;
}

.btn-secondary:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #d0d0d0;
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(86, 171, 47, 0.4);
}

.btn-large {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    margin-top: 20px;
}

/* 卡片 */
.welcome-card, .question-card, .result-card, .result-header-card {
    background: white;
    border-radius: var(--card-radius);
    padding: 30px;
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

/* =========================================
   5. 开始页面 (Start Page)
   ========================================= */
.welcome-card h2 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--text-main);
    text-align: center;
}

.description {
    color: var(--text-light);
    margin-bottom: 25px;
    text-align: justify;
}

.test-intro {
    display: flex;
    justify-content: space-around;
    margin: 25px 0;
    padding: 20px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.intro-item {
    text-align: center;
    font-size: 13px;
    color: var(--text-light);
}

.intro-item .icon {
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
}

.culture-insight {
    background: #f9fbfd;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 20px;
}

.culture-insight h3 {
    font-size: 16px;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-align: center;
}

.culture-insight p {
    font-size: 14px;
    color: #555;
    text-align: justify;
}

/* =========================================
   6. 测试进行页面 (Test Page)
   ========================================= */
/* 进度条 */
.progress-section {
    margin-bottom: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 50px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-info {
    display: flex;
    flex-direction: column;
    min-width: 70px;
}

.current-question {
    font-size: 16px;
    font-weight: bold;
    color: var(--primary-color);
}

.total-questions {
    font-size: 12px;
    color: var(--text-light);
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 4px;
}

.percentage {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-light);
    min-width: 40px;
    text-align: right;
}

/* 题目区域 */
.question-header {
    margin-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
}

.question-header h3 {
    font-size: 20px;
    color: var(--text-main);
    margin-bottom: 5px;
}

.question-stage {
    display: inline-block;
    font-size: 12px;
    background: #eef2ff;
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
}

.question-text {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 10px;
    line-height: 1.5;
}

.question-metaphor {
    font-size: 14px;
    color: #888;
    font-style: italic;
    margin-bottom: 25px;
    background: #fff9e6;
    padding: 10px;
    border-radius: 8px;
}

/* 选项区域 */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option-item {
    position: relative;
    padding: 15px 20px;
    border: 2px solid #eee;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.option-item:hover {
    border-color: #b3c0ff;
    background-color: #f8faff;
}

.option-item.selected {
    border-color: var(--primary-color);
    background-color: #eef2ff;
    box-shadow: 0 0 0 1px var(--primary-color);
}

.option-item input[type="radio"] {
    margin-right: 15px;
    accent-color: var(--primary-color);
    transform: scale(1.2);
}

.option-item label {
    cursor: pointer;
    font-size: 15px;
    flex: 1;
}

/* 导航按钮 */
.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.step-indicator {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
}

/* =========================================
   7. 加载页面 (Loading Page)
   ========================================= */
.loading-container {
    text-align: center;
    padding: 50px 20px;
    background: white;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-md);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-container h2 {
    font-size: 20px;
    margin-bottom: 10px;
}

.loading-tips {
    margin-top: 30px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    font-size: 14px;
    color: #666;
}

/* =========================================
   8. 结果页面 (Result Page - Generated by JS)
   ========================================= */
.result-header-card {
    text-align: center;
    padding-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.result-header-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.02), transparent);
}

.result-emoji {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.result-description {
    font-size: 16px;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.result-card h3 {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: var(--text-main);
    display: flex;
    align-items: center;
}

.result-card p {
    font-size: 15px;
    line-height: 1.7;
    color: #444;
    text-align: justify;
}

.jieqi-info p {
    margin-bottom: 8px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
}

.jieqi-info strong {
    color: var(--text-main);
    margin-right: 5px;
}

/* 分数条 */
.season-scores {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.score-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.season-label {
    width: 40px;
    font-size: 14px;
    font-weight: bold;
    color: var(--text-light);
}

.bar-container {
    flex: 1;
    height: 10px;
    background: #eee;
    border-radius: 5px;
    overflow: hidden;
}

.bar {
    height: 100%;
    border-radius: 5px;
    transition: width 1s ease-out;
}

.score-value {
    width: 30px;
    text-align: right;
    font-size: 14px;
    font-weight: bold;
    color: var(--text-main);
}

.culture-card {
    background: linear-gradient(to right, #fff, #fcfcfc);
    border: 1px solid #f0f0f0;
}

.result-footer {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin: 20px 0;
}

/* 结果页操作按钮 */
.result-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 30px;
}

/* =========================================
   9. 响应式适配 (Responsive)
   ========================================= */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }

    .header h1 {
        font-size: 20px;
    }

    .welcome-card, .question-card, .result-card {
        padding: 20px;
    }

    .question-text {
        font-size: 16px;
    }

    .option-item {
        padding: 12px 15px;
    }

    .option-item label {
        font-size: 14px;
    }

    .result-actions {
        flex-direction: column;
    }

    .result-actions button {
        width: 100%;
    }
    
    .navigation {
        gap: 10px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* =========================================
   10. 打印样式优化 (Print)
   ========================================= */
@media print {
    .header,
    .footer,
    .result-actions,
    .navigation,
    .progress-section,
    .btn {
        display: none !important;
    }
    
    .container {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .main-content {
        padding: 0;
        background: white;
    }
    
    .result-card, .welcome-card, .question-card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
        margin-bottom: 15px;
    }
    
    body {
        background: white;
    }
}
/* =========================================
   🙈 盲测模式：隐藏所有干扰信息
   隐藏 Stage、Metaphor 以及具体的阶段标题
   ========================================= */

/* 1. 隐藏 [第一阶段]... 这种具体的阶段标题 (您刚才指出的部分) */
.question-stage,
#questionStage {
    display: none !important;
}

/* 2. 隐藏题目的元数据 (Stage 1 / Stage Name: Survival 等) */
.question-meta {
    display: none !important;
}

/* 3. 隐藏题目下方的隐喻/引言 */
.question-metaphor {
    display: none !important;
}

/* 4. 布局修正：隐藏上述元素后，给题目文字增加一点呼吸感 */
.question-text {
    margin-top: 1rem;    /* 顶部留白 */
    margin-bottom: 2rem; /* 底部留白 */
}
