/* =====================================================================
   NalarAI · games.css — Nalar Games & Turnamen (port Education Games ke tema Lebah Antariksa)
   Standar glass: blur ≤ 24px, maksimal 2 lapis kaca bertumpuk, kontras teks ≥ 4,5:1, Poppins/Fredoka.
   Variabel lama Education Games dipetakan ke token NalarAI di bawah agar gaya game tetap berjalan.
   ===================================================================== */
:root {
  --glass-bg: var(--nl-glass); --glass-bg-strong: var(--nl-glass-strong); --glass-border: var(--nl-glass-border);
  --glass-shadow: var(--nl-shadow); --glass-blur: var(--nl-blur); --text-primary: var(--nl-text);
  --input-border: rgba(124, 92, 255, .3); --brand-600: var(--nl-violet-ink); --brand-700: #33219A;
}

/* ---------- game.css ---------- */
/* game.css — gaya bersama semua game (dipakai bersama theme.css) */

:root {
  --gk-blue: #2f80ed; --gk-blue-d: #1d5fc4; --gk-red: #ef4444; --gk-red-d: #c42828;
  --gk-yellow: #fbbf24; --gk-green: #22c55e; --gk-purple: #8b5cf6;
  --gk-font: 'Fredoka', 'Poppins', system-ui, sans-serif;
}
.gk-font, .gk-title { font-family: var(--gk-font); }

.game-shell { max-width: 1180px; margin: 0 auto; padding: 0 12px 24px; }
.game-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 12px; flex-wrap: wrap; }
.game-topbar h1 { font-family: var(--gk-font); font-weight: 700; font-size: clamp(1.3rem, 2.6vw, 1.9rem); margin: 0; }
.gk-icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--input-border); background: var(--glass-bg-strong);
  color: var(--text-primary); display: inline-flex; align-items: center; justify-content: center; }
.gk-icon-btn:hover { background: var(--glass-bg); }

/* ---------- panggung ---------- */
.game-stage { position: relative; border-radius: 28px; overflow: hidden; box-shadow: 0 18px 50px rgba(15, 34, 84, .22);
  background: linear-gradient(#7dd3fc, #bae6fd 55%, #dcfce7); isolation: isolate; }
.game-stage svg.scene { display: block; width: 100%; height: auto; }
[data-theme="dark"] .game-stage { box-shadow: 0 18px 50px rgba(0, 0, 0, .5); }

.gk-hud { position: absolute; inset: 12px 12px auto 12px; display: flex; justify-content: space-between; gap: 8px; pointer-events: none; z-index: 5; }
.gk-chip { pointer-events: auto; font-family: var(--gk-font); font-weight: 600; background: rgba(255, 255, 255, .88); color: #0f172a;
  border-radius: 999px; padding: 6px 14px; box-shadow: 0 4px 14px rgba(0, 0, 0, .12); display: inline-flex; align-items: center; gap: 6px; font-size: 1rem; }
.gk-chip img { width: 22px; height: 22px; }
.gk-chip.blue { background: var(--gk-blue); color: #fff; }
.gk-chip.red { background: var(--gk-red); color: #fff; }
.gk-chip.timer.low { background: var(--gk-red); color: #fff; animation: gk-pulse .6s infinite; }

/* ---------- overlay start / hasil ---------- */
.gk-overlay { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(15, 23, 42, .45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.gk-overlay[hidden] { display: none; }
.gk-panel { background: #fff; color: #0f172a; border-radius: 28px; padding: 26px 24px; width: min(520px, 100%); text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .3); animation: gk-rise .45s cubic-bezier(.2, .9, .3, 1.3) both; max-height: 100%; overflow: auto; }
[data-theme="dark"] .gk-panel { background: #111a33; color: #f1f5fb; }
.gk-panel h2 { font-family: var(--gk-font); font-weight: 700; font-size: 2rem; margin-bottom: 6px; }
.gk-panel .lead-sm { color: #64748b; margin-bottom: 16px; }
[data-theme="dark"] .gk-panel .lead-sm { color: #9aa6c4; }
.gk-hero-img { width: 96px; height: 96px; margin: -6px auto 6px; display: block; animation: gk-bob 2.4s ease-in-out infinite; }

.gk-options { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 10px 0 4px; }
.gk-option { border: 2px solid #e2e8f0; background: #f8fafc; color: #0f172a; border-radius: 16px; padding: 10px 14px; font-weight: 600;
  font-family: var(--gk-font); min-width: 110px; }
.gk-option small { display: block; font-weight: 500; color: #64748b; font-size: .75rem; }
.gk-option.active { border-color: var(--gk-blue); background: #eff6ff; box-shadow: 0 0 0 3px rgba(47, 128, 237, .2); }
[data-theme="dark"] .gk-option { background: #0b1226; border-color: #22305a; color: #e2e8f0; }
[data-theme="dark"] .gk-option.active { background: #13224a; border-color: var(--gk-blue); }
.gk-label { font-family: var(--gk-font); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; margin-top: 12px; }

.gk-btn { font-family: var(--gk-font); font-weight: 700; font-size: 1.25rem; border: 0; border-radius: 18px; padding: 14px 34px; color: #fff;
  background: linear-gradient(#34d399, #16a34a); box-shadow: 0 6px 0 #11803a, 0 12px 24px rgba(22, 163, 74, .35); transition: transform .08s ease; }
.gk-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #11803a; }
.gk-btn.secondary { background: linear-gradient(#60a5fa, #2563eb); box-shadow: 0 6px 0 #1d4ed8, 0 12px 24px rgba(37, 99, 235, .3); }
.gk-btn.ghost { background: #e2e8f0; color: #0f172a; box-shadow: 0 6px 0 #cbd5e1; }

.gk-stars { display: flex; justify-content: center; gap: 6px; margin: 4px 0 10px; }
.gk-star { width: 56px; height: 56px; filter: grayscale(1) opacity(.3); transform: scale(.6); animation: gk-starpop .5s ease forwards; }
.gk-star.on { filter: none; }
.gk-star:nth-child(2) { width: 70px; height: 70px; margin-top: -10px; }

/* ---------- countdown ---------- */
.gk-countdown { position: absolute; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; pointer-events: none;
  background: rgba(15, 23, 42, .25); }
.gk-countdown span { font-family: var(--gk-font); font-weight: 700; font-size: clamp(5rem, 16vw, 11rem); color: #fff;
  -webkit-text-stroke: 6px #1e3a8a; paint-order: stroke fill; animation: gk-count .8s ease both; }
.gk-countdown span.go { color: var(--gk-yellow); font-size: clamp(3.5rem, 11vw, 8rem); }

/* ---------- teks melayang & efek ---------- */
.gk-float { position: absolute; z-index: 25; font-family: var(--gk-font); font-weight: 700; font-size: 2rem; color: #fff; pointer-events: none;
  -webkit-text-stroke: 4px rgba(0, 0, 0, .35); paint-order: stroke fill; animation: gk-floatup 1.1s ease-out forwards; transform: translate(-50%, 0); }
.gk-float.good { color: #fde047; } .gk-float.bad { color: #fecaca; }
.gk-shake { animation: gk-shake .45s; }
.gk-pop { animation: gk-popa .35s; }

/* ---------- panel tim + keypad ---------- */
.team-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
@media (max-width: 640px) { .team-row { gap: 8px; } }
.team-card { border-radius: 24px; padding: 14px; color: #fff; position: relative; overflow: hidden; }
.team-card.blue { background: linear-gradient(160deg, #3b82f6, #1d4ed8); }
.team-card.red { background: linear-gradient(160deg, #f87171, #dc2626); }
.team-card .team-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--gk-font); font-weight: 600; margin-bottom: 8px; }
.team-card .streak { font-size: .9rem; opacity: .95; }
.team-card .question { font-family: var(--gk-font); font-weight: 700; font-size: clamp(1.8rem, 5vw, 3rem); text-align: center; line-height: 1.1;
  background: rgba(255, 255, 255, .16); border-radius: 18px; padding: 10px 6px; margin-bottom: 10px; }
.team-card.is-stunned { filter: saturate(.4); }

.gk-keypad .gk-display { font-family: var(--gk-font); font-weight: 700; font-size: 2rem; text-align: center; background: #fff; color: #0f172a;
  border-radius: 14px; padding: 4px; margin-bottom: 8px; min-height: 52px; }
.gk-keypad .gk-display.empty { color: #cbd5e1; }
.gk-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gk-key { font-family: var(--gk-font); font-weight: 700; font-size: clamp(1.3rem, 3.5vw, 1.8rem); border: 0; border-radius: 16px; padding: 10px 0;
  background: #fff; color: #0f172a; box-shadow: 0 5px 0 rgba(0, 0, 0, .18); touch-action: manipulation; user-select: none; transition: transform .06s; }
.gk-key:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(0, 0, 0, .18); }
.gk-key.ok { background: var(--gk-yellow); color: #422006; }
.gk-key.del { background: rgba(255, 255, 255, .7); }
.gk-keypad.is-disabled { opacity: .55; pointer-events: none; }

/* ---------- animasi ---------- */
@keyframes gk-count { 0% { transform: scale(2.2); opacity: 0; } 25% { transform: scale(1); opacity: 1; } 80% { opacity: 1; } 100% { transform: scale(.7); opacity: 0; } }
@keyframes gk-floatup { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.6); } 20% { opacity: 1; transform: translate(-50%, 0) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -70px) scale(1); } }
@keyframes gk-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-9px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }
@keyframes gk-popa { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes gk-rise { from { opacity: 0; transform: translateY(30px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes gk-bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(3deg); } }
@keyframes gk-starpop { 0% { transform: scale(0) rotate(-40deg); } 70% { transform: scale(1.25) rotate(8deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes gk-pulse { 50% { transform: scale(1.08); } }
@keyframes gk-cloud { from { transform: translateX(-200px); } to { transform: translateX(1200px); } }
.gk-cloud { animation: gk-cloud linear infinite; }

@media (prefers-reduced-motion: reduce) {
  .gk-cloud, .gk-hero-img { animation: none !important; }
}

/* ---------- arena: panggung + 2 panel tim ---------- */
.arena { position: relative; }
.arena > .gk-overlay, .arena > .gk-countdown { border-radius: 28px; }
.team-card { display: grid; gap: 10px; }
@media (min-width: 768px) {
  .team-card { grid-template-columns: 1fr 1.15fr; align-items: center; }
  .team-card .question { margin-bottom: 0; padding: 18px 6px; }
  .team-card .gk-key { padding: 7px 0; }
}
@media (max-width: 767.98px) {
  .team-card { padding: 10px; }
  .team-card .question { font-size: 1.6rem; padding: 6px; margin-bottom: 0; }
  .gk-keys { gap: 6px; }
  .gk-key { padding: 6px 0; font-size: 1.25rem; }
  .gk-keypad .gk-display { font-size: 1.5rem; min-height: 40px; }
}

/* ---------- kartu pilihan (kategori / operasi / level) ---------- */
.pick-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; text-decoration: none;
  padding: 22px 12px; border-radius: 26px; color: #0f172a; background: #fff; border: 3px solid transparent; height: 100%;
  box-shadow: 0 8px 0 color-mix(in srgb, var(--pick, #3b82f6) 35%, transparent), 0 14px 30px rgba(15, 34, 84, .12); transition: transform .15s ease; }
.pick-card:hover { transform: translateY(-4px); border-color: var(--pick, #3b82f6); color: #0f172a; }
[data-theme="dark"] .pick-card { background: #111a33; color: #f1f5fb; }
.pick-symbol { width: 84px; height: 84px; border-radius: 26px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--gk-font);
  font-weight: 700; font-size: 3rem; color: #fff; background: var(--pick, #3b82f6); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .15); margin-bottom: 6px; }
.pick-symbol img { width: 64px; height: 64px; }
.pick-title { font-weight: 700; font-size: 1.3rem; }
.pick-sub { font-size: .85rem; color: #64748b; }
[data-theme="dark"] .pick-sub { color: #9aa6c4; }
.pick-stars img { width: 22px; height: 22px; }
.pick-stars img.off { filter: grayscale(1) opacity(.3); }

/* ---------- logic_tiles.css ---------- */
/* logic_tiles.css — kartu memori 3D flip */
.lt-board-wrap { position: relative; overflow: hidden; border-radius: 28px; padding: clamp(10px, 2.5vw, 22px);
  background: radial-gradient(circle at 20% 10%, #c4b5fd 0, transparent 45%), radial-gradient(circle at 85% 90%, #93c5fd 0, transparent 45%), linear-gradient(135deg, #ede9fe, #dbeafe);
  box-shadow: 0 18px 50px rgba(15, 34, 84, .18); }
[data-theme="dark"] .lt-board-wrap { background: radial-gradient(circle at 20% 10%, #4c1d95 0, transparent 45%), radial-gradient(circle at 85% 90%, #1e3a8a 0, transparent 45%), #0b1226; }

.lt-board { display: grid; gap: clamp(6px, 1.4vw, 14px); margin: 0 auto; grid-template-columns: repeat(var(--cols), 1fr);
  width: min(100%, calc(var(--cols) * 150px), calc((100vh - 250px) / 1.25)); }
@media (max-width: 575.98px) { .lt-board { width: 100%; } }

.lt-card { position: relative; aspect-ratio: 3 / 3.6; border: 0; padding: 0; background: none; perspective: 900px; cursor: pointer; border-radius: 18px; }
.lt-card:focus-visible { outline: 3px solid #f59e0b; outline-offset: 3px; }
.lt-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); border-radius: inherit; }
.lt-card.open .lt-inner, .lt-card.matched .lt-inner { transform: rotateY(180deg); }
.lt-face { position: absolute; inset: 0; border-radius: inherit; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
.lt-back { background: linear-gradient(145deg, #8b5cf6, #3b82f6); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .18), 0 6px 14px rgba(59, 7, 100, .25); }
.lt-back::before { content: ""; position: absolute; inset: 7%; border-radius: 12px; border: 2px dashed rgba(255, 255, 255, .35);
  background-image: radial-gradient(rgba(255, 255, 255, .18) 2px, transparent 2.5px); background-size: 14px 14px; }
.lt-back span { position: relative; font-family: var(--gk-font); font-weight: 700; color: #fff; font-size: clamp(1.4rem, 4vw, 2.6rem);
  width: 1.8em; height: 1.8em; border-radius: 50%; background: rgba(255, 255, 255, .2); display: flex; align-items: center; justify-content: center;
  text-shadow: 0 3px 0 rgba(0, 0, 0, .15); }
.lt-card:hover:not(.open):not(.matched) .lt-inner { transform: translateY(-4px) rotate(-1deg); }
.lt-front { transform: rotateY(180deg); background: #fff; box-shadow: inset 0 -6px 0 rgba(15, 23, 42, .08), 0 6px 14px rgba(15, 34, 84, .15); }
.lt-front::before { content: ""; position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%; top: 8%; background: var(--tint, #fef3c7); }
.lt-front img { position: relative; width: 66%; height: auto; aspect-ratio: 1; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .15)); }
.lt-front .lt-name { position: relative; font-family: var(--gk-font); font-weight: 600; font-size: clamp(.6rem, 1.6vw, .95rem); color: #334155; margin-top: 4%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 92%; }
.g6 .lt-front .lt-name { display: none; }
[data-theme="dark"] .lt-front { background: #f8fafc; }

.lt-card.matched .lt-front { box-shadow: 0 0 0 4px #22c55e, 0 10px 24px rgba(34, 197, 94, .35); animation: lt-match .55s ease; }
.lt-card.matched::after { content: "✓"; position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border-radius: 50%; background: #22c55e;
  color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: .9rem; box-shadow: 0 3px 8px rgba(0, 0, 0, .2); z-index: 2; }
.lt-card.wrong .lt-front { box-shadow: 0 0 0 4px #f87171; }
.lt-card.wrong { animation: gk-shake .45s; }

.lt-toast { position: absolute; left: 50%; bottom: 14px; transform: translate(-50%, 140%); z-index: 15; width: min(460px, 92%);
  display: flex; gap: 12px; align-items: center; background: #fff; color: #0f172a; border-radius: 20px; padding: 10px 14px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .25); transition: transform .35s cubic-bezier(.3, 1.4, .5, 1), opacity .2s; opacity: 0; visibility: hidden; }
.lt-toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.lt-toast img { width: 52px; height: 52px; flex: none; }
.lt-toast strong { font-family: var(--gk-font); font-size: 1.1rem; display: block; }
.lt-toast small { color: #64748b; }

.lt-peek { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 12; font-family: var(--gk-font); font-weight: 700;
  background: #f59e0b; color: #fff; padding: 6px 18px; white-space: nowrap; font-size: clamp(.8rem, 2.4vw, 1rem); border-radius: 999px; box-shadow: 0 6px 16px rgba(0, 0, 0, .2); }

.lt-learned { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 10px 0 4px; max-height: 140px; overflow: auto; }
.lt-learned span { display: inline-flex; align-items: center; gap: 4px; background: #f1f5f9; border-radius: 999px; padding: 3px 10px 3px 4px; font-size: .8rem; color: #0f172a; }
.lt-learned img { width: 22px; height: 22px; }

@keyframes lt-match { 0% { transform: rotateY(180deg) scale(1); } 40% { transform: rotateY(180deg) scale(1.1); } 100% { transform: rotateY(180deg) scale(1); } }
@media (prefers-reduced-motion: reduce) { .lt-inner { transition: none; } }

/* ---------- tournament.css ---------- */
/* tournament.css — layar presenter host & HP peserta (kuis langsung) */
:root {
  --opt-a: #be123c; --opt-a-d: #881337;
  --opt-b: #0369a1; --opt-b-d: #0c4a6e;
  --opt-c: #b45309; --opt-c-d: #78350f;
  --opt-d: #047857; --opt-d-d: #064e3b;
}
.tv { position: relative; min-height: calc(100vh - 150px); border-radius: 28px; overflow: hidden; color: #fff; padding: 22px clamp(14px, 3vw, 36px) 96px;
  background: radial-gradient(circle at 15% 15%, rgba(124, 92, 255, .45), transparent 40%), radial-gradient(circle at 85% 85%, rgba(250, 204, 21, .25), transparent 40%),
  linear-gradient(140deg, #141B45, #2A1F74 45%, #4B33C9); font-family: var(--gk-font); }
.tv:fullscreen { border-radius: 0; min-height: 100vh; padding-bottom: 110px; }
.tv .bg-shape { position: absolute; border-radius: 30%; opacity: .08; background: #fff; animation: tv-float 16s ease-in-out infinite; pointer-events: none; }
.tv h1, .tv h2, .tv h3 { font-family: var(--gk-font); font-weight: 700; color: #fff; }
.tv-screen { position: relative; z-index: 1; }
.tv-screen[hidden] { display: none !important; }

/* bar kontrol host */
.tv-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px clamp(12px, 3vw, 28px); background: rgba(8, 15, 40, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.tv-bar .tv-status { font-weight: 600; opacity: .9; margin-right: auto; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.tv-bar .tv-status b { font-weight: 700; }
.tv-btn { font-family: var(--gk-font); font-weight: 700; border: 0; border-radius: 14px; padding: 10px 22px; font-size: 1.05rem; color: #0f172a;
  background: #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, .25); }
.tv-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.tv-btn.primary { background: #facc15; color: #422006; }
.tv-btn.ghost { background: rgba(255, 255, 255, .15); color: #fff; box-shadow: none; }
.tv-btn.danger { background: rgba(244, 63, 94, .9); color: #fff; }
.tv-btn:disabled { opacity: .45; }

/* lobby */
.tv-join { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; background: #fff; color: #0f172a; border-radius: 24px;
  padding: 16px 22px; box-shadow: 0 16px 40px rgba(0, 0, 0, .25); }
.tv-join .lbl { font-weight: 600; color: #64748b; font-size: clamp(.9rem, 1.6vw, 1.2rem); }
.tv-join .url { font-weight: 700; font-size: clamp(1rem, 2.2vw, 1.6rem); word-break: break-all; }
.tv-pin { font-weight: 700; font-size: clamp(2.6rem, 7vw, 5.5rem); letter-spacing: .12em; line-height: 1; color: #1e3a8a; }
.tv-qr { background: #fff; border-radius: 16px; padding: 6px; width: clamp(110px, 14vw, 170px); height: auto; }
.tv-count { display: inline-flex; align-items: center; gap: 10px; background: rgba(0, 0, 0, .25); padding: 8px 18px; border-radius: 999px; font-weight: 700; font-size: 1.3rem; }
.tv-players { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.tv-player { display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .95); color: #0f172a; border-radius: 999px;
  padding: 5px 14px 5px 5px; font-weight: 700; animation: tv-popin .45s cubic-bezier(.3, 1.6, .5, 1) both; }
.tv-player img { width: 34px; height: 34px; }
.tv-player button { border: 0; background: none; color: #94a3b8; padding: 0 0 0 4px; }
.tv-player button:hover { color: #e11d48; }
.tv-empty { opacity: .8; font-size: 1.3rem; margin-top: 40px; text-align: center; }

/* soal */
.tv-qhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 600; opacity: .95; }
.tv-badge { background: rgba(255, 255, 255, .18); border-radius: 999px; padding: 6px 14px; font-weight: 700; }
.tv-question { background: #fff; color: #0f172a; border-radius: 22px; padding: clamp(16px, 3vw, 30px); text-align: center; font-weight: 700;
  font-size: clamp(1.4rem, 3.6vw, 2.8rem); line-height: 1.2; margin: 14px 0; box-shadow: 0 16px 40px rgba(0, 0, 0, .25); }
.tv-mid { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; margin: 6px 0 14px; }
.tv-timer { width: clamp(84px, 11vw, 130px); aspect-ratio: 1; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 700; background: conic-gradient(#facc15 var(--p, 100%), rgba(255, 255, 255, .15) 0); position: relative; }
.tv-timer::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #1e3a8a; }
.tv-timer span { position: relative; }
.tv-answered { text-align: center; font-weight: 700; }
.tv-answered big { display: block; font-size: clamp(2rem, 4.5vw, 3.4rem); line-height: 1; }
.tv-intro-bar { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.tv-intro-bar i { display: block; height: 100%; background: #facc15; width: 0; }

.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(8px, 1.4vw, 16px); }
.opt { display: flex; align-items: center; gap: 14px; border-radius: 18px; padding: clamp(12px, 2vw, 22px); color: #fff; font-weight: 700;
  font-size: clamp(1.05rem, 2.2vw, 1.8rem); text-align: left; border: 0; min-height: clamp(64px, 10vh, 120px); transition: opacity .3s, transform .3s; }
.opt .shape { flex: none; width: clamp(34px, 4vw, 54px); height: clamp(34px, 4vw, 54px); }
.opt-A { background: var(--opt-a); box-shadow: 0 6px 0 var(--opt-a-d); }
.opt-B { background: var(--opt-b); box-shadow: 0 6px 0 var(--opt-b-d); }
.opt-C { background: var(--opt-c); box-shadow: 0 6px 0 var(--opt-c-d); }
.opt-D { background: var(--opt-d); box-shadow: 0 6px 0 var(--opt-d-d); }
.opt.dim { opacity: .28; }
.opt.right { outline: 5px solid #fff; transform: scale(1.02); }
.opt .ok-mark { margin-left: auto; font-size: 1.4em; }

/* distribusi */
.dist { display: flex; justify-content: center; align-items: flex-end; gap: clamp(10px, 3vw, 36px); height: clamp(150px, 28vh, 260px); margin: 8px 0 18px; }
.dist-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; width: clamp(60px, 10vw, 120px); }
.dist-bar { width: 100%; border-radius: 12px 12px 4px 4px; min-height: 8px; transition: height .7s cubic-bezier(.3, 1.2, .5, 1); }
.dist-n { font-weight: 700; font-size: 1.5rem; margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.dist-col.dim { opacity: .35; }

/* scoreboard */
.sb-list { max-width: 820px; margin: 10px auto 0; display: grid; gap: 10px; }
.sb-row { display: grid; grid-template-columns: 54px 50px 1fr auto; align-items: center; gap: 12px; background: #fff; color: #0f172a; border-radius: 16px;
  padding: 10px 18px; font-weight: 700; font-size: clamp(1rem, 2vw, 1.4rem); animation: tv-slidein .5s ease both; }
.sb-row .rk { font-size: 1.4em; text-align: center; }
.sb-row img { width: 46px; height: 46px; }
.sb-row .sc { font-size: 1.2em; color: #1d4ed8; }
.sb-row.out { opacity: .55; }
.sb-row .streak { font-size: .75em; color: #ea580c; margin-left: 8px; }

/* podium */
.podium { display: flex; justify-content: center; align-items: flex-end; gap: clamp(8px, 2vw, 24px); margin-top: 24px; min-height: 380px; }
.pod { display: flex; flex-direction: column; align-items: center; width: clamp(110px, 20vw, 220px); }
.pod img.av { width: clamp(70px, 9vw, 110px); height: auto; animation: gk-bob 2.4s ease-in-out infinite; }
.pod .nm { font-weight: 700; font-size: clamp(1rem, 2vw, 1.5rem); text-align: center; margin: 6px 0; word-break: break-word; }
.pod .blk { width: 100%; border-radius: 18px 18px 0 0; display: flex; flex-direction: column; align-items: center; padding-top: 12px; font-weight: 700;
  transform-origin: bottom; animation: tv-rise .9s cubic-bezier(.3, 1.3, .5, 1) both; }
.pod .blk img { width: clamp(44px, 6vw, 70px); }
.pod.p1 .blk { height: 230px; background: linear-gradient(#fde047, #f59e0b); color: #422006; animation-delay: 1.4s; }
.pod.p2 .blk { height: 170px; background: linear-gradient(#e2e8f0, #94a3b8); color: #0f172a; animation-delay: .8s; }
.pod.p3 .blk { height: 120px; background: linear-gradient(#fdba74, #c2410c); color: #431407; animation-delay: .2s; }
.pod.p1 { order: 2; } .pod.p2 { order: 1; } .pod.p3 { order: 3; }

@keyframes tv-popin { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes tv-slidein { from { transform: translateX(-30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes tv-rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes tv-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-30px) rotate(25deg); } }

/* ================= HP peserta ================= */
.pl { min-height: calc(100vh - 140px); display: flex; flex-direction: column; font-family: var(--gk-font); color: #0f172a; }
.pl-top { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 18px; padding: 8px 12px; box-shadow: 0 6px 16px rgba(15, 34, 84, .12); }
[data-theme="dark"] .pl-top { background: #111a33; color: #f1f5fb; }
.pl-top img { width: 40px; height: 40px; }
.pl-top .nm { font-weight: 700; line-height: 1.1; }
.pl-top .sc { margin-left: auto; font-weight: 700; background: #1e3a8a; color: #fff; border-radius: 999px; padding: 4px 14px; }
.pl-body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 14px 0; }
.pl-card { border-radius: 26px; padding: 26px 18px; text-align: center; color: #fff; background: linear-gradient(150deg, #1e3a8a, #3b82f6);
  box-shadow: 0 16px 40px rgba(15, 34, 84, .25); animation: gk-rise .4s ease both; }
.pl-card h2 { font-weight: 700; font-size: clamp(1.6rem, 7vw, 2.4rem); margin: 6px 0; color: #fff; }
.pl-card p { margin: 0; opacity: .9; font-size: 1.05rem; }
.pl-card .big-emoji { width: 96px; height: 96px; }
.pl-card.good { background: linear-gradient(150deg, #16a34a, #4ade80); }
.pl-card.bad { background: linear-gradient(150deg, #be123c, #fb7185); }
.pl-card.wait { background: linear-gradient(150deg, #6d28d9, #a78bfa); }
.pl-card.gold { background: linear-gradient(150deg, #b45309, #facc15); }
.pl-points { font-size: clamp(2.2rem, 10vw, 3.4rem); font-weight: 700; margin: 4px 0; }
.pl-q { background: #fff; border-radius: 18px; padding: 12px 14px; font-weight: 700; text-align: center; font-size: 1.15rem; margin-bottom: 12px;
  box-shadow: 0 6px 16px rgba(15, 34, 84, .1); }
[data-theme="dark"] .pl-q { background: #111a33; color: #f1f5fb; }
.pl-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; flex: 1; min-height: 52vh; }
.pl-opts.two { grid-template-columns: 1fr; }
.pl-opts .opt { flex-direction: column; justify-content: center; text-align: center; font-size: 1.05rem; min-height: 0; padding: 12px 8px; }
.pl-opts .opt .shape { width: 46px; height: 46px; }
.pl-opts .opt:active { transform: scale(.97); }
.pl-timer { height: 8px; border-radius: 999px; background: #e2e8f0; overflow: hidden; margin-bottom: 10px; }
.pl-timer i { display: block; height: 100%; background: linear-gradient(90deg, #22c55e, #f59e0b, #ef4444); width: 100%; }
.avatar-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.avatar-grid label { cursor: pointer; border-radius: 14px; padding: 4px; border: 2px solid transparent; background: #f8fafc; display: flex; justify-content: center; }
.avatar-grid input { position: absolute; opacity: 0; pointer-events: none; }
.avatar-grid input:checked + img { transform: scale(1.12); }
.avatar-grid label:has(input:checked) { border-color: #2563eb; background: #eff6ff; }
.avatar-grid img { width: 100%; max-width: 46px; height: auto; transition: transform .15s; }
[data-theme="dark"] .avatar-grid label { background: #0b1226; }
@media (max-width: 575.98px) { .tv-join { grid-template-columns: 1fr; text-align: center; } .tv-qr { margin: 0 auto; } }
.sb-row { text-align: left; }

/* ---------- tambahan NalarAI v06 ---------- */
.gk-panel { border-radius: var(--nl-radius); }
.game-card-thumb { aspect-ratio: 3/2; border-radius: 18px; overflow: hidden; background: var(--nl-glass-strong); }
.game-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.xp-toast { display: inline-flex; align-items: center; gap: .5rem; margin-top: .75rem; padding: .45rem .9rem; border-radius: 999px;
  background: linear-gradient(135deg, #FFE58A, var(--nl-yellow)); color: var(--nl-yellow-ink); font-weight: 700; }
.xp-toast[hidden] { display: none; }
.level-bar { height: 14px; border-radius: 8px; background: rgba(124, 92, 255, .15); overflow: hidden; }
.level-bar > span { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--nl-yellow), var(--nl-violet)); }
.kunci-game { position: absolute; top: 12px; right: 12px; }
.pick-card { color: var(--nl-text); }
.tv a.link-light { color: #FFE58A !important; }
.game-shell-sempit { max-width: 900px; }
