:root{
  --bg:#0f172a; --panel:#111827; --soft:#1f2937; --line:#334155;
  --text:#e5e7eb; --muted:#94a3b8; --ok:#16a34a; --bad:#dc2626; --accent:#2563eb; --warn:#f59e0b;
}
*{box-sizing:border-box}
body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:linear-gradient(180deg,#0b1020,#111827);color:var(--text)}
.wrap{max-width:1180px;margin:0 auto;padding:24px}
.hero{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:24px;flex-wrap:wrap}
.title{font-size:34px;font-weight:800;letter-spacing:-.02em}
.subtitle{color:var(--muted);margin-top:6px;max-width:760px}
.grid{display:grid;gap:16px}
.cards{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
.card{background:rgba(17,24,39,.92);border:1px solid var(--line);border-radius:22px;padding:18px;box-shadow:0 14px 40px rgba(0,0,0,.18)}
.narrow{max-width:520px;margin:0 auto}
.player-shell{max-width:920px;margin:0 auto}
h2,h3{margin:0 0 12px}h3{font-size:18px}
label{display:block;font-size:13px;color:var(--muted);margin-bottom:6px}
input,textarea,select{width:100%;padding:12px 14px;border-radius:14px;border:1px solid var(--line);background:#0b1220;color:var(--text);outline:none}
textarea{min-height:88px;resize:vertical}
button{border:0;border-radius:14px;padding:12px 16px;font-weight:700;cursor:pointer;background:var(--accent);color:#fff}
button.secondary{background:#1e293b} button.ok{background:var(--ok)} button.warn{background:var(--warn);color:#111827} button.bad{background:var(--bad)}
button:disabled{opacity:.6;cursor:not-allowed}
.row{display:flex;gap:10px;flex-wrap:wrap}.row > *{flex:1}
.small{font-size:12px;color:var(--muted)} .hidden{display:none !important}
.pill{display:inline-block;padding:7px 12px;border-radius:999px;background:#172033;border:1px solid var(--line);color:#cbd5e1;font-size:12px}
.list{display:grid;gap:10px}.item{padding:12px;border:1px solid var(--line);border-radius:14px;background:#0b1220}
.topbar{display:flex;justify-content:space-between;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:14px}
.notice{padding:12px 14px;border-radius:14px;background:#0b1220;border:1px solid var(--line);color:#cbd5e1}
.notice.success{border-color:#166534;background:rgba(22,163,74,.1)} .notice.danger{border-color:#991b1b;background:rgba(220,38,38,.1)} .notice.warning{border-color:#92400e;background:rgba(245,158,11,.1)}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}
.stat{padding:16px;border-radius:18px;background:#0b1220;border:1px solid var(--line)}
.stat .k{font-size:12px;color:var(--muted)} .stat .v{font-size:24px;font-weight:800;margin-top:6px}
.timer-big{display:flex;align-items:center;justify-content:center;min-height:96px;border-radius:22px;background:linear-gradient(180deg,#0b1220,#101a30);border:1px solid var(--line);font-size:52px;font-weight:900;letter-spacing:-.03em;margin:12px 0 6px}
.timer-sub{font-size:12px;color:var(--muted);text-align:center}
.progress-wrap{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;flex-wrap:wrap}
.progress-label{font-size:14px;font-weight:800;color:#dbeafe}
.progress-bar{height:10px;background:#0b1220;border:1px solid var(--line);border-radius:999px;overflow:hidden;flex:1;min-width:160px}
.progress-fill{height:100%;background:linear-gradient(90deg,#2563eb,#60a5fa);width:0%}
.question-box{padding:22px;border-radius:24px;background:#0b1220;border:1px solid var(--line)}
.question-big{font-size:28px;font-weight:800;line-height:1.2;margin-bottom:20px}
.options-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.option{padding:18px;border-radius:18px;border:1px solid var(--line);cursor:pointer;font-weight:700;color:#fff}
.option.option-a{background:#e21b3c;border-color:#ef4444}.option.option-b{background:#1368ce;border-color:#3b82f6}.option.option-c{background:#d89e00;border-color:#f59e0b;color:#111827}.option.option-d{background:#26890c;border-color:#22c55e}
.option:hover{filter:brightness(1.05);transform:translateY(-2px)}
.option.disabled{opacity:.75;cursor:default;transform:none}
.option.correct{box-shadow:0 0 0 3px rgba(22,163,74,.5) inset}
.option .letter{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:999px;background:rgba(255,255,255,.18);margin-right:10px;font-size:18px;font-weight:900}
.option-content{display:flex;align-items:flex-start;gap:12px}.option-text{flex:1;min-width:0}.option-image{width:110px;height:78px;object-fit:cover;border-radius:12px;border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.08);flex:0 0 auto}
.question-media{width:100%;max-height:300px;object-fit:contain;border-radius:18px;border:1px solid var(--line);background:#0b1220;margin-bottom:16px}
.teacher-media-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:10px}
.mini-badge{display:inline-block;padding:4px 8px;border-radius:999px;background:#172033;border:1px solid var(--line);font-size:11px;color:#cbd5e1;margin-top:8px;margin-right:6px}
.results-card{margin-top:14px;padding:18px;border-radius:22px;background:#0b1220;border:1px solid var(--line)}
.bars{display:grid;gap:12px}.bar-row{display:grid;grid-template-columns:36px 1fr 64px;gap:10px;align-items:center}.bar-label{font-weight:900;text-align:center}
.bar-track{height:16px;background:#111827;border:1px solid var(--line);border-radius:999px;overflow:hidden}.bar-fill{height:100%;border-radius:999px}
.bar-fill.option-a{background:#e21b3c}.bar-fill.option-b{background:#1368ce}.bar-fill.option-c{background:#d89e00}.bar-fill.option-d{background:#26890c}
.bar-pct{text-align:right;font-weight:800;color:#cbd5e1}
.correct-pill{display:inline-block;margin-top:10px;padding:8px 12px;border-radius:999px;background:rgba(22,163,74,.14);border:1px solid #16a34a;color:#dcfce7;font-weight:800}
.rank-list{display:grid;gap:10px}.rank-row{display:grid;grid-template-columns:56px 1fr auto;gap:12px;align-items:center;padding:14px 16px;border-radius:18px;background:#0b1220;border:1px solid var(--line)}
.rank-row.top1{border-color:#f59e0b;background:linear-gradient(90deg,rgba(245,158,11,.15),rgba(11,18,32,.8))}.rank-row.top2{border-color:#94a3b8;background:linear-gradient(90deg,rgba(148,163,184,.14),rgba(11,18,32,.8))}.rank-row.top3{border-color:#b45309;background:linear-gradient(90deg,rgba(180,83,9,.14),rgba(11,18,32,.8))}
.rank-medal{font-size:26px;text-align:center}.rank-name{font-weight:800;font-size:18px}.rank-score{font-weight:900;font-size:20px}
.section-title-sm{font-size:13px;font-weight:900;letter-spacing:.04em;text-transform:uppercase;color:#93c5fd;margin-bottom:10px}.bold-gap{font-weight:800;margin-bottom:12px}
.nav-buttons{max-width:520px}
@media (max-width:700px){.options-grid{grid-template-columns:1fr}.question-big{font-size:22px}.title{font-size:28px}.timer-big{font-size:40px;min-height:82px}.teacher-media-grid{grid-template-columns:1fr}}
