/* 九型人格测评 - 共享样式 */
:root {
  --primary: #6C5CE7;
  --primary-light: #A29BFE;
  --primary-dark: #5A4BD1;
  --bg: #F8F9FC;
  --card: #FFFFFF;
  --text: #2D3436;
  --text-secondary: #636E72;
  --text-light: #B2BEC3;
  --border: #E8E8F0;
  --success: #00B894;
  --warning: #FDCB6E;
  --danger: #E17055;
  --radius: 16px;
  --shadow: 0 2px 12px rgba(108, 92, 231, 0.08);
  --max-width: 480px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 16px;
  min-height: 100vh;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  gap: 8px;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(108, 92, 231, 0.3);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 40px; font-size: 18px; border-radius: 14px; }
.btn-sm { padding: 8px 16px; font-size: 14px; border-radius: 8px; }

/* 卡片 */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 16px;
}

/* 进度条 */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 24px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* 首页 */
.hero { text-align: center; padding: 40px 0 20px; }
.hero-icon { font-size: 64px; margin-bottom: 16px; }
.hero h1 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.hero p { color: var(--text-secondary); font-size: 15px; line-height: 1.6; margin-bottom: 24px; }
.features { text-align: left; padding: 0 8px; margin-bottom: 32px; }
.feature-item { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.feature-item .check { color: var(--success); font-weight: bold; font-size: 18px; flex-shrink: 0; }
.feature-item span { color: var(--text-secondary); font-size: 15px; }
.footer-note { text-align: center; color: var(--text-light); font-size: 12px; margin-top: 32px; }

/* 答题页 */
.test-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.test-counter { font-size: 14px; color: var(--text-secondary); font-weight: 500; }
.test-question { min-height: 300px; display: flex; flex-direction: column; justify-content: center; }
.test-question .q-text {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  padding: 20px 0 32px;
}
.rating-group {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 24px;
}
.rating-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 4px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
  font-size: 12px;
}
.rating-btn .num {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-light);
  transition: color 0.2s;
}
.rating-btn:hover { border-color: var(--primary-light); }
.rating-btn.active {
  border-color: var(--primary);
  background: rgba(108, 92, 231, 0.06);
  color: var(--primary);
}
.rating-btn.active .num { color: var(--primary); }
.rating-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 24px;
}
.test-nav { display: flex; gap: 12px; }
.test-nav .btn { flex: 1; }

/* 结果页 */
.result-header { text-align: center; padding: 24px 0 16px; }
.result-number {
  font-size: 72px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 4px;
}
.result-name { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.result-label { font-size: 16px; color: var(--text-secondary); margin-bottom: 8px; }

.result-section { margin-bottom: 24px; }
.result-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.result-section h3 .icon { font-size: 20px; }
.result-section p { color: var(--text-secondary); font-size: 15px; line-height: 1.7; }
.result-section ul { list-style: none; padding: 0; }
.result-section li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.result-section li:last-child { border-bottom: none; }
.result-section li strong { color: var(--text); }

/* 雷达图容器 */
.radar-container {
  width: 100%;
  max-width: 340px;
  margin: 0 auto 24px;
}
.radar-container canvas { width: 100% !important; height: auto !important; }

/* 健康层级标签 */
.health-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}
.health-badge.健康 { background: #DFF6E8; color: #00B894; }
.health-badge.一般 { background: #FEF3D6; color: #E17055; }
.health-badge.需关注 { background: #FFE8E0; color: #D63031; }

/* 侧翼信息 */
.wing-info {
  text-align: center;
  padding: 16px;
  background: rgba(108, 92, 231, 0.04);
  border-radius: 12px;
  margin-bottom: 16px;
}
.wing-info .label { font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; }
.wing-info .value { font-size: 18px; font-weight: 600; color: var(--primary); }

/* 底部引导 */
.cta-section {
  text-align: center;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}
.cta-section p { font-size: 15px; color: var(--text-secondary); margin-bottom: 16px; }

/* 交叉验证页 */
.cross-header { text-align: center; padding: 24px 0; }
.cross-match {
  text-align: center;
  padding: 24px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.cross-match.high { background: #DFF6E8; }
.cross-match.medium { background: #FEF3D6; }
.cross-match.low { background: #FFE8E0; }
.cross-match .match-icon { font-size: 48px; margin-bottom: 8px; }
.cross-match .match-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.cross-match .match-desc { font-size: 15px; color: var(--text-secondary); line-height: 1.6; }

/* 加载动画 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.4s ease; }

/* 响应式 */
@media (min-width: 768px) {
  .container { padding: 32px 24px; }
  .hero h1 { font-size: 36px; }
  .test-question .q-text { font-size: 22px; }
  .rating-btn { padding: 16px 8px; }
  .rating-btn .num { font-size: 22px; }
}

/* 结果页得分列表 */
.score-list { margin-top: 16px; }
.score-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.score-row .type-label {
  width: 48px;
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  flex-shrink: 0;
}
.score-row .bar-bg {
  flex: 1;
  height: 20px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.score-row .bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
  border-radius: 10px;
  transition: width 0.6s ease;
}
.score-row .score-num {
  width: 28px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: left;
  flex-shrink: 0;
}