/* EasyLearn HT2 demo — Mission Control skin */
:root {
  --bg: #0a0e21;
  --surface: rgba(255,255,255,.05);
  --surface-2: rgba(255,255,255,.08);
  --border: rgba(167,139,250,.25);
  --border-strong: rgba(167,139,250,.55);
  --violet:#8b5cf6; --cyan:#22d3ee; --pink:#f472b6; --gold:#fbbf24; --green:#34d399;
  --chem:#a78bfa; --text:#eef0ff; --text-dim:#a6add4; --text-faint:#6d76a8;
  --grad: linear-gradient(135deg,#8b5cf6,#22d3ee);
  --grad-gold: linear-gradient(135deg,#f59e0b,#fbbf24);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  min-height: 100vh; color: var(--text);
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, "Segoe UI", sans-serif;
  background:
    radial-gradient(1100px 700px at 85% -10%, rgba(139,92,246,.22), transparent 60%),
    radial-gradient(900px 650px at -15% 110%, rgba(34,211,238,.14), transparent 55%),
    var(--bg);
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(167,139,250,.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(167,139,250,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(900px 600px at 50% 0%, rgba(0,0,0,.7), transparent 75%);
}
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 22px 70px; }
a { text-decoration: none; color: inherit; }

/* topbar */
.topbar { display:flex; align-items:center; gap:14px; padding:16px 24px; max-width:1060px; margin:0 auto; }
.logo { display:flex; align-items:center; gap:10px; font-weight:800; font-size:21px; }
.logo .mark { width:36px; height:36px; border-radius:12px; display:grid; place-items:center;
  background:var(--grad); box-shadow:0 4px 18px rgba(139,92,246,.45); font-size:18px; }
.topbar .spacer { flex:1; }
.streak { background:rgba(251,146,60,.14); border:1px solid rgba(251,146,60,.4);
  padding:7px 12px; border-radius:999px; font-weight:800; font-size:13px; color:#fdba74; }
.player { display:flex; align-items:center; gap:12px; background:var(--surface);
  border:1px solid var(--border); border-radius:16px; padding:8px 14px 8px 8px; }
.avatar { width:38px; height:38px; border-radius:12px; display:grid; place-items:center;
  background:var(--grad); font-weight:800; color:#fff; }
.name { font-weight:800; font-size:14px; }
.lvl { font-size:11px; font-weight:700; color:var(--text-dim); letter-spacing:.06em; }
.xpbar { width:120px; height:7px; border-radius:99px; margin-top:5px; background:rgba(255,255,255,.09); overflow:hidden; }
.xpbar i { display:block; height:100%; background:var(--grad); border-radius:99px; transition: width .4s; }
.xpbar.inline { display:inline-block; width:110px; vertical-align:middle; margin-left:8px; }

/* hero + notice */
.hero { text-align:center; margin:36px 0 24px; }
.hero h1 { font-size:clamp(30px,4.6vw,46px); font-weight:900; letter-spacing:-.03em;
  background:linear-gradient(120deg,#fff 30%,#c4b5fd 60%,#67e8f9);
  -webkit-background-clip:text; background-clip:text; color:transparent; }
.hero p { color:var(--text-dim); font-size:15.5px; margin-top:8px; font-weight:600; }
.notice { max-width:820px; margin:0 auto 26px; padding:13px 18px; border-radius:14px;
  background:rgba(251,191,36,.08); border:1px solid rgba(251,191,36,.3);
  color:#fde68a; font-size:13.5px; line-height:1.55; text-align:center; }
.notice b { color:#fff; }

/* mission cards */
.grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(460px,1fr)); gap:16px; }
@media (max-width:1040px) { .grid { grid-template-columns:1fr; } }
.mission { display:flex; gap:16px; padding:16px; background:var(--surface);
  border:1px solid var(--border); border-radius:20px; position:relative; overflow:hidden;
  transition:transform .18s, border-color .18s, box-shadow .18s; }
.mission:hover { transform:translateY(-3px); border-color:var(--subj,var(--border-strong));
  box-shadow:0 12px 36px rgba(0,0,0,.45); }
.art { width:96px; height:96px; flex-shrink:0; border-radius:16px; display:grid; place-items:center;
  font-size:42px; background:linear-gradient(135deg,#1e1b4b,#312e81);
  border:1px solid rgba(255,255,255,.09); position:relative; }
.art .rarity { position:absolute; bottom:6px; left:50%; transform:translateX(-50%);
  font-size:9px; font-weight:900; letter-spacing:.12em; color:rgba(255,255,255,.7); white-space:nowrap; }
.m-body { flex:1; min-width:0; display:flex; flex-direction:column; }
.m-sub { color:var(--text-faint); font-size:10.5px; font-weight:800; letter-spacing:.1em;
  text-transform:uppercase; margin-bottom:3px; }
.m-title { font-size:18.5px; font-weight:800; letter-spacing:-.01em; }
.tags { display:flex; gap:6px; flex-wrap:wrap; margin:8px 0; }
.tag { font-size:11px; font-weight:800; padding:3px 10px; border-radius:999px; border:1px solid; }
.tag.subject { color:var(--subj,var(--cyan)); border-color:color-mix(in srgb,var(--subj) 45%,transparent);
  background:color-mix(in srgb,var(--subj) 12%,transparent); }
.tag.diff { color:var(--text-dim); border-color:rgba(255,255,255,.14); background:rgba(255,255,255,.05); }
.tag.diff.extended { color:#f0abfc; border-color:rgba(240,171,252,.4); background:rgba(240,171,252,.1); }
.m-desc { color:var(--text-dim); font-size:13px; line-height:1.5; flex:1; }
.m-meta { display:flex; align-items:center; gap:12px; margin-top:10px; font-size:12px;
  font-weight:700; color:var(--text-faint); letter-spacing:.04em; }
.m-stars { color:var(--gold); letter-spacing:2px; font-size:14px; }
.m-meta .reward { margin-left:auto; color:var(--gold); font-weight:900; }
.m-ctas { display:flex; gap:10px; margin-top:10px; }
.boss-card { border-color:rgba(244,114,182,.4); }
.boss-card:hover { border-color:var(--pink); box-shadow:0 12px 36px rgba(244,114,182,.2); }

/* buttons */
.btn { flex:1; display:flex; align-items:center; justify-content:center; gap:8px;
  padding:11px 14px; border-radius:13px; font-weight:900; font-size:13.5px;
  border:none; cursor:pointer; font-family:inherit; transition:transform .15s, box-shadow .15s, background .15s; }
.btn:active { transform:scale(.97); }
.btn-primary { background:var(--grad); color:#fff; box-shadow:0 6px 20px rgba(139,92,246,.4); }
.btn-primary:hover { transform:translateY(-2px); box-shadow:0 10px 26px rgba(139,92,246,.55); }
.btn-gold { background:rgba(251,191,36,.1); color:var(--gold); border:1.5px solid rgba(251,191,36,.45); }
.btn-gold:hover { background:rgba(251,191,36,.18); transform:translateY(-2px); }

/* quiz chrome */
.boss-head { display:flex; align-items:flex-start; gap:14px; margin:16px 0 10px; }
.boss-title { font-size:22px; font-weight:900; color:var(--pink); letter-spacing:-.01em; }
.boss-side { margin-left:auto; display:flex; gap:10px; align-items:center; }
.combo-badge { font-weight:900; font-size:13px; color:#fdba74; }
.xptag { background:rgba(52,211,153,.12); border:1.5px solid rgba(52,211,153,.45); color:var(--green);
  font-weight:900; font-size:13px; padding:6px 12px; border-radius:11px; }
.timer { height:9px; border-radius:99px; background:rgba(255,255,255,.07); overflow:hidden; margin-bottom:6px; }
.timer i { display:block; height:100%; background:linear-gradient(90deg,var(--pink),var(--gold)); border-radius:99px; transition:width .3s; }
.prog-label-row { text-align:right; font-size:11px; font-weight:800; color:var(--text-faint);
  letter-spacing:.1em; margin-bottom:12px; }

/* question */
.qmeta { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.qtopic { font-size:12px; font-weight:900; letter-spacing:.12em; }
.qtier { font-size:10px; font-weight:900; letter-spacing:.12em; color:var(--text-faint); }
.qtext { font-size:21px; font-weight:800; line-height:1.4; margin-bottom:20px; letter-spacing:-.01em; }
.qcontext { background:rgba(255,255,255,.05); border:1px solid var(--border); border-radius:14px;
  padding:14px 16px; color:var(--text-dim); font-size:13.5px; line-height:1.6; margin-bottom:16px; }
.qcontext b, .qcontext strong { color:var(--gold); }
.opts { display:grid; gap:10px; }
.opt { display:flex; align-items:center; gap:13px; text-align:left; padding:13px 16px;
  border-radius:14px; cursor:pointer; background:rgba(255,255,255,.05);
  border:1.5px solid rgba(255,255,255,.1); color:var(--text); font-size:15px; font-weight:700;
  font-family:inherit; transition:all .15s; }
.opt:hover:not(:disabled) { border-color:var(--border-strong); background:rgba(139,92,246,.12); transform:translateX(4px); }
.opt .key { width:30px; height:30px; border-radius:9px; display:grid; place-items:center; flex-shrink:0;
  background:rgba(255,255,255,.08); font-weight:900; font-size:13px; color:var(--text-dim); }
.opt.right { border-color:var(--green); background:rgba(52,211,153,.13); }
.opt.right .key { color:var(--green); }
.opt.wrong { border-color:var(--pink); background:rgba(244,114,182,.12); }
.opt.wrong .key { color:var(--pink); }
.fb { margin-top:16px; padding:13px 16px; border-radius:14px; font-size:14px; }
.fb.good { background:rgba(52,211,153,.1); border:1px solid rgba(52,211,153,.4); }
.fb.bad { background:rgba(244,114,182,.1); border:1px solid rgba(244,114,182,.4); }
.fb-verdict { font-weight:900; }
.fb.good .fb-verdict { color:var(--green); }
.fb.bad .fb-verdict { color:var(--pink); }
.fb-why { margin-top:7px; color:var(--text-dim); font-size:13px; line-height:1.55; }
.steps { margin:14px 0 0 6px; padding-left:22px; color:var(--text-dim); font-size:14px; line-height:1.75; }
.steps li { margin-bottom:2px; }
.drill-hint { color:var(--text-faint); font-size:13px; margin-bottom:16px; }
.drill-ans { margin-top:12px; font-weight:900; color:var(--gold); font-size:16px; }
.nextbtn { margin-top:16px; max-width:220px; }

/* results */
.result { text-align:center; padding:30px 16px; }
.r-emoji { font-size:60px; }
.r-title { font-size:28px; font-weight:900; margin:10px 0 6px; letter-spacing:-.02em; }
.r-score { color:var(--text-dim); font-size:16px; font-weight:700; }
.r-stars { color:var(--gold); font-size:34px; letter-spacing:8px; margin:12px 0; }
.r-xp { color:var(--green); font-weight:800; font-size:14px; margin-bottom:18px; }
.bd { max-width:460px; margin:6px auto 22px; display:grid; gap:8px; }
.bd-row { display:flex; align-items:center; gap:12px; font-size:13px; font-weight:700;
  background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08);
  padding:9px 14px; border-radius:12px; color:var(--text-dim); }
.bd-row.weak { border-color:rgba(244,114,182,.45); }
.bd-row.weak::after { content:"REVISE"; font-size:9px; font-weight:900; color:var(--pink); letter-spacing:.1em; }
.bd-bar { flex:1; height:7px; border-radius:99px; background:rgba(255,255,255,.08); overflow:hidden; }
.bd-bar i { display:block; height:100%; background:var(--grad); border-radius:99px; }
.bd-val { width:44px; text-align:right; color:var(--text); }
.r-actions { display:flex; gap:12px; max-width:460px; margin:0 auto; }
.copy-hint { margin-top:12px; font-size:13px; font-weight:700; color:var(--green); min-height:16px; }

.foot { text-align:center; color:var(--text-faint); font-size:12px; margin-top:56px; }

.btn-compact { flex: 0 0 auto; padding: 11px 16px; }

/* ---------- Briefing card (3D visual + 2D exam bridge) ---------- */
.br-loading {
  padding: 64px 20px; text-align: center; color: var(--text-dim); font-weight: 700;
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
}

.briefing {
  background: rgba(15, 22, 48, 0.72);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px 20px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
}

.br-head { margin-bottom: 11px; }
.br-title {
  font-size: clamp(20px, 2.6vw, 25px); font-weight: 900;
  letter-spacing: -0.02em; color: #fff; line-height: 1.2;
}
.br-lead {
  margin-top: 4px; color: var(--text-dim); font-size: 14px; line-height: 1.5; max-width: 74ch;
}
.br-lead strong { color: #fff; }

.stage-wrap {
  position: relative; width: 100%; height: 290px;
  border-radius: 18px; overflow: hidden;
  border: 1px solid rgba(167, 139, 250, 0.28);
  background:
    radial-gradient(600px 320px at 50% 20%, rgba(139, 92, 246, 0.22), transparent 68%),
    radial-gradient(500px 260px at 80% 90%, rgba(34, 211, 238, 0.14), transparent 70%),
    linear-gradient(180deg, #0d132b 0%, #131c3d 100%);
  cursor: grab;
}
.stage-wrap:active { cursor: grabbing; }

.stage-legend {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  display: flex; flex-wrap: wrap; gap: 10px; pointer-events: none;
  background: rgba(10, 14, 33, 0.72); backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px; padding: 6px 11px;
  font-size: 12px; font-weight: 700; color: var(--text);
}
.stage-legend span { display: inline-flex; align-items: center; gap: 6px; }
.stage-legend .dot { width: 9px; height: 9px; border-radius: 999px; display: inline-block; }

.stage-hint {
  position: absolute; bottom: 12px; right: 12px; z-index: 2; pointer-events: none;
  background: rgba(10, 14, 33, 0.72); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px; padding: 5px 11px;
  font-size: 11.5px; font-weight: 700; color: var(--text-dim);
  opacity: 1; transition: opacity 240ms var(--ease-out);
}
.stage-hint.gone { opacity: 0; }

.webgl-fallback {
  height: 100%; display: grid; place-items: center; padding: 24px;
  text-align: center; color: var(--text-dim); font-weight: 700; font-size: 14px;
}

/* Interactive controls */
.ctrl-panel {
  margin-top: 11px; display: grid; gap: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px; padding: 11px 14px;
}

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-row.compact { gap: 6px; }

.pill {
  appearance: none; border: 1.5px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05); color: var(--text-dim);
  border-radius: 11px; padding: 9px 13px; min-height: 40px;
  font-family: inherit; font-size: 13px; font-weight: 800; cursor: pointer;
  transition: transform 150ms var(--ease-out), background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.pill:active { transform: scale(0.97); }
.pill.active {
  background: rgba(139, 92, 246, 0.24); border-color: var(--cyan); color: #fff;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.25);
}
.pill-accent {
  border-color: rgba(52, 211, 153, 0.5); background: rgba(52, 211, 153, 0.12); color: var(--green);
}

.toggle-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tg-group { display: grid; gap: 6px; align-content: start; }
.tg-lbl { font-size: 12px; font-weight: 800; color: var(--text-dim); }

.slider-row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  font-size: 13px; font-weight: 700; color: var(--text-dim);
}
.slider-lbl strong { color: #fff; font-variant-numeric: tabular-nums; margin-left: 4px; }
.slider-note { font-size: 12.5px; font-weight: 800; color: var(--cyan); text-align: right; }
.slider-row input[type="range"] {
  width: 100%; accent-color: var(--cyan); height: 6px; cursor: pointer;
}

/* Exam bridge: 2D SVG + live readout */
.exam-strip {
  margin-top: 11px; display: grid; grid-template-columns: 236px 1fr; gap: 12px; align-items: stretch;
}
.svg-card {
  background: rgba(10, 14, 33, 0.65); border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px; padding: 10px; display: grid; place-items: center;
}
.exam-svg { width: 100%; height: auto; display: block; }

.readout {
  background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px;
}

.formula-box {
  background: rgba(139, 92, 246, 0.14); border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: 11px; padding: 8px 12px;
  font-size: 14.5px; font-weight: 800; color: #e2e8f0;
  font-variant-numeric: tabular-nums;
}
.formula-box strong { color: var(--gold); font-size: 16px; }

.metrics-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.metric {
  background: rgba(10, 14, 33, 0.55); border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px; padding: 8px 10px; display: grid; gap: 2px;
}
.m-k { font-size: 11px; font-weight: 700; color: var(--text-faint); }
.m-v { font-size: 17px; font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; }
.m-v.cyan { color: var(--cyan); }
.m-v.gold { color: var(--gold); }

.takeaway { font-size: 13.5px; line-height: 1.55; color: var(--text); }
.exam-rule {
  font-size: 12.5px; font-weight: 800; color: #fde68a;
  background: rgba(251, 191, 36, 0.09); border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 10px; padding: 7px 11px; line-height: 1.45;
}

.fn-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fn-chip {
  padding: 8px 10px; border-radius: 11px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.09);
  display: grid; gap: 2px; opacity: 0.55;
  transition: opacity 180ms ease, border-color 180ms ease, background-color 180ms ease;
}
.fn-chip strong { font-size: 12px; color: #fff; }
.fn-chip span { font-size: 11px; color: var(--text-dim); line-height: 1.3; }
.fn-chip.lit { opacity: 1; border-color: rgba(52, 211, 153, 0.5); background: rgba(52, 211, 153, 0.1); }

.br-footer { margin-top: 18px; display: flex; gap: 10px; }
.br-go { max-width: 280px; }

@media (hover: hover) and (pointer: fine) {
  .pill:hover:not(.active) { border-color: var(--border-strong); color: #fff; background: rgba(139, 92, 246, 0.12); }
  .pill-accent:hover { background: rgba(52, 211, 153, 0.22); }
}

@media (max-width: 760px) {
  .topbar { padding: 12px 14px; gap: 10px; flex-wrap: wrap; }
  .logo { font-size: 18px; gap: 8px; }
  .streak { order: 3; width: 100%; text-align: center; font-size: 12px; padding: 5px 10px; }
  .player { padding: 6px 10px 6px 6px; gap: 8px; }
  .xpbar { width: 84px; }
  .wrap { padding: 0 14px max(56px, env(safe-area-inset-bottom)); }
  .hero { margin: 22px 0 18px; }
  .qtext { font-size: 18px; }
  .opt { padding: 14px; font-size: 14.5px; }
  .nextbtn { max-width: none; width: 100%; }
  .r-actions { flex-wrap: wrap; }
  .r-actions .btn { min-width: 140px; }
  .history-row { flex-wrap: wrap; gap: 6px 10px; }
  .briefing { padding: 14px; }
  .stage-wrap { height: 270px; }
  .exam-strip { grid-template-columns: 1fr; }
  .svg-card { max-width: 320px; width: 100%; margin: 0 auto; }
  .toggle-grid { grid-template-columns: 1fr; }
  .slider-row { grid-template-columns: 1fr; gap: 6px; }
  .slider-note { text-align: left; }
  .fn-strip { grid-template-columns: 1fr; }
  .br-go { max-width: none; }
}

@media (max-width: 520px) {
  .mission { gap: 12px; padding: 14px; }
  .art { width: 64px; height: 64px; font-size: 30px; border-radius: 13px; }
  .art .rarity { display: none; }
  .m-title { font-size: 16.5px; }
  .m-ctas { flex-wrap: wrap; }
  .m-ctas .btn { min-width: 120px; }
}

.btn, .opt, .pill, .genie-btn, .genie-retry { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

@media (prefers-reduced-motion: reduce) {
  .pill, .btn, .mission, .opt, .stage-hint, .fn-chip { transition: opacity 160ms ease, background-color 160ms ease, border-color 160ms ease; }
  .pill:active, .btn:active { transform: none; }
}

/* simple login modal + recent activity */
.login-overlay {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center; padding: 20px;
  background: rgba(6, 9, 22, 0.82); backdrop-filter: blur(8px);
}
.login-card {
  position: relative;
  width: 100%; max-width: 380px; padding: 26px 22px; border-radius: 22px;
  background: #121735; border: 1px solid var(--border-strong);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); text-align: center;
}
.login-close {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px;
  border-radius: 10px; border: 1px solid var(--border); background: rgba(255,255,255,.06);
  color: var(--text-dim); font-size: 14px; font-weight: 800; cursor: pointer;
}
.tag-grid { display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow-y: auto; margin-bottom: 14px; }
.tag-pick {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px;
  border-radius: 14px; border: 1px solid var(--border); background: rgba(255,255,255,.05);
  color: var(--text); font-family: inherit; text-align: left; cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.tag-pick:hover { border-color: var(--cyan); background: rgba(34,211,238,.1); }
.tag-av {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center; background: var(--grad); font-weight: 900; color: #fff;
}
.tag-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.tag-info strong { font-size: 15px; }
.tag-info small { font-size: 11.5px; color: var(--text-dim); }
.tag-lock { font-size: 14px; opacity: .8; }
.login-new-btn { width: 100%; }
.login-err { min-height: 18px; margin-top: 8px; font-size: 12.5px; font-weight: 700; color: #fda4af; }
.sync-ok { margin-left: 8px; color: var(--green); font-size: 11px; letter-spacing: .04em; text-transform: none; }
.sync-off { margin-left: 8px; color: var(--text-faint); font-size: 11px; letter-spacing: .04em; text-transform: none; }
.login-mark {
  width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 14px;
  display: grid; place-items: center; background: var(--grad); font-size: 22px;
}
.login-card h2 { font-size: 22px; font-weight: 900; margin-bottom: 6px; }
.login-card p { font-size: 13px; color: var(--text-dim); margin-bottom: 18px; }
.login-card input {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--border); background: rgba(255,255,255,.06);
  color: var(--text); font-size: 16px; font-weight: 700; text-align: center; outline: none;
}
.login-card input:focus { border-color: var(--cyan); }
.login-actions { margin-top: 14px; display: flex; gap: 10px; justify-content: center; }

.history { max-width: 820px; margin: 34px auto 0; }
.history-title { font-size: 13px; font-weight: 800; letter-spacing: .08em; color: var(--text-dim); margin-bottom: 10px; }
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  border-radius: 14px; background: var(--surface); border: 1px solid var(--border); font-size: 13px;
}
.history-row .h-name { font-weight: 800; flex: 1; }
.history-row .h-score { color: var(--cyan); font-weight: 800; }
.history-row .h-stars { color: var(--gold); letter-spacing: 1px; }
.history-row .h-time { color: var(--text-faint); font-size: 12px; }

/* ---------- Geniul helper (Romanian AI wrong-answer coach) ---------- */
.genie-wrap { margin-top: 12px; }
.genie-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 16px; border-radius: 14px; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.28), rgba(34, 211, 238, 0.2));
  border: 1.5px solid rgba(167, 139, 250, 0.6);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.25);
  transition: transform 150ms var(--ease-out), border-color 160ms ease, background-color 160ms ease;
}
.genie-btn:active { transform: scale(0.97); }
.genie-btn-subtle {
  background: rgba(255, 255, 255, 0.04); border-color: rgba(167, 139, 250, 0.3);
  color: var(--text-dim); font-size: 13px; padding: 8px 13px; box-shadow: none;
}
.genie-icon { font-size: 18px; line-height: 1; }

.genie-card {
  border-radius: 18px; padding: 16px 18px;
  background:
    radial-gradient(420px 200px at 95% 0%, rgba(34, 211, 238, 0.16), transparent 65%),
    linear-gradient(145deg, rgba(76, 29, 149, 0.42), rgba(15, 23, 56, 0.88));
  border: 1.5px solid rgba(167, 139, 250, 0.52);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.38);
}
.genie-card-err { border-color: rgba(244, 114, 182, 0.45); }
.genie-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.genie-orb {
  width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 22px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.55), rgba(34, 211, 238, 0.4));
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.genie-title { font-size: 15.5px; font-weight: 900; color: #fff; line-height: 1.3; }
.genie-sub { font-size: 12px; font-weight: 700; color: var(--text-dim); margin-top: 2px; }

.genie-loading {
  display: flex; align-items: center; gap: 11px; padding: 8px 2px;
  color: #ddd6fe; font-size: 14px; font-weight: 700;
}
.genie-spin {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  border: 2.5px solid rgba(196, 181, 253, 0.28); border-top-color: var(--cyan);
  animation: genieSpin 700ms linear infinite;
}
@keyframes genieSpin { to { transform: rotate(360deg); } }

.genie-body { display: grid; gap: 10px; }
.genie-sec {
  background: rgba(10, 14, 33, 0.5); border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px; padding: 11px 13px;
}
.genie-lbl { font-size: 11.5px; font-weight: 800; color: var(--cyan); margin-bottom: 4px; }
.genie-sec p { font-size: 14px; line-height: 1.58; color: var(--text); }
.genie-sec strong, .genie-tip strong { color: #fde68a; font-weight: 800; }

.genie-tip {
  background: rgba(251, 191, 36, 0.1); border: 1px solid rgba(251, 191, 36, 0.32);
  border-radius: 12px; padding: 9px 13px; font-size: 13.5px; line-height: 1.5; color: #fef3c7;
}
.genie-retry {
  appearance: none; padding: 8px 14px; border-radius: 10px; cursor: pointer;
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--border-strong);
  color: #fff; font-family: inherit; font-size: 13px; font-weight: 800;
  transition: transform 150ms var(--ease-out), background-color 150ms ease;
}
.genie-retry:active { transform: scale(0.97); }

@media (hover: hover) and (pointer: fine) {
  .genie-btn:hover { border-color: var(--cyan); }
  .genie-btn-subtle:hover { color: #fff; border-color: var(--border-strong); }
  .genie-retry:hover { background: rgba(139, 92, 246, 0.24); }
}
@media (prefers-reduced-motion: reduce) {
  .genie-spin { animation-duration: 1600ms; }
  .genie-btn:active, .genie-retry:active { transform: none; }
}

/* missed questions review on results screen */
.missed-box {
  text-align: left; max-width: 640px; margin: 22px auto 0;
  padding: 16px; border-radius: 16px;
  background: rgba(244, 114, 182, 0.06); border: 1px solid rgba(244, 114, 182, 0.28);
}
.missed-title { font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--pink); margin-bottom: 10px; }
.missed-item { padding: 10px 0; border-top: 1px solid rgba(255,255,255,.07); }
.missed-item:first-of-type { border-top: 0; padding-top: 0; }
.missed-q { font-weight: 800; font-size: 14px; margin-bottom: 4px; }
.missed-a { font-size: 13px; margin-bottom: 4px; }
.m-bad { color: #fda4af; }
.m-ok { color: var(--green); font-weight: 700; }
.missed-why { font-size: 12.5px; line-height: 1.45; color: var(--text-dim); }
