:root {
  --bg: #090b0a;
  --panel: #111412;
  --panel-2: #171b18;
  --text: #f4f2e9;
  --muted: #9ca39d;
  --gold: #d8ff39;
  --gold-dark: #a9cf08;
  --line: rgba(255,255,255,.12);
  --danger: #ff6b5f;
  --success: #b9e72d;
  --radius: 22px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -20%, rgba(216,255,57,.13), transparent 40%),
    linear-gradient(135deg, #0b0e0c 0%, #080a09 55%, #0d110e 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  overflow-x: hidden;
}

button { font: inherit; }
.noise {
  position: fixed; inset: 0; pointer-events: none; opacity: .22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
}
.app-shell { position: relative; width: min(100%, 760px); min-height: 100vh; min-height: 100dvh; margin: 0 auto; }
.screen { display: none; min-height: 100vh; min-height: 100dvh; padding: max(28px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom)); }
.screen.is-active { display: flex; animation: enter .45s cubic-bezier(.2,.8,.2,1); }
@keyframes enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.start-screen { align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.eyebrow { color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.hero-mark { position: relative; width: 180px; height: 180px; margin: 12px 0 -12px; display: grid; place-items: center; }
.hero-number { position: relative; z-index: 2; color: var(--text); font: 900 124px/.8 Arial Black, sans-serif; font-style: italic; letter-spacing: -.1em; text-shadow: 8px 8px 0 rgba(216,255,57,.15); }
.orbit { position: absolute; inset: 22px; border: 1px solid rgba(216,255,57,.4); border-radius: 50%; transform: rotate(-18deg) scaleY(.35); }
.orbit-two { inset: 8px; opacity: .35; transform: rotate(28deg) scaleY(.55); }
h1 { margin: 0; max-width: 650px; font-size: clamp(44px, 9vw, 76px); line-height: .98; letter-spacing: -.055em; }
h1 em { color: var(--gold); font-style: normal; }
.lead { max-width: 510px; margin: 22px auto; color: #b9bdb9; font-size: 16px; line-height: 1.8; }
.start-meta { display: flex; align-items: center; gap: 15px; margin: 4px 0 30px; color: var(--muted); font-size: 13px; }
.start-meta strong { color: var(--text); font-size: 15px; }
.start-meta i { width: 3px; height: 3px; background: #667067; border-radius: 50%; }
.primary-btn, .secondary-btn {
  width: min(100%, 360px); min-height: 58px; border-radius: 999px; cursor: pointer; font-weight: 800; transition: transform .18s, background .18s, opacity .18s;
}
.primary-btn { border: 0; background: var(--gold); color: #11140c; display: flex; align-items: center; justify-content: space-between; padding: 0 25px; box-shadow: 0 12px 35px rgba(216,255,57,.15); }
.primary-btn:hover { background: #e3ff6a; transform: translateY(-2px); }
.primary-btn:active, .secondary-btn:active { transform: scale(.98); }
.primary-btn:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.fine-print { margin-top: 18px; color: #676d68; font-size: 11px; }

.quiz-screen { flex-direction: column; }
.quiz-header { display: flex; align-items: center; gap: 18px; width: 100%; margin-bottom: clamp(35px, 7vh, 75px); }
.icon-btn { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.03); color: var(--muted); cursor: pointer; font-size: 24px; }
.progress-wrap { flex: 1; }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 9px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.progress-track { height: 3px; background: rgba(255,255,255,.1); overflow: hidden; }
.progress-bar { width: 10%; height: 100%; background: var(--gold); transition: width .4s ease; }
.question-card { width: 100%; }
.question-kicker { margin-bottom: 14px; color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.question-card h2 { margin: 0 0 28px; font-size: clamp(20px, 4vw, 28px); line-height: 1.55; letter-spacing: -.02em; }
.options { display: grid; gap: 12px; }
.option {
  width: 100%; min-height: 66px; display: grid; grid-template-columns: 38px 1fr 22px; align-items: center; gap: 12px; padding: 13px 18px;
  color: var(--text); text-align: left; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.025); cursor: pointer; transition: .18s ease;
}
.option:hover:not(:disabled) { border-color: rgba(216,255,57,.48); background: rgba(216,255,57,.04); transform: translateX(3px); }
.option-letter { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; color: var(--muted); font-size: 12px; font-weight: 800; }
.option-text { font-size: 14px; line-height: 1.55; }
.option-indicator { width: 18px; height: 18px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; }
.option.is-selected { border-color: var(--gold); background: rgba(216,255,57,.08); }
.option.is-selected .option-letter, .option.is-selected .option-indicator { color: #111; border-color: var(--gold); background: var(--gold); }
.option.is-correct { border-color: var(--success); background: rgba(185,231,45,.08); }
.option.is-wrong { border-color: var(--danger); background: rgba(255,107,95,.07); }
.option:disabled { cursor: default; }
.feedback { min-height: 26px; margin: 16px 4px 8px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.feedback strong { color: var(--text); }
.next-btn { max-width: none; margin-top: 8px; }

.result-screen { align-items: center; flex-direction: column; text-align: center; overflow: hidden; }
.result-halo { position: absolute; top: -240px; left: 50%; width: 560px; height: 560px; transform: translateX(-50%); border-radius: 50%; background: rgba(216,255,57,.09); filter: blur(60px); pointer-events: none; }
.result-screen .eyebrow { margin-top: 20px; }
.score-ring { width: 190px; height: 190px; margin: 32px 0 23px; border: 1px solid rgba(216,255,57,.5); border-radius: 50%; display: flex; align-items: baseline; justify-content: center; padding-top: 47px; box-shadow: inset 0 0 45px rgba(216,255,57,.07), 0 0 0 12px rgba(216,255,57,.025); }
.score-ring span { color: var(--gold); font: 900 72px/1 Arial Black, sans-serif; }
.score-ring small { color: var(--muted); font-weight: 700; }
.result-badge { margin: 0 0 13px; padding: 7px 15px; color: #111; background: var(--gold); border-radius: 999px; font-size: 12px; font-weight: 900; letter-spacing: .08em; }
.result-screen h2 { margin: 0 0 13px; font-size: clamp(28px, 6vw, 40px); letter-spacing: -.04em; }
.result-comment { max-width: 520px; min-height: 58px; margin: 0 0 28px; color: #aeb4af; font-size: 15px; line-height: 1.8; }
.result-actions { width: 100%; display: flex; gap: 10px; justify-content: center; }
.result-actions .primary-btn { width: 260px; }
.secondary-btn { width: 130px; border: 1px solid var(--line); color: var(--text); background: rgba(255,255,255,.035); }
.secondary-btn:hover { border-color: rgba(255,255,255,.3); }
.review-section { width: 100%; margin-top: 30px; border-top: 1px solid var(--line); }
.review-toggle { width: 100%; display: flex; justify-content: space-between; padding: 20px 5px; color: var(--text); border: 0; background: none; cursor: pointer; font-weight: 700; }
.review-list { display: grid; gap: 10px; padding-bottom: 25px; text-align: left; }
.review-list[hidden] { display: none; }
.review-item { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); }
.review-item-head { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.review-item-head .right { color: var(--success); }
.review-item-head .wrong { color: var(--danger); }
.review-item p { margin: 4px 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.review-item strong { color: var(--text); font-weight: 600; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 28px; transform: translate(-50%, 20px); padding: 11px 18px; color: #111; background: var(--text); border-radius: 999px; font-size: 13px; font-weight: 700; opacity: 0; pointer-events: none; transition: .25s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 560px) {
  .screen { padding-left: 18px; padding-right: 18px; }
  .hero-mark { width: 150px; height: 150px; }
  .hero-number { font-size: 105px; }
  .lead { font-size: 14px; }
  .question-card h2 { font-size: 19px; }
  .option { min-height: 62px; padding: 11px 13px; gap: 8px; }
  .option-text { font-size: 13px; }
  .result-actions { flex-direction: column; align-items: center; }
  .result-actions .primary-btn, .secondary-btn { width: min(100%, 360px); }
  .score-ring { width: 160px; height: 160px; padding-top: 38px; margin-top: 25px; }
  .score-ring span { font-size: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
