/* ========== Reset & Base ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f0f14;
  --surface: #1a1a24;
  --surface2: #22222e;
  --border: #2e2e3e;
  --text: #e8e8f0;
  --text-muted: #8888a0;
  --accent: #8b5cf6;
  --accent-light: #a78bfa;
  --accent-glow: rgba(139, 92, 246, 0.3);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
}

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.7;
  min-height: 100vh;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
a { color: var(--accent-light); text-decoration: none; }
a:hover { color: var(--accent); }

/* ========== Header ========== */
.lang-btn { background: transparent; border: 1px solid var(--border); color: var(--text-muted); padding: 4px 12px; border-radius: var(--radius-sm); cursor: pointer; font-size: 0.85rem; transition: all .2s; margin-left: 8px; }
.lang-btn:hover, .lang-btn.active { border-color: var(--accent); color: var(--accent-light); background: rgba(139,92,246,0.1); }
.site-header {
  background: rgba(15,15,20,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-size: 1.3rem; font-weight: 700; color: var(--text) !important; }
.nav { display: flex; gap: 24px; }
.nav a { color: var(--text-muted); font-size: 0.95rem; transition: color .2s; }
.nav a:hover, .nav a.active { color: var(--accent-light); }

/* ========== Hero ========== */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, var(--accent-glow) 0%, transparent 60%);
}
.hero h1 { font-size: 2.4rem; font-weight: 800; margin-bottom: 16px; line-height: 1.3; }
.hero p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 32px; }
.btn { display: inline-block; padding: 12px 32px; border-radius: var(--radius); font-weight: 600; font-size: 1rem; transition: all .2s; cursor: pointer; border: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-light); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 24px var(--accent-glow); }

/* ========== Tests Section ========== */
.tests-section { padding: 60px 0; }
.section-title { font-size: 1.6rem; font-weight: 700; margin-bottom: 32px; text-align: center; }
.tests-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }

.test-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all .25s;
  display: block;
  color: var(--text);
}
.test-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,.3); }
.test-icon { font-size: 2.2rem; margin-bottom: 12px; }
.test-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.test-card p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 16px; }
.test-meta { font-size: 0.8rem; color: var(--accent-light); background: var(--surface2); padding: 4px 10px; border-radius: 20px; }

/* ========== Features ========== */
.features { padding: 60px 0; background: var(--surface); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; }
.feature-item { text-align: center; padding: 20px; }
.feature-icon { font-size: 2rem; margin-bottom: 12px; }
.feature-item h3 { font-size: 1rem; margin-bottom: 8px; }
.feature-item p { font-size: 0.85rem; color: var(--text-muted); }

/* ========== About ========== */
.about-section { padding: 60px 0; }
.about-section p { max-width: 700px; margin: 0 auto 16px; text-align: center; color: var(--text-muted); }
.disclaimer { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 24px; font-size: 0.85rem; color: var(--warning); margin-top: 24px; text-align: center; display: block; }
.about-section .disclaimer { margin: 24px auto 0; max-width: 700px; }

/* ========== Footer ========== */
.site-footer { padding: 32px 0; text-align: center; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.85rem; }
.footer-note { font-size: 0.75rem; margin-top: 8px; }

/* ========== Test Page ========== */
.test-page { max-width: 720px; margin: 0 auto; padding: 40px 20px; }
.test-header { text-align: center; margin-bottom: 32px; }
.test-header .test-icon { font-size: 3rem; }
.test-header h2 { font-size: 1.6rem; margin: 12px 0 8px; }
.test-header p { color: var(--text-muted); font-size: 0.9rem; }
.test-header .meta { display: inline-flex; gap: 16px; margin-top: 12px; font-size: 0.8rem; color: var(--accent-light); }

.progress-bar { background: var(--surface2); border-radius: 20px; height: 6px; margin-bottom: 24px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 20px; transition: width .3s; }
.progress-text { text-align: center; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px; }

.question-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; margin-bottom: 16px; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.question-num { font-size: 0.75rem; color: var(--accent-light); margin-bottom: 8px; }
.question-text { font-size: 1rem; font-weight: 500; margin-bottom: 16px; }
.options { display: flex; flex-direction: column; gap: 8px; }
.option-label { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: all .2s; }
.option-label:hover { border-color: var(--accent); background: rgba(139,92,246,0.1); }
.option-label input { display: none; }
.option-label .radio { width: 18px; height: 18px; border: 2px solid var(--border); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .2s; }
.option-label input:checked ~ .radio { border-color: var(--accent); background: var(--accent); }
.option-label input:checked ~ .radio::after { content: ""; width: 6px; height: 6px; background: #fff; border-radius: 50%; }
.option-label input:checked ~ .option-text { color: var(--accent-light); }
.option-text { font-size: 0.9rem; color: var(--text-muted); transition: color .2s; }

.test-actions { display: flex; justify-content: space-between; margin-top: 24px; gap: 12px; }
.btn-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--text); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ========== Result Page ========== */
.result-page { max-width: 720px; margin: 0 auto; padding: 40px 20px; }
.result-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; margin-bottom: 24px; text-align: center; }
.result-score { font-size: 3rem; font-weight: 800; color: var(--accent-light); }
.result-level { font-size: 1.2rem; margin: 8px 0; font-weight: 600; }
.result-desc { color: var(--text-muted); font-size: 0.9rem; }
.level-normal { color: var(--success); }
.level-mild { color: var(--warning); }
.level-severe { color: var(--danger); }

.factor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 20px; }
.factor-item { background: var(--surface2); border-radius: var(--radius-sm); padding: 16px; text-align: center; }
.factor-name { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 4px; }
.factor-score { font-size: 1.4rem; font-weight: 700; }
.factor-bar { height: 4px; background: var(--border); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.factor-bar-fill { height: 100%; border-radius: 2px; }

.result-actions { display: flex; justify-content: center; gap: 12px; margin-top: 32px; }

.ad-placeholder {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 24px 0;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-placeholder ins {
  border: none;
  margin: 0;
  padding: 0;
}

@media (max-width: 600px) {
  .hero h1 { font-size: 1.6rem; }
  .tests-grid { grid-template-columns: 1fr; }
  .nav { gap: 16px; }
}
