/* Noud Games — game stage, shared by every game */
.game-main { padding: 22px 0 0; }
.crumbs { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 14px; margin: 0 0 14px; }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--text); }
.crumbs i { width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg); opacity: .7; }
html.embed .game-main { padding: 0; } html.embed .game-main > .wrap { width: 100%; }
html.embed .stage { border-radius: 0; min-height: 100vh; border: 0; }

.stage {
  --accent: var(--gold);
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(780px, calc(100vh - 110px)); display: flex; flex-direction: column;
  border-radius: var(--r-lg); border: 1px solid rgba(255,255,255,.1);
  background: var(--navy-950); box-shadow: var(--shadow-3);
}
.stage-art { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.stage-art svg { width: 100%; height: 100%; }
.stage-bar { display: flex; align-items: center; gap: 12px; padding: 16px clamp(14px, 3vw, 26px) 4px; }
.stage-title { display: inline-flex; align-items: center; gap: 12px; margin-inline-end: auto; min-width: 0; }
.stage-title b { font-family: var(--f-display); font-weight: 600; font-size: 19px; white-space: nowrap; }
.stage-title .ar { font-size: 21px; color: var(--gold); line-height: 1; }
.stage-title .dot { width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); flex: none; }
.stage-tools { display: flex; gap: 8px; }
.stage-tools .icon-btn { background: rgba(8,17,42,.45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
@media (max-width: 480px) { .stage-title .ar, .stage-title .dot { display: none; } .stage-title b { font-size: 17px; } }

.screen { flex: 1; display: flex; flex-direction: column; padding: 10px clamp(16px, 4vw, 52px) clamp(20px, 3vw, 36px); animation: rise .6s var(--ease) both; }
.screen[hidden] { display: none; }

/* ---------- intro ---------- */
.intro { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 56px); align-items: center; flex: 1; }
.intro h1 { font-size: clamp(40px, 6vw, 72px); margin: 14px 0 6px; }
.intro .ar-title { font-family: var(--f-quran); font-size: clamp(30px, 4vw, 44px); color: var(--gold); direction: rtl; line-height: 1.5; text-shadow: 0 0 30px rgba(229,185,78,.35); }
.intro .lead { margin: 6px 0 22px; }
.steps { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 12px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; color: var(--muted); font-size: 15.5px; }
.steps li b { color: var(--text); font-weight: 600; }
.steps .n { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--gold); border: 1.5px solid rgba(229,185,78,.5); background: rgba(229,185,78,.08); }
.levels { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.level {
  text-align: start; padding: 14px 16px; border-radius: 16px; cursor: pointer;
  border: 1.5px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04);
  transition: border-color .2s, background .2s, transform .25s var(--spring);
}
.level:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.25); }
.level:active { transform: scale(.98); }
.level b { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.level b::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--faint); box-shadow: inset 0 0 0 3px var(--navy-950); transition: .2s; }
.level span { display: block; color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.level[aria-pressed="true"] { border-color: var(--gold); background: rgba(229,185,78,.1); }
.level[aria-pressed="true"] b::before { border-color: var(--gold); background: var(--gold); }
.intro-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.best { color: var(--faint); font-size: 14px; }
.best b { color: var(--gold); }

.legend { padding: clamp(18px, 2.4vw, 28px); border-radius: var(--r-lg); }
.legend h3 { font-size: 20px; margin-bottom: 4px; }
.legend > p { color: var(--muted); margin: 0 0 16px; font-size: 14.5px; }
.legend-grid { display: grid; gap: 10px; }
.rule-row { display: grid; grid-template-columns: 6px 1fr auto; gap: 14px; align-items: center; padding: 10px 14px 10px 0; border-radius: 14px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.07); overflow: hidden; }
.rule-row::before { content: ""; align-self: stretch; background: var(--c); border-radius: 0 6px 6px 0; box-shadow: 0 0 16px var(--c); }
.rule-row b { font-size: 15.5px; display: block; }
.rule-row b .ar { font-size: 20px; color: var(--c); margin-inline-start: 8px; font-weight: 700; }
.rule-row small { color: var(--muted); font-size: 13px; }
.rule-row .letters { font-family: var(--f-quran); direction: rtl; font-size: 21px; color: var(--ivory); letter-spacing: .08em; white-space: nowrap; }
@media (max-width: 900px) { .intro { grid-template-columns: 1fr; } .intro h1 { margin-top: 8px; } }
@media (max-width: 420px) { .rule-row { grid-template-columns: 6px 1fr; } .rule-row .letters { grid-column: 2; font-size: 19px; } .levels { grid-template-columns: 1fr; } }

/* ---------- HUD ---------- */
.hud { display: flex; align-items: center; gap: clamp(10px, 2vw, 18px); margin: 4px 0 clamp(14px, 2.2vw, 22px); flex-wrap: wrap; }
.progress { display: flex; align-items: center; gap: 12px; margin-inline-end: auto; }
.dots { display: flex; gap: 6px; }
.dots i { width: 22px; height: 6px; border-radius: 4px; background: rgba(255,255,255,.14); transition: background .3s, box-shadow .3s, width .3s var(--ease); }
.dots i.ok { background: var(--emerald); } .dots i.no { background: var(--coral); }
.dots i.now { background: var(--gold); width: 34px; box-shadow: 0 0 12px rgba(229,185,78,.8); }
.round { font-weight: 700; color: var(--muted); font-size: 14.5px; white-space: nowrap; }
.round b { color: var(--text); font-size: 17px; }
.stat { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 10px; border-radius: 999px; background: rgba(8,17,42,.5); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.stat svg { width: 20px; height: 20px; }
.stat small { display: block; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); line-height: 1; }
.stat b { display: block; font-size: 19px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat.score svg { color: var(--gold); }
.stat.streak svg { color: var(--coral); }
.stat.streak.hot { border-color: rgba(255,122,107,.5); box-shadow: 0 0 18px rgba(255,122,107,.25); }
.stat.timer svg { color: var(--turquoise); }
.stat .bump { animation: pop .45s var(--spring); }
@media (max-width: 560px) { .dots i { width: 12px; } .dots i.now { width: 20px; } .hud { gap: 8px; } .progress { width: 100%; justify-content: space-between; } .stat { padding: 5px 12px 5px 8px; } .stat b { font-size: 17px; } }
@media (max-width: 380px) { .dots { gap: 4px; } .dots i { width: 9px; } .dots i.now { width: 16px; } }

/* ---------- prompt ---------- */
.prompt {
  position: relative; margin: 0 auto clamp(16px, 2.4vw, 26px); width: min(100%, 820px);
  padding: clamp(18px, 3vw, 30px) clamp(16px, 3vw, 34px) clamp(16px, 2.4vw, 24px); border-radius: var(--r-lg); text-align: center;
}
.prompt::before { content: ""; position: absolute; inset: -30% 15% auto; height: 70%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 30%, transparent), transparent); filter: blur(10px); z-index: -1; opacity: .7; }
.prompt .ask { color: var(--muted); font-size: 14.5px; font-weight: 500; margin: 0; }
.prompt .verse { font-family: var(--f-quran); direction: rtl; font-size: clamp(44px, 8.2vw, 92px); line-height: 1.7; margin: 2px 0 0; color: var(--ivory); text-shadow: 0 2px 24px rgba(0,0,0,.35); overflow-wrap: anywhere; }
.verse .hl { color: var(--gold); text-shadow: 0 0 22px rgba(229,185,78,.55); }
.prompt .ref { display: inline-flex; align-items: center; gap: 8px; color: var(--faint); font-size: 13.5px; margin-top: 10px; }
.prompt .ref .ar { color: var(--muted); font-size: 16px; }
.meet { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 12px; direction: rtl; flex-wrap: wrap; }
.meet .tile { min-width: 64px; padding: 4px 14px 8px; border-radius: 14px; background: rgba(8,17,42,.55); border: 1px solid rgba(255,255,255,.12); text-align: center; }
.meet .tile .quran { font-size: 34px; line-height: 1.9; display: block; color: var(--ivory); }
.meet .tile small { display: block; direction: ltr; font-size: 11px; color: var(--faint); letter-spacing: .06em; text-transform: uppercase; margin-top: 2px; }
.meet .tile.src .quran { color: var(--gold); }
.meet .tile.nx { border-color: color-mix(in srgb, var(--hint, #fff) 55%, transparent); }
.meet .tile.nx .quran { color: var(--hint, var(--ivory)); }
.meet .plus { color: var(--faint); font-size: 22px; }

/* ---------- choices ---------- */
.choices { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 16px); width: min(100%, 1040px); margin: 0 auto; }
.choice {
  --c: var(--gold); position: relative; isolation: isolate; overflow: hidden; cursor: pointer; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: clamp(120px, 16vw, 168px); padding: 18px 12px 14px; border-radius: 22px;
  border: 1.5px solid color-mix(in srgb, var(--c) 45%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 22%, rgba(14,26,58,.7)), rgba(10,20,48,.78));
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 10px 26px -10px color-mix(in srgb, var(--c) 60%, transparent), var(--shadow-1);
  transition: transform .28s var(--spring), box-shadow .25s, border-color .25s, opacity .3s, filter .3s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.choice::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--c); box-shadow: 0 0 18px var(--c); }
.choice::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--c) 28%, transparent), transparent 70%); opacity: .7; transition: opacity .3s; }
.choice:hover { transform: translateY(-4px); border-color: var(--c); box-shadow: 0 1px 0 rgba(255,255,255,.1) inset, 0 18px 36px -12px color-mix(in srgb, var(--c) 75%, transparent), var(--shadow-1); }
.choice:hover::after { opacity: 1; }
.choice:active { transform: translateY(0) scale(.97); transition-duration: .08s; }
.choice .num {
  position: absolute; top: 12px; inset-inline-start: 12px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 14.5px; color: #0B1430; background: var(--c);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 30%, transparent);
}
.choice .ar-name { font-family: var(--f-ar); font-weight: 700; font-size: clamp(28px, 3.4vw, 38px); line-height: 1.35; color: #fff; direction: rtl; }
.choice .en-name { font-weight: 700; font-size: 15.5px; color: var(--c); letter-spacing: .01em; filter: brightness(1.25); }
.choice .sub { font-size: 12.5px; color: var(--muted); }
.choice .hint { font-family: var(--f-quran); direction: rtl; font-size: 18px; color: rgba(255,255,255,.72); margin-top: 4px; line-height: 1.5; letter-spacing: .05em; }
.choice .mark { position: absolute; top: 10px; inset-inline-end: 10px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; opacity: 0; transform: scale(.5); transition: .35s var(--spring); }
.choice .mark svg { width: 20px; height: 20px; }
.choices.done .choice { cursor: default; }
.choices.done .choice:not(.is-right):not(.is-wrong) { opacity: .38; filter: saturate(.5); transform: none; }
.choice.is-right { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 45%, transparent), 0 0 46px -6px var(--c), var(--shadow-2); transform: translateY(-4px) scale(1.02); }
.choice.is-right .mark { opacity: 1; transform: none; background: var(--emerald); color: #fff; }
.choice.is-wrong { animation: shake .5s var(--ease); border-color: var(--coral); }
.choice.is-wrong .mark { opacity: 1; transform: none; background: var(--coral); color: #fff; }
@media (max-width: 760px) { .choices { --cols: 2 !important; } }
@media (max-width: 360px) { .choice { min-height: 112px; } .choice .hint { font-size: 16px; } }

/* ---------- feedback ---------- */
.feedback { width: min(100%, 820px); margin: clamp(14px, 2vw, 22px) auto 0; display: flex; align-items: center; gap: 16px; padding: 14px 16px 14px 18px; border-radius: 20px; animation: rise .45s var(--ease) both; }
.feedback[hidden] { display: none; }
.feedback .fi { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.feedback .fi svg { width: 24px; height: 24px; }
.feedback.ok .fi { background: var(--emerald); box-shadow: 0 0 22px rgba(31,181,143,.6); }
.feedback.no .fi { background: var(--coral); box-shadow: 0 0 22px rgba(255,122,107,.5); }
.feedback .ft { flex: 1; min-width: 0; }
.feedback .ft p b { color: var(--text); }
.feedback .ft .ttl { display: block; font-family: var(--f-display); font-size: 19px; font-weight: 600; }
.feedback .ft p { margin: 2px 0 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.feedback .ft p .quran, .feedback .ft p .ar { color: var(--ivory); font-size: 1.35em; }
.feedback .btn { flex: none; }
@media (max-width: 600px) { .feedback { flex-wrap: wrap; } .feedback .btn { width: 100%; } }

/* ---------- timer ring ---------- */
.ring { width: 22px; height: 22px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3.5; }
.ring .bg { stroke: rgba(255,255,255,.15); } .ring .fg { stroke: var(--turquoise); stroke-linecap: round; transition: stroke-dashoffset .25s linear, stroke .3s; }
.stat.timer.low .fg { stroke: var(--coral); } .stat.timer.low { border-color: rgba(255,122,107,.5); }

/* ---------- end screen ---------- */
.end { flex: 1; display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(20px, 4vw, 48px); align-items: center; }
.trophy { position: relative; display: grid; place-items: center; }
.trophy svg { width: min(100%, 340px); height: auto; }
.end h2 { font-size: clamp(36px, 5vw, 58px); }
.end .ar-praise { display: inline-block; font-family: var(--f-quran); font-size: clamp(30px, 4vw, 42px); color: var(--gold); direction: rtl; line-height: 1.6; text-shadow: 0 0 28px rgba(229,185,78,.45); }
.end .lead { margin: 8px 0 18px; }
.rating { display: flex; gap: 8px; margin: 4px 0 6px; }
.rating svg { width: 38px; height: 38px; color: rgba(255,255,255,.14); }
.rating svg.on { color: var(--gold); filter: drop-shadow(0 0 10px rgba(229,185,78,.7)); animation: pop .6s var(--spring) both; }
.rating svg.on:nth-child(2) { animation-delay: .15s; } .rating svg.on:nth-child(3) { animation-delay: .3s; }
.end-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.end-stats div { padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); }
.end-stats small { display: block; color: var(--faint); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.end-stats b { font-size: 26px; font-variant-numeric: tabular-nums; }
.end-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.review { margin: 0 0 20px; padding: 14px 16px; border-radius: 18px; }
.review h3 { font-size: 17px; margin-bottom: 8px; }
.review ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 250px; overflow: auto; }
.review li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 12px; border-radius: 12px; background: rgba(8,17,42,.45); }
.review li .quran { font-size: 26px; line-height: 1.7; color: var(--ivory); }
.review li .ans { text-align: end; font-size: 13.5px; color: var(--muted); }
.review li .ans b { color: var(--c, var(--gold)); }
.review li .ans s { color: var(--coral); opacity: .85; }
.review .clean { color: var(--emerald); margin: 0; font-weight: 600; }
@media (max-width: 860px) { .end { grid-template-columns: 1fr; text-align: center; } .rating, .end-actions { justify-content: center; } .trophy svg { width: 220px; } .review { text-align: start; } }
@media (max-width: 380px) { .end-stats b { font-size: 21px; } }

/* ---------- smartboard (full screen): everything bigger ---------- */
.stage:fullscreen { border-radius: 0; border: 0; min-height: 100vh; width: 100vw; overflow: auto; }
.stage:-webkit-full-screen { border-radius: 0; border: 0; min-height: 100vh; width: 100vw; overflow: auto; }
.stage:fullscreen .prompt .verse { font-size: clamp(64px, 9vw, 132px); }
.stage:fullscreen .choice { min-height: clamp(150px, 18vh, 230px); }
.stage:fullscreen .choice .ar-name { font-size: clamp(36px, 3.6vw, 56px); }
.stage:fullscreen .choice .en-name { font-size: 19px; }
.stage:fullscreen .choice .num { width: 40px; height: 40px; font-size: 18px; }
.stage:fullscreen .choices, .stage:fullscreen .prompt, .stage:fullscreen .feedback { width: min(100%, 1320px); }
.stage:fullscreen .btn { min-height: 60px; font-size: 18px; padding-inline: 28px; }
.stage:fullscreen .icon-btn { width: 52px; height: 52px; }
