:root {
  --bg: #09111f;
  --panel: #121e31;
  --panel2: #18263b;
  --line: #2a3a55;
  --text: #f7f8fc;
  --muted: #9caac0;
  --gold: #f4bd4f;
  --cyan: #49c9d5;
  --purple: #a78bfa;
  --green: #55d69e;
  --red: #ff6b78;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 10% 10%, #18345a 0, transparent 34%),
    radial-gradient(circle at 90% 30%, #2e204f 0, transparent 30%),
    var(--bg);
}
.arena-shell { width: min(980px, 92%); margin: 0 auto; padding: 34px 0 60px; }
.site-header { display: flex; justify-content: center; align-items: center; gap: 14px; margin-bottom: 26px; }
.site-header h1 { margin: 2px 0 0; font-size: clamp(1.9rem, 5vw, 3rem); }
.brand-mark { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 15px; color: #111827; background: linear-gradient(145deg,#ffe298,var(--gold)); font-weight: 900; font-size: 1.2rem; box-shadow: 0 8px 25px #f4bd4f33; }
.kicker { margin: 0; color: var(--gold); font-weight: 800; font-size: .72rem; letter-spacing: .17em; }
.card { background: linear-gradient(145deg,rgba(23,37,58,.98),rgba(13,24,40,.98)); border: 1px solid var(--line); border-radius: 22px; padding: 30px; box-shadow: 0 22px 60px #0006; }
.start-screen, .result-screen { text-align: center; max-width: 850px; margin: auto; }
.start-screen > p, .result-screen > p { max-width: 680px; margin: 10px auto 22px; color: var(--muted); line-height: 1.7; }
.trophy { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 12px; border: 1px solid #725d31; border-radius: 50%; color: var(--gold); background: #30291c; font-size: 2rem; }
.start-screen h2, .result-screen h2 { margin: 8px 0; font-size: 2rem; }
.features { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin: 24px 0 30px; }
.features span { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: #0e192a; color: #c9d3e2; font-size: .86rem; }
.start-screen h3 { margin: 0 0 13px; color: #dbe2ed; }
.levels { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
button { font: inherit; cursor: pointer; }
.level-btn { min-height: 135px; display: flex; flex-direction: column; justify-content: center; gap: 4px; color: var(--text); background: var(--panel2); border: 1px solid #354765; border-radius: 15px; transition: .2s ease; }
.level-btn:hover { transform: translateY(-3px); border-color: var(--gold); box-shadow: 0 10px 30px #0004; }
.level-btn.featured { border-color: #887137; background: linear-gradient(160deg,#292b32,#19263a); }
.level-btn strong { color: var(--gold); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; }
.level-btn span { font-weight: 850; font-size: 1.15rem; }
.level-btn small { color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 16px; }
.stats div { text-align: center; padding: 11px; background: #101c2d; border: 1px solid var(--line); border-radius: 12px; }
.stats small, .result-grid small { display: block; color: var(--muted); font-size: .66rem; letter-spacing: .13em; }
.stats strong { display: block; margin-top: 4px; font-size: 1.05rem; }
.progress-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin-bottom: 14px; color: var(--muted); font-size: .85rem; }
.progress { height: 7px; background: #101a29; border-radius: 20px; overflow: hidden; }
#progressFill { height: 100%; width: 0; background: linear-gradient(90deg,var(--cyan),var(--gold)); transition: width .3s ease; }
.subject-label { min-width: 75px; text-align: center; padding: 6px 9px; border: 1px solid #3b526f; border-radius: 999px; color: var(--cyan); background: #102638; font-weight: 800; }
.question-card { position: relative; min-height: 440px; padding-right: 120px; }
.timer-wrap { position: absolute; right: 26px; top: 26px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); font-size: .7rem; }
.timer-ring { display: grid; place-items: center; width: 68px; height: 68px; border: 5px solid var(--green); border-radius: 50%; background: #0d1726; transition: border-color .2s; }
.timer-ring.warning { border-color: var(--gold); }
.timer-ring.danger { border-color: var(--red); animation: pulse .7s infinite alternate; }
.timer-ring span { font-size: 1.4rem; font-weight: 900; }
#questionText { min-height: 68px; margin: 10px 0 24px; line-height: 1.45; font-size: clamp(1.2rem,3vw,1.55rem); }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.answer-btn { min-height: 70px; padding: 14px; text-align: left; color: var(--text); background: var(--panel2); border: 1px solid #354967; border-radius: 12px; font-weight: 650; transition: .16s ease; }
.answer-btn:hover:not(:disabled) { border-color: var(--cyan); background: #20334d; transform: translateY(-1px); }
.answer-btn:disabled { cursor: default; }
.answer-btn.correct { color: #bff6dc; background: #173a30; border-color: var(--green); }
.answer-btn.wrong { color: #ffd2d5; background: #47252d; border-color: var(--red); }
.feedback { min-height: 28px; margin: 16px 0 8px; font-weight: 800; }
.feedback.good { color: var(--green); } .feedback.bad { color: var(--red); }
.next-btn, .play-again { border: 0; border-radius: 10px; padding: 12px 19px; color: #151719; background: var(--gold); font-weight: 850; }
.next-btn { float: right; }
.result-icon { font-size: 4rem; margin-bottom: 8px; }
.result-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 24px 0; }
.result-grid div { padding: 18px 10px; background: #0e1929; border: 1px solid var(--line); border-radius: 13px; }
.result-grid strong { display: block; color: var(--gold); font-size: 1.5rem; margin-top: 6px; }
.hidden { display: none !important; }
@keyframes pulse { to { box-shadow: 0 0 18px #ff6b7860; } }
@media (max-width: 680px) {
  .levels { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2,1fr); }
  .progress-row { grid-template-columns: 1fr auto; }
  .progress { grid-column: 1 / -1; grid-row: 2; }
  .question-card { padding: 105px 19px 24px; }
  .timer-wrap { top: 20px; right: 50%; transform: translateX(50%); }
  .answers { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
}
