/* ============================================================
   Süper Lig Bingo — "maç programı" tasarım sistemi (v2)
   Zemin: gece laciverti · Vurgu: saha limesi · Sosyal: menekşe
   Display: Barlow Condensed · Veri: IBM Plex Mono · Metin: Inter

   Dil: skorbord / matchday programı — hairline çizgiler, mono
   veri etiketleri, düz yüzeyler, 6px köşe. Emoji yok, glow yok,
   gradient kart yok, 999px hap yok.

   Renk disiplini: lime YALNIZ birincil aksiyon + "senin hamlen",
   yeşil/kırmızı YALNIZ oyun sonu cevap açılışı, menekşe YALNIZ
   çok oyunculu bağlam, amber YALNIZ lider tablosu/uyarı.
   ============================================================ */

:root {
  /* yüzeyler */
  --bg: #0a0f1c;
  --panel: #0e1526;
  --panel-2: #121a2e;
  --panel-3: #17203a;
  --line: rgba(146, 164, 205, 0.16);
  --line-2: rgba(146, 164, 205, 0.32);

  /* metin */
  --text: #e9efff;
  --muted: #90a0c4;
  --faint: #5d6c92;

  /* marka */
  --lime: #c8f231;
  --lime-2: #a8d426;
  --lime-dim: rgba(200, 242, 49, 0.14);
  --lime-soft: rgba(200, 242, 49, 0.08);
  --lime-line: rgba(200, 242, 49, 0.5);
  --lime-ink: #131c05;
  --violet: #9d8bff;
  --violet-line: rgba(157, 139, 255, 0.45);

  /* durum */
  --good: #1e9a5c;
  --good-deep: #12563a;
  --bad: #c73840;
  --bad-deep: #6e2328;
  --warn: #ffb020;
  --warn-line: rgba(255, 176, 32, 0.45);

  /* biçim */
  --r: 6px;
  --r-lg: 10px;

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --ease: cubic-bezier(0.32, 0.72, 0.24, 1);
  --pop: cubic-bezier(0.22, 1.3, 0.36, 1);

  font-size: 16px;
}

* { box-sizing: border-box; }
html { scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p { margin: 0; }
button { font-family: inherit; }

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(200, 242, 49, 0.35);
  border-radius: var(--r);
}

::selection { background: rgba(200, 242, 49, 0.45); color: var(--text); }

/* Saha çizgisi: ışık efekti değil, çok soluk iki orta yuvarlağı çizimi. */
.pitch-lines {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.pitch-lines::before {
  content: ""; position: absolute;
  width: 720px; height: 720px; border-radius: 50%;
  border: 1px solid rgba(146, 164, 205, 0.07);
  top: -280px; right: -220px;
}
.pitch-lines::after {
  content: ""; position: absolute;
  width: 720px; height: 720px; border-radius: 50%;
  border: 1px solid rgba(146, 164, 205, 0.05);
  bottom: -340px; left: -260px;
}

/* Genel amaçlı satır içi ikon boyu */
.ic { width: 18px; height: 18px; flex-shrink: 0; display: block; }
.ic-sm { width: 14px; height: 14px; }

/* ============================================================
   Üst bar
   ============================================================ */

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 clamp(12px, 4vw, 24px);
  min-height: 54px;
  padding-top: env(safe-area-inset-top);
  background: rgba(10, 15, 28, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 10px; min-width: 0; flex-shrink: 1;
  background: none; border: none; padding: 0; margin: 0; font: inherit;
  cursor: pointer; text-align: left;
  transition: opacity 0.15s var(--ease);
}
.brand:hover, .brand:focus-visible { opacity: 0.85; }
.brand-mark {
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: var(--r);
  background: var(--lime); color: var(--lime-ink);
}
.brand-mark svg { width: 15px; height: 15px; display: block; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.15rem; letter-spacing: 0.06em;
  text-transform: uppercase; white-space: nowrap;
  overflow: hidden; text-overflow: clip;
}
.brand-name em { font-style: normal; color: var(--lime); }

.topbar-auth { display: flex; gap: 8px; align-items: center; min-width: 0; flex-shrink: 0; }
.topbar-auth.hidden { display: none; }
.auth-chip {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--r); padding: 4px 10px 4px 5px;
}
.auth-avatar { width: 24px; height: 24px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.auth-avatar.hidden { display: none; }
.auth-initial {
  display: grid; place-items: center; flex-shrink: 0;
  width: 24px; height: 24px; border-radius: 4px;
  background: var(--panel-3); color: var(--lime);
  font-family: var(--font-mono); font-weight: 600; font-size: 0.78rem;
}
.auth-initial.hidden { display: none; }
.auth-name {
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500;
  color: var(--text);
  max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

#app {
  position: relative; z-index: 1;
  max-width: 680px; margin: 0 auto;
  padding: clamp(16px, 4vw, 28px) clamp(12px, 4vw, 20px) 56px;
  padding-bottom: max(56px, calc(40px + env(safe-area-inset-bottom)));
}
.screen.hidden { display: none; }
.screen { animation: screen-in 0.28s var(--ease); }
@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } }

/* ============================================================
   Butonlar
   ============================================================ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid transparent; border-radius: var(--r);
  padding: 13px 22px;
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase;
  cursor: pointer; white-space: nowrap;
  transition: transform 0.1s var(--ease), background 0.15s var(--ease),
              border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-block { display: flex; width: 100%; }

.btn-primary { background: var(--lime); color: var(--lime-ink); }
.btn-primary:hover:not(:disabled) { background: #d8fa55; }

.btn-ghost { background: transparent; color: var(--muted); border-color: var(--line-2); }
.btn-ghost:hover:not(:disabled) { color: var(--text); border-color: var(--muted); }

.btn-white {
  background: #fff; color: #1a1f2e;
  font-family: var(--font-body); font-size: 0.95rem;
  letter-spacing: 0; text-transform: none;
}
.btn-white:hover:not(:disabled) { filter: brightness(0.96); }

.btn-sm { padding: 9px 15px; font-size: 0.9rem; }
.btn-icon { padding: 8px 10px; }
.btn-back { display: flex; margin: 28px auto 0; }

/* ============================================================
   Form elemanları
   ============================================================ */

.field { display: flex; flex-direction: column; gap: 7px; }
.field-label {
  font-family: var(--font-mono);
  font-size: 0.62rem; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--faint);
}
.field-hint { font-size: 0.76rem; color: var(--faint); }
.field-error {
  color: #f08a90; font-size: 0.86rem; font-weight: 600;
  margin: -4px 0 0; text-align: center;
}
.field-error.hidden { display: none; }
.field-success {
  color: var(--lime); font-size: 0.86rem; font-weight: 600;
  margin: -4px 0 0; text-align: center;
}
.field-success.hidden { display: none; }

.input-wrap {
  position: relative; display: flex; align-items: center;
  background: var(--panel-3); border: 1px solid var(--line-2);
  border-radius: var(--r);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.input-wrap:focus-within {
  border-color: var(--lime);
  box-shadow: 0 0 0 3px var(--lime-dim);
}
.input-wrap input, .input-wrap select {
  width: 100%; min-width: 0;
  background: transparent; color: var(--text);
  border: none; outline: none;
  padding: 13px 14px; font-size: 0.96rem; font-family: var(--font-body);
}
.input-wrap input::placeholder { color: var(--faint); }
.input-prefix { padding-left: 14px; color: var(--faint); font-weight: 600; }
.input-prefixed input { padding-left: 6px; }

.select-wrap { position: relative; }
.select-wrap select {
  appearance: none; -webkit-appearance: none;
  padding-right: 40px; cursor: pointer;
}
.select-wrap::after {
  content: ""; position: absolute; right: 16px; top: 50%;
  width: 8px; height: 8px; margin-top: -6px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg); pointer-events: none;
}
.select-wrap select option { background: var(--panel-2); color: var(--text); }

.code-input {
  font-family: var(--font-mono); font-size: 1.4rem !important;
  font-weight: 600; letter-spacing: 0.4em; text-transform: uppercase;
  text-align: center; text-indent: 0.4em;
}

/* Anahtar (switch) */
.switch-list { display: flex; flex-direction: column; gap: 12px; }
.switch-row {
  display: flex; align-items: flex-start; gap: 12px;
  cursor: pointer; user-select: none;
}
.switch-row input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch {
  flex-shrink: 0; margin-top: 2px;
  width: 40px; height: 22px; border-radius: 4px;
  background: var(--panel-3); border: 1px solid var(--line-2);
  position: relative;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 3px;
  background: var(--muted);
  transition: transform 0.2s var(--pop), background 0.2s var(--ease);
}
.switch-row input:checked + .switch { background: var(--lime-dim); border-color: var(--lime); }
.switch-row input:checked + .switch::after { transform: translateX(18px); background: var(--lime); }
.switch-row input:focus-visible + .switch { box-shadow: 0 0 0 3px rgba(200, 242, 49, 0.35); }
.switch-text b { display: block; font-size: 0.92rem; font-weight: 600; }
.switch-text small { display: block; color: var(--muted); font-size: 0.78rem; line-height: 1.4; margin-top: 1px; }

/* ============================================================
   Ortak kalıplar: kart, başlık dizisi, mono etiket, cetvel
   ============================================================ */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
}
.card-form { display: flex; flex-direction: column; gap: 16px; }

/* "eyebrow rozeti" yerine: mono etiket + uzayan hairline */
.kicker {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--lime);
  margin: clamp(10px, 3vw, 22px) 0 16px;
}
.kicker::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.baslik {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 8vw, 3.4rem);
  font-weight: 800; line-height: 0.92;
  letter-spacing: 0.01em; text-transform: uppercase;
  margin: 0 0 4px;
}
.baslik em { font-style: normal; color: var(--lime); }
.baslik-sm { font-size: clamp(1.7rem, 6vw, 2.3rem); }

/* dönemler satırı: alt metnin üstünde mono "arşiv damgası" */
.donemler {
  font-family: var(--font-mono); font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.1em; color: var(--lime);
  margin-top: 14px;
}

.altyazi {
  color: var(--muted); font-size: 0.93rem; line-height: 1.65;
  max-width: 46ch; margin-top: 10px;
}

/* Kural hapları yerine: hairline ile bölünmüş cetvel tablosu */
.cetvel {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: var(--r);
  margin: 24px 0; overflow: hidden;
}
.cetvel > div {
  padding: 12px 8px 10px; text-align: center;
  border-right: 1px solid var(--line);
}
.cetvel > div:last-child { border-right: none; }
.cetvel b {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: 1.5rem; line-height: 1; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.cetvel span {
  display: block; margin-top: 5px;
  font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--faint);
}

.section-title {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 0.64rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint);
  margin: 26px 0 12px;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ============================================================
   Giriş duvarı + kullanıcı adı
   ============================================================ */

.gate-box { max-width: 380px; margin: 26px auto 0; }
.btn-google { width: 100%; padding: 14px 22px; font-size: 0.95rem; font-weight: 600; }
.google-g { width: 19px; height: 19px; flex-shrink: 0; }

.gate-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0;
  font-family: var(--font-mono); font-size: 0.66rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint);
}
.gate-divider::before, .gate-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.gate-email-form { display: flex; flex-direction: column; gap: 10px; }
.gate-input {
  width: 100%; padding: 13px 15px;
  background: var(--panel-3); border: 1px solid var(--line-2);
  border-radius: var(--r); color: var(--text); font-size: 0.95rem;
}
.gate-input::placeholder { color: var(--faint); }
.gate-input:focus {
  outline: none; border-color: var(--lime);
  box-shadow: 0 0 0 3px var(--lime-dim);
}
.gate-toggle {
  display: block; width: 100%; margin: 12px 0 0; padding: 4px;
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 0.86rem; font-family: inherit;
}
.gate-toggle b { color: var(--lime); font-weight: 700; }
.gate-toggle-sm { margin: 4px 0 0; font-size: 0.78rem; color: var(--faint); }
.gate-toggle.hidden, .gate-input.hidden { display: none; }

.verify-banner {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  flex-wrap: wrap; margin: 0 0 18px; padding: 10px 16px;
  background: rgba(255, 176, 32, 0.08); border: 1px solid var(--warn-line);
  border-left: 3px solid var(--warn);
  border-radius: var(--r); font-size: 0.85rem; color: var(--text);
  text-align: center;
}
.verify-banner.hidden { display: none; }
.verify-resend-btn {
  background: none; border: 1px solid var(--warn-line); border-radius: var(--r);
  padding: 4px 12px; color: var(--warn);
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  cursor: pointer;
}
.verify-resend-btn:disabled { opacity: 0.5; cursor: default; }

.gate-perks {
  list-style: none; margin: 22px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.gate-perks li {
  display: flex; align-items: center; gap: 11px;
  color: var(--muted); font-size: 0.9rem;
}
.gate-perks .perk-ic {
  display: grid; place-items: center; flex-shrink: 0;
  width: 30px; height: 30px; border-radius: var(--r);
  background: var(--panel-2); border: 1px solid var(--line);
  color: var(--muted);
}
.gate-perks .perk-ic svg { width: 15px; height: 15px; }

.username-form { max-width: 380px; margin: 0 auto; }

/* ============================================================
   Giriş (setup) ekranı
   ============================================================ */

/* Nasıl oynanır — vurgulu ama birincil aksiyonla yarışmayan lime blok */
.how-to-play {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; margin: -6px 0 24px;
  padding: 13px 20px;
  background: var(--lime-dim); color: var(--lime);
  border: 1px solid var(--lime-line); border-radius: var(--r);
  font-family: var(--font-display); font-size: 1.1rem; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.how-to-play:hover { background: rgba(200, 242, 49, 0.22); border-color: var(--lime); }
.how-to-play svg { width: 19px; height: 19px; flex-shrink: 0; }

.setup-controls { padding: 14px 16px; margin-bottom: 4px; }

.mode-cards { display: flex; flex-direction: column; gap: 10px; }
.mode-card {
  position: relative;
  display: flex; align-items: center; gap: 15px;
  width: 100%; padding: 17px 18px;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r);
  cursor: pointer; text-align: left;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.mode-card:hover { border-color: var(--line-2); background: var(--panel-2); }
.mode-icon {
  display: grid; place-items: center; flex-shrink: 0;
  width: 40px; height: 40px; border-radius: var(--r);
  border: 1px solid var(--line-2); color: var(--muted);
  background: transparent;
}
.mode-icon svg { width: 19px; height: 19px; }
.mode-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mode-name {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.05;
}
.mode-desc { font-size: 0.82rem; color: var(--muted); line-height: 1.35; }
.mode-go {
  margin-left: auto; flex-shrink: 0;
  color: var(--faint);
  font-family: var(--font-mono); font-size: 0.9rem; white-space: nowrap;
  transition: transform 0.15s var(--ease), color 0.15s var(--ease);
}
.mode-card:hover .mode-go { transform: translateX(3px); color: var(--text); }

/* öne çıkan: glow değil — sol kenarda 3px lime cetvel + köşe damgası */
.mode-featured { border-left: 3px solid var(--lime); }
.mode-featured:hover { border-color: var(--line-2); border-left-color: var(--lime); }
.mode-featured .mode-icon { border-color: var(--lime-line); color: var(--lime); }
.mode-featured .mode-name { color: var(--lime); }
.mode-tag {
  position: absolute; top: -1px; right: 14px;
  background: var(--lime); color: var(--lime-ink);
  font-family: var(--font-mono); font-size: 0.56rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 3px 8px 2px; border-radius: 0 0 4px 4px;
}
.mode-multi { border-left: 3px solid var(--violet); }
.mode-multi:hover { border-left-color: var(--violet); }
.mode-multi .mode-icon { border-color: var(--violet-line); color: var(--violet); }
.mode-multi .mode-name { color: var(--violet); }

.mode-lider { border-left: 3px solid var(--warn); }
.mode-lider:hover { border-left-color: var(--warn); }
.mode-lider .mode-icon { border-color: var(--warn-line); color: var(--warn); }
.mode-lider .mode-name { color: var(--warn); }

/* ============================================================
   Sekmeler + paneller
   ============================================================ */

.tabs {
  display: flex; gap: 4px; margin: 0 auto 20px; max-width: 380px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); padding: 4px;
}
.tab {
  flex: 1; background: transparent; color: var(--muted);
  border: none; border-radius: 4px; padding: 10px 16px;
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  cursor: pointer; transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--lime); color: var(--lime-ink); }

.panel { max-width: 380px; margin: 0 auto; }
.panel.hidden { display: none; }

/* ============================================================
   Lobi
   ============================================================ */

#lobby-screen { text-align: center; }
.lobby-card { padding: 22px 20px; margin-bottom: 14px; }
.lobby-label {
  font-family: var(--font-mono);
  font-size: 0.62rem; font-weight: 500; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--faint); margin: 0 0 10px;
}
.room-code {
  display: flex; justify-content: center; gap: clamp(5px, 2vw, 8px);
  margin: 0 0 20px;
}
.room-code .rc-char {
  display: grid; place-items: center;
  width: clamp(42px, 12vw, 54px); height: clamp(52px, 15vw, 64px);
  background: var(--panel-3); border: 1px solid var(--line-2);
  border-radius: var(--r);
  font-family: var(--font-mono); font-weight: 600;
  font-size: clamp(1.6rem, 6vw, 2.1rem); line-height: 1;
  color: var(--lime);
}
.lobby-share-title { font-size: 0.88rem; color: var(--muted); margin: 0 0 10px; }
.room-link {
  display: flex; align-items: center; gap: 10px;
  width: 100%; max-width: 440px; margin: 0 auto;
  background: var(--panel-2); color: var(--text);
  border: 1px dashed var(--line-2); border-radius: var(--r);
  padding: 12px 14px; cursor: pointer;
  font-family: var(--font-mono); font-size: 0.76rem;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.room-link:hover { border-color: var(--lime); background: var(--lime-soft); }
.room-link-ic { flex-shrink: 0; color: var(--faint); display: grid; place-items: center; }
.room-link-ic svg { width: 14px; height: 14px; }
.room-link #room-link-text {
  flex: 1; min-width: 0; text-align: left;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--muted);
}
.room-link-copy {
  flex-shrink: 0; background: var(--lime); color: var(--lime-ink);
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 3px;
}
.lobby-hint {
  color: var(--lime); font-size: 0.9rem; font-weight: 600;
  margin: 16px 0 0;
}

.lobby-cols { display: grid; gap: 12px; }
.lobby-panel { padding: 0; overflow: hidden; text-align: left; }
.panel-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 12px 15px; border-bottom: 1px solid var(--line);
}
.panel-title {
  font-family: var(--font-display); font-size: 1rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.panel-note {
  font-family: var(--font-mono); font-size: 0.62rem;
  color: var(--faint); text-align: right;
}
.panel-subhead { padding: 8px 15px 0; }
.panel-count {
  display: inline-block; white-space: nowrap;
  font-family: var(--font-mono); font-size: 0.64rem; font-weight: 600;
  color: var(--lime);
  background: var(--panel-3); border: 1px solid var(--line-2);
  padding: 2px 8px; border-radius: 3px;
}

.lobby-feed {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 8px; max-height: 200px; overflow-y: auto;
}
.feed-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: 4px;
  font-size: 0.92rem; color: var(--text);
  animation: slide-in 0.25s var(--ease);
}
@keyframes slide-in { from { opacity: 0; transform: translateY(6px); } }
.feed-av {
  display: grid; place-items: center; flex-shrink: 0;
  width: 26px; height: 26px; border-radius: 4px;
  background: var(--panel-3); border: 1px solid var(--line-2);
  font-family: var(--font-mono); font-weight: 600; font-size: 0.74rem;
  color: var(--lime);
}
.feed-row b { font-weight: 600; }
.feed-what {
  color: var(--faint); margin-left: auto;
  font-family: var(--font-mono); font-size: 0.64rem;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.feed-row.left { opacity: 0.5; }
.feed-row.left .feed-av { color: var(--muted); }
.feed-row.me { background: var(--panel-2); }
.feed-row.me .feed-av { color: var(--text); border-color: var(--lime); }

.lobby-chat .chat-log {
  display: flex; flex-direction: column; gap: 8px;
  height: 190px; overflow-y: auto; padding: 12px 15px;
  scrollbar-width: thin;
}
.chat-log:empty::after {
  content: "Henüz mesaj yok — ilk yazan sen ol.";
  color: var(--faint); font-size: 0.82rem; margin: auto; text-align: center;
}
.chat-msg {
  font-size: 0.9rem; line-height: 1.4; word-break: break-word;
  animation: slide-in 0.22s var(--ease);
}
.chat-who {
  display: block; font-family: var(--font-mono);
  font-size: 0.64rem; font-weight: 600;
  letter-spacing: 0.04em; color: var(--violet); margin-bottom: 2px;
}
.chat-msg.mine .chat-who { color: var(--lime); }
.chat-text {
  display: inline-block;
  background: var(--panel-3); border: 1px solid var(--line);
  border-radius: 3px var(--r) var(--r) var(--r); padding: 7px 11px;
  color: var(--text);
}
.chat-msg.mine .chat-text {
  background: var(--lime-dim); border-color: var(--lime-line);
}
.chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.chat-input {
  flex: 1; min-width: 0; background: var(--bg); color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 10px 13px; font: inherit; font-size: 0.9rem;
  transition: border-color 0.15s var(--ease);
}
.chat-input::placeholder { color: var(--faint); }
.chat-input:focus { outline: none; border-color: var(--lime); }
.chat-send {
  flex-shrink: 0; width: 40px; height: 40px; border: none; border-radius: var(--r);
  display: grid; place-items: center;
  background: var(--lime); color: var(--lime-ink);
  cursor: pointer; transition: background 0.15s var(--ease), transform 0.1s var(--ease);
}
.chat-send svg { width: 16px; height: 16px; }
.chat-send:hover { background: #d8fa55; }
.chat-send:active { transform: scale(0.94); }

.lobby-actions { margin-top: 18px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lobby-actions .btn-block { max-width: 380px; }
#start-room-btn.hidden { display: none; }

/* ============================================================
   Oynanış üst bandı — skorbord
   ============================================================ */

.playbar {
  position: relative; overflow: hidden;
  display: flex; align-items: stretch;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

/* süre bloğu: sayı + alt kenarda eriyen lime bar */
.pb-timer {
  position: relative; flex-shrink: 0; width: 72px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; border-right: 1px solid var(--line);
  background: var(--panel-2);
}
#turn-count {
  font-family: var(--font-display); font-size: 2.1rem; font-weight: 800;
  color: var(--lime); line-height: 1; font-variant-numeric: tabular-nums;
  transition: color 0.3s var(--ease);
}
.pb-timer-label {
  font-family: var(--font-mono); font-size: 0.55rem; letter-spacing: 0.16em;
  color: var(--faint); text-transform: uppercase;
}
.pb-bar {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--lime);
}
.pb-timer.warn #turn-count { color: var(--warn); }
.pb-timer.warn .pb-bar { background: var(--warn); }
.pb-timer.urgent #turn-count { color: #ff6b72; }
.pb-timer.urgent .pb-bar { background: var(--bad); }
.pb-timer.urgent { animation: timer-throb 1s ease-in-out infinite; }
@keyframes timer-throb { 50% { transform: scale(1.04); } }

.pb-player { flex: 1; min-width: 0; padding: 12px 16px 14px; }
.pb-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.58rem; font-weight: 500; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--faint);
}
.pb-name {
  display: flex; align-items: baseline; gap: 8px;
  min-width: 0; margin: 3px 0 4px;
  animation: player-in 0.25s var(--pop);
}
@keyframes player-in { from { opacity: 0; transform: translateY(6px); } }
.pb-first, .pb-last {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 6vw, 1.9rem); font-weight: 800;
  letter-spacing: 0.01em; color: var(--text); line-height: 1.05;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pb-first { flex-shrink: 0; max-width: 46%; }
.pb-last { min-width: 0; }
.pb-tag {
  display: inline-block;
  font-family: var(--font-mono); font-size: 0.66rem; color: var(--muted);
}

/* kalan futbolcu — pasın solunda, lime zeminli net kutu */
.pb-kalan {
  flex-shrink: 0; width: 72px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  background: var(--lime-dim);
  border-left: 1px solid var(--lime-line);
}
.pb-kalan b {
  font-family: var(--font-display); font-weight: 800; font-size: 2.1rem;
  line-height: 1; color: var(--lime); font-variant-numeric: tabular-nums;
}
.pb-kalan span {
  font-family: var(--font-mono); font-size: 0.55rem; letter-spacing: 0.16em;
  color: var(--muted); text-transform: uppercase;
}

.pb-skip {
  flex-shrink: 0; align-self: stretch;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 16px;
  background: transparent; color: var(--muted);
  border: none; border-left: 1px solid var(--line);
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.pb-skip:hover:not(:disabled) { color: var(--text); background: var(--panel-2); }
.pb-skip:disabled { opacity: 0.35; cursor: not-allowed; }
.pb-skip svg { width: 14px; height: 14px; }

/* kuyruk ilerlemesi: bandın en altına gömülü ince şerit */
.queue-progress {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: transparent; pointer-events: none;
}
.queue-progress-fill {
  height: 100%; width: 0;
  background: var(--line-2);
  transition: width 0.4s var(--ease);
}

/* meta: hap değil, tek satır mono veri şeridi */
.playmeta {
  display: flex; gap: 22px; justify-content: center; flex-wrap: wrap;
  margin: 12px 0 14px;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--faint);
}
.pm-item { display: inline-flex; align-items: baseline; gap: 7px; }
.pm-item b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.pm-clock b { color: var(--warn); }

/* ============================================================
   Kart (grid)
   ============================================================ */

.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }

.cell {
  position: relative; isolation: isolate;
  min-height: 112px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r); padding: 10px 7px 9px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  text-align: center;
  cursor: pointer; color: var(--text);
  transition: transform 0.13s var(--ease), border-color 0.13s var(--ease),
              background 0.13s var(--ease);
  min-width: 0; overflow-wrap: break-word;
}
.cell:hover:not(.filled):not(.solved):not(.wrong-cell) {
  transform: translateY(-2px);
  border-color: var(--lime-line);
  background: var(--panel-2);
}
.cell:active:not(.filled):not(.solved):not(.wrong-cell) { transform: translateY(0) scale(0.98); }

.cell-label {
  font-size: 0.7rem; font-weight: 500; line-height: 1.3;
  color: var(--muted); letter-spacing: 0.002em;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.cell:hover:not(.filled):not(.solved):not(.wrong-cell) .cell-label { color: var(--text); }

.cell-art { display: flex; gap: 5px; align-items: center; justify-content: center; }

/* Takım işareti: parlak küre yerine düz, köşeleri yumuşak forma karesi */
.cell-team-dot {
  width: 22px; height: 22px; border-radius: 4px; flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.cell-icon { width: 28px; height: 28px; object-fit: contain; border-radius: 4px; }
.cell-icon.flag {
  width: 26px; height: 18px; object-fit: cover; border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

/* Takım/uyruk dışı kategoriler: çizgi ikon ya da mono kod rozeti */
.cell-mark {
  min-width: 26px; height: 26px; padding: 0 4px;
  display: grid; place-items: center;
  color: var(--faint);
}
.cell-mark svg { width: 22px; height: 22px; display: block; }
.cell:hover:not(.filled):not(.solved):not(.wrong-cell) .cell-mark { color: var(--muted); }
.cell-mark.txt {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.04em; color: var(--muted);
  background: var(--panel-3); border: 1px solid var(--line-2);
  border-radius: 4px; line-height: 1;
}
/* kırmızı kart kategorisi: düz kırmızı kart */
.cell-mark.redcard {
  width: 18px; min-width: 18px; height: 24px; padding: 0;
  background: #d3212c; border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* Dolu hücre: glow yok — lime hairline + soluk lime zemin (nötr, sızdırmaz) */
.cell.filled {
  background: var(--lime-dim);
  border-color: var(--lime-line);
  cursor: default;
}
.cell.filled .cell-label { color: var(--text); }
.cell.filled .cell-mark { color: var(--muted); }
.cell.filled .cell-mark.txt { background: rgba(200, 242, 49, 0.12); border-color: var(--lime-line); }

/* açılış: düz derin yeşil/kırmızı — gradient yok */
.cell.solved {
  background: var(--good-deep);
  border-color: var(--good);
  color: #d9f5e6; cursor: default;
}
.cell.wrong-cell {
  background: var(--bad-deep);
  border-color: var(--bad);
  color: #f8dddd; cursor: default;
}
.cell.solved .cell-label { color: #d9f5e6; }
.cell.wrong-cell .cell-label { color: #f8dddd; }
.cell.solved .cell-mark, .cell.wrong-cell .cell-mark { color: rgba(255, 255, 255, 0.6); }
.cell.solved .cell-mark.txt, .cell.wrong-cell .cell-mark.txt {
  background: rgba(0, 0, 0, 0.25); border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.85);
}
.cell.solved .cell-team-dot, .cell.wrong-cell .cell-team-dot {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

/* yerleştirilen futbolcunun adı */
.cell-name {
  font-family: var(--font-mono);
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.02em;
  background: var(--lime); color: var(--lime-ink);
  border-radius: 3px; padding: 2px 7px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cell.solved .cell-name { background: var(--good); color: #eafff3; }
.cell.wrong-cell .cell-name { background: var(--bad); color: #fff; }

/* oyun sonu: köşede doğru/yanlış işareti */
.cell-badge {
  position: absolute; top: 5px; right: 6px;
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 600;
}
.cell.solved .cell-badge { color: #7ee2ac; }
.cell.wrong-cell .cell-badge { color: #f79ba0; }

/* hamle geri bildirimi: yalnız "yerleşti" nabzı — doğruluk ipucu vermez */
.cell.flash-placed { animation: flash-placed 0.5s var(--ease); }
@keyframes flash-placed {
  0% { transform: scale(0.92); box-shadow: 0 0 0 0 rgba(200, 242, 49, 0.45); }
  55% { transform: scale(1.03); box-shadow: 0 0 0 12px rgba(200, 242, 49, 0); }
  100% { transform: scale(1); }
}

/* ============================================================
   BİNGO kutlaması
   ============================================================ */

.bingo-overlay {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  pointer-events: none; opacity: 0;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 16vw, 7rem);
  font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--lime);
  text-shadow: 0 6px 0 rgba(0, 0, 0, 0.4);
}
.bingo-overlay.show { animation: bingo-pop 1.4s var(--pop); }
@keyframes bingo-pop {
  0% { opacity: 0; transform: scale(0.3) rotate(-6deg); }
  18% { opacity: 1; transform: scale(1.1) rotate(1.5deg); }
  30% { transform: scale(1) rotate(-1deg); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.04); }
}

/* ============================================================
   Teknik alan
   ============================================================ */

.technical-area {
  margin-top: 20px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); padding: 14px 18px;
}
.technical-area summary {
  cursor: pointer; font-weight: 600; font-size: 0.87rem; color: var(--muted);
  list-style: none; user-select: none;
  display: flex; align-items: center; gap: 8px;
}
.technical-area summary::-webkit-details-marker { display: none; }
.technical-area summary::before {
  content: "›"; color: var(--lime); font-size: 1.15rem; line-height: 1;
  transition: transform 0.2s var(--ease);
}
.technical-area[open] summary::before { transform: rotate(90deg); }
.technical-area summary:hover { color: var(--text); }

/* ============================================================
   Sonuç ekranı
   ============================================================ */

#end-screen { text-align: center; }
.result-card { padding: 24px 20px 20px; margin-bottom: 8px; }

.rank-block { margin-bottom: 14px; }
.rank-block.hidden { display: none; }
.rank-num {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(3.4rem, 15vw, 4.6rem); line-height: 0.92;
  font-variant-numeric: tabular-nums;
  color: var(--lime);
}
.rank-num em { font-style: normal; font-size: 0.45em; color: var(--muted); margin-left: 2px; }
.rank-sub {
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint);
  margin-top: 6px;
}

#end-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 6vw, 2.1rem); font-weight: 800;
  text-transform: uppercase; margin: 0 0 20px; line-height: 1.05;
}

/* iki büyük sayı, arada hairline bölme */
.stat-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; margin-bottom: 20px;
  background: var(--panel-2);
}
.stat {
  padding: 20px 8px 16px;
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: none; }
.stat b {
  display: block; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.4rem, 10vw, 3.4rem); line-height: 0.95;
  font-variant-numeric: tabular-nums;
}
.stat span {
  display: block; margin-top: 7px;
  font-family: var(--font-mono);
  font-size: 0.6rem; color: var(--faint);
  letter-spacing: 0.18em; text-transform: uppercase;
}
.stat-hero b { color: var(--lime); }

.result-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 6px; }
.btn-share { flex: 1 1 170px; max-width: 230px; }
.btn-share.hidden { display: none; }

/* canlı skor tablosu */
.lb-block { text-align: left; margin-top: 20px; }
.lb-block.hidden { display: none; }
.lb-head {
  display: grid; grid-template-columns: 1fr 58px 42px 54px;
  align-items: center; gap: 4px;
  padding: 0 6px 9px; border-bottom: 1px solid var(--line-2);
  font-family: var(--font-mono);
  font-size: 0.62rem; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--faint);
}
.lb-live { display: flex; align-items: center; gap: 7px; }
.lb-live i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--good);
  animation: live-pulse 1.6s ease-in-out infinite;
}
@keyframes live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.lb-live.done i { background: var(--lime); animation: none; }
.lb-col { text-align: right; }

.lb-rows { display: flex; flex-direction: column; }
.lb-row {
  display: grid; grid-template-columns: 1fr 58px 42px 54px;
  align-items: center; gap: 4px;
  padding: 11px 6px; border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
  animation: slide-in 0.25s var(--ease);
}
.lb-row:last-child { border-bottom: none; }
.lb-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lb-pos {
  display: grid; place-items: center; flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 4px;
  background: var(--panel-3); color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.68rem; font-weight: 600; font-variant-numeric: tabular-nums;
}
.lb-pos.medal-1 { background: #d9a916; color: #2e2200; }
.lb-pos.medal-2 { background: #aab6cd; color: #1c2331; }
.lb-pos.medal-3 { background: #bd7d4a; color: #2a1505; }
.lb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.lb-you {
  flex-shrink: 0; background: var(--lime); color: var(--lime-ink);
  font-family: var(--font-mono); font-size: 0.56rem; font-weight: 600;
  letter-spacing: 0.12em;
  border-radius: 3px; padding: 2px 6px;
}
.lb-time, .lb-pld {
  text-align: right; color: var(--muted);
  font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 0.78rem;
}
.lb-pts {
  text-align: right; font-weight: 600;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 0.95rem;
}
.lb-row.me { background: var(--lime-dim); border-radius: 4px; border-bottom-color: transparent; }
.lb-row.me .lb-name, .lb-row.me .lb-pts { color: var(--lime); }
.lb-row.clickable { cursor: pointer; }
.lb-row.clickable:hover { background: var(--panel-2); }
.lb-note { color: var(--muted); font-size: 0.82rem; text-align: center; margin: 14px 0 0; }
.lb-note-top { margin: 0 0 16px; }
.lb-empty { color: var(--muted); font-size: 0.88rem; text-align: center; margin: 20px 0 6px; }
.lb-empty.hidden { display: none; }

/* Haftalık tablo: isim / ort. puan / kazanılan */
.lb-head-weekly, .lb-row-weekly { grid-template-columns: 1fr 84px 84px; gap: 10px; }
.lb-row-weekly .lb-pld { font-size: 0.88rem; font-weight: 600; color: var(--text); }

.end-grid { margin-bottom: 16px; }
.end-grid .cell { cursor: default; }
#end-summary {
  display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--faint);
}
#end-summary .pm-item b { font-weight: 600; color: var(--text); }
.end-details { margin-top: 14px; text-align: left; }
.end-details .reveal-list { border: none; background: transparent; padding: 0; margin: 12px 0 0; max-width: none; }

.reveal-list { text-align: left; }
.reveal-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 0.85rem;
}
.reveal-row:last-child { border-bottom: none; }
.reveal-row .cat { color: var(--muted); }
.reveal-row .ans { font-weight: 600; text-align: right; white-space: nowrap; }
.reveal-row.empty .ans { color: var(--faint); font-weight: 400; }
.reveal-row.ok .ans { color: #4cc98a; }
.reveal-row.fail .ans { color: #f08a90; }

/* Geri bildirim kutusu — sonuç ekranı, "Tekrar Oyna"nın hemen üstünde.
   Hairline kart + soluk davet metni: göze batmaz ama kaydırırken üstünden
   atlanmaz. Gönderim mail'e gitmez, doğrudan DB'ye yazılır. */
.feedback-block {
  margin-top: 22px; padding: 16px; border-radius: var(--r-lg);
  background: var(--panel); border: 1px solid var(--line); text-align: left;
}
.feedback-prompt {
  font-size: 0.86rem; color: var(--muted); margin: 0 0 10px;
}
.feedback-form { display: flex; flex-direction: column; gap: 8px; }
.feedback-textarea {
  width: 100%; resize: vertical; min-height: 64px;
  background: var(--panel-3); border: 1px solid var(--line-2);
  border-radius: var(--r); color: var(--text);
  padding: 11px 13px; font: inherit; font-size: 0.9rem; line-height: 1.5;
}
.feedback-textarea::placeholder { color: var(--faint); }
.feedback-textarea:focus {
  outline: none; border-color: var(--lime);
  box-shadow: 0 0 0 3px var(--lime-dim);
}
.feedback-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.feedback-count {
  font-family: var(--font-mono); font-size: 0.66rem; color: var(--faint);
}

.end-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }

/* Sonraki el (rematch) paneli — çok oyunculu bağlam: menekşe vurgu,
   sonuç ekranının en üstünde (skorun altında) durduğu için fark edilsin diye
   sol kenar cetveli + hafifçe öne çıkan zemin var. */
.rematch-block {
  margin-top: 14px; padding: 18px 16px; border-radius: var(--r-lg);
  background: var(--panel-2); border: 1px solid var(--line-2);
  border-left: 3px solid var(--violet); text-align: center;
  animation: slide-in 0.25s var(--ease);
}
.rematch-block.hidden { display: none; }
.rematch-title {
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; margin: 0;
  color: var(--violet);
}
.rematch-sub { font-size: 0.85rem; color: var(--faint); margin: 6px 0 14px; }
.rematch-list {
  display: flex; flex-direction: column; gap: 4px; text-align: left;
  max-height: 220px; overflow-y: auto; margin-bottom: 14px;
}
.rematch-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 4px;
  font-size: 0.92rem; color: var(--muted);
}
.rematch-row.ready { color: var(--text); background: var(--panel-2); }
.rematch-ic {
  flex-shrink: 0; width: 18px; text-align: center;
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--faint);
}
.rematch-row.ready .rematch-ic { color: var(--lime); }
.rematch-row b { font-weight: 600; }

/* ============================================================
   Geri sayım
   ============================================================ */

.countdown {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: rgba(7, 11, 21, 0.94);
  backdrop-filter: blur(10px);
  animation: ob-fade 0.25s var(--ease);
}
.countdown.hidden { display: none; }
.cd-label {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted);
}
.cd-num {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(7rem, 34vw, 12rem); line-height: 1;
  color: var(--lime); font-variant-numeric: tabular-nums;
}
.cd-num.tick { animation: cd-tick 0.9s var(--pop); }
@keyframes cd-tick {
  0% { opacity: 0.15; transform: scale(1.5); }
  25% { opacity: 1; transform: scale(1); }
  100% { opacity: 1; transform: scale(1); }
}
.cd-num.go { color: #fff; }
.cd-hint { color: var(--faint); font-size: 0.92rem; }

.cd-fact {
  margin-top: 26px;
  max-width: min(90vw, 460px);
  padding: 16px 20px;
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--lime);
  border-radius: var(--r);
  background: var(--panel);
  text-align: left;
  transition: opacity 0.4s var(--ease);
}
.cd-fact.hidden { display: none; }
.cd-fact.swap { opacity: 0; }
.cd-fact-tag {
  font-family: var(--font-mono); font-weight: 500;
  font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--lime); margin-bottom: 8px;
}
.cd-fact-text {
  color: var(--text); font-size: 0.95rem; line-height: 1.5;
  min-height: 3em;
  display: flex; align-items: center;
}

.pc-modal {
  position: fixed; inset: 0; z-index: 95;
  display: flex; align-items: center; justify-content: center;
  background: rgba(7, 11, 21, 0.85);
  backdrop-filter: blur(8px);
  padding: 20px;
  animation: ob-fade 0.2s var(--ease);
}
.pc-modal.hidden { display: none; }
.pc-modal-card {
  position: relative; width: min(420px, 100%);
  max-height: 88vh; overflow-y: auto;
}
.pc-modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--panel-2); color: var(--muted);
  font-size: 0.9rem; cursor: pointer;
}
.pc-modal-close:hover { color: var(--text); border-color: var(--muted); }
.pc-modal-name {
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  margin: 0 34px 14px 0;
}

/* ============================================================
   Bildirimler
   ============================================================ */

.toast {
  position: fixed; bottom: max(22px, env(safe-area-inset-bottom)); left: 50%;
  transform: translateX(-50%); z-index: 60;
  background: var(--panel-2); border: 1px solid var(--line-2);
  border-left: 3px solid var(--lime);
  color: var(--text);
  padding: 12px 18px; border-radius: var(--r);
  font-size: 0.9rem; font-weight: 500;
  max-width: min(92vw, 480px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.toast.good { border-left-color: var(--good); }
.toast.bad { border-left-color: var(--bad); }
.toast.hidden { opacity: 0; transform: translateX(-50%) translateY(10px); pointer-events: none; }

.conn-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 70;
  background: var(--warn); color: #2a1c00;
  padding: 10px 14px; text-align: center;
  font-size: 0.85rem; font-weight: 700;
}
.conn-banner.hidden { display: none; }

/* ============================================================
   ONBOARDING — kaydırmalı tanıtım
   ============================================================ */

.onboarding {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  padding: 16px;
  background: rgba(7, 11, 21, 0.8);
  backdrop-filter: blur(10px);
  animation: ob-fade 0.25s var(--ease);
}
.onboarding.hidden { display: none; }
@keyframes ob-fade { from { opacity: 0; } }

.ob-shell {
  position: relative;
  width: min(460px, 100%);
  background: var(--panel);
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  padding: 22px 22px 18px;
  overflow: hidden;
  animation: ob-rise 0.35s var(--pop);
}
@keyframes ob-rise { from { opacity: 0; transform: translateY(18px) scale(0.98); } }
.ob-shell::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 2px;
  background: var(--lime);
}

.ob-skip {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  background: transparent; color: var(--faint); border: none;
  font-family: var(--font-mono); font-size: 0.66rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer; padding: 6px 8px;
  transition: color 0.15s var(--ease);
}
.ob-skip:hover { color: var(--text); }

.ob-viewport { overflow: hidden; margin: 0 -22px; }
.ob-track { display: flex; transition: transform 0.45s cubic-bezier(0.5, 0.05, 0.2, 1); }
.ob-slide { flex: 0 0 100%; padding: 8px 22px 4px; text-align: center; align-self: stretch; }

.ob-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 6vw, 1.8rem); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.02em;
  margin: 18px 0 8px; line-height: 1.05;
}
.ob-text { color: var(--muted); font-size: 0.9rem; line-height: 1.55; margin: 0 auto; max-width: 340px; }
.ob-text b { color: var(--text); font-weight: 700; }

.ob-art {
  height: 208px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

/* 1 · mini grid */
.ob-mini-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: 178px; }
.mg-cell {
  aspect-ratio: 1; border-radius: 4px;
  background: var(--panel); border: 1px solid var(--line);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--lime);
}
.mg-cell.hit { background: var(--lime-dim); border-color: var(--lime-line); }
.ob-slide.is-active .mg-cell.hit {
  opacity: 0; animation: mg-pop 0.4s var(--ease) forwards;
  animation-delay: calc(var(--d) * 0.08s + 0.15s);
}
@keyframes mg-pop { from { opacity: 0; transform: scale(0.3); } to { opacity: 1; transform: scale(1); } }

/* 2 · yerleştirme */
.ob-art-place { gap: 6px; }
.ob-queue { display: flex; align-items: center; gap: 7px; }
.q-dot { width: 8px; height: 8px; border-radius: 2px; background: var(--line-2); }
.q-dot.done { background: rgba(200, 242, 49, 0.45); }
.q-chip {
  font-family: var(--font-mono); font-weight: 600; font-size: 0.78rem;
  letter-spacing: 0.02em;
  background: var(--lime); color: var(--lime-ink);
  padding: 5px 10px; border-radius: 4px;
}
.ob-slide.is-active .q-chip { animation: chip-bob 1.4s ease-in-out infinite; }
@keyframes chip-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.ob-arrow { color: var(--lime); font-size: 1.3rem; font-weight: 800; line-height: 0.6; }
.ob-slide.is-active .ob-arrow { animation: arrow-drop 1.4s ease-in-out infinite; }
@keyframes arrow-drop { 0%, 100% { transform: translateY(0); opacity: 0.6; } 50% { transform: translateY(4px); opacity: 1; } }
.ob-place-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pg-cell {
  width: 62px; height: 62px; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--faint);
}
.pg-cell svg { width: 18px; height: 18px; }
.pg-cell .pg-forma { width: 16px; height: 16px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); }
.pg-cell .pg-kod {
  font-family: var(--font-mono); font-size: 0.6rem; font-weight: 600;
  background: var(--panel-3); border: 1px solid var(--line-2); border-radius: 3px;
  padding: 1px 4px; color: var(--muted);
}
.pg-cell em {
  font-style: normal; font-family: var(--font-mono); font-weight: 500;
  font-size: 0.5rem; text-transform: uppercase; color: var(--muted); letter-spacing: 0.04em;
}
.pg-cell.target { border-color: var(--lime); color: var(--lime); }
.pg-cell.target em { color: var(--lime); }
.ob-slide.is-active .pg-cell.target { animation: target-blink 1.4s ease-in-out infinite; }
@keyframes target-blink {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200, 242, 49, 0.35); }
  50% { box-shadow: 0 0 0 3px rgba(200, 242, 49, 0.35); }
}

/* 3 · reveal */
.ob-art-reveal { perspective: 600px; }
.reveal-demo { position: relative; width: 150px; height: 150px; }
.rd-face {
  position: absolute; inset: 0; border-radius: var(--r);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  font-size: 2.2rem; backface-visibility: hidden;
  font-family: var(--font-mono);
}
.rd-face em {
  font-style: normal; font-family: var(--font-mono); font-weight: 500;
  font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.1em;
}
.rd-neutral { background: var(--panel-3); border: 1px solid var(--line-2); color: var(--muted); }
.rd-ok { background: var(--good-deep); border: 1px solid var(--good); color: #7ee2ac; }
.ob-slide.is-active .rd-neutral { animation: flip-out 3.2s ease-in-out infinite; }
.ob-slide.is-active .rd-ok { animation: flip-in 3.2s ease-in-out infinite; }
@keyframes flip-out {
  0%, 35% { transform: rotateY(0); opacity: 1; }
  50%, 90% { transform: rotateY(180deg); opacity: 0; }
  100% { transform: rotateY(0); opacity: 1; }
}
@keyframes flip-in {
  0%, 35% { transform: rotateY(-180deg); opacity: 0; }
  50%, 90% { transform: rotateY(0); opacity: 1; }
  100% { transform: rotateY(-180deg); opacity: 0; }
}

/* 4 · araçlar */
.ob-art-tools { justify-content: center; gap: 10px; padding: 0 14px; width: 100%; }
.tool-row {
  display: flex; align-items: center; gap: 13px; text-align: left; width: 100%;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 11px 14px;
}
.ob-slide.is-active .tool-row { opacity: 0; animation: tool-in 0.4s var(--ease) forwards; }
.ob-slide.is-active .tool-row:nth-child(1) { animation-delay: 0.1s; }
.ob-slide.is-active .tool-row:nth-child(2) { animation-delay: 0.22s; }
@keyframes tool-in { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: translateX(0); } }
.tool-ic {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: var(--r);
  display: grid; place-items: center;
  background: var(--panel-3); border: 1px solid var(--line-2);
  color: var(--muted);
}
.tool-ic svg { width: 18px; height: 18px; }
.tool-ic.tool-timer { border-color: var(--warn-line); color: var(--warn); }
.tool-row b { display: block; font-size: 0.92rem; }
.tool-row small { display: block; color: var(--muted); font-size: 0.76rem; line-height: 1.4; margin-top: 2px; }
.tool-row small b { display: inline; color: var(--text); }

/* 5 · interaktif demo */
.ob-art.ob-art-demo { gap: 10px; height: auto; min-height: 208px; padding: 14px 10px 12px; }
.demo-player {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: var(--panel);
  border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 8px 22px; min-width: 200px;
}
.dp-label {
  color: var(--faint); font-family: var(--font-mono);
  font-size: 0.54rem; font-weight: 500; letter-spacing: 0.16em;
}
.dp-name {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.01em; line-height: 1.05;
}
.dp-meta { color: var(--muted); font-family: var(--font-mono); font-size: 0.64rem; }
.demo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; width: 250px; }
.demo-cell {
  height: 52px; border-radius: var(--r); cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 4px 8px;
  transition: transform 0.12s var(--ease), border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.demo-cell .demo-ic { flex-shrink: 0; display: grid; place-items: center; color: var(--faint); }
.demo-cell .demo-ic svg { width: 16px; height: 16px; }
.demo-cell .demo-forma { width: 16px; height: 16px; border-radius: 3px; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); }
.demo-cell .demo-kod {
  flex-shrink: 0; font-family: var(--font-mono); font-size: 0.58rem; font-weight: 600;
  background: var(--panel-3); border: 1px solid var(--line-2); border-radius: 3px;
  padding: 1px 4px; color: var(--muted);
}
.demo-cell em {
  font-style: normal; font-family: var(--font-body); font-weight: 600;
  font-size: 0.66rem; color: var(--muted); line-height: 1.15; text-align: left;
}
.demo-cell:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--lime); }
.demo-cell:disabled { cursor: default; }
.demo-cell.filled { background: var(--lime-dim); border-color: var(--lime-line); }
.demo-cell.reveal-ok { background: var(--good-deep); border-color: var(--good); color: #d9f5e6; }
.demo-cell.reveal-ok em { color: #d9f5e6; }
.demo-cell.reveal-bad { background: var(--bad-deep); border-color: var(--bad); color: #f8dddd; }
.demo-cell.reveal-bad em { color: #f8dddd; }
.demo-cell.reveal-ok .demo-ic, .demo-cell.reveal-bad .demo-ic,
.demo-cell.reveal-ok .demo-forma, .demo-cell.reveal-bad .demo-forma,
.demo-cell.reveal-ok .demo-kod, .demo-cell.reveal-bad .demo-kod { display: none; }
.demo-mark {
  flex-shrink: 0; font-family: var(--font-mono); font-size: 0.85rem; font-weight: 600;
}
.demo-cell.reveal-ok .demo-mark { color: #7ee2ac; }
.demo-cell.reveal-bad .demo-mark { color: #f79ba0; }
.demo-cell.flash { animation: flash-placed 0.5s var(--ease); }
.demo-caption {
  color: var(--muted); font-size: 0.82rem; line-height: 1.35;
  margin: 2px 0 0; min-height: 2.7em; font-weight: 600;
  transition: color 0.2s var(--ease);
}
.demo-caption.ok { color: #4cc98a; }
.demo-caption.bad { color: #f08a90; }

/* --- Alt kısım: geri / noktalar / ileri --- */
.ob-footer { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.ob-dots { display: flex; gap: 6px; margin: 0 auto; }
.ob-dot {
  width: 6px; height: 6px; border-radius: 3px; background: var(--line-2);
  cursor: pointer;
  transition: width 0.25s var(--ease), background 0.25s var(--ease);
}
.ob-dot.active { width: 18px; background: var(--lime); }
.ob-nav {
  border: none; border-radius: var(--r); cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  transition: transform 0.1s var(--ease), background 0.15s var(--ease), opacity 0.2s var(--ease);
}
.ob-nav:active { transform: scale(0.96); }
.ob-prev {
  width: 42px; height: 42px; flex-shrink: 0; font-size: 1rem;
  background: var(--panel-3); color: var(--text); border: 1px solid var(--line-2);
}
.ob-prev:hover { border-color: var(--lime); color: var(--lime); }
.ob-prev.ob-hidden { visibility: hidden; }
.ob-next {
  background: var(--lime); color: var(--lime-ink);
  padding: 12px 24px;
}
.ob-next:hover { background: #d8fa55; }
.ob-next.pulse { animation: next-pulse 1.2s ease-in-out infinite; }
@keyframes next-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200, 242, 49, 0.4); }
  50% { box-shadow: 0 0 0 5px rgba(200, 242, 49, 0.18); }
}

/* ============================================================
   Duyarlı ayarlar
   ============================================================ */

@media (min-width: 640px) {
  .lobby-cols { grid-template-columns: 1fr 1fr; align-items: start; }
}

@media (max-width: 560px) {
  .mode-card { padding: 14px 15px; gap: 12px; }
  .mode-icon { width: 38px; height: 38px; }
  .mode-name { font-size: 1.2rem; }
  .mode-desc { font-size: 0.78rem; }
  .cetvel { grid-template-columns: repeat(2, 1fr); }
  .cetvel > div:nth-child(2) { border-right: none; }
  .cetvel > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 430px) {
  .auth-name { display: none; }
  .auth-chip { padding: 4px; gap: 0; }

  .grid { gap: 5px; }
  .cell { min-height: 104px; padding: 9px 5px 8px; gap: 6px; }
  .cell-label { font-size: 0.64rem; line-height: 1.22; -webkit-line-clamp: 4; }
  .cell-name { font-size: 0.58rem; padding: 2px 6px; }
  .cell-team-dot { width: 20px; height: 20px; }
  .cell-mark { min-width: 24px; height: 24px; }
  .cell-mark svg { width: 20px; height: 20px; }
  .cell-mark.txt { font-size: 0.62rem; }
  .cell-icon.flag { width: 24px; height: 17px; }

  /* skorbord iki satıra sarılır: üstte süre + isim, altta kalan + pas */
  .playbar { flex-wrap: wrap; }
  .pb-timer { width: 60px; }
  #turn-count { font-size: 1.7rem; }
  .pb-player { flex: 1 1 60%; min-width: 0; padding: 10px 14px 12px; }
  .pb-kalan {
    width: 50%; flex-direction: row; gap: 8px; padding: 9px 0;
    border-left: none; border-top: 1px solid var(--line);
  }
  .pb-kalan b { font-size: 1.5rem; }
  .pb-skip {
    flex: 1; justify-content: center; padding: 9px 0;
    border-top: 1px solid var(--line);
  }
  .playmeta { gap: 16px; }

  .kicker { margin-top: 8px; }
  .altyazi { font-size: 0.88rem; }
  .how-to-play { margin-bottom: 20px; }
  .cetvel { margin: 20px 0; }
  .setup-controls { padding: 12px 14px; }
  .section-title { margin: 20px 0 10px; }

  .brand-name { font-size: 1.05rem; }
  .result-card { padding: 20px 14px 16px; }
  .lb-head, .lb-row { grid-template-columns: 1fr 50px 34px 46px; }
  .lb-row { font-size: 0.86rem; }
  .lb-head-weekly, .lb-row-weekly { grid-template-columns: 1fr 66px 66px; }
  .card { padding: 16px; }

  .ob-shell { padding: 20px 16px 16px; }
  .ob-viewport { margin: 0 -16px; }
  .ob-slide { padding: 6px 16px 4px; }
  .ob-art:not(.ob-art-demo) { height: 190px; }
}

/* Hareket duyarlılığı: süslemeler kapanır, işlevsel geçişler kısalır. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.08s !important;
    scroll-behavior: auto !important;
  }
  .pb-bar { transition: none !important; }
}
