:root {
    /* 修改点：首页背景改为极简干净的 Apple 风格灰白渐变 */
    --bg-gradient: linear-gradient(to bottom, #f5f7fa, #eef2f7);
    --card-bg: #ffffff;
    --primary: #2c3e50;
    --accent: #0071e3; /* Apple Blue */
    --text-main: #1d1d1f;
    --text-light: #86868b;
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body { font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, sans-serif; background: var(--bg-gradient); color: var(--text-main); height: 100vh; overflow: hidden; display: flex; justify-content: center; }

/* 容器 */
.app-container {
    width: 100%; max-width: 550px; height: 100%; background: #fff; position: relative;
    box-shadow: 0 0 50px rgba(0,0,0,0.05); overflow: hidden;
}

/* 页面通用 */
.page {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    overflow-y: auto; opacity: 0; visibility: hidden; 
    transition: opacity 0.4s ease; background: #fff;
    /* padding-bottom removed, let content dictate height */
}
.page.active { opacity: 1; visibility: visible; z-index: 10; }
.page::-webkit-scrollbar { display: none; }

/* 首页 - 修改背景 */
#landing-page {
    display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
    background: var(--bg-gradient); /* 使用干净的渐变 */
}
.landing-content {
    padding: 40px 30px; max-width: 85%;
}
.logo { font-weight: 700; letter-spacing: 2px; margin-bottom: 20px; color: var(--text-light); font-size: 14px; }
.main-title { font-size: 36px; font-weight: 800; line-height: 1.2; margin-bottom: 16px; color: #1d1d1f; }
.subtitle { font-size: 16px; color: var(--text-light); line-height: 1.6; margin-bottom: 40px; font-weight: 400; }
.tags-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 50px; }
.tags-row span { font-size: 12px; background: #f0f0f5; padding: 6px 14px; border-radius: 20px; color: var(--text-light); font-weight: 500; }
.footer-note { font-size: 12px; color: #d1d1d6; margin-top: 30px; }

/* 按钮 */
.btn-primary, .btn-save {
    background: #1d1d1f;
    color: #fff; border: none; padding: 18px 40px; font-size: 17px; font-weight: 600;
    border-radius: 50px; cursor: pointer; box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: transform 0.2s, background 0.2s; width: 100%;
}
.btn-primary:active, .btn-save:active { transform: scale(0.98); background: #333; }

/* 答题页 */
.nav-header { display: flex; justify-content: space-between; align-items: center; padding: 24px; }
/* 修改点：上一题按钮样式改为纯文字 */
.nav-back { background: none; border: none; color: var(--text-light); cursor: pointer; padding: 10px 0; font-size: 15px; font-family: inherit; transition: color 0.2s; }
.nav-back:hover { color: var(--accent); }
.progress-indicator { font-weight: 600; font-size: 15px; color: var(--text-light); }
.progress-track { width: 100%; height: 4px; background: #efeff4; }
.progress-fill { width: 0%; height: 100%; background: var(--accent); transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.question-container { padding: 40px 24px; }
.question-title { font-size: 22px; line-height: 1.4; margin-bottom: 40px; min-height: 70px; font-weight: 700; color: #1d1d1f; }
.option-btn {
    background: #fff; border: 1.5px solid #e5e5ea; padding: 18px 20px;
    border-radius: 16px; margin-bottom: 14px; text-align: left; font-size: 16px; font-weight: 500;
    transition: all 0.2s; cursor: pointer; color: #1d1d1f;
}
.option-btn.selected { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3); transform: scale(0.99); }

/* 结果页 */
#result-page { background: #f5f5f7; /* 结果页背景稍微灰一点，突出白色卡片 */ }
.result-container {
    background: #fff; padding: 50px 30px; margin: 20px; border-radius: 24px;
    box-shadow: var(--shadow-card);
    /* 截图时不需要圆角和阴影，但在页面显示时需要 */
}

.result-header { text-align: center; margin-bottom: 40px; position: relative; }
.score-badge { 
    display: inline-flex; flex-direction: column; align-items: center; 
    margin-bottom: 15px;
}
.score-badge .label { font-size: 12px; color: var(--text-light); text-transform: uppercase; letter-spacing: 1px; }
.score-badge .value { font-size: 48px; font-weight: 800; color: #1d1d1f; line-height: 1; margin-top: 5px; }

.identity-title { font-size: 34px; margin-bottom: 10px; color: #1d1d1f; font-weight: 800; }
.identity-subtitle { font-size: 16px; color: var(--text-light); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 15px; font-family: -apple-system, sans-serif; }

/* --- 核心回归：光谱条样式 --- */
.spectrum-container { margin: 40px 0; position: relative; }
.spectrum-bar {
    height: 14px;
    /* 绿 -> 蓝 -> 黄 -> 橙 -> 红 */
    background: linear-gradient(90deg, #34c759 0%, #32ade6 25%, #ffcc00 50%, #ff9500 75%, #ff3b30 100%);
    border-radius: 10px; position: relative; margin-bottom: 12px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}
.score-dot {
    width: 24px; height: 24px; background: #fff; border: 4px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); border-radius: 50%; position: absolute;
    top: 50%; transform: translate(-50%, -50%); transition: left 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.spectrum-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-light); margin-bottom: 15px; }
.spectrum-rank { text-align: center; font-size: 14px; color: #1d1d1f; font-weight: 600; }
.highlight-percent { color: var(--accent); font-size: 16px; font-weight: 800; }
/* ------------------------- */

/* 雷达图优化 */
.radar-box { width: 100%; height: 260px; position: relative; margin: 30px 0 50px 0; }

/* 深度解析长文排版 */
.deep-analysis { border-top: 1px solid #eee; padding-top: 40px; }
.section-block { margin-bottom: 40px; }
.section-title {
    font-size: 18px; font-weight: 700; color: #1d1d1f; margin-bottom: 16px;
    display: flex; align-items: center; gap: 10px;
}
.content-text { font-size: 16px; color: #3a3a3c; line-height: 1.7; text-align: justify; }
.highlight-block { background: #f2f2f7; padding: 24px; border-radius: 16px; }

/* 关键词云 */
.keywords-cloud { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 40px; padding-top: 30px; border-top: 1px solid #eee; }
.keyword-tag { background: #f0f0f5; padding: 8px 16px; border-radius: 20px; font-size: 13px; color: var(--text-light); font-weight: 500; }

.copyright { text-align: center; color: #d1d1d6; font-size: 11px; margin-top: 50px; letter-spacing: 1px; }

/* 修改点：操作按钮区改为跟随滚动 */
.action-scroll-area {
    padding: 30px 24px 50px 24px;
    display: flex; flex-direction: column; gap: 15px;
    align-items: center;
    background: #f5f5f7; /* 与背景融合 */
}
.btn-restart {
    background: none; border: none; color: var(--text-light); font-size: 15px; padding: 10px; cursor: pointer; text-decoration: underline; text-underline-offset: 4px;
}