/* =====================================================================
   theme.css - Tasarım token'ları, reset, temel tipografi
   Görsel dil: koyu premium stadyum + neon arcade + broadcast HUD
   ===================================================================== */

:root {
  /* --- yüzeyler --- */
  --bg-0: #05070d;
  --bg-1: #0a0f1a;
  --bg-2: #111827;
  --bg-3: #18212f;
  --glass: rgba(20, 28, 42, 0.62);
  --glass-2: rgba(28, 38, 56, 0.78);
  --glass-line: rgba(255, 255, 255, 0.09);
  --glass-line-strong: rgba(255, 255, 255, 0.18);

  /* --- metin --- */
  --txt-0: #f4f8ff;
  --txt-1: #b9c6db;
  --txt-2: #7d8ba3;
  --txt-3: #55637a;

  /* --- neon vurgular --- */
  --neon: #00e5ff;
  --neon-2: #7c4dff;
  --neon-3: #ff2d95;
  --gold: #ffca28;
  --green: #00e676;
  --red: #ff3d57;
  --orange: #ff8a3d;

  /* --- takım renkleri (JS ile güncellenir) --- */
  --team-0: #1e88e5;
  --team-1: #e53935;

  /* --- ölçü --- */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --gap: 14px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);

  /* --- gölge --- */
  --sh-1: 0 2px 8px rgba(0, 0, 0, 0.4);
  --sh-2: 0 8px 28px rgba(0, 0, 0, 0.5);
  --sh-3: 0 18px 60px rgba(0, 0, 0, 0.6);
  --glow: 0 0 24px rgba(0, 229, 255, 0.35);

  --font: 'Bahnschrift', 'DIN Alternate', 'Segoe UI Semibold', system-ui, -apple-system, sans-serif;
  --font-ui: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-num: 'Bahnschrift', 'DIN Alternate', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg-0);
  color: var(--txt-0);
  font-family: var(--font-ui);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
  touch-action: manipulation;
  user-select: none;
}

/* Belge seviyesinde kaydirma YOK: tek kaydirma kabugu #screens'dir (ui.css).
   Bu, tabbar'in (position:fixed) altinda kalan icerigin sonsuza kadar
   erisilemez olmasini engeller. Çok kisa (yatay telefon) ekranlar icin
   belge kaydirmasi acma kacisi @media (max-height: 380px) blogunda,
   dosya sonunda tanimlidir. `.is-scroll` kurali kaldirildi: hicbir JS
   bu sinifi eklemiyordu, dolayisiyla sessiz bir olu koduydu. */

h1, h2, h3, h4 {
  font-family: var(--font);
  margin: 0;
  letter-spacing: 0.02em;
  font-weight: 700;
}

button {
  font-family: inherit;
  color: inherit;
  border: none;
  background: none;
  cursor: pointer;
  font-size: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
  color: var(--txt-0);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  width: 100%;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--neon);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.12);
}
input::placeholder { color: var(--txt-3); }
select option { background: var(--bg-2); }

/* ------------------------------------------------- odak (klavye) gorunurlugu
   Klavye kullanicisi her odaklanan oge icin 2px --neon halka gorur.
   `outline` modern tarayicilarda ogenin kendi border-radius'unu takip
   eder; bu yuzden burada border-radius YAZILMAZ (aksi halde odak aninda
   .btn'in yuvarlakligi degisir). Isik (box-shadow) sadece hover:hover
   ortaminda eklenir; hibrit cihazlarda klavye odagi yine de gorunur.
   `.menu-tile .team-card .tab .seg button .row-item` gibi butonlar bu
   :where() listesi sayesinde otomatik kapsanir - ek kural gerekmez. */
:where(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 2px;
}
@media (hover: hover) {
  :where(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
    box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.16), var(--glow);
  }
}
/* Fare/tik odaginda halka gorunmez; klavye odaginda gorunur. */
:focus:not(:focus-visible) { outline: none; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.mono { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------- yardımcı */
.glass {
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--glass-line);
  box-shadow: var(--sh-2), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.neon-text {
  background: linear-gradient(100deg, var(--neon), var(--neon-2) 55%, var(--neon-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(0, 229, 255, 0.28));
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--glass-line);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tag-rarity-common { background: rgba(159, 179, 200, 0.18); color: #b9c6db; }
.tag-rarity-rare { background: rgba(79, 195, 247, 0.2); color: #4fc3f7; }
.tag-rarity-epic { background: rgba(179, 136, 255, 0.22); color: #b388ff; }
.tag-rarity-legendary { background: rgba(255, 202, 40, 0.22); color: #ffca28; }

.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--glass-line-strong), transparent); }

/* ------------------------------------------------------------- butonlar */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: var(--r-md);
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--glass-line-strong);
  color: var(--txt-0);
  overflow: hidden;
  transition: transform 0.14s cubic-bezier(0.2, 0.9, 0.3, 1.2), box-shadow 0.18s, border-color 0.18s, background 0.18s;
  will-change: transform;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.22) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s;
}
.btn:hover { transform: translateY(-2px); border-color: rgba(0, 229, 255, 0.5); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 22px rgba(0, 229, 255, 0.18); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0) scale(0.97); }
.btn:disabled { opacity: 0.4; pointer-events: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--neon), #0091ea 60%, var(--neon-2));
  color: #04121a;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(0, 145, 234, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:hover { box-shadow: 0 10px 30px rgba(0, 145, 234, 0.55), 0 0 30px rgba(0, 229, 255, 0.35); }
.btn-danger { background: linear-gradient(135deg, #ff5252, #d32f2f); color: #fff; border-color: transparent; }
.btn-gold { background: linear-gradient(135deg, var(--gold), #ff8f00); color: #2a1a00; border-color: transparent; }
.btn-ghost { background: rgba(255, 255, 255, 0.05); }
.btn-sm { padding: 9px 15px; font-size: 0.8rem; border-radius: var(--r-sm); }
.btn-block { width: 100%; }
.btn-lg { padding: 17px 30px; font-size: 1.1rem; }

/* --------------------------------------------------------------- animasyon */
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes pulseGlow { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes popIn { 0% { transform: scale(0.6); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes shimmer { 0% { background-position: -300% 0; } 100% { background-position: 300% 0; } }
@keyframes shake { 0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-6px, 3px); } 40% { transform: translate(6px, -3px); } 60% { transform: translate(-4px, -2px); } 80% { transform: translate(4px, 2px); } }
@keyframes spinSlow { to { transform: rotate(360deg); } }
@keyframes ringPulse { 0% { transform: scale(0.85); opacity: 0.85; } 100% { transform: scale(1.6); opacity: 0; } }

.anim-up { animation: slideUp 0.45s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
.anim-in { animation: slideIn 0.4s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
.anim-pop { animation: popIn 0.35s cubic-bezier(0.2, 1.4, 0.4, 1) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.06s !important;
  }
  /* Yukaridaki genel kural sureyi kisaltir ama bazi efektleri (nabiz gibi
     sonsuz donguler) yine de gorunur kalir; onlar acikca kapatilir.
     NOT: .hud-* siniflari game.css'in alani; dokunulmadi. Yukaridakaki
     `*` kurali onlarin da surelerini 0.01ms'e indirdigi icin burada
     gerek yok. */
  .currency.bump,
  .menu-tile .badge { animation: none !important; }

  /* Kademeli giris gecikmeleri: hepsi ayni anda gelsin. */
  .screen.fade-in .team-card,
  .screen.fade-in .menu-tile { animation: none !important; animation-delay: 0s !important; }

  /* Bildirimler ve hata bandi: kaybolma animasyonu olmasin. */
  .toast,
  .toast.error,
  .toast.warn,
  .toast.out,
  .toast-action,
  .fatal-banner { animation: none !important; opacity: 1 !important; }

  /* Yumusak kaydirma (duz atlayis). */
  html, body, #screens, .modal, .app, .landing { scroll-behavior: auto !important; }
}
