/* Sinaps — koyu, sinir ağı temalı arayüz
   Düzen: üst bar + sahne (test alanı) + sağda canlı sıralama paneli; mobilde panel sahnenin üstüne iner. */
:root {
  --bg: #0a0c12;
  --bg-2: #0f121b;
  --surface: #141826;
  --surface-2: #1b2031;
  --surface-3: #252b40;
  --line: rgba(173, 186, 230, 0.10);
  --line-2: rgba(173, 186, 230, 0.18);
  --fg: #eef0f8;
  --fg-2: #b9bed2;
  --muted: #7f879f;
  --accent: #ffb547;        /* sinaptik kıvılcım */
  --accent-ink: #1d1203;
  --accent-soft: rgba(255, 181, 71, 0.14);
  --cool: #5be0c8;          /* başarı / bitti */
  --hot: #ff5d7a;           /* hata / bekle */
  --go: #34d399;
  --wait: #e5484d;

  --f-display: 'Unbounded', 'Segoe UI', system-ui, sans-serif;
  --f-body: 'Figtree', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* Cam yüzeyler */
  --glass: rgba(20, 24, 40, 0.50);
  --glass-strong: rgba(16, 19, 32, 0.74);
  --glass-soft: rgba(255, 255, 255, 0.035);
  --glass-hover: rgba(255, 255, 255, 0.07);
  --edge: rgba(255, 255, 255, 0.09);
  --edge-hi: rgba(255, 255, 255, 0.18);
  --blur: blur(24px) saturate(165%);
  --sheen: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0) 38%);

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 30px 70px -32px rgba(0, 0, 0, 0.85);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 var(--f-body);
  -webkit-font-smoothing: antialiased;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
[hidden] { display: none !important; }

/* ---------- Ortam arka planı: cam yüzeylerin arkasında süzülen ışıklar ---------- */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--bg); }
.ambient .orb { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; opacity: .32; will-change: transform; }
.ambient .o1 { background: radial-gradient(circle, rgba(255, 170, 60, .50), transparent 62%); top: -22vmax; right: -14vmax; animation: drift1 26s ease-in-out infinite alternate; }
.ambient .o2 { background: radial-gradient(circle, rgba(255, 150, 50, .36), transparent 62%); bottom: -26vmax; left: -18vmax; animation: drift2 32s ease-in-out infinite alternate; }
.ambient .o3 { background: radial-gradient(circle, rgba(255, 185, 90, .30), transparent 62%); top: 30%; left: 35%; width: 46vmax; height: 46vmax; animation: drift3 38s ease-in-out infinite alternate; }
.ambient .o4 { background: radial-gradient(circle, rgba(255, 130, 40, .26), transparent 62%); top: -10vmax; left: -12vmax; width: 40vmax; height: 40vmax; animation: drift2 44s ease-in-out infinite alternate-reverse; }
.ambient .grid { position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1.2px); background-size: 28px 28px; -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 75%); mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 75%); }
.ambient .grain { position: absolute; inset: -50%; opacity: .06; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@keyframes drift1 { to { transform: translate(-14vmax, 18vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(18vmax, -12vmax) scale(1.1); } }
@keyframes drift3 { from { transform: translate(-50%, -30%) scale(.9); } to { transform: translate(-10%, -60%) scale(1.15); } }

/* Ana cam yüzeyler (yalnızca en dış katmanlar bulanıklaştırır) */
.glass, .card, .side, .arena, .rank-list li, .wait-pill, .topbar-inner, .toast {
  background-color: var(--glass);
  background-image: var(--sheen);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--edge);
  box-shadow: var(--shadow);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass: rgba(20, 24, 40, 0.92); }
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.dim { color: var(--muted); }
.muted { color: var(--muted); margin: 0; }
.center { text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.strong { font-weight: 700; color: var(--fg); }
.eyebrow { font: 600 12px/1.2 var(--f-body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.label, .field label { font-size: 13px; font-weight: 600; color: var(--fg-2); letter-spacing: 0.02em; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
.h2 { font: 700 clamp(22px, 3vw, 30px)/1.15 var(--f-display); letter-spacing: -0.01em; }
.h3 { font: 600 17px/1.3 var(--f-body); }

/* ---------- Kabuk ---------- */
.shell { max-width: 1240px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 0 48px; }
.topbar { position: sticky; top: calc(10px + env(safe-area-inset-top, 0px)); z-index: 20; padding-block: 14px 18px; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 18px; background-color: rgba(16, 19, 32, 0.55); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); }
.brand-mark { width: 30px; height: 30px; }
.bm-a { fill: var(--accent); }
.bm-b { fill: none; stroke: var(--cool); stroke-width: 2.4; }
.bm-gap { stroke: var(--fg-2); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1 3; }
.bm-spark { fill: var(--fg); animation: spark 2.4s ease-in-out infinite; }
@keyframes spark { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.brand-word { font: 800 20px/1 var(--f-display); letter-spacing: -0.02em; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.room-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--edge); background: var(--glass-soft); border-radius: 999px; font-size: 14px; letter-spacing: 0.12em; }
.room-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cool); box-shadow: 0 0 0 4px rgba(91, 224, 200, .15); }
.lang { display: inline-flex; padding: 3px; background: var(--glass-soft); border: 1px solid var(--edge); border-radius: 999px; }
.lang button { border: 0; background: none; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--muted); }
.lang button.on { background: rgba(255, 255, 255, .12); color: var(--fg); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }

.layout { display: grid; grid-template-columns: 1fr; gap: 24px; }
.layout.in-room { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
.stage { min-width: 0; }
.side { position: sticky; top: 100px; border-radius: 22px; padding: 18px; }

/* ---------- Butonlar & alanlar ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid transparent; border-radius: 12px; padding: 11px 18px; font-weight: 700; font-size: 15px; transition: transform .12s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease; white-space: nowrap; }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, #ffd27f 0%, var(--accent) 45%, #ff9440 100%); color: var(--accent-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 12px 34px -10px rgba(255, 160, 60, .65); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.06); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 16px 44px -10px rgba(255, 160, 60, .8); }
.btn-secondary { background: rgba(255, 255, 255, .07); color: var(--fg); border-color: var(--edge-hi); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); }
.btn-secondary:hover:not(:disabled) { background: rgba(255, 255, 255, .12); }
.btn-ghost { background: rgba(255, 255, 255, .03); color: var(--fg-2); border-color: var(--edge); }
.btn-ghost:hover:not(:disabled) { color: var(--fg); border-color: var(--fg-2); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { padding: 14px 22px; font-size: 16px; }
.btn-xl { padding: 17px 30px; font-size: 17px; border-radius: 14px; }
.btn .arr { font-family: var(--f-mono); transition: transform .15s ease; }
.btn:hover .arr { transform: translateX(3px); }
.spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: rot .7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

.input { width: 100%; background: rgba(6, 8, 14, .45); border: 1px solid var(--edge-hi); border-radius: 12px; padding: 12px 14px; color: var(--fg); outline: none; transition: border-color .15s, box-shadow .15s; }
.input::placeholder { color: #565d73; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: rgba(6, 8, 14, .6); }
.field { display: grid; gap: 8px; }
.err { color: var(--hot); min-height: 1.4em; margin: 0; font-size: 14px; font-weight: 600; }

.card { border-radius: 24px; padding: 24px; display: grid; gap: 14px; }
.card > * { min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }

.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; background: var(--surface-3); color: var(--fg-2); }
.tag.host { background: var(--accent-soft); color: var(--accent); }
.tag.me { background: rgba(122, 167, 255, .15); color: #9fbfff; }
.tag.ok { background: rgba(91, 224, 200, .14); color: var(--cool); }
.tag.off { background: rgba(255, 93, 122, .12); color: var(--hot); }
.tag.live i, .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .35; transform: scale(.85); } 50% { opacity: 1; transform: scale(1); } }

.av { --c: var(--accent); flex: none; width: 34px; height: 34px; border-radius: 11px; display: inline-grid; place-items: center; font: 700 15px/1 var(--f-display); color: #0b0d13; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent); }
.av.sm { width: 26px; height: 26px; border-radius: 8px; font-size: 12px; box-shadow: none; }
.av.lg { width: 44px; height: 44px; border-radius: 14px; font-size: 18px; }
.av.xl { width: 64px; height: 64px; border-radius: 20px; font-size: 26px; }
.av.ghost { background: transparent; border: 1.5px dashed var(--line-2); box-shadow: none; }

.ticon { flex: none; width: 38px; height: 38px; border-radius: 12px; display: inline-grid; place-items: center; background: linear-gradient(145deg, rgba(255, 181, 71, .18), rgba(255, 181, 71, .04)); border: 1px solid rgba(255, 181, 71, .22); color: var(--accent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.ticon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ticon.lg { width: 52px; height: 52px; border-radius: 15px; }
.ticon.lg svg { width: 26px; height: 26px; }
.ticon.sm { width: 28px; height: 28px; border-radius: 8px; }
.ticon.sm svg { width: 16px; height: 16px; }

/* ---------- Ana sayfa ---------- */
.home { display: grid; gap: 28px; padding-top: 8px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.hero-copy { display: grid; gap: 14px; }
.hero-title { font: 800 clamp(56px, 11vw, 132px)/0.9 var(--f-display); letter-spacing: -0.05em; position: relative; display: inline-block; background: linear-gradient(100deg, var(--fg) 30%, var(--accent) 75%, var(--cool)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
.hero-title.sm { font-size: clamp(30px, 6vw, 56px); letter-spacing: -0.03em; }
.hero-spark { display: inline-block; width: .16em; height: .16em; margin-left: .06em; border-radius: 50%; background: var(--accent); box-shadow: 0 0 24px 6px rgba(255, 181, 71, .55); animation: spark 2s ease-in-out infinite; }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--fg-2); max-width: 34ch; margin: 0; }
.hero-viz svg { width: 100%; max-width: 380px; height: auto; display: block; margin-left: auto; }
.hv-e { stroke: var(--line-2); stroke-width: 1.4; stroke-dasharray: 4 6; animation: flow 3s linear infinite; animation-delay: var(--d); }
@keyframes flow { to { stroke-dashoffset: -40; } }
.hv-n { fill: var(--c); animation: node 2.8s ease-in-out infinite; animation-delay: var(--d); transform-box: fill-box; transform-origin: center; }
@keyframes node { 0%, 100% { opacity: .55; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.15); } }

.entry { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 28px; padding: 26px; }
.entry-id { display: grid; gap: 16px; align-content: start; padding-right: 28px; border-right: 1px solid var(--edge); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 32px; height: 32px; border-radius: 10px; border: 0; background: var(--c); position: relative; transition: transform .12s; }
.sw:hover { transform: translateY(-2px); }
.sw[aria-checked="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c); }
.entry-actions { display: grid; gap: 14px; align-content: start; }
.action { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; margin: 0; }
.action > div:first-child { display: grid; gap: 2px; }
#joinForm { grid-template-columns: 1fr; }
.join-row { display: flex; gap: 10px; }
.code-in { text-transform: uppercase; letter-spacing: .3em; font-size: 20px; font-weight: 700; text-align: center; max-width: 220px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 28px; }
.how, .tests-show { display: grid; gap: 14px; align-content: start; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; color: var(--fg-2); }
.steps b { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--accent); font-size: 13px; }
.tcards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tcard { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 18px; background-color: var(--glass); background-image: var(--sheen); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--edge); transition: transform .2s ease, border-color .2s ease; }
.tcard:hover { transform: translateY(-2px); border-color: var(--edge-hi); }
.tcard b { display: block; font-size: 15px; }
.tcard small { color: var(--muted); font-size: 13px; line-height: 1.4; display: block; }

/* ---------- Lobi ---------- */
.lobby { display: grid; gap: 18px; }
.code-card { text-align: center; justify-items: center; padding: 30px 22px; background-image: radial-gradient(120% 90% at 50% 0%, rgba(255, 181, 71, .14), transparent 60%), var(--sheen); }
.big-code { display: flex; gap: 10px; justify-content: center; }
.big-code span { width: clamp(46px, 11vw, 70px); height: clamp(58px, 13vw, 84px); display: grid; place-items: center; font-size: clamp(30px, 7vw, 46px); font-weight: 700; border-radius: 16px; background: rgba(6, 8, 14, .45); border: 1px solid var(--edge-hi); color: var(--accent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 10px 30px -14px rgba(255, 181, 71, .45); text-shadow: 0 0 22px rgba(255, 181, 71, .5); }
.link-row { display: flex; gap: 10px; width: 100%; max-width: 520px; }
.link-row .input { font-size: 13px; color: var(--fg-2); }
.slots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.slot { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; background: var(--glass-soft); border: 1px solid var(--edge); min-width: 0; animation: slotIn .3s ease both; }
.slot.is-me { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.slot.empty { animation: none; background: transparent; border-style: dashed; }
.slot.empty .slot-name { color: #4c5369; }
.slot-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.kick { border: 0; background: rgba(255, 255, 255, .07); width: 26px; height: 26px; border-radius: 8px; color: var(--muted); font-size: 16px; line-height: 1; flex: none; }
.kick:hover { color: var(--hot); }
@keyframes slotIn { from { opacity: 0; transform: translateY(6px); } }
.tpick { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.tests-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.tests-quick { display: flex; gap: 8px; }
.tpick-b { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px; border-radius: 16px; background: var(--glass-soft); border: 1px solid var(--edge); opacity: .55; transition: opacity .15s, border-color .15s, background .15s; }
.tpick-b.on { opacity: 1; border-color: rgba(255, 181, 71, .38); background: linear-gradient(135deg, rgba(255, 181, 71, .10), rgba(255, 255, 255, .02)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.tpick-b:disabled { cursor: default; }
.tpick-b:not(:disabled):hover { opacity: 1; }
.tp-txt { flex: 1; min-width: 0; }
.tp-txt b { display: block; }
.tp-txt small { color: var(--muted); display: block; font-size: 13px; }
.tp-n { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; border: 1px solid var(--line-2); color: var(--muted); }
.tpick-b.on .tp-n { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.lobby-cta { display: grid; justify-items: center; gap: 10px; padding-top: 6px; text-align: center; }
.lobby-cta.row { display: flex; justify-content: center; flex-wrap: wrap; align-items: center; gap: 12px; }
.wait-pill { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 999px; color: var(--fg-2); }

/* ---------- Yan panel ---------- */
.side-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.side-head h2 { font: 600 13px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); }
.side-prog { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }
.side-prog span { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--glass-soft); color: #5a6178; border: 1px solid var(--edge); }
.side-prog svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.side-prog .done { color: var(--cool); }
.side-prog .cur { color: var(--accent-ink); background: linear-gradient(135deg, #ffd27f, var(--accent)); border-color: transparent; box-shadow: 0 6px 18px -6px rgba(255, 181, 71, .7); }
.plist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.plist li { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; transition: background .2s; }
.plist li.is-me { background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px var(--edge); }
.plist li.is-off { opacity: .45; }
.plist .rank { width: 18px; text-align: center; color: var(--muted); font-size: 13px; }
.pname { flex: 1; min-width: 0; display: grid; gap: 3px; }
.nm-t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta { display: flex; gap: 4px; flex-wrap: wrap; }
.plist .pts { font-weight: 700; font-size: 15px; }

/* ---------- Oyun ---------- */
.play, .results, .final { display: grid; gap: 18px; }
.play-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.ph-left { display: flex; gap: 14px; align-items: center; }
.ph-left > div { display: grid; gap: 4px; }
.ph-how { max-width: 46ch; font-size: 14px; }
.arena { position: relative; min-height: min(62vh, 560px); border-radius: 26px; overflow: hidden; display: grid; }
.arena.waiting { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; padding: 28px; gap: 28px; }
.countdown { place-self: center; display: grid; justify-items: center; gap: 8px; }
.cd { font-size: clamp(90px, 18vw, 160px); line-height: 1; font-weight: 700; color: var(--fg); }
.cd.bump { animation: bump .5s ease; }
@keyframes bump { from { transform: scale(1.3); opacity: .3; } }
.force-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 13px; }

.score-hero { display: grid; gap: 10px; justify-items: start; }
.score-raw { font-size: clamp(40px, 6vw, 64px); line-height: 1; font-weight: 700; }
.score-pts { font-size: 18px; color: var(--fg-2); }
.score-pts b { color: var(--accent); font-size: 26px; }
.wait-list { display: grid; gap: 12px; background: var(--glass-soft); border: 1px solid var(--edge); border-radius: 18px; padding: 16px; }
.wait-head { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.wait-head .mono { margin-left: auto; }
.wait-bar { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.wait-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--cool)); border-radius: 99px; transition: width .4s ease; }
.wait-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wait-list li { display: flex; gap: 10px; align-items: center; }
.wait-list li span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Tepki */
.rx { all: unset; box-sizing: border-box; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; cursor: pointer; text-align: center; user-select: none; -webkit-user-select: none; touch-action: manipulation; transition: background .08s; -webkit-tap-highlight-color: transparent; }
.rx:focus-visible { outline: 2px solid var(--accent); outline-offset: -6px; }
.rx[data-s="idle"], .rx[data-s="shown"] { background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .06), transparent 70%); }
.rx[data-s="wait"] { background: var(--wait); }
.rx[data-s="go"] { background: var(--go); color: #04170f; }
.rx[data-s="early"] { background: rgba(255, 93, 122, .08); }
.rx[data-s="early"] .rx-big { color: var(--hot); }
.rx-big { font: 800 clamp(36px, 7vw, 72px)/1 var(--f-display); letter-spacing: -0.02em; }
.rx[data-s="shown"] .rx-big { font-family: var(--f-mono); }
.rx-sub { color: inherit; opacity: .7; font-size: 16px; min-height: 1.5em; }
.rx-dots { display: flex; gap: 8px; margin-top: 10px; }
.rx-dots i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; opacity: .4; }
.rx-dots i.on { background: currentColor; opacity: .9; }

/* Nişancı */
.aim { display: grid; grid-template-rows: auto 1fr; }
.tt-hud, .aim-hud, .sq-hud, .cp-hud, .ty-hud { display: flex; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--fg-2); font-size: 14px; font-weight: 600; }
.aim-field { position: relative; min-height: 420px; touch-action: manipulation; background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 26px 26px; cursor: crosshair; }
.aim-target { position: absolute; width: 74px; height: 74px; margin: -37px 0 0 -37px; border-radius: 50%; border: 0; padding: 0; background: radial-gradient(circle, var(--accent) 0 22%, transparent 23% 42%, var(--accent) 43% 60%, transparent 61% 76%, color-mix(in srgb, var(--accent) 60%, transparent) 77%); cursor: crosshair; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.aim-target.pop { animation: pop .18s ease-out; }
@keyframes pop { from { transform: scale(.6); } }
.aim-hint { position: absolute; left: 0; right: 0; top: calc(50% + 56px); text-align: center; color: var(--fg-2); pointer-events: none; }
.aim-miss { position: absolute; width: 10px; height: 10px; margin: -5px; border-radius: 50%; border: 2px solid var(--hot); animation: miss .5s ease-out forwards; pointer-events: none; }
@keyframes miss { to { transform: scale(2.4); opacity: 0; } }

/* Sayı hafızası */
.nm { display: grid; grid-template-rows: auto 1fr; }
.nm-level { padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--fg-2); font-size: 14px; font-weight: 600; }
.nm-body { display: grid; place-content: center; justify-items: center; gap: 18px; padding: 28px 18px; text-align: center; min-width: 0; }
.nm-label { color: var(--fg-2); font-weight: 600; letter-spacing: .04em; }
.nm-num { font-size: clamp(34px, 7vw, 76px); font-weight: 700; letter-spacing: .06em; word-break: break-all; max-width: 100%; }
.nm-bar { width: min(320px, 70vw); height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.nm-bar i { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; animation: shrink linear forwards; }
@keyframes shrink { to { transform: scaleX(0); } }
.nm-form { display: grid; gap: 14px; justify-items: center; width: min(460px, 86vw); }
.nm-in { width: 100%; text-align: center; font-size: clamp(24px, 4vw, 36px); font-weight: 700; letter-spacing: .1em; background: rgba(6, 8, 14, .45); border: 1px solid var(--edge-hi); border-radius: 14px; padding: 14px; outline: none; }
.nm-in:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.nm-ok { font: 800 44px/1 var(--f-display); color: var(--cool); }
.nm-bad { font: 800 44px/1 var(--f-display); color: var(--hot); }
.nm-cmp { display: grid; grid-template-columns: auto auto; gap: 8px 16px; align-items: baseline; text-align: left; }
.nm-cmp span { color: var(--muted); font-size: 14px; }
.nm-cmp b { font-size: clamp(20px, 4vw, 30px); letter-spacing: .06em; word-break: break-all; }
.nm-cmp .bad { color: var(--hot); text-decoration: underline; text-underline-offset: 4px; }

/* Sıra hafızası */
.sq { display: grid; grid-template-rows: auto 1fr; }
.sq-state { color: var(--accent); }
.sq-grid { --gap: clamp(8px, 2vw, 14px); place-self: center; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); width: min(400px, 80vw, 52vh); aspect-ratio: 1; padding: 20px 0; box-sizing: content-box; }
.sq-cell { border: 1px solid var(--edge); border-radius: 18px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); transition: background .12s, transform .12s, box-shadow .12s; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.sq-grid[data-mode="watch"] .sq-cell { cursor: default; }
.sq-grid[data-mode="input"] .sq-cell:hover { background: rgba(255, 255, 255, .11); }
.sq-cell.lit { background: var(--fg); box-shadow: 0 0 30px rgba(255, 255, 255, .35); transform: scale(.97); }
.sq-grid.ok .sq-cell { background: rgba(91, 224, 200, .3); }
.sq-grid.fail .sq-cell { background: rgba(255, 93, 122, .4); }

/* Şempanze */
.cp { display: grid; grid-template-rows: auto 1fr auto; }
.cp-lives b { color: var(--hot); letter-spacing: .2em; margin-left: 6px; }
.cp-lives .dim { color: var(--surface-3); }
.cp-grid { place-self: center; display: grid; grid-template-columns: repeat(var(--cols), 1fr); grid-template-rows: repeat(var(--rows), 1fr); gap: clamp(4px, 1vw, 10px); width: min(760px, 100%); aspect-ratio: 8 / 5; padding: 18px; }
.cp-tile { border: 2px solid var(--fg-2); border-radius: 12px; background: transparent; color: var(--fg); font: 700 clamp(14px, 3vw, 28px)/1 var(--f-mono); display: grid; place-items: center; padding: 0; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: background .12s; }
.cp-tile:hover { background: rgba(255, 255, 255, .07); }
.cp-grid.hide .cp-tile:not(.gone) { background: var(--fg); border-color: var(--fg); }
.cp-grid.hide .cp-tile:not(.gone) span { visibility: hidden; }
.cp-tile.gone { visibility: hidden; }
.cp-tile.wrong { background: var(--hot) !important; border-color: var(--hot) !important; }
.cp-tile.wrong span { visibility: visible !important; }
.cp-msg { text-align: center; color: var(--hot); font-weight: 700; min-height: 2.6em; padding: 0 0 14px; }

/* Yazma */
.ty { display: grid; grid-template-rows: auto 1fr auto; }
.ty-hud b { color: var(--fg); font-size: 18px; }
.ty-text { padding: clamp(18px, 4vw, 40px); font: 500 clamp(19px, 2.4vw, 26px)/1.7 var(--f-mono); color: #5d6480; word-break: break-word; }
.ty-text span.ok { color: var(--fg); }
.ty-text span.bad { color: var(--hot); background: rgba(255, 93, 122, .15); border-radius: 3px; }
.ty-text span.cur { box-shadow: -2px 0 0 var(--accent); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { box-shadow: -2px 0 0 transparent; } }
.ty-in { margin: 0 18px 18px; width: calc(100% - 36px); resize: none; background: rgba(6, 8, 14, .45); border: 1px solid var(--edge-hi); border-radius: 14px; padding: 14px; font: 500 17px/1.5 var(--f-mono); outline: none; }
.ty-in:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* ---------- Ortak test iskeleti (yeni testler) ---------- */
.tt { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; }
.tt-hud { align-items: center; }
.tt-body { display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; justify-items: center; gap: 16px; padding: 22px 18px; text-align: center; min-width: 0; }
.tt-timebar { height: 4px; background: rgba(255, 255, 255, .05); }
.tt-timebar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ff9440); transform-origin: left; transition: transform .1s linear; }
.tt-dots { display: inline-flex; gap: 6px; }
.tt-dots i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--fg-2); opacity: .35; }
.tt-dots i.on { background: var(--accent); border-color: var(--accent); opacity: 1; }
.lives { color: var(--hot); letter-spacing: .2em; margin-left: 6px; }
.lives .dim { color: rgba(255, 255, 255, .12); }
.good { color: var(--cool); font-weight: 700; }
.bad { color: var(--hot); font-weight: 700; }
.svg-hint { fill: var(--fg-2); font: 600 20px var(--f-body); }
.clickable { cursor: crosshair; }

/* Renk Gözü */
.ce-grid { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: clamp(4px, 1vw, 8px); width: min(440px, 82vw, 54vh); aspect-ratio: 1; }
.ce-cell { border: 0; border-radius: clamp(6px, 1.4vw, 14px); padding: 0; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: transform .12s; }
.ce-cell:hover { transform: scale(.97); }
.ce-cell.hit { outline: 3px solid var(--cool); outline-offset: 2px; }
.ce-cell.miss { outline: 3px solid var(--hot); outline-offset: 2px; }
.ce-cell.reveal { outline: 3px dashed var(--fg); outline-offset: 2px; }

/* Zaman Hissi */
.ts-pad { all: unset; box-sizing: border-box; position: relative; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; cursor: pointer; text-align: center; user-select: none; -webkit-user-select: none; touch-action: manipulation; overflow: hidden; }
.ts-pad:focus-visible { outline: 2px solid var(--accent); outline-offset: -6px; }
.ts-main { font: 800 clamp(30px, 6vw, 60px)/1 var(--f-display); position: relative; }
.ts-main b { color: var(--accent); }
.ts-sub { color: var(--fg-2); max-width: 36ch; position: relative; min-height: 1.5em; }
.ts-ring { position: absolute; left: 50%; top: 50%; width: 220px; height: 220px; margin: -110px; border-radius: 50%; border: 2px solid rgba(255, 181, 71, .25); opacity: 0; }
.ts-pad[data-s="run"] .ts-ring { animation: tsRing 1.4s ease-out forwards; }
.ts-pad[data-s="run"] .ts-main { color: var(--fg-2); }
@keyframes tsRing { from { opacity: 1; transform: scale(.4); } to { opacity: 0; transform: scale(1.6); } }

/* Hızlı Matematik */
.qm-form { display: grid; gap: 16px; justify-items: center; width: min(460px, 86vw); }
.qm-q { font-size: clamp(34px, 7vw, 64px); font-weight: 700; letter-spacing: .02em; }
.qm-q.pop { animation: bump .25s ease; }
.qm-in { width: 100%; text-align: center; font-size: clamp(26px, 4vw, 38px); font-weight: 700; background: rgba(6, 8, 14, .45); border: 1px solid var(--edge-hi); border-radius: 16px; padding: 14px; outline: none; color: var(--fg); }
.qm-in:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.qm-hint { font-size: 13px; }
.shake { animation: shake .3s ease; }
@keyframes shake { 25% { transform: translateX(-8px); } 50% { transform: translateX(7px); } 75% { transform: translateX(-4px); } }

/* Nokta Sayma */
.dc-svg, .ej-svg, .co-svg, .tg-svg { width: min(100%, 760px); height: auto; max-height: 52vh; display: block; }
@media (max-width: 760px) { .dc-svg, .tg-svg { max-height: 62vh; } }
.dc-svg { border-radius: 16px; background: rgba(6, 8, 14, .35); border: 1px solid var(--edge); }
.dc-dot { fill: var(--fg); }
.dc-mask { fill: transparent; }
.dc-form { display: grid; gap: 12px; justify-items: center; }
.dc-in { max-width: 140px; text-align: center; font-size: 24px; font-weight: 700; }
.dc-res { display: grid; gap: 10px; justify-items: center; font-size: 18px; }
.dc-cmp { display: grid; grid-template-columns: auto auto; gap: 6px 16px; align-items: baseline; }
.dc-cmp span { color: var(--muted); font-size: 14px; }
.dc-cmp b { font-size: 28px; }

/* Göz Kararı */
.ej-svg { border-radius: 16px; background: rgba(6, 8, 14, .3); border: 1px solid var(--edge); touch-action: manipulation; }
.ej-line, .ej-line line { stroke: var(--fg); stroke-width: 4; stroke-linecap: round; fill: none; }
.ej-ref { fill: rgba(255, 255, 255, .1); stroke: var(--fg); stroke-width: 3; }
.ej-adj { fill: rgba(255, 181, 71, .14); stroke: var(--accent); stroke-width: 3; }
.ej-true { stroke: var(--cool); stroke-width: 3; fill: none; stroke-dasharray: 6 5; }
.ej-mine { stroke: var(--accent); stroke-width: 4; }
.ej-truedot { fill: var(--cool); }
.ej-minedot { fill: var(--accent); }
.ej-ctrl { min-height: 52px; display: grid; place-items: center; }
.ej-form .input { max-width: 120px; text-align: center; font-size: 22px; font-weight: 700; }
.ej-slide { display: flex; gap: 12px; align-items: center; width: min(460px, 84vw); }
.ej-slide input { flex: 1; accent-color: var(--accent); }
.ej-res { min-height: 1.6em; font-size: 20px; }

/* Çarpışma Tahmini */
.co-track { stroke: rgba(255, 255, 255, .12); stroke-width: 2; stroke-dasharray: 6 8; }
.co-a { fill: var(--accent); filter: drop-shadow(0 0 10px rgba(255, 181, 71, .6)); }
.co-b { fill: var(--cool); filter: drop-shadow(0 0 10px rgba(91, 224, 200, .6)); }
.co-ghost { fill: none; stroke: var(--fg-2); stroke-width: 2; stroke-dasharray: 4 4; }
.co-res { min-height: 1.6em; font-size: 20px; }
.co-btn { min-width: 200px; touch-action: manipulation; }

/* Atış Tahmini */
.tg-svg { border-radius: 16px; background: linear-gradient(180deg, rgba(255, 181, 71, .05), rgba(6, 8, 14, .35)); border: 1px solid var(--edge); touch-action: manipulation; }
.tg-ground { stroke: var(--fg-2); stroke-width: 3; }
.tg-ticks line { stroke: var(--muted); stroke-width: 2; }
.tg-launch { fill: var(--fg-2); }
.tg-trail { fill: none; stroke: rgba(255, 181, 71, .7); stroke-width: 3; stroke-dasharray: 2 7; stroke-linecap: round; }
.tg-rest { fill: none; stroke: rgba(91, 224, 200, .7); stroke-width: 3; stroke-dasharray: 2 7; stroke-linecap: round; }
.tg-ball { fill: var(--accent); filter: drop-shadow(0 0 8px rgba(255, 181, 71, .7)); }
.tg-aim { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 4 6; pointer-events: none; }
.tg-mine { stroke: var(--accent); stroke-width: 4; }
.tg-true { stroke: var(--cool); stroke-width: 4; }
.tg-res { min-height: 1.6em; font-size: 20px; }

/* Hafızadan Çiz */
.dm-body { gap: 12px; }
.dm-wrap { position: relative; display: grid; gap: 10px; justify-items: center; }
.dm-canvas { width: min(400px, 80vw, 50vh); aspect-ratio: 1; border-radius: 18px; background: rgba(6, 8, 14, .4); border: 1px solid var(--edge-hi); touch-action: none; }
.dm-canvas.drawable { cursor: crosshair; border-color: rgba(255, 181, 71, .45); box-shadow: 0 0 0 4px var(--accent-soft); }
.dm-ctrl { display: flex; gap: 10px; }
.dm-res { min-height: 1.6em; font-size: 20px; }


/* ---------- YENİ etiketi ---------- */
.badge-new { display: inline-block; vertical-align: middle; margin-left: 8px; padding: 2px 7px; border-radius: 6px; font: 800 10px/1.4 var(--f-body); letter-spacing: .1em; color: var(--accent-ink); background: linear-gradient(135deg, #ffd27f, var(--accent)); box-shadow: 0 4px 14px -4px rgba(255, 181, 71, .7); }
.h2 .badge-new { font-size: 11px; transform: translateY(-4px); }

/* ---------- Takım modu ---------- */
.tdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); margin-right: 7px; vertical-align: middle; flex: none; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--glass-soft); border: 1px solid var(--edge); border-radius: 12px; }
.seg button { border: 0; background: none; color: var(--fg-2); font-weight: 700; font-size: 14px; padding: 7px 14px; border-radius: 9px; }
.seg button.on { background: linear-gradient(135deg, #ffd27f, var(--accent)); color: var(--accent-ink); }
.seg button:disabled { cursor: default; }
.seg button:not(.on):not(:disabled):hover { color: var(--fg); background: rgba(255, 255, 255, .06); }
.team-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.teams-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.team-box { display: grid; gap: 10px; align-content: start; padding: 14px; border-radius: 18px; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 12%, transparent), rgba(255, 255, 255, .02)); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
.team-box.mine { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 60%, transparent), 0 12px 30px -16px color-mix(in srgb, var(--c) 70%, transparent); }
.tb-head { display: flex; align-items: center; gap: 4px; }
.tb-head b { flex: 1; }
.team-box ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.team-box li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.team-box li.is-me .slot-name { color: var(--accent); }
.tb-empty { color: var(--muted); font-size: 14px; }
.tb-join { justify-self: start; }
.side-teams { display: grid; gap: 6px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--edge); }
.st-row { display: flex; align-items: center; gap: 4px; padding: 7px 10px; border-radius: 10px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 14%, transparent), transparent); }
.st-row span { flex: 1; font-weight: 600; }
.team-res { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tr-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 18%, transparent), rgba(255, 255, 255, .03)); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.tr-chip b { color: var(--accent); }
.mvp { display: inline-flex; align-items: center; gap: 8px; margin: 6px 0 0; color: var(--fg-2); }
.pod-team { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; max-width: 100%; }

/* ---------- Beyin profili ---------- */
.profiles { display: grid; gap: 14px; }
.prof-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.prof-card { display: grid; gap: 8px; justify-items: center; text-align: center; padding: 16px; border-radius: 22px; background-color: var(--glass); background-image: radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--c) 16%, transparent), transparent 70%), var(--sheen); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--edge); box-shadow: var(--shadow); min-width: 0; }
.prof-card.is-me { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.prof-who { display: flex; align-items: center; gap: 8px; justify-self: stretch; }
.prof-who b { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radar { width: 100%; max-width: 240px; height: auto; overflow: visible; }
.rd-ring { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 1; }
.rd-spoke { stroke: rgba(255, 255, 255, .07); stroke-width: 1; }
.rd-area { fill: color-mix(in srgb, var(--c) 30%, transparent); stroke: var(--c); stroke-width: 2.5; stroke-linejoin: round; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--c) 50%, transparent)); }
.rd-lbl { fill: var(--fg-2); font: 600 11px var(--f-body); }
.rd-lbl.na { fill: #4c5369; }
.prof-type { display: grid; gap: 4px; }
.prof-type .eyebrow { font-family: var(--f-display); font-size: 17px; letter-spacing: .02em; text-transform: none; color: var(--c); }
.prof-type p { margin: 0; color: var(--fg-2); font-size: 14px; }
.prof-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 0; justify-self: stretch; }
.prof-meta div { padding: 8px; border-radius: 12px; background: var(--glass-soft); border: 1px solid var(--edge); }
.prof-meta dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.prof-meta dd { margin: 2px 0 0; font-weight: 700; font-size: 14px; }

/* ---------- Mükemmel Daire / Sabit El / Hız Karşılaştırma ---------- */
.sh-body { padding: 14px; }
.sh-svg { width: min(100%, 860px); height: auto; max-height: 56vh; display: block; touch-action: none; cursor: crosshair; }
.sh-svg.vert { max-height: 66vh; }
.sh-tunnel { fill: rgba(255, 255, 255, .06); stroke: rgba(255, 255, 255, .22); stroke-width: 2; transition: fill .15s; }
.sh-svg.out .sh-tunnel { fill: rgba(255, 93, 122, .14); stroke: rgba(255, 93, 122, .55); }
.sh-tunnel.bump { animation: shBump .3s ease; }
@keyframes shBump { 50% { fill: rgba(255, 93, 122, .3); } }
.sh-center { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 1.5; stroke-dasharray: 3 7; }
.sh-start { fill: rgba(52, 211, 153, .25); stroke: var(--go); stroke-width: 2; }
.sh-svg.running .sh-start { fill: none; stroke-opacity: .3; }
.sh-finish { stroke: var(--accent); stroke-width: 4; stroke-dasharray: 6 5; }
.sh-trail { fill: none; stroke: rgba(255, 181, 71, .55); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sh-dot { fill: var(--accent); filter: drop-shadow(0 0 8px rgba(255, 181, 71, .8)); pointer-events: none; }
.sc-body { gap: 12px; }
.sc-svg { width: min(100%, 760px); height: auto; display: block; border-radius: 16px; background: rgba(6, 8, 14, .3); border: 1px solid var(--edge); }
.sc-lane { stroke: rgba(255, 255, 255, .1); stroke-width: 2; stroke-dasharray: 4 8; }
.sc-tag { fill: var(--muted); font: 600 14px var(--f-body); }
.sc-ball { transition: opacity .05s; }
.sc-ball.b0 { fill: var(--accent); filter: drop-shadow(0 0 8px rgba(255, 181, 71, .6)); }
.sc-ball.b1 { fill: var(--cool); filter: drop-shadow(0 0 8px rgba(91, 224, 200, .6)); }
.sc-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.sc-btns .btn { min-width: 150px; }
.sc-btns .btn.right { border-color: var(--cool); color: var(--cool); }
.sc-btns .btn.wrong { border-color: var(--hot); color: var(--hot); }
.sc-res { min-height: 1.6em; font-size: 18px; }
.pc-res { min-height: 1.6em; font-size: 20px; }


/* ---------- Turnuva ---------- */
.tourney { display: grid; gap: 18px; }
.br-banner { text-align: center; justify-items: center; background-image: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--c) 18%, transparent), transparent 65%), var(--sheen); }
.br-score { margin: 0; font-size: 18px; color: var(--fg-2); }
.next-match { justify-items: center; text-align: center; padding: 26px 22px; background-image: radial-gradient(120% 90% at 50% 0%, rgba(255, 181, 71, .12), transparent 60%), var(--sheen); }
.vs { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 4vw, 36px); flex-wrap: wrap; }
.vs-x { font: 800 clamp(22px, 4vw, 34px)/1 var(--f-display); color: var(--accent); text-shadow: 0 0 24px rgba(255, 181, 71, .5); }
.vs-p { display: grid; justify-items: center; gap: 8px; padding: 16px 22px; min-width: 150px; border-radius: 22px; background: var(--glass-soft); border: 1px solid var(--edge); color: var(--fg); transition: transform .15s, border-color .15s, box-shadow .15s; }
.vs-p:not(:disabled):hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 60%, transparent); }
.vs-p:disabled { cursor: default; }
.vs-p.picked { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 30%, transparent), 0 16px 40px -18px var(--c); }
.vs-p b { font-size: 18px; }
.vs-votes { font-size: 13px; color: var(--fg-2); }
.bracket-wrap { overflow-x: auto; padding-bottom: 4px; }
.bracket { display: flex; gap: 22px; min-width: max-content; }
.br-col { display: grid; grid-template-rows: auto 1fr; gap: 10px; min-width: 190px; }
.br-matches { display: flex; flex-direction: column; justify-content: space-around; gap: 14px; }
.br-match { display: grid; border-radius: 14px; overflow: hidden; border: 1px solid var(--edge); background: var(--glass-soft); }
.br-match.next { border-color: rgba(255, 181, 71, .6); box-shadow: 0 0 0 3px var(--accent-soft), 0 12px 30px -16px rgba(255, 181, 71, .6); }
.br-match.last { border-color: rgba(91, 224, 200, .45); }
.br-match.bye { opacity: .7; }
.bm-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; min-width: 0; }
.bm-row + .bm-row { border-top: 1px solid var(--edge); }
.bm-row .bm-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.bm-row.win { background: linear-gradient(90deg, rgba(255, 181, 71, .16), transparent); }
.bm-row.win .mono { color: var(--accent); font-weight: 700; }
.bm-row.lose { opacity: .45; }
.bm-row.tbd { color: var(--muted); font-size: 14px; }
.bm-row.is-me .bm-name { color: var(--accent); }
.plist li.is-out { opacity: .5; }
.tag.pred { background: rgba(91, 224, 200, .12); color: var(--cool); }
.match-bar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(80px, 2fr) minmax(0, 1fr); align-items: center; gap: 14px; padding: 12px 16px; border-radius: 18px; background: var(--glass-soft); border: 1px solid var(--edge); }
.mb-side { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mb-side b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-side .mono { font-weight: 700; font-size: 18px; color: var(--c); }
.mb-side.right { justify-content: flex-end; }
.mb-track { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: rgba(255, 255, 255, .06); }
.mb-track i { display: block; height: 100%; background: var(--c); transition: width .5s ease; }
.mb-track i + i { opacity: .85; }

.spec-box { display: grid; gap: 10px; margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--edge); }
.spec-box-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spec-box-head .btn { margin-left: auto; }
.spec-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.spec-list li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 999px; background: var(--glass-soft); border: 1px solid var(--edge); }
.spec-list li.is-me { border-color: rgba(255, 181, 71, .45); }
.mini-btn { flex: none; border: 1px solid var(--edge); background: rgba(255, 255, 255, .06); color: var(--fg-2); height: 26px; min-width: 26px; padding: 0 6px; border-radius: 8px; font-size: 13px; font-weight: 700; line-height: 1; }
.mini-btn:hover:not(:disabled) { color: var(--fg); border-color: var(--edge-hi); background: rgba(255, 255, 255, .1); }
.mini-btn.txt { padding: 0 9px; font-size: 12px; }
.mini-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- Canlı izleme ---------- */
.spec { display: grid; gap: 14px; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--hot); margin-right: 6px; vertical-align: middle; animation: pulse 1.2s ease-in-out infinite; }
.spec-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.spec-pane { display: grid; gap: 8px; padding: 10px; border-radius: 22px; background-color: var(--glass); background-image: linear-gradient(180deg, color-mix(in srgb, var(--c) 14%, transparent), transparent 120px), var(--sheen); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); box-shadow: var(--shadow); min-width: 0; }
.spec-pane.finished { border-color: rgba(91, 224, 200, .5); }
.spec-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 2px 4px; }
.spec-head b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spec-st { display: inline-flex; gap: 8px; align-items: center; }
.spec-raw { font-size: 13px; color: var(--fg-2); }
.spec-view { position: relative; overflow: hidden; border-radius: 16px; min-height: 160px; background: rgba(6, 8, 14, .35); }
.spec-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); }
.spec-scale { transform-origin: top left; pointer-events: none; user-select: none; }
.spec-arena { width: 100%; height: 100%; min-height: 0 !important; }
.spec-arena *, .spec-arena *::before, .spec-arena *::after { animation: none !important; transition: none !important; }
.spec-arena img.dm-canvas { display: block; }

/* ---------- Tepkiler ---------- */
.react-bar { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 40; display: flex; gap: 2px; padding: 5px; border-radius: 999px; background-color: rgba(16, 19, 32, .6); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--edge-hi); box-shadow: var(--shadow); }
.react-bar button { border: 0; background: none; font-size: 22px; line-height: 1; width: 42px; height: 42px; border-radius: 50%; transition: transform .12s, background .12s; }
.react-bar button:hover { background: rgba(255, 255, 255, .08); transform: translateY(-2px) scale(1.08); }
.react-bar button:active { transform: scale(.9); }
.reacts { position: fixed; inset: 0; pointer-events: none; z-index: 45; overflow: hidden; }
.react-float { position: absolute; bottom: 70px; display: grid; justify-items: center; gap: 2px; animation: floatUp 2.6s ease-out forwards; }
.react-float b { font-size: 34px; line-height: 1; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .5)); }
.react-float small { font-size: 11px; font-weight: 700; color: var(--c); background: rgba(16, 19, 32, .7); padding: 1px 7px; border-radius: 99px; }
@keyframes floatUp { 0% { transform: translateY(20px) scale(.6); opacity: 0; } 12% { transform: translateY(0) scale(1.1); opacity: 1; } 100% { transform: translateY(-46vh) scale(.95); opacity: 0; } }
.shell { padding-bottom: 90px; }
@media (max-width: 760px) {
  .spec-grid { grid-template-columns: 1fr; }
  .match-bar { grid-template-columns: 1fr 1fr; }
  .mb-track { grid-column: 1 / -1; order: 3; }
  .vs-p { min-width: 120px; padding: 12px; }
  .react-bar button { width: 38px; height: 38px; font-size: 20px; }
}

/* ---------- Sonuçlar ---------- */
.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rank-list li { display: grid; grid-template-columns: 28px auto minmax(0, 1.2fr) minmax(60px, 2fr) 64px 64px; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 18px; }
.results.anim .rank-list li { animation: slotIn .4s ease both; animation-delay: calc(var(--i) * 70ms); }
.rank-list li.is-me { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.rank-list li.first .rank { color: var(--accent); }
.rank-list .rank { font-weight: 700; font-size: 18px; text-align: center; color: var(--muted); }
.rl-name { display: grid; min-width: 0; }
.rl-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-name small { color: var(--muted); font-size: 13px; }
.rl-bar { height: 8px; background: rgba(255, 255, 255, .06); border-radius: 99px; overflow: hidden; }
.rl-bar i { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, color-mix(in srgb, var(--c) 55%, transparent), var(--c)); border-radius: 99px; box-shadow: 0 0 14px color-mix(in srgb, var(--c) 60%, transparent); }
.results.anim .rl-bar i { animation: grow .9s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 70ms + .15s); }
@keyframes grow { from { width: 0; } }
.rl-pts { font-weight: 700; color: var(--accent); text-align: right; }
.rl-tot { text-align: right; color: var(--fg-2); }

/* ---------- Final ---------- */
.final-head { text-align: center; display: grid; gap: 6px; justify-items: center; padding-top: 6px; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; max-width: 640px; width: 100%; margin: 0 auto; }
.pod { display: grid; justify-items: center; gap: 8px; text-align: center; min-width: 0; animation: slotIn .5s ease both; }
.pod-2 { animation-delay: .25s; } .pod-3 { animation-delay: .45s; }
.pod-name { font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-pts { color: var(--fg-2); font-weight: 700; }
.pod-block { width: 100%; border-radius: 18px 18px 6px 6px; display: grid; place-items: start center; padding-top: 12px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 38%, transparent), rgba(255, 255, 255, .02)); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 20px 50px -20px color-mix(in srgb, var(--c) 60%, transparent); }
.pod-block span { font-size: 28px; font-weight: 700; }
.pod-1 .pod-block { height: 150px; }
.pod-2 .pod-block { height: 105px; }
.pod-3 .pod-block { height: 78px; }
.pod-1 .av { box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 30%, transparent), 0 0 40px color-mix(in srgb, var(--c) 50%, transparent); }
.table-card { padding: 8px; }
.table-wrap { overflow-x: auto; }
.ftable { width: 100%; border-collapse: collapse; font-size: 14px; }
.ftable th, .ftable td { padding: 10px 12px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ftable th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.ftable .l { text-align: left; }
.ftable tr:last-child td { border-bottom: 0; }
.ftable tr.is-me td { background: rgba(255, 255, 255, .05); }
.cell-p { display: inline-flex; gap: 10px; align-items: center; font-weight: 600; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; background: var(--c); animation: fall 3s cubic-bezier(.3, .6, .5, 1) forwards; animation-delay: var(--d); }
@keyframes fall { to { transform: translate(var(--x), 105vh) rotate(var(--r)); opacity: .7; } }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); color: var(--fg); padding: 11px 20px; border-radius: 999px; font-weight: 700; font-size: 14px; z-index: 60; border-color: var(--edge-hi); }

/* ---------- Duyarlı ---------- */
@media (max-width: 1000px) {
  .layout.in-room { grid-template-columns: 1fr; }
  .side { position: static; padding: 14px; }
  .plist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero-viz { display: none; }
  .entry { grid-template-columns: 1fr; padding: 18px; gap: 20px; }
  .entry-id { padding-right: 0; border-right: 0; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
  .action { grid-template-columns: 1fr; }
  .action .btn { width: 100%; }
  .join-row .code-in { max-width: none; }
  .home-grid { grid-template-columns: 1fr; }
  .tpick { grid-template-columns: 1fr; }
  .arena.waiting { grid-template-columns: 1fr; padding: 20px; }
  .rank-list li { grid-template-columns: 22px auto minmax(0, 1fr) 54px; gap: 10px; padding: 10px 12px; }
  .rl-bar, .rl-tot { display: none; }
  .aim-field { min-height: 60vh; }
  .aim-target { width: 62px; height: 62px; margin: -31px 0 0 -31px; }
  .cp-grid { padding: 10px; }
  .cp-tile { border-radius: 8px; }
  .topbar { padding-block: 10px 14px; top: calc(6px + env(safe-area-inset-top, 0px)); }
  .topbar-inner { padding: 8px 8px 8px 12px; border-radius: 16px; }
  .side { top: 0; }
  .btn-xl { width: 100%; }
}
@media (max-width: 480px) {
  .tcards, .plist { grid-template-columns: 1fr; }
  .link-row { flex-direction: column; }
  .brand-word { display: none; }
  .room-chip { padding: 5px 9px; font-size: 12px; }
  .lobby-cta.row .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
