﻿/* =====================================================================
   game.css - Maç ekranı: canvas, HUD, dokunmatik kontroller, efektler
   ===================================================================== */

.game-stage {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;      /* yedek (eski tarayıcılar) */
  height: 100dvh;     /* dinamik: adres çubuğu açılıp kapanınca doğru ölçü */
  background: #04060c;
  overflow: hidden;
  overscroll-behavior: none;
  /* Uygulama kabuğu (appbar z-30, tabbar z-40) oyun alanının ÜSTÜNE binmesin:
     aksi halde alt navigasyon HUD barlarını ve joysticki kapatıyor. Modal
     katmanlari (z-90/100) bu degerin ustunde kalmali. */
  z-index: 60;
}
.game-stage.hidden { display: none; }

#gameCanvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

/* ---------------------------------------------------------------- HUD */
.hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  font-family: var(--font);
}

.hud-top {
  position: absolute;
  top: calc(var(--safe-t) + 8px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: stretch;
  gap: 6px;
  padding: 6px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(6, 10, 18, 0.9), rgba(6, 10, 18, 0.72));
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.6);
  max-width: min(94vw, 720px);
}

.hud-team {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  min-width: 118px;
}
.hud-team.right { flex-direction: row-reverse; }
.hud-crest {
  width: 38px; height: 38px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
  flex: 0 0 auto;
}
.hud-crest canvas { display: block; width: 100%; height: 100%; }
.hud-name {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--txt-1);
  max-width: 62px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hud-score {
  font-family: var(--font-num);
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1;
  min-width: 52px;
  text-align: center;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.25);
}
.hud-clock {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.45);
  font-family: var(--font-num);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  min-width: 84px;
  color: var(--gold);
  text-shadow: 0 0 14px rgba(255, 202, 40, 0.4);
}
.hud-clock.urgent {
  color: #ff5252;
  animation: pulseGlow 0.7s infinite;
}

.hud-ping {
  position: absolute;
  top: calc(var(--safe-t) + 8px);
  right: calc(var(--safe-r) + 10px);
  font-family: var(--font-num);
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--glass-line);
}
.hud-ping.ok { color: var(--green); }
.hud-ping.bad { color: var(--orange); animation: pulseGlow 0.8s infinite; }

/* alt barlar
   --tc-h, dokunma kontrollerinin GERÇEK yüksekliğini ölçüp MobileControls
   tarafından :root'a yazılır. Barlar `bottom: safe-b + --tc-h` ile tam olarak
   kontrol kümesinin ÜSTÜNE oturur. Önceden sabit piksel değerleri kullanılıyordu
   (118/158/178/194/210) ve bunlar buton sayısı/ekran boyutu değişince
   yanlış kalıyordu -> barlar butonların üstüne biniyordu. Ölçüm tabanlı
   çözüm her breakpoint'te doğrudur. */
.hud-bars {
  position: absolute;
  bottom: calc(var(--safe-b) + var(--tc-h, 118px));
  display: flex;
  gap: 20px;
  width: 100%;
  padding: 0 max(14px, 6vw);
  justify-content: space-between;
}
.hud-bars.right { flex-direction: row-reverse; }

.bar-group { width: min(34vw, 190px); }
.bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 4px;
}
.bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 999px;
  transition: width 0.12s linear;
}
.hud-bars.right .bar-fill { inset: 0 0 0 auto; }
.bar-energy .bar-fill { background: linear-gradient(90deg, #00e5ff, #2979ff); box-shadow: 0 0 10px rgba(0, 255, 133, 0.6); }
.bar-stamina .bar-fill { background: linear-gradient(90deg, #00e676, #aeea00); }
.bar-charge { height: 6px; }
.bar-charge .bar-fill { background: linear-gradient(90deg, var(--gold), var(--orange)); box-shadow: 0 0 12px rgba(255, 202, 40, 0.7); }
.bar-label {
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: var(--txt-2);
  font-weight: 700;
}

/* güç butonu (PC) */
.hud-power {
  position: absolute;
  right: calc(var(--safe-r) + 16px);
  bottom: calc(var(--safe-b) + 22px);
  width: 74px; height: 74px;
  border-radius: 50%;
  pointer-events: auto;
  background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.16), rgba(10, 16, 26, 0.9));
  border: 2px solid rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
  box-shadow: var(--sh-2);
  overflow: hidden;
  transition: transform 0.12s, box-shadow 0.2s, border-color 0.2s;
}
.hud-power .icon { font-size: 1.9rem; z-index: 2; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)); }
.hud-power .cost {
  position: absolute; bottom: 4px; right: 8px; z-index: 2;
  font-size: 0.62rem; font-weight: 800; color: var(--neon);
}
.hud-power .cd {
  position: absolute; inset: auto 0 0 0; z-index: 1;
  background: rgba(0, 0, 0, 0.65);
  transition: height 0.1s linear;
}
.hud-power.ready { border-color: var(--neon); box-shadow: 0 0 24px rgba(0, 255, 133, 0.45), var(--sh-2); }
.hud-power.ready:hover { transform: scale(1.06); }
.hud-power.locked { filter: grayscale(0.8) brightness(0.7); }
.hud-power.active { border-color: var(--gold); box-shadow: 0 0 28px rgba(255, 202, 40, 0.6); animation: pulseGlow 0.9s infinite; }
.hud-power:active { transform: scale(0.94); }

/* banner (GOAL!, geri sayım) */
.hud-banner {
  position: absolute;
  top: 34%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  font-family: var(--font);
  font-size: clamp(3rem, 13vw, 9rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}
.hud-banner.pop { animation: bannerPop 0.6s cubic-bezier(0.15, 1.5, 0.4, 1) forwards; }
@keyframes bannerPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4) rotate(-6deg); }
  35% { opacity: 1; transform: translate(-50%, -50%) scale(1.14) rotate(2deg); }
  60% { transform: translate(-50%, -50%) scale(1) rotate(0); }
  100% { opacity: 0.92; transform: translate(-50%, -50%) scale(1.02); }
}

/* ------------------------------------------------------------ overlay */
.game-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  background: rgba(3, 5, 10, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 16px;
}
.game-overlay.hidden { display: none; }

.result-card {
  width: min(560px, 94vw);
  max-height: 92vh;
  overflow: auto;
  border-radius: var(--r-lg);
  padding: 22px;
  text-align: center;
  animation: popIn 0.45s cubic-bezier(0.2, 1.3, 0.4, 1) both;
}
.result-title {
  font-size: clamp(2rem, 7vw, 3.2rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.result-score {
  font-family: var(--font-num);
  font-size: clamp(2.6rem, 11vw, 4.4rem);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 8px 0 4px;
}
.result-score .vs { font-size: 1.1rem; color: var(--txt-3); font-family: var(--font); letter-spacing: 0.2em; }
.reward-row { display: flex; gap: 12px; justify-content: center; margin: 14px 0 6px; flex-wrap: wrap; }
.reward-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--glass-line);
  font-weight: 700;
}
.reward-chip .ic { font-size: 1.15rem; }
.stat-rows { text-align: left; margin: 14px 0; }
.stat-row {
  display: grid;
  grid-template-columns: 1fr 90px 1fr;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 0.9rem;
}
.stat-row .lbl { text-align: right; color: var(--txt-2); font-size: 0.74rem; letter-spacing: 0.1em; }
.stat-row .r { text-align: left; color: var(--txt-2); }
.stat-row .v { text-align: center; font-family: var(--font-num); font-weight: 800; font-size: 1.1rem; }

/* pause menüsü */
.pause-menu { width: min(400px, 92vw); border-radius: var(--r-lg); padding: 22px; }
.pause-menu h3 { text-align: center; margin-bottom: 16px; letter-spacing: 0.16em; }

/* ------------------------------------------------------- dokunmatik */
.touch-controls {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s;
}
.touch-controls.visible { opacity: 1; visibility: visible; }
.touch-controls > * { pointer-events: auto; }

.tc-left {
  position: absolute;
  left: calc(var(--safe-l) + 18px);
  bottom: calc(var(--safe-b) + 16px);
}
.tc-right {
  position: absolute;
  right: calc(var(--safe-r) + 16px);
  bottom: calc(var(--safe-b) + 14px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
/* Aksiyon ızgarası: 2 sütun x 2 satır. Daha önce tüm butonlar (güç dahil
   olmadan) tek ızgaradaydı; emoji butonları eklenince küme 3 satıra
   taşıyor ve HUD barlarının üstüne biniyordu. */
.tc-actions {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 10px;
  align-items: end;
  justify-items: end;
}
/* Emoji satırı: küçük butonlar, tek satır. Aksiyon kümesinin üstünde. */
.tc-emojis { display: flex; gap: 8px; }
.tc-btn-emoji {
  width: 44px; height: 44px;
  font-size: 1.05rem;
  border-radius: 999px;
  opacity: 0.9;
}

.tc-joystick {
  position: relative;
  width: 128px; height: 128px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.28));
  border: 2px solid rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.18s, box-shadow 0.18s;
}
/* Görünmeyen ama DOKUNULABİLİR genişletilmiş hedef alanı: görsel daire aynı
   kalır, parmakla yakalama alanı ~168px olur. Merkez aynı olduğu için
   joystick merkezi hesabı değişmez. */
.tc-joystick::before {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 50%;
}
.tc-joystick.active { border-color: var(--neon); box-shadow: 0 0 26px rgba(0, 255, 133, 0.35), inset 0 0 20px rgba(0, 255, 133, 0.1); }
.tc-joy-base { position: absolute; inset: 22px; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, 0.14); }
.tc-joy-knob {
  position: absolute;
  top: 50%; left: 50%;
  width: 54px; height: 54px;
  margin: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 36% 30%, rgba(255, 255, 255, 0.4), rgba(0, 255, 133, 0.28));
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  transition: transform 0.05s linear;
}

.tc-btn {
  position: relative;
  width: 74px; height: 74px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.18), rgba(8, 14, 24, 0.88));
  border: 2px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.5rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: var(--sh-2);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s, box-shadow 0.2s, border-color 0.2s, filter 0.2s;
}

/* Dokunmatik kontroller GERÇEKTEN görünürken HUD güç düğmesi gizlenir
   (aynı köşede çakışıyordu). `has()` yerine göre: geniş ekranda fare ile
   oynanırsa kontroller CSS tarafından gizlenir ve güç düğmesi GÖRÜNÜR
   kalmalıdır — eski `body.has-touch-controls` kuralı ikisini de gizliyordu. */
/* Güç düğmesi yalnızca dokunma kontrolleri GERÇEKTEN kullanılırken gizlenir.
   Mobilde güç yeteneği, dokunma butonlarındaki `.tc-btn-power` üzerinden
   kullanılır (MobileControls.build). */
/* Nasıl oynanır / kurallar */
.rules-card { width: min(720px, 94vw); max-height: min(82vh, 760px); overflow:auto; padding: 24px; border-radius: var(--r-lg); }
.rules-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:16px; }
.rules-grid > div { padding:14px; border:1px solid rgba(255,255,255,.1); border-radius:14px; background:rgba(0,0,0,.18); }
.rules-grid b { display:block; margin-bottom:6px; letter-spacing:.04em; }
.rules-grid span { display:block; color:var(--txt-2); font-size:.88rem; line-height:1.45; }
@media (max-width:620px) { .rules-card { padding:18px; } .rules-grid { grid-template-columns:1fr; } }

@media (max-width: 1024px), (pointer: coarse) {
  body:has(.touch-controls.visible) .hud-power { display: none; }
}
/* NOT: Barların dikey konumu artık breakpoint başına sabit değil; JS'in
   ölçtüğü --tc-h değişkeni ile ayarlanır (yukarıdaki .hud-bars kuralı). */
.tc-btn .tc-icon { z-index: 2; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)); }
.tc-btn.pressed { transform: scale(0.9); border-color: var(--neon); box-shadow: 0 0 24px rgba(0, 255, 133, 0.5); }
.tc-btn.nudge { animation: shake 0.28s; }
.tc-btn-jump { grid-column: 2; grid-row: 1; }
.tc-btn-kick { grid-column: 1; grid-row: 2; }
.tc-btn-power { grid-column: 1; grid-row: 1; }
.tc-btn-power.ready { border-color: var(--neon); box-shadow: 0 0 24px rgba(0, 255, 133, 0.45); }
.tc-btn-power.locked { filter: grayscale(0.85) brightness(0.65); }
.tc-btn .tc-cost { position: absolute; right: 6px; bottom: 4px; font-size: 0.6rem; font-weight: 800; color: var(--neon); z-index: 2; }
.tc-btn .tc-cd { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.62); transition: height 0.1s linear; z-index: 1; }
.tc-btn .tc-charge { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(0deg, var(--gold), rgba(255, 202, 40, 0.2)); z-index: 1; transition: height 0.06s linear; }

/* Barların dikey konumu artık sabit piksel değeriyle değil, JS'in ölçtüğü
   --tc-h değişkeniyle belirlenir; aşağıdaki breakpoint'ler yalnız kontrol
   BOYUTLARını değiştirir. */
@media (max-height: 460px) {
  .tc-joystick { width: 108px; height: 108px; }
  .tc-btn { width: 62px; height: 62px; font-size: 1.25rem; }
  .tc-btn-emoji { width: 38px; height: 38px; font-size: 0.95rem; }
  .hud-score { font-size: 1.8rem; }
  .hud-clock { font-size: 1.15rem; min-width: 66px; }
  .hud-crest { width: 28px; height: 28px; }
}

/* =====================================================================
   DUYARLI ARENA - dort gorsunum modu
   Canvas uniform zoom kullandigi icin oyun alani her en-boy oraninda
   bozulmaz; burada yalnizca HUD ve dokunma hedefleri olceklenir.
   ===================================================================== */

/* 1) Telefon dikey ------------------------------------------------- */
@media (max-width: 560px) and (orientation: portrait) {
  .hud-team { gap: 6px; min-width: 0; padding: 2px 6px; }
  .hud-crest { width: 30px; height: 30px; }
  .hud-name { font-size: 0.7rem; letter-spacing: 0.04em; max-width: 46px; }
  .hud-score { font-size: 1.9rem; min-width: 40px; }
  .hud-clock { font-size: 1.05rem; min-width: 60px; padding: 3px 8px; }
  /* ÖNEMLİ: genişlik .bar-group'a verilir. .hud-bars'a verilirse iki takım
     çubuğu tek bir dar kutuya sıkışır (space-between çalışmaz). */
  .bar-group { width: min(38vw, 190px); }
  .tc-joystick { width: 140px; height: 140px; }
  .tc-btn { width: 72px; height: 72px; font-size: 1.45rem; }
}

/* ÇOK DAR ekran (320px): takım adı gizlenir, HUD sığdırılır */
@media (max-width: 380px) {
  .hud-top { gap: 2px; padding: 4px; border-radius: 14px; }
  .hud-team { padding: 2px 4px; }
  .hud-name { display: none; }
  .hud-score { font-size: 1.7rem; min-width: 34px; }
  .hud-clock { font-size: 0.95rem; min-width: 52px; padding: 2px 6px; }
  .bar-group { width: min(40vw, 150px); }
  .bar-label { display: none; }
}

/* 2) Telefon yatay ------------------------------------------------- */
@media (max-height: 500px) and (orientation: landscape) {
  .hud-top { padding: 4px calc(var(--safe-r) + 8px); }
  .hud-crest { width: 26px; height: 26px; }
  .hud-score { font-size: 1.7rem; }
  .hud-clock { font-size: 1rem; min-width: 56px; padding: 2px 8px; }
  .bar-group { width: min(30vw, 170px); }
}

/* 3) Tablet -------------------------------------------------------- */
@media (min-width: 700px) and (max-width: 1024px) {
  .hud-score { font-size: 2.6rem; }
  .hud-clock { font-size: 1.3rem; }
  .hud-crest { width: 38px; height: 38px; }
  .tc-joystick { width: 148px; height: 148px; }
  .tc-btn { width: 80px; height: 80px; font-size: 1.6rem; }
  .tc-btn-emoji { width: 50px; height: 50px; font-size: 1.2rem; }
}

/* 4) Masaustu ------------------------------------------------------ */
@media (min-width: 1280px) and (min-height: 720px) {
  .hud-score { font-size: 3rem; }
  .hud-clock { font-size: 1.4rem; }
  .hud-crest { width: 44px; height: 44px; }
  .tc-joystick { width: 168px; height: 168px; }
  .tc-btn { width: 88px; height: 88px; font-size: 1.8rem; }
  .tc-btn-emoji { width: 54px; height: 54px; font-size: 1.3rem; }
  .bar-group { width: 220px; }
}

/* genis ekranda dokunma kontrollerini gizle (fare/mouse kullanilir) */
@media (min-width: 1025px) and (pointer: fine) {
  .touch-controls { display: none !important; }
}

/* ------------------------------------------------------------ debug */
.debug-panel {
  position: absolute;
  top: calc(var(--safe-t) + 6px);
  left: calc(var(--safe-l) + 8px);
  z-index: 8;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(0, 255, 133, 0.28);
  border-radius: 8px;
  padding: 7px 9px;
  color: #9fe8ff;
  min-width: 168px;
  pointer-events: none;
  display: none;
}
.debug-panel.visible { display: block; }
.debug-panel div { display: flex; justify-content: space-between; gap: 12px; }
.debug-panel span { color: #5f7d8c; }
.debug-panel b { font-weight: 600; }

/* ------------------------------------------------------- yükleme ekranı
   Tek bir orkestre an: projektör ışığı altında zıplayan top, yere düşüşte
   logo harfleri açılır, ilerleme çubuğu çizgi boyunca parlayan bir uçla akar. */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 70;   /* game-stage (60) ve uygulama kabuğu (30/40) üstünde */
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(130% 90% at 50% -10%, #12224d 0%, #080d1f 46%, #03050b 100%);
  transition: opacity .65s ease, transform .65s cubic-bezier(.55, 0, .2, 1), filter .65s ease;
}
.loading-screen.hidden { display: none; }
.loading-screen.leaving { opacity: 0; transform: scale(1.07); filter: blur(7px); pointer-events: none; }

/* --- arka plan --- */
.ld-bg { position: absolute; inset: 0; pointer-events: none; }
.ld-beam {
  position: absolute; top: -12%; left: 50%;
  width: 46vmax; height: 130vmax; margin-left: -23vmax;
  transform-origin: 50% 0;
  clip-path: polygon(47% 0, 53% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, rgba(0, 255, 133, .34), rgba(0, 255, 133, 0) 62%);
  mix-blend-mode: screen;
  opacity: 0;
  animation: ldFade 1.2s ease .1s forwards, ldSway 7s ease-in-out infinite alternate;
  --r0: -34deg; --r1: -22deg;
}
.ld-beam.b2 { background: linear-gradient(180deg, rgba(124, 77, 255, .34), rgba(124, 77, 255, 0) 62%); --r0: 4deg; --r1: -5deg; animation-delay: .3s, 0s; animation-duration: 1.2s, 9s; }
.ld-beam.b3 { background: linear-gradient(180deg, rgba(255, 212, 0, .26), rgba(255, 212, 0, 0) 62%); --r0: 24deg; --r1: 34deg; animation-delay: .5s, 0s; animation-duration: 1.2s, 8s; }
@keyframes ldSway { from { transform: rotate(var(--r0)); } to { transform: rotate(var(--r1)); } }
@keyframes ldFade { to { opacity: .62; } }

.ld-grid {
  position: absolute; left: -60%; right: -60%; bottom: -34%; height: 78%;
  background-image:
    linear-gradient(rgba(0, 230, 118, .4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 230, 118, .4) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(520px) rotateX(66deg);
  -webkit-mask-image: linear-gradient(to top, #000 8%, transparent 82%);
          mask-image: linear-gradient(to top, #000 8%, transparent 82%);
  animation: ldGrid 2.2s linear infinite;
}
@keyframes ldGrid { to { background-position: 0 64px; } }

.ld-sparks i {
  position: absolute; bottom: -12px; left: var(--x);
  width: var(--z); height: var(--z); border-radius: 50%;
  background: #9ff3ff; box-shadow: 0 0 10px 2px rgba(0, 255, 133, .8);
  opacity: 0;
  animation: ldSpark var(--d) linear var(--w) infinite;
}
@keyframes ldSpark {
  0% { transform: translateY(0); opacity: 0; }
  12% { opacity: .9; }
  100% { transform: translateY(-105vh) translateX(18px); opacity: 0; }
}
.ld-vignette { position: absolute; inset: 0; background: radial-gradient(90% 75% at 50% 48%, transparent 40%, rgba(0, 0, 0, .68) 100%); }

/* --- içerik --- */
.loading-box { position: relative; width: min(420px, 84vw); text-align: center; }

.ld-ball-wrap { position: relative; width: 100px; height: 146px; margin: 0 auto 4px; }
.ld-ball {
  position: absolute; left: 2px; top: 34px; width: 96px; height: 96px;
  transform-origin: 50% 100%;
  filter: drop-shadow(0 0 18px rgba(0, 255, 133, .55));
  animation: ldBounce 1.15s infinite;
}
.ld-ball-svg { width: 100%; height: 100%; display: block; animation: ldSpin 2.3s linear infinite; }
@keyframes ldSpin { to { transform: rotate(360deg); } }
@keyframes ldBounce {
  0%   { transform: translateY(0) scale(1.14, .86); animation-timing-function: cubic-bezier(.2, .7, .3, 1); }
  12%  { transform: translateY(-10px) scale(.97, 1.04); animation-timing-function: cubic-bezier(.2, .7, .4, 1); }
  50%  { transform: translateY(-34px) scale(1, 1); animation-timing-function: cubic-bezier(.6, 0, .8, .4); }
  92%  { transform: translateY(-2px) scale(1, 1.03); }
  100% { transform: translateY(0) scale(1.14, .86); }
}
.ld-ball-shadow {
  position: absolute; left: 50%; bottom: 6px; width: 78px; height: 13px; margin-left: -39px;
  border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .7), transparent);
  animation: ldShadow 1.15s infinite;
}
@keyframes ldShadow {
  0%, 100% { transform: scale(1.1); opacity: 1; }
  50% { transform: scale(.55); opacity: .45; }
}
/* yere çarpınca yayılan şok halkası */
.ld-ring {
  position: absolute; left: 50%; bottom: 4px; width: 120px; height: 24px; margin-left: -60px;
  border: 2px solid rgba(0, 255, 133, .7); border-radius: 50%;
  opacity: 0; transform: scale(.3);
  animation: ldRing 1.15s ease-out infinite;
}
.ld-ring.r2 { animation-delay: .12s; border-color: rgba(124, 77, 255, .6); }
@keyframes ldRing {
  0%, 8% { opacity: .9; transform: scale(.3); }
  70%, 100% { opacity: 0; transform: scale(2.4); }
}

.loading-title {
  display: flex; justify-content: center; gap: .06em;
  font-family: var(--font);
  font-size: clamp(2.3rem, 10vw, 3.7rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: .08em;
  margin-bottom: 10px;
  color: var(--txt-0);
  text-shadow: 0 0 26px rgba(0, 255, 133, .35);
}
.loading-title span {
  display: inline-block;
  opacity: 0;
  transform: translateY(26px) scale(.7);
  filter: blur(10px);
  animation: ldLetter .75s cubic-bezier(.2, .9, .3, 1.35) forwards;
  animation-delay: calc(.25s + var(--i) * .07s);
}
.loading-title span.t2 { color: var(--neon); text-shadow: 0 0 28px rgba(0, 255, 133, .8), 0 0 60px rgba(0, 255, 133, .35); }
@keyframes ldLetter { to { opacity: 1; transform: none; filter: none; } }

.ld-tag { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 18px; opacity: 0; animation: ldFade2 .8s ease 1s forwards; }
.ld-tag em { font-style: normal; font-size: .72rem; letter-spacing: .32em; color: var(--txt-1); }
.ld-tag b { display: block; height: 1px; width: 0; background: linear-gradient(90deg, transparent, rgba(0, 255, 133, .8)); animation: ldLine .9s ease 1.1s forwards; }
.ld-tag b:last-child { background: linear-gradient(270deg, transparent, rgba(0, 255, 133, .8)); }
@keyframes ldLine { to { width: 44px; } }
@keyframes ldFade2 { to { opacity: 1; } }

.loading-sub { color: var(--txt-2); font-size: .78rem; letter-spacing: .16em; margin-bottom: 14px; min-height: 1.2em; }

.loading-track {
  position: relative; height: 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .07); border: 1px solid var(--glass-line);
}
.loading-fill {
  position: relative; height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, var(--neon-2), var(--neon) 70%, #7dffb5);
  box-shadow: 0 0 18px rgba(0, 255, 133, .6);
  transition: width .4s cubic-bezier(.3, .7, .2, 1);
}
.loading-fill::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .28) 0 8px, transparent 8px 18px);
  background-size: 36px 100%; animation: ldStripe .8s linear infinite;
}
@keyframes ldStripe { to { background-position: 36px 0; } }
/* ilerlemenin ucunda parlayan top */
.loading-fill::after {
  content: ""; position: absolute; right: -8px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #c6f6ff 55%, #00e5ff);
  box-shadow: 0 0 16px 4px rgba(0, 255, 133, .75);
}
.loading-pct { margin-top: 12px; font-family: var(--font-num); font-size: .86rem; color: var(--txt-1); font-variant-numeric: tabular-nums; }
.ld-hint { opacity: 0; margin-top: 10px; animation: ldFade2 .6s ease 6s forwards; }

@media (prefers-reduced-motion: reduce) {
  .ld-beam, .ld-grid, .ld-sparks i, .ld-ring, .ld-ball, .ld-ball-svg, .ld-ball-shadow, .loading-fill::before { animation: none !important; }
  .ld-beam { opacity: .5; }
  .ld-ball { transform: translateY(-10px); }
  .loading-title span, .ld-tag { animation-duration: .01s !important; animation-delay: 0s !important; }
  .loading-screen { transition-duration: .2s; }
}
@media (max-height: 520px) { .ld-ball-wrap { display: none; } }

/* YÖN UYARISI KALDIRILDI — portrait artık destekleniyor (kamera görüş alanını
   ekrana uyarlar, HUD esnek). rotate-hint hiçbir ekranda kullanılmıyor. */
.rotate-hint { display: none !important; }

/* ------------------------------------------------------- giriş / kayıt
   Yükleme ekranıyla aynı sahne: projektör ışıkları + zemin ızgarası.
   Tek orkestre an: top düşer, logo harfleri açılır, kart yükselir.
   Seçiciler #authScreen ile kapsanır; ui.css'teki eski .auth-* kurallarının üstüne çıkar. */
#authScreen {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  overflow-y: auto; overscroll-behavior: contain;
  padding: calc(var(--safe-t) + 20px) calc(var(--safe-r) + 16px) calc(var(--safe-b) + 20px) calc(var(--safe-l) + 16px);
  background: radial-gradient(130% 90% at 50% -10%, #12224d 0%, #080d1f 46%, #03050b 100%);
}
#authScreen.hidden, #authScreen .hidden { display: none !important; }
#authScreen .auth-bg { position: fixed; overflow: hidden; }

#authScreen .auth-card {
  position: relative; width: min(420px, 100%); margin: auto;
  padding: 26px 24px 22px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(14, 22, 44, .82), rgba(7, 11, 24, .88));
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .65), 0 0 0 1px rgba(0, 255, 133, .06), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  animation: authRise .7s cubic-bezier(.2, .9, .3, 1) .55s both;
}
#authScreen .auth-card::before {
  content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--neon), #7c4dff, #00ff85, transparent);
}
@keyframes authRise { from { opacity: 0; transform: translateY(28px) scale(.97); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* logo */
#authScreen .auth-logo { text-align: center; margin-bottom: 20px; }
#authScreen .auth-ball { position: relative; width: 76px; height: 92px; margin: 0 auto 2px; }
#authScreen .auth-ball svg {
  position: absolute; left: 0; top: 0; width: 76px; height: 76px;
  filter: drop-shadow(0 0 16px rgba(0, 255, 133, .6));
  animation: authDrop .9s cubic-bezier(.3, 0, .6, 1) both, ldSpin 14s linear 1s infinite;
}
#authScreen .auth-ring {
  position: absolute; left: 50%; bottom: 2px; width: 96px; height: 18px; margin-left: -48px;
  border: 2px solid rgba(0, 255, 133, .7); border-radius: 50%; opacity: 0;
  animation: ldRing 1.1s ease-out .55s 2;
}
@keyframes authDrop {
  0% { transform: translateY(-140px); opacity: 0; }
  18% { opacity: 1; }
  60% { transform: translateY(14px) scale(1.1, .9); }
  80% { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}
#authScreen .auth-logo h1 {
  display: flex; justify-content: center; gap: .06em; margin: 0 0 8px;
  font-family: var(--font); font-size: clamp(2rem, 9vw, 2.7rem); font-weight: 800; line-height: 1; letter-spacing: .08em;
  color: var(--txt-0); text-shadow: 0 0 24px rgba(0, 255, 133, .3);
}
#authScreen .auth-logo h1 span {
  display: inline-block; opacity: 0; transform: translateY(20px) scale(.7); filter: blur(8px);
  animation: ldLetter .7s cubic-bezier(.2, .9, .3, 1.35) forwards; animation-delay: calc(.6s + var(--i) * .06s);
}
#authScreen .auth-logo h1 span.t2 { color: var(--neon); text-shadow: 0 0 26px rgba(0, 255, 133, .8), 0 0 56px rgba(0, 255, 133, .3); }
#authScreen .auth-logo p { margin: 0; font-size: .86rem; line-height: 1.45; color: var(--txt-2); }

/* sekmeler */
#authScreen .auth-tabs {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 18px;
  border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .07);
}
#authScreen .auth-tabs button {
  flex: 1; min-height: 40px; border: 0; border-radius: 10px; cursor: pointer;
  background: transparent; color: var(--txt-2);
  font: 800 .74rem/1 var(--font); letter-spacing: .12em;
  transition: background .2s, color .2s, box-shadow .2s;
}
#authScreen .auth-tabs button:hover { color: var(--txt-0); }
#authScreen .auth-tabs button.active, #authScreen .auth-tabs button[aria-selected="true"] {
  color: #fff; background: linear-gradient(180deg, rgba(0, 255, 133, .28), rgba(0, 255, 133, .1));
  box-shadow: inset 0 0 0 1px rgba(0, 255, 133, .55), 0 0 18px rgba(0, 255, 133, .18);
}

/* alanlar */
#authScreen form { display: grid; gap: 14px; }
#authScreen .field { display: grid; gap: 6px; margin: 0; }
#authScreen .field label { font-size: .8rem; font-weight: 600; color: var(--txt-1); }
#authScreen .field input {
  width: 100%; min-height: 50px; padding: 0 14px; border-radius: 12px;
  background: rgba(3, 6, 14, .62); border: 1px solid rgba(255, 255, 255, .13);
  color: var(--txt-0); font: 500 16px/1.2 var(--font); outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
#authScreen .field input::placeholder { color: var(--txt-3); }
#authScreen .field input:hover { border-color: rgba(255, 255, 255, .24); }
#authScreen .field input:focus {
  border-color: var(--neon); background: rgba(3, 10, 22, .8);
  box-shadow: 0 0 0 3px rgba(0, 255, 133, .16), 0 0 22px rgba(0, 255, 133, .16);
}
#authScreen .field input[aria-invalid="true"], #authScreen .field input.invalid, #authScreen .field input.error { border-color: #ff5a6e; box-shadow: 0 0 0 3px rgba(255, 90, 110, .14); }
#authScreen .field input:-webkit-autofill {
  -webkit-text-fill-color: var(--txt-0); caret-color: var(--txt-0);
  box-shadow: 0 0 0 100px #0a1226 inset; transition: background-color 9999s;
}
#authScreen .field-err {
  padding: 9px 12px; border-radius: 10px; font-size: .8rem; line-height: 1.4;
  color: #ffb3bd; background: rgba(255, 90, 110, .1); border: 1px solid rgba(255, 90, 110, .35);
}
#authScreen .field-err:empty { display: none; }

/* butonlar */
#authScreen form .btn-primary {
  min-height: 52px; margin-top: 4px; border: 0; border-radius: 14px; cursor: pointer;
  background: linear-gradient(180deg, #4df0ff, var(--neon) 55%, var(--neon-2));
  color: #03121a; font: 800 .9rem/1 var(--font); letter-spacing: .14em;
  box-shadow: 0 10px 28px rgba(0, 255, 133, .35), inset 0 1px 0 rgba(255, 255, 255, .55);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
#authScreen form .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 34px rgba(0, 255, 133, .5), inset 0 1px 0 rgba(255, 255, 255, .55); }
#authScreen form .btn-primary:active { transform: scale(.98); }
#authScreen form .btn-primary:disabled { opacity: .55; cursor: progress; transform: none; filter: saturate(.6); }

#authScreen .auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 12px; color: var(--txt-3); font-size: .76rem; }
#authScreen .auth-or::before, #authScreen .auth-or::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .16)); }
#authScreen .auth-or::after { background: linear-gradient(270deg, transparent, rgba(255, 255, 255, .16)); }
#authScreen .stack { display: grid; gap: 8px; margin: 0; }
#authScreen .stack .btn {
  min-height: 44px; border-radius: 12px; cursor: pointer;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .14);
  color: var(--txt-1); font: 700 .74rem/1 var(--font); letter-spacing: .12em;
  transition: background .18s, border-color .18s, color .18s;
}
#authScreen .stack .btn:hover { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .28); color: var(--txt-0); }
#authScreen button:focus-visible { outline: 2px solid var(--neon); outline-offset: 2px; }

@media (max-height: 640px) {
  #authScreen .auth-card { padding-top: 20px; }
  #authScreen .auth-ball { transform: scale(.72); transform-origin: 50% 0; height: 66px; margin-bottom: 0; }
  #authScreen .auth-logo p { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  #authScreen .ld-beam, #authScreen .ld-grid, #authScreen .auth-ball svg, #authScreen .auth-ring { animation: none !important; }
  #authScreen .ld-beam { opacity: .5; }
  #authScreen .auth-card, #authScreen .auth-logo h1 span { animation-duration: .01s !important; animation-delay: 0s !important; }
}

/* ------------------------------------------- yükleme ekranı: ek katman
   Saha çizgileri, tribün flaşları, harflerde dalga parıltısı, zemin ışığı. */
.ld-pitch {
  position: absolute; left: 50%; bottom: -4%; width: 84vmin; height: 84vmin; margin-left: -42vmin;
  border: 2px solid rgba(255, 255, 255, .3); border-radius: 50%;
  transform: perspective(520px) rotateX(66deg);
  box-shadow: 0 0 30px rgba(0, 230, 118, .25), inset 0 0 30px rgba(0, 230, 118, .18);
  -webkit-mask-image: linear-gradient(to top, #000 30%, transparent 92%);
          mask-image: linear-gradient(to top, #000 30%, transparent 92%);
  animation: ldPitch 2.2s ease-in-out infinite alternate;
}
.ld-pitch::before { content: ""; position: absolute; left: -80vw; right: -80vw; top: 50%; height: 2px; margin-top: -1px; background: rgba(255, 255, 255, .26); }
.ld-pitch::after  { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
@keyframes ldPitch { from { opacity: .55; } to { opacity: 1; } }

.ld-flashes i {
  position: absolute; left: var(--x); top: var(--y); width: 4px; height: 4px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 12px 4px rgba(255, 255, 255, .85); opacity: 0;
  animation: ldFlash var(--d) linear var(--w) infinite;
}
@keyframes ldFlash {
  0%, 84%, 100% { opacity: 0; transform: scale(.3); }
  88% { opacity: 1; transform: scale(1.7); }
  94% { opacity: .15; transform: scale(1); }
}

.ld-sparks i:nth-child(3n+1) { background: #ffb3dc; box-shadow: 0 0 10px 2px rgba(255, 212, 0, .8); }
.ld-sparks i:nth-child(3n+2) { background: #b9ffd6; box-shadow: 0 0 10px 2px rgba(0, 230, 118, .75); }

/* harflerde soldan sağa parıltı dalgası */
.loading-title span {
  animation: ldLetter .75s cubic-bezier(.2, .9, .3, 1.35) forwards, ldGlint 3.4s ease-in-out infinite;
  animation-delay: calc(.25s + var(--i) * .07s), calc(1.8s + var(--i) * .09s);
}
@keyframes ldGlint { 0%, 30%, 100% { filter: none; } 15% { filter: brightness(1.9) drop-shadow(0 0 12px #fff); } }

/* topun altında yere vurdukça parlayan ışık */
.ld-ball-wrap::before {
  content: ""; position: absolute; left: 50%; bottom: -6px; width: 190px; height: 44px; margin-left: -95px;
  background: radial-gradient(closest-side, rgba(0, 255, 133, .42), transparent);
  animation: ldShadow 1.15s infinite;
}

/* ilerleme çubuğunda %10'luk dilimler */
.loading-track::before {
  content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(3, 6, 14, .75) calc(10% - 1px) 10%);
}

@media (prefers-reduced-motion: reduce) {
  .ld-pitch, .ld-flashes i, .ld-ball-wrap::before, .loading-title span { animation-name: none !important; }
  .loading-title span { opacity: 1; transform: none; filter: none; }
}

/* ------------------------------------------- yükleme ekranı: sade sahne
   İki karakter karşılıklı, ortada logo ve top. Eski kıvılcım/ızgara/saha
   katmanları HTML'den kaldırıldı. */
.ld-field { --floor: 9vh; position: absolute; inset: 0; pointer-events: none; }
.ld-floor {
  position: absolute; left: 0; right: 0; bottom: var(--floor); height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 133, .55), rgba(255, 212, 0, .55), transparent);
  box-shadow: 0 0 18px rgba(0, 255, 133, .25);
}
.ld-floor::after { content: ""; position: absolute; left: 0; right: 0; top: 1px; height: var(--floor); background: linear-gradient(rgba(0, 0, 0, .38), transparent); }

#ldChar .k { fill: #0b1224; }
#ldChar .c { fill: var(--c); }
#ldChar .s { fill: #ffd9b0; }
#ldChar .h { fill: var(--h); }

.ld-char {
  position: absolute; bottom: calc(var(--floor) - 6px); width: clamp(110px, 21vw, 200px);
  opacity: 0; filter: drop-shadow(0 0 22px color-mix(in srgb, var(--c) 45%, transparent));
  animation: ldCharIn .9s cubic-bezier(.2, .8, .3, 1) .35s forwards;
}
.ld-char.left  { left: 5vw;  --dx: -70px; }
.ld-char.right { right: 5vw; --dx: 70px; animation-delay: .5s; }
.ld-char svg { display: block; width: 100%; height: auto; overflow: visible; transform-origin: 50% 100%; animation: ldBob 1.7s ease-in-out infinite alternate; }
.ld-char.right svg { scale: -1 1; animation-delay: -.85s; }
@keyframes ldCharIn { from { opacity: 0; transform: translateX(var(--dx)); } to { opacity: 1; transform: none; } }
@keyframes ldBob { from { transform: translateY(0) rotate(-1.5deg); } to { transform: translateY(-7px) rotate(1.5deg); } }

/* top iki karakterin arasında, yerde */
.ld-field .ld-ball-wrap {
  position: absolute; left: 50%; bottom: calc(var(--floor) - 6px); margin: 0 0 0 -50px;
  transform: scale(.6); transform-origin: 50% 100%;
}
.loading-track::before { display: none; }

@media (prefers-reduced-motion: reduce) {
  .ld-char { animation-duration: .01s !important; animation-delay: 0s !important; }
  .ld-char svg { animation: none !important; }
}


/* =====================================================================
   SERT / AGRESİF TEMA — siyah · sinyal kırmızısı · uyarı sarısı
   Performans: blur, backdrop-filter, drop-shadow, mix-blend ve dev
   döndürülen katmanlar kaldırıldı; yalnız transform/opacity animasyonu.
   ===================================================================== */
:root { --neon: #00ff85; --neon-2: #00c25f; --r-lg: 2px; }
.glass, .hud-top, .game-overlay, .auth-card, #authScreen .auth-card { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
@keyframes ldLetter { from { opacity: 0; transform: translateY(-34px) skewX(-8deg); } to { opacity: 1; transform: skewX(-8deg); } }
@keyframes authRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes ldSlashIn { from { transform: translateX(-130vw) skewX(-18deg); } to { transform: skewX(-18deg); } }

/* yükleme ekranı */
.loading-screen { background: #2b0030; transition: opacity .3s ease; }
.loading-screen.leaving { opacity: 0; transform: none; filter: none; }
.ld-beam, .ld-grid, .ld-vignette { display: none !important; }
.ld-slash { position: absolute; top: 0; bottom: 0; transform: skewX(-18deg); animation: ldSlashIn .5s cubic-bezier(.2, .9, .2, 1) both; }
.ld-slash.s1 { left: 64%; width: 15vw; background: var(--neon); }
.ld-slash.s2 { left: 82%; width: 2.5vw; background: #fff; animation-delay: .1s; }
.ld-bigtxt {
  position: absolute; left: -2vw; bottom: 2vh; white-space: nowrap; line-height: .8;
  font: 900 30vw/.8 Impact, "Arial Black", Haettenschweiler, sans-serif;
  color: transparent; -webkit-text-stroke: 2px rgba(255, 255, 255, .08);
}
.ld-hazard { position: absolute; left: 0; right: 0; bottom: 0; height: 22px; background: repeating-linear-gradient(-45deg, #00ff85 0 20px, #2b0030 20px 40px); }
.loading-box { width: min(520px, 88vw); text-align: left; }
.loading-title {
  justify-content: flex-start; gap: 0; letter-spacing: 0; margin-bottom: 6px; text-shadow: none;
  font: 900 clamp(3rem, 15vw, 6rem)/.9 Impact, "Arial Black", Haettenschweiler, sans-serif;
}
.loading-title span { filter: none; transform: skewX(-8deg); animation: ldLetter .3s cubic-bezier(.2, .9, .2, 1) both; animation-delay: calc(.05s + var(--i) * .035s); }
.loading-title span.t2 { color: var(--neon); text-shadow: none; }
.ld-tag { justify-content: flex-start; opacity: 1; animation: none; }
.ld-tag b { display: none; }
.ld-tag em { background: #fff; color: #2b0030; font-weight: 800; padding: 4px 10px; letter-spacing: .2em; }
.loading-sub { color: #fff; font-weight: 800; letter-spacing: .22em; }
.loading-track { height: 16px; border-radius: 0; background: #1a1a1a; border: 2px solid #fff; }
.loading-fill { border-radius: 0; background: var(--neon); box-shadow: none; }
.loading-fill::before { border-radius: 0; animation: none; background: repeating-linear-gradient(-45deg, rgba(0, 0, 0, .3) 0 6px, transparent 6px 12px); }
.loading-fill::after { display: none; }
.loading-pct { color: var(--neon); font-weight: 900; font-size: 1.1rem; }

/* giriş / kayıt */
#authScreen { background: #2b0030; }
#authScreen .auth-bg::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22px; background: repeating-linear-gradient(-45deg, #00ff85 0 20px, #2b0030 20px 40px); }
#authScreen .auth-card { border-radius: 0; background: #240028; border: 2px solid #fff; box-shadow: 8px 8px 0 var(--neon); }
#authScreen .auth-card::before { left: 0; right: 0; top: -2px; height: 6px; border-radius: 0; background: var(--neon); }
#authScreen .auth-ball svg { filter: none; animation: authDrop .6s cubic-bezier(.3, 0, .6, 1) both; }
#authScreen .auth-logo h1 { font-family: Impact, "Arial Black", sans-serif; letter-spacing: 0; text-shadow: none; }
#authScreen .auth-logo h1 span { filter: none; animation: ldLetter .3s cubic-bezier(.2, .9, .2, 1) both; animation-delay: calc(.2s + var(--i) * .035s); }
#authScreen .auth-logo h1 span.t2 { color: var(--neon); text-shadow: none; }
#authScreen .auth-tabs, #authScreen .auth-tabs button, #authScreen .field input, #authScreen .field-err, #authScreen .stack .btn { border-radius: 0; }
#authScreen .auth-tabs button.active, #authScreen .auth-tabs button[aria-selected="true"] { background: var(--neon); color: #2b0030; box-shadow: none; }
#authScreen .field input:focus { box-shadow: 4px 4px 0 var(--neon); }
#authScreen form .btn-primary { border-radius: 0; background: var(--neon); color: #2b0030; box-shadow: 4px 4px 0 #fff; }
#authScreen form .btn-primary:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #fff; }
#authScreen form .btn-primary:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #fff; }

/* maç HUD ve pencereler */
.hud-top { border-radius: 0; background: rgba(43, 0, 48, .94); border: 2px solid #fff; box-shadow: 4px 4px 0 var(--neon); }
.hud-clock { border-radius: 0; background: var(--neon); color: #2b0030; text-shadow: none; }
.hud-score { text-shadow: none; }
.bar, .bar-fill { border-radius: 0; }
.bar-energy .bar-fill, .bar-charge .bar-fill { box-shadow: none; }
.result-card, .pause-menu { border-radius: 0; background: #240028; border: 2px solid #fff; box-shadow: 8px 8px 0 var(--neon); }
.result-title { font-family: Impact, "Arial Black", sans-serif; font-style: italic; }
.reward-chip { border-radius: 0; }

/* şeritler yazının üstüne binmesin */
.ld-slash.s1 { left: 86%; width: 8vw; }
.ld-slash.s2 { left: 96%; width: 1.5vw; }
@media (max-width: 800px) {
  .ld-slash.s1 { left: 74%; width: 34vw; opacity: .22; }
  .ld-slash.s2 { display: none; }
  .ld-bigtxt { font-size: 52vw; }
}

/* ===== PREMIER LİG havası: mor zemin · elektrik yeşili · beyaz ===== */
.loading-screen, #authScreen { background: linear-gradient(125deg, #3d0a4a 0%, #38003c 45%, #1c001f 100%); }
.ld-hazard, #authScreen .auth-bg::before { background: repeating-linear-gradient(-45deg, #00ff85 0 20px, #38003c 20px 40px); }
.ld-bigtxt { -webkit-text-stroke: 2px rgba(0, 255, 133, .14); }
.loading-title span { color: #fff; }
.loading-title span.t2, #authScreen .auth-logo h1 span.t2 { color: var(--neon); }
.ld-tag em { background: var(--neon); color: #2b0030; }
.loading-track { background: #240028; border-color: var(--neon); }
.loading-fill::before { background: repeating-linear-gradient(-45deg, rgba(56, 0, 60, .35) 0 6px, transparent 6px 12px); }
.loading-pct { color: #fff; }
#authScreen .auth-card, .result-card, .pause-menu, .hud-top { border-color: var(--neon); box-shadow: 6px 6px 0 rgba(0, 255, 133, .9); }
#authScreen .field input { background: #1c001f; border-color: rgba(255, 255, 255, .3); }
.hud-score { color: #fff; }
#authScreen .field input { box-sizing: border-box; }

/* =====================================================================
   RHENXBALL // PREMIUM BROADCAST UI
   Premier League esintili modern futbol yayın estetiği.
   Oyun mantığına dokunmaz. Sadece görsel katmanı iyileştirir.
   ===================================================================== */

:root {
  --broadcast-purple: #12001f;
  --broadcast-purple-2: #25003a;
  --broadcast-violet: #5b16a8;
  --broadcast-green: #00f58a;
  --broadcast-green-2: #00c878;
  --broadcast-white: #f7f8ff;
  --broadcast-muted: #a9a7ba;
}

/* ---------- arena ---------- */

.game-stage {
  background:
    radial-gradient(circle at 50% 42%, rgba(0, 245, 138, .08), transparent 28%),
    linear-gradient(180deg, #08050f 0%, #11051d 55%, #050308 100%);
}

.game-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(91,22,168,.10), transparent 18%, transparent 82%, rgba(91,22,168,.10)),
    repeating-linear-gradient(90deg, transparent 0 9.8%, rgba(255,255,255,.018) 9.8% 10%);
  mix-blend-mode: screen;
}

.game-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 48%, rgba(0,0,0,.48) 100%);
}

/* Canvas must stay below the broadcast UI */
#gameCanvas {
  z-index: 0;
}

/* ---------- top scoreboard ---------- */

.hud {
  z-index: 5;
}

.hud-top {
  top: max(calc(var(--safe-t) + 12px), 12px);
  gap: 0;
  padding: 0;
  min-width: min(680px, 92vw);
  max-width: min(760px, 94vw);
  height: 76px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(28,10,45,.97), rgba(11,7,20,.97));
  box-shadow:
    0 18px 50px rgba(0,0,0,.48),
    0 0 0 1px rgba(0,245,138,.08),
    0 0 35px rgba(91,22,168,.14);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.hud-top::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--broadcast-green);
  box-shadow: 0 0 20px rgba(0,245,138,.55);
}

.hud-top::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--broadcast-violet);
  box-shadow: 0 0 20px rgba(91,22,168,.45);
}

.hud-team {
  position: relative;
  flex: 1 1 0;
  min-width: 150px;
  height: 100%;
  padding: 0 18px;
  gap: 11px;
  background: linear-gradient(90deg, rgba(255,255,255,.045), transparent);
}

.hud-team.right {
  background: linear-gradient(270deg, rgba(255,255,255,.045), transparent);
}

.hud-crest {
  width: 44px;
  height: 44px;
  padding: 5px;
  border-radius: 12px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.hud-name {
  max-width: 110px;
  color: rgba(255,255,255,.9);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .09em;
}

.hud-score {
  position: relative;
  min-width: 62px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 2.45rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 3px 18px rgba(0,0,0,.5);
}

.hud-score:first-of-type {
  background: linear-gradient(180deg, rgba(0,245,138,.08), transparent);
}

.hud-clock {
  position: relative;
  min-width: 82px;
  height: 42px;
  margin: 0 2px;
  padding: 0 13px;
  border: 1px solid rgba(0,245,138,.45);
  border-radius: 9px;
  background: #00e58a;
  color: #07120e;
  font-size: 1.25rem;
  font-weight: 950;
  box-shadow: 0 0 24px rgba(0,245,138,.16);
}

.hud-clock::before {
  content: "MATCH";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font);
  font-size: .43rem;
  letter-spacing: .2em;
  color: rgba(255,255,255,.42);
}

.hud-clock.urgent {
  background: #ff496b;
  color: #fff;
  border-color: rgba(255,255,255,.4);
}

/* ---------- live / ping ---------- */

.hud-ping {
  top: calc(var(--safe-t) + 100px);
  right: calc(var(--safe-r) + 14px);
  padding: 5px 9px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  background: rgba(9,6,16,.62);
  color: rgba(255,255,255,.62);
  backdrop-filter: blur(10px);
}

/* ---------- energy bars ---------- */

.hud-bars {
  z-index: 5;
  bottom: calc(var(--safe-b) + var(--tc-h, 118px) + 12px);
  padding: 0 max(20px, 5vw);
}

.bar-group {
  width: min(31vw, 220px);
}

.bar-label {
  margin-bottom: 5px;
  color: rgba(255,255,255,.55);
  font-size: .52rem;
  letter-spacing: .18em;
}

.bar {
  height: 5px;
  margin-top: 3px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
}

.bar + .bar {
  opacity: .82;
}

.bar-fill {
  border-radius: inherit;
}

.bar-energy .bar-fill {
  background: linear-gradient(90deg, #00a9ff, #00f58a);
  box-shadow: 0 0 12px rgba(0,245,138,.38);
}

.bar-stamina .bar-fill {
  background: linear-gradient(90deg, #72ffb8, #d9ff67);
}

.bar-charge .bar-fill {
  background: linear-gradient(90deg, #ffd84d, #ff8b38);
  box-shadow: 0 0 12px rgba(255,177,53,.4);
}

/* ---------- special power ---------- */

.hud-power {
  right: calc(var(--safe-r) + 22px);
  bottom: calc(var(--safe-b) + 28px);
  width: 78px;
  height: 78px;
  border: 1px solid rgba(255,255,255,.2);
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.18), transparent 32%),
    linear-gradient(145deg, #2c0d48, #0c0912);
  box-shadow:
    0 12px 35px rgba(0,0,0,.48),
    inset 0 0 0 1px rgba(0,245,138,.08);
}

.hud-power.ready {
  border-color: var(--broadcast-green);
  box-shadow:
    0 0 0 1px rgba(0,245,138,.2),
    0 0 30px rgba(0,245,138,.28),
    0 14px 35px rgba(0,0,0,.5);
}

.hud-power .icon {
  font-size: 1.75rem;
}

/* ---------- goal banner ---------- */

.hud-banner {
  top: 31%;
  font-style: italic;
  font-weight: 950;
  letter-spacing: -.025em;
  color: #fff;
  text-shadow:
    0 5px 0 #28003c,
    0 0 35px rgba(0,245,138,.42);
}

/* ---------- touch controls ---------- */

.touch-controls {
  z-index: 8;
}

.tc-joystick {
  width: 136px;
  height: 136px;
  border: 1px solid rgba(255,255,255,.17);
  background:
    radial-gradient(circle, rgba(0,245,138,.07), rgba(9,5,15,.52) 68%),
    rgba(255,255,255,.025);
  box-shadow:
    0 16px 35px rgba(0,0,0,.35),
    inset 0 0 35px rgba(255,255,255,.025);
}

.tc-joy-base {
  border-color: rgba(255,255,255,.13);
}

.tc-joy-knob {
  width: 56px;
  height: 56px;
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,.4), rgba(0,245,138,.24) 50%, rgba(25,20,35,.9));
  border-color: rgba(255,255,255,.26);
  box-shadow: 0 8px 24px rgba(0,0,0,.48), 0 0 20px rgba(0,245,138,.12);
}

.tc-btn {
  width: 72px;
  height: 72px;
  border: 1px solid rgba(255,255,255,.16);
  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,.17), transparent 30%),
    linear-gradient(145deg, rgba(38,18,57,.95), rgba(9,7,14,.94));
  box-shadow: 0 12px 28px rgba(0,0,0,.42);
}

.tc-btn.pressed,
.tc-btn.ready {
  border-color: rgba(0,245,138,.8);
  box-shadow: 0 0 25px rgba(0,245,138,.24), 0 12px 28px rgba(0,0,0,.42);
}

/* ---------- result / pause ---------- */

.game-overlay {
  z-index: 20;
  background: rgba(4,2,9,.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.result-card,
.pause-menu {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 0%, rgba(91,22,168,.28), transparent 45%),
    linear-gradient(160deg, #1b0b29, #09070e);
  box-shadow:
    0 30px 80px rgba(0,0,0,.58),
    0 0 0 1px rgba(0,245,138,.05);
}

.result-card::before,
.pause-menu::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--broadcast-green), #5b16a8, var(--broadcast-green));
}

.result-title {
  font-family: var(--font);
  font-style: italic;
  font-weight: 950;
  letter-spacing: -.02em;
  text-shadow: 0 4px 25px rgba(0,245,138,.18);
}

.result-score {
  font-size: clamp(3rem, 12vw, 5rem);
  font-weight: 950;
}

.result-score .vs {
  font-size: .75rem;
  color: rgba(255,255,255,.35);
}

.reward-chip {
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 999px;
  background: rgba(255,255,255,.045);
}

/* ---------- pause button ---------- */

#btnPause {
  border: 1px solid rgba(255,255,255,.15) !important;
  border-radius: 11px !important;
  background: rgba(13,8,20,.76) !important;
  color: #fff !important;
  box-shadow: 0 10px 25px rgba(0,0,0,.35) !important;
  backdrop-filter: blur(10px);
}

/* ---------- loading ---------- */

.loading-screen {
  background:
    radial-gradient(circle at 68% 34%, rgba(0,245,138,.12), transparent 20%),
    radial-gradient(circle at 25% 65%, rgba(91,22,168,.35), transparent 35%),
    linear-gradient(135deg, #09030f, #1c0630 55%, #050308);
}

.loading-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 57%, rgba(0,245,138,.08) 57.2% 58%, transparent 58.2%),
    linear-gradient(115deg, transparent 0 68%, rgba(255,255,255,.035) 68.2% 68.7%, transparent 69%);
}

.ld-hazard {
  height: 4px;
  background: linear-gradient(90deg, var(--broadcast-green), #5b16a8, var(--broadcast-green));
}

.ld-bigtxt {
  opacity: .35;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,.08);
}

.loading-box {
  position: relative;
  z-index: 2;
  width: min(650px, 88vw);
}

.loading-title {
  font-family: var(--font), Arial, sans-serif;
  font-style: italic;
  font-weight: 950;
  letter-spacing: -.06em;
  text-shadow: 0 12px 50px rgba(0,0,0,.5);
}

.loading-title span.t2 {
  color: var(--broadcast-green);
}

.ld-tag em {
  border-radius: 999px;
  background: var(--broadcast-green);
  box-shadow: 0 0 25px rgba(0,245,138,.18);
}

.loading-track {
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.45);
}

.loading-fill {
  border-radius: inherit;
  background: linear-gradient(90deg, #00bd72, #00f58a);
  box-shadow: 0 0 20px rgba(0,245,138,.35);
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .game-stage::before,
  .game-stage::after {
    animation: none !important;
  }
}

/* ---------- mobile portrait ---------- */

@media (max-width: 560px) and (orientation: portrait) {
  .hud-top {
    top: max(calc(var(--safe-t) + 8px), 8px);
    width: calc(100vw - 16px);
    min-width: 0;
    height: 64px;
    border-radius: 12px;
  }

  .hud-team {
    min-width: 0;
    padding: 0 7px;
    gap: 6px;
  }

  .hud-crest {
    width: 32px;
    height: 32px;
    padding: 3px;
    border-radius: 8px;
  }

  .hud-name {
    max-width: 50px;
    font-size: .59rem;
    letter-spacing: .04em;
  }

  .hud-score {
    min-width: 32px;
    font-size: 1.72rem;
  }

  .hud-clock {
    min-width: 58px;
    height: 34px;
    padding: 0 7px;
    font-size: .96rem;
  }

  .hud-clock::before {
    display: none;
  }

  .hud-bars {
    padding: 0 14px;
    bottom: calc(var(--safe-b) + var(--tc-h, 118px) + 6px);
  }

  .bar-group {
    width: min(37vw, 165px);
  }

  .bar-label {
    font-size: .44rem;
  }

  .hud-power {
    width: 64px;
    height: 64px;
    right: calc(var(--safe-r) + 14px);
    bottom: calc(var(--safe-b) + var(--tc-h, 118px) + 14px);
  }

  .tc-joystick {
    width: 122px;
    height: 122px;
  }

  .tc-btn {
    width: 64px;
    height: 64px;
    font-size: 1.3rem;
  }

  .tc-btn-emoji {
    width: 40px;
    height: 40px;
  }

  .result-card {
    width: min(94vw, 480px);
    padding: 20px 15px;
    border-radius: 16px;
  }

  .result-score {
    font-size: 3rem;
    gap: 12px;
  }
}

/* ---------- very small phones ---------- */

@media (max-width: 380px) {
  .hud-top {
    width: calc(100vw - 10px);
    height: 58px;
  }

  .hud-crest {
    width: 28px;
    height: 28px;
  }

  .hud-score {
    font-size: 1.52rem;
    min-width: 27px;
  }

  .hud-clock {
    min-width: 51px;
    height: 30px;
    font-size: .82rem;
  }

  .hud-name {
    display: none;
  }

  .bar-group {
    width: 40vw;
  }
}

/* ---------- landscape phones ---------- */

@media (max-height: 500px) and (orientation: landscape) {
  .hud-top {
    height: 56px;
  }

  .hud-crest {
    width: 30px;
    height: 30px;
  }

  .hud-score {
    font-size: 1.75rem;
  }

  .hud-clock {
    height: 32px;
    min-width: 58px;
    font-size: .9rem;
  }

  .hud-bars {
    bottom: calc(var(--safe-b) + var(--tc-h, 100px) + 4px);
  }

  .tc-joystick {
    width: 104px;
    height: 104px;
  }

  .tc-btn {
    width: 58px;
    height: 58px;
  }
}

/* ---------- desktop ---------- */

@media (min-width: 1280px) and (min-height: 720px) {
  .hud-top {
    height: 82px;
  }

  .hud-score {
    font-size: 2.8rem;
    min-width: 70px;
  }

  .hud-crest {
    width: 48px;
    height: 48px;
  }

  .hud-clock {
    min-width: 88px;
  }
}

/* =====================================================================
   RHENXBALL 2.0 - yayıncı tarzı HUD + karakter katmanı
   ===================================================================== */
.hud-top {
  min-height: 72px;
  gap: 0;
  padding: 5px;
  border: 1px solid rgba(255,255,255,.16);
  background: linear-gradient(180deg, rgba(7,12,23,.96), rgba(10,15,27,.82));
  box-shadow: 0 16px 45px rgba(0,0,0,.58), 0 0 32px rgba(0,229,255,.08), inset 0 1px rgba(255,255,255,.08);
}
.hud-team {
  position: relative;
  min-width: 155px;
  padding: 5px 12px;
  overflow: hidden;
}
.hud-team-accent {
  position: absolute;
  top: 7px; bottom: 7px; left: 3px;
  width: 3px;
  border-radius: 8px;
}
.hud-team.right .hud-team-accent { left: auto; right: 3px; }
.hud-name-wrap { display:flex; flex-direction:column; min-width:0; }
.hud-side-label {
  color: rgba(255,255,255,.38);
  font-size: .52rem;
  font-weight: 900;
  letter-spacing: .18em;
  margin-top: 2px;
}
.hud-score {
  position: relative;
  min-width: 62px;
  font-size: 2.55rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 22px rgba(255,255,255,.18);
}
.hud-clock-wrap {
  min-width: 104px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:1px;
  padding: 2px 6px;
}
.hud-live {
  color: #ff5268;
  font-size: .48rem;
  font-weight: 900;
  letter-spacing: .18em;
}
.hud-live i {
  display:inline-block; width:5px; height:5px; border-radius:50%;
  background:#ff3d57; box-shadow:0 0 9px #ff3d57;
  animation:pulseGlow 1s infinite;
}
.hud-phase {
  color: rgba(255,255,255,.42);
  font-size: .47rem;
  font-weight: 900;
  letter-spacing: .13em;
}
.hud-clock {
  min-width: 90px;
  padding: 3px 9px;
  font-size: 1.35rem;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.55);
}
.hud-top.home-leading .hud-score[data-hud="score0"],
.hud-top.away-leading .hud-score[data-hud="score1"] {
  color: #fff;
  transform: scale(1.06);
  text-shadow: 0 0 18px rgba(0,229,255,.45);
}
.hud-top.home-leading .hud-score[data-hud="score1"],
.hud-top.away-leading .hud-score[data-hud="score0"] { opacity:.58; }

/* Karakteri daha okunaklı yapan oyun içi "kartvizit" katmanı */
.player-nameplate {
  pointer-events:none;
  font-family:var(--font);
}
@media (max-width: 620px) {
  .hud-team { min-width: 92px; padding: 4px 7px; }
  .hud-name { max-width: 48px; font-size:.66rem; }
  .hud-side-label { display:none; }
  .hud-score { min-width: 38px; font-size:1.9rem; }
  .hud-clock-wrap { min-width:74px; }
  .hud-clock { min-width:64px; font-size:1.05rem; }
  .hud-live { font-size:.4rem; }
}
@media (max-width: 390px) {
  .hud-team { min-width: 67px; padding-inline:4px; }
  .hud-crest { width:27px; height:27px; }
  .hud-name { display:none; }
  .hud-score { min-width:31px; font-size:1.65rem; }
  .hud-clock-wrap { min-width:59px; }
  .hud-clock { min-width:56px; padding-inline:5px; font-size:.94rem; }
  .hud-phase { display:none; }
}

/* RHENXBALL HUD v2 overrides */

/* RHENXBALL HUD v2 overrides */
.hud-top {
  height: 64px;
  min-width: min(620px, 90vw);
  max-width: min(700px, 94vw);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 18px;
  background: rgba(8,10,18,.88);
  box-shadow: 0 12px 32px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.07);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.hud-top::before,.hud-top::after { width: 3px; opacity:.8; }
.hud-team {
  min-width: 0;
  padding: 0 12px;
  gap: 8px;
  background: transparent;
}
.hud-team.right { background: transparent; }
.hud-crest {
  width: 34px; height: 34px; padding: 4px; border-radius: 10px;
  background: rgba(255,255,255,.055); border-color: rgba(255,255,255,.10);
}
.hud-name-wrap { gap: 1px; }
.hud-name { max-width: 92px; font-size: .68rem; letter-spacing: .06em; white-space: nowrap; overflow:hidden; text-overflow:ellipsis; }
.hud-side-label { color: rgba(255,255,255,.34); font-size:.42rem; letter-spacing:.16em; }
.hud-score {
  min-width: 48px; padding: 0 4px; font-size: 2rem; font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 10px rgba(0,0,0,.55);
}
.hud-clock-wrap { min-width: 78px; gap: 2px; }
.hud-live { font-size: .42rem; letter-spacing:.12em; opacity:.72; }
.hud-live i { width:5px; height:5px; }
.hud-clock {
  min-width: 66px; height: 34px; margin:0; padding:0 9px; border-radius:10px;
  border:1px solid rgba(255,255,255,.16); background:rgba(255,255,255,.07); color:#fff;
  box-shadow:none; font-size:1.05rem; font-variant-numeric:tabular-nums;
}
.hud-clock::before { display:none; }
.hud-phase { font-size:.38rem; letter-spacing:.16em; color:rgba(255,255,255,.4); }
.hud-top.home-leading .hud-score[data-hud="score0"],
.hud-top.away-leading .hud-score[data-hud="score1"] { color:#fff; }
.hud-top.home-leading .hud-score[data-hud="score0"]::after,
.hud-top.away-leading .hud-score[data-hud="score1"]::after {
  content:""; position:absolute; bottom:7px; width:18px; height:2px; border-radius:99px; background:currentColor; opacity:.7;
}
.hud-bars { opacity:.78; }
.hud-bars.left { left:0; }
.hud-bars.right { right:0; }

/* Rakip takip sistemi */
.opponent-track-label {
  position:absolute; z-index:6; pointer-events:none; transform:translate(-50%,-100%);
  padding:4px 8px; border-radius:999px; background:rgba(8,10,18,.76);
  border:1px solid rgba(255,72,105,.42); color:#fff; font:800 9px/1 system-ui,sans-serif;
  letter-spacing:.12em; box-shadow:0 5px 18px rgba(0,0,0,.3); white-space:nowrap;
}

@media (max-width: 700px) {
  .hud-top { height:56px; min-width:0; width:min(96vw,560px); border-radius:15px; }
  .hud-team { padding:0 7px; gap:5px; }
  .hud-crest { width:29px; height:29px; }
  .hud-name { max-width:55px; font-size:.57rem; }
  .hud-side-label { display:none; }
  .hud-score { min-width:34px; font-size:1.65rem; }
  .hud-clock-wrap { min-width:58px; }
  .hud-clock { min-width:53px; height:30px; font-size:.92rem; }
  .hud-live { display:none; }
}
@media (max-width: 430px) {
  .hud-team { padding:0 4px; }
  .hud-crest { width:25px; height:25px; }
  .hud-name { display:none; }
  .hud-score { min-width:29px; font-size:1.45rem; }
  .hud-clock-wrap { min-width:49px; }
  .hud-clock { min-width:46px; padding:0 4px; font-size:.84rem; }
  .hud-phase { display:none; }
}

/* ------------------------------------------------------------- sosyal maç HUD */
.match-social {
  pointer-events: auto;
  position: absolute;
  right: max(14px, env(safe-area-inset-right));
  top: calc(92px + env(safe-area-inset-top));
  display: flex;
  gap: 5px;
  padding: 6px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(5,9,18,.78);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 25px rgba(0,0,0,.24);
  z-index: 8;
}
.match-social button {
  width: 34px; height: 34px; border: 0; border-radius: 10px;
  background: rgba(255,255,255,.07); color: #fff; font-size: 18px;
  cursor: pointer; transition: transform .12s ease, background .12s ease;
}
.match-social button:hover { transform: translateY(-2px) scale(1.06); background: rgba(255,255,255,.16); }
.match-social button:active { transform: scale(.92); }



.hud-score { font-size: 2.15rem; min-width: 54px; font-variant-numeric: tabular-nums; }
.hud-clock-wrap { position:relative; min-width:92px; }
.hud-goal-text {
  position:absolute; left:50%; top:calc(100% + 7px); transform:translate(-50%,-6px) scale(.92);
  opacity:0; white-space:nowrap; pointer-events:none;
  padding:5px 11px; border-radius:999px; background:rgba(5,8,13,.9);
  border:1px solid rgba(255,255,255,.18); box-shadow:0 8px 24px rgba(0,0,0,.3);
  font-size:.58rem; font-weight:950; letter-spacing:.1em; text-transform:uppercase;
  transition:opacity .18s ease, transform .22s ease;
}
.hud-goal-text.show { opacity:1; transform:translate(-50%,0) scale(1); }
.hud-powers {
  position:absolute; left:50%; bottom:calc(14px + env(safe-area-inset-bottom)); transform:translateX(-50%);
  display:flex; gap:7px; z-index:8; pointer-events:auto;
}
.hud-power {
  --power-color:#00e5ff; position:relative; width:54px; height:54px; border:1px solid color-mix(in srgb,var(--power-color) 45%, transparent);
  border-radius:14px; background:rgba(7,10,17,.88); color:#fff; cursor:pointer; overflow:hidden;
  box-shadow:0 8px 22px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.08);
  transition:transform .14s ease, border-color .14s ease, opacity .14s ease;
}
.hud-power:hover { transform:translateY(-2px); border-color:var(--power-color); }
.hud-power.ready { box-shadow:0 0 0 1px var(--power-color), 0 0 20px color-mix(in srgb,var(--power-color) 28%, transparent); }
.hud-power.locked { opacity:.48; }
.hud-power.active { border-color:#fff; transform:scale(1.05); }
.hud-power .icon { position:relative; z-index:2; font-size:22px; line-height:1; }
.hud-power .cost { position:absolute; right:4px; bottom:3px; z-index:2; font-size:8px; font-weight:900; color:rgba(255,255,255,.7); }
.hud-power .key { position:absolute; left:4px; top:3px; z-index:2; font-size:8px; font-weight:950; color:rgba(255,255,255,.5); }
.hud-power .cd { position:absolute; inset:auto 0 0; height:0; background:rgba(0,0,0,.62); z-index:1; transition:height .08s linear; }
.match-social { pointer-events:auto; z-index:8; }
@media (max-width:700px) {
  .hud-top { height:58px; min-width:0; width:min(96vw,600px); }
  .hud-score { min-width:38px; font-size:1.72rem; }
  .hud-goal-text { font-size:.5rem; top:calc(100% + 5px); }
  .hud-powers { bottom:calc(82px + env(safe-area-inset-bottom)); gap:5px; }
  .hud-power { width:43px; height:43px; border-radius:11px; }
  .hud-power .icon { font-size:18px; }
}

/* Mobilde dört güç yan yana; zıpla/vuruş ayrı kalır. */
.tc-powers { grid-column:1; grid-row:1; display:flex; gap:5px; align-items:flex-end; }
.tc-powers .tc-btn-power { width:48px; height:48px; }
.tc-actions > .tc-btn-jump { grid-column:2; grid-row:1; }
.tc-actions > .tc-btn-kick { grid-column:2; grid-row:2; }
@media (max-height:460px) { .tc-powers .tc-btn-power { width:40px; height:40px; } }


/* ================================================================
   RHENXBALL HUD POLISH - temiz yayıncı skorboardu + maç geri bildirimi
   ================================================================ */
.hud-top {
  height: 70px;
  min-width: min(720px, 92vw);
  max-width: min(780px, 95vw);
  padding: 4px;
  gap: 2px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.14);
  background:
    linear-gradient(180deg, rgba(12,16,27,.98), rgba(7,10,18,.94));
  box-shadow:
    0 20px 55px rgba(0,0,0,.48),
    0 0 0 1px rgba(255,255,255,.025),
    inset 0 1px 0 rgba(255,255,255,.08);
}
.hud-team {
  min-width: 178px;
  padding: 0 14px;
  gap: 10px;
  border-radius: 15px;
}
.hud-team-home {
  background: linear-gradient(90deg, rgba(255,255,255,.065), transparent 85%);
}
.hud-team-away {
  background: linear-gradient(270deg, rgba(255,255,255,.065), transparent 85%);
}
.hud-team-accent { width: 4px; top: 10px; bottom: 10px; }
.hud-crest {
  width: 40px; height: 40px;
  border-radius: 12px;
  padding: 4px;
  background: rgba(255,255,255,.055);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 5px 16px rgba(0,0,0,.22);
}
.hud-name {
  max-width: 112px;
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .08em;
}
.hud-side-label { font-size: .43rem; }
.hud-score {
  min-width: 66px;
  font-size: 2.55rem;
  font-weight: 950;
  line-height: 1;
  color: rgba(255,255,255,.92);
  text-shadow: 0 3px 18px rgba(0,0,0,.55);
}
.hud-score::before {
  content: 'SKOR';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .36rem;
  font-weight: 900;
  letter-spacing: .2em;
  color: rgba(255,255,255,.25);
}
.hud-clock-wrap {
  position: relative;
  min-width: 112px;
  height: 100%;
  padding: 0 7px;
  gap: 1px;
}
.hud-match-label {
  display: block;
  color: rgba(255,255,255,.28);
  font-size: .38rem;
  font-weight: 900;
  letter-spacing: .22em;
}
.hud-clock {
  min-width: 82px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(0,229,138,.22);
  background: rgba(0,229,138,.08);
  color: #f4fff9;
  font-size: 1.2rem;
  font-weight: 950;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.hud-clock.urgent {
  background: rgba(255,73,107,.14);
  border-color: rgba(255,73,107,.48);
  color: #fff;
}
.hud-live { position:absolute; top:1px; right:5px; font-size:.37rem; }
.hud-phase { display:none; }
.hud-goal-text {
  top: calc(100% + 8px);
  padding: 7px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.16);
  background: linear-gradient(180deg, rgba(18,22,34,.98), rgba(7,9,15,.98));
  box-shadow: 0 12px 30px rgba(0,0,0,.42), 0 0 24px rgba(0,229,138,.1);
  font-size: .62rem;
  letter-spacing: .12em;
}
.hud-goal-text.show { animation: goalBadgeIn .28s cubic-bezier(.2,1.4,.3,1) both; }
@keyframes goalBadgeIn {
  from { opacity:0; transform:translate(-50%,-8px) scale(.82); }
  to { opacity:1; transform:translate(-50%,0) scale(1); }
}
.score-pop { animation: scorePop .52s cubic-bezier(.15,1.55,.3,1); }
@keyframes scorePop {
  0% { transform:scale(1); }
  35% { transform:scale(1.28); color:#fff; text-shadow:0 0 28px rgba(0,245,138,.75); }
  100% { transform:scale(1); }
}
.hud-top.home-leading .hud-score[data-hud="score0"],
.hud-top.away-leading .hud-score[data-hud="score1"] {
  color:#fff;
  text-shadow:0 0 24px rgba(0,245,138,.28);
}
.hud-top.home-leading .hud-score[data-hud="score1"],
.hud-top.away-leading .hud-score[data-hud="score0"] { opacity:.48; }

/* Güçler daha okunaklı: aktif güçte isim/renk hissi verir. */
.hud-power { width:58px; height:58px; border-radius:15px; }
.hud-power .key { background:rgba(255,255,255,.08); padding:2px 4px; border-radius:5px; }
.hud-power.ready { transform:translateY(-2px); }
.hud-power.ready:hover { transform:translateY(-4px) scale(1.04); }

/* Rakibe emoji paneli HUD'un önüne geçmesin. */
.match-social {
  top: calc(84px + env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  padding: 5px;
  border-radius: 13px;
  background: rgba(7,10,18,.82);
}
.match-social button { width:32px; height:32px; font-size:17px; }

@media (max-width:700px) {
  .hud-top { height:58px; width:min(97vw,620px); min-width:0; border-radius:16px; }
  .hud-team { min-width:0; padding:0 7px; gap:5px; }
  .hud-crest { width:30px; height:30px; border-radius:9px; }
  .hud-name { max-width:60px; font-size:.57rem; }
  .hud-score { min-width:40px; font-size:1.75rem; }
  .hud-score::before { display:none; }
  .hud-clock-wrap { min-width:66px; }
  .hud-clock { min-width:58px; height:29px; font-size:.94rem; }
  .hud-match-label { display:none; }
  .match-social { top:calc(68px + env(safe-area-inset-top)); }
}
@media (max-width:430px) {
  .hud-team { padding:0 4px; }
  .hud-crest { width:25px; height:25px; }
  .hud-name { display:none; }
  .hud-score { min-width:30px; font-size:1.48rem; }
  .hud-clock-wrap { min-width:52px; }
  .hud-clock { min-width:47px; font-size:.82rem; }
  .match-social { right:6px; gap:3px; padding:4px; }
  .match-social button { width:28px; height:28px; font-size:15px; }
}

/* ================================================================
   RHENXBALL SCOREBOARD v7.1 — compact broadcast HUD
   ================================================================ */
.hud-top {
  top: max(calc(var(--safe-t) + 14px), 14px);
  width: min(700px, 92vw);
  min-width: 0;
  max-width: 700px;
  height: 78px;
  padding: 5px;
  gap: 0;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 70px 106px 70px minmax(180px, 1fr);
  align-items: stretch;
  overflow: visible;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  background: rgba(5,8,15,.94);
  box-shadow: 0 18px 50px rgba(0,0,0,.52), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.hud-top::before,
.hud-top::after {
  width: 3px;
  top: 13px;
  bottom: 13px;
  border-radius: 99px;
  opacity: .8;
}
.hud-team {
  min-width: 0;
  height: 100%;
  padding: 0 13px;
  gap: 9px;
  border-radius: 13px;
  background: transparent;
}
.hud-team-home { background: linear-gradient(90deg, rgba(255,255,255,.065), transparent); }
.hud-team-away { background: linear-gradient(270deg, rgba(255,255,255,.065), transparent); }
.hud-team-accent {
  width: 3px;
  top: 15px;
  bottom: 15px;
  border-radius: 99px;
}
.hud-team.right .hud-team-accent { order: 0; }
.hud-crest {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.09);
}
.hud-name-wrap { min-width: 0; }
.hud-name {
  max-width: 105px;
  font-size: .73rem;
  font-weight: 900;
  letter-spacing: .07em;
  color: #fff;
}
.hud-side-label {
  display: block;
  margin-top: 3px;
  font-size: .4rem;
  font-weight: 900;
  letter-spacing: .18em;
  color: rgba(255,255,255,.32);
}
.hud-score {
  min-width: 0;
  width: auto;
  padding: 0;
  display: grid;
  place-items: center;
  align-self: center;
  height: 58px;
  border-radius: 14px;
  background: rgba(255,255,255,.035);
  font-size: 2.55rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  color: rgba(255,255,255,.76);
  text-shadow: none;
  transition: transform .18s ease, color .18s ease, background .18s ease, opacity .18s ease;
}
.hud-score::before { display:none; }
.hud-top.home-leading .hud-score[data-hud="score0"],
.hud-top.away-leading .hud-score[data-hud="score1"] {
  color: #fff;
  background: rgba(0,245,138,.12);
  box-shadow: inset 0 0 0 1px rgba(0,245,138,.15), 0 0 24px rgba(0,245,138,.08);
  opacity: 1;
}
.hud-top.home-leading .hud-score[data-hud="score1"],
.hud-top.away-leading .hud-score[data-hud="score0"] { opacity: .55; }
.hud-clock-wrap {
  position: relative;
  min-width: 0;
  height: 100%;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.hud-match-label {
  display: block;
  font-size: .38rem;
  line-height: 1;
  letter-spacing: .24em;
  font-weight: 950;
  color: rgba(255,255,255,.28);
}
.hud-clock {
  min-width: 76px;
  width: 76px;
  height: 32px;
  padding: 0 9px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,.1);
  background: #151b26;
  color: #fff;
  font-size: 1.12rem;
  font-weight: 950;
  letter-spacing: .05em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07);
  text-shadow: 0 0 14px rgba(255,255,255,.16);
}
.hud-clock.urgent {
  color: #fff;
  background: rgba(255,73,107,.16);
  border-color: rgba(255,73,107,.45);
}
.hud-live {
  top: 5px;
  right: 2px;
  font-size: .34rem;
  color: rgba(255,255,255,.34);
}
.hud-live i { width: 4px; height: 4px; }
.hud-goal-text {
  top: calc(100% + 8px);
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(0,245,138,.28);
  background: rgba(5,9,16,.96);
  color: #fff;
  box-shadow: 0 12px 32px rgba(0,0,0,.45), 0 0 22px rgba(0,245,138,.1);
  font-size: .6rem;
  font-weight: 950;
  letter-spacing: .1em;
  white-space: nowrap;
}
.score-pop { animation: scorePopClean .48s cubic-bezier(.2,1.4,.3,1); }
@keyframes scorePopClean {
  0% { transform: scale(1); }
  35% { transform: scale(1.2); color:#fff; }
  100% { transform: scale(1); }
}

@media (max-width: 700px) {
  .hud-top {
    width: min(96vw, 610px);
    height: 62px;
    grid-template-columns: minmax(0,1fr) 44px 72px 44px minmax(0,1fr);
    padding: 4px;
    border-radius: 15px;
  }
  .hud-team { padding: 0 7px; gap: 6px; }
  .hud-crest { width: 32px; height: 32px; flex-basis:32px; border-radius:9px; padding:3px; }
  .hud-name { max-width: 65px; font-size:.56rem; }
  .hud-side-label { display:none; }
  .hud-score { height: 48px; border-radius:10px; font-size:1.85rem; }
  .hud-clock { width:58px; min-width:58px; height:27px; font-size:.86rem; border-radius:7px; }
  .hud-match-label { font-size:.3rem; }
  .hud-live { display:none; }
  .hud-goal-text { font-size:.48rem; padding:6px 11px; top:calc(100% + 6px); }
}

@media (max-width: 430px) {
  .hud-top { grid-template-columns: minmax(0,1fr) 38px 62px 38px minmax(0,1fr); }
  .hud-name { max-width: 48px; }
  .hud-crest { width:28px; height:28px; flex-basis:28px; }
  .hud-score { font-size:1.6rem; }
  .hud-clock { width:52px; min-width:52px; font-size:.76rem; }
}


/* =====================================================================
   RHENXBALL // MOBILE CLEAN CONTROLS
   Mobil oyunda ekrandaki buton sayisini bilerek azaltiyoruz:
   joystick + ziplama + vurus sabit, ozel gucler acilir bir tepside.
   Emoji butonlari mac ekranindan kaldirildi.
   ===================================================================== */
@media (max-width: 700px), (pointer: coarse) {
  .touch-controls { z-index: 8; }
  .tc-left {
    left: max(calc(var(--safe-l) + 10px), 10px);
    bottom: max(calc(var(--safe-b) + 12px), 12px);
  }
  .tc-right {
    right: max(calc(var(--safe-r) + 10px), 10px);
    bottom: max(calc(var(--safe-b) + 12px), 12px);
    gap: 0;
  }
  .tc-actions {
    display: flex !important;
    align-items: flex-end;
    gap: 8px;
  }
  .tc-emojis { display: none !important; }
  .tc-powers { display: none !important; }
  .tc-joystick {
    width: 116px;
    height: 116px;
    border-width: 1px;
  }
  .tc-joy-base { inset: 20px; }
  .tc-joy-knob { width: 50px; height: 50px; }
  .tc-btn {
    width: 62px;
    height: 62px;
    font-size: 1.3rem;
    border-width: 1px;
  }
  .tc-btn-jump,
  .tc-btn-kick { position: relative; inset: auto; }
  .tc-power-wrap {
    position: relative;
    width: 62px;
    height: 62px;
    order: 0;
  }
  .tc-btn-power-menu {
    width: 62px;
    height: 62px;
    font-size: 1.3rem;
  }
  .tc-btn-power-menu .tc-menu-count {
    position: absolute;
    right: 4px;
    bottom: 4px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(0,245,138,.9);
    color: #13001d;
    font: 900 .56rem/1 system-ui,sans-serif;
    z-index: 3;
  }
  .tc-power-tray {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    width: 136px;
    padding: 6px;
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 16px;
    background: rgba(13,6,22,.96);
    box-shadow: 0 14px 36px rgba(0,0,0,.55), 0 0 0 1px rgba(0,245,138,.05);
  }
  .tc-power-tray.open {
    display: grid;
    animation: tcTrayIn .14s ease-out both;
  }
  .tc-power-tray .tc-btn-power {
    width: 58px;
    height: 58px;
    font-size: 1.2rem;
  }
  .tc-power-tray .tc-cost { font-size: .48rem; right: 5px; bottom: 3px; }
  .tc-power-tray .tc-cd { border-radius: inherit; }
  .tc-power-tray .tc-btn-power.ready { transform: none; }
  .hud-bars {
    padding-left: 10px;
    padding-right: 10px;
    gap: 10px;
    opacity: .9;
  }
  .hud-bars .bar-group { width: min(42vw, 150px); }
  .hud-bars .bar-label { font-size: .42rem; }
  .hud-bars .bar { height: 6px; }
  .hud-power { display: none !important; }
}

@keyframes tcTrayIn {
  from { opacity: 0; transform: translateY(7px) scale(.96); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 420px) {
  .tc-joystick { width: 108px; height: 108px; }
  .tc-btn, .tc-btn-power-menu, .tc-power-wrap { width: 58px; height: 58px; }
  .tc-power-tray { width: 128px; }
  .tc-power-tray .tc-btn-power { width: 54px; height: 54px; }
  .hud-bars .bar-group { width: 42vw; }
}

@media (max-height: 500px) and (orientation: landscape) {
  .tc-left { bottom: max(calc(var(--safe-b) + 8px), 8px); }
  .tc-right { bottom: max(calc(var(--safe-b) + 8px), 8px); }
  .tc-joystick { width: 96px; height: 96px; }
  .tc-btn, .tc-btn-power-menu, .tc-power-wrap { width: 56px; height: 56px; }
  .tc-power-tray { width: 122px; padding: 5px; gap: 5px; }
  .tc-power-tray .tc-btn-power { width: 52px; height: 52px; }
  .hud-bars { bottom: calc(var(--safe-b) + var(--tc-h, 96px) + 4px); }
}


/* ================================================================
   RHENXBALL // MOBILE MATCH UI v3
   Maçta kontrol alanı ile yayın HUD'u birbirinden ayrılır; ekranın
   merkezinde oyun için temiz görüş alanı kalır.
   ================================================================ */
@media (max-width: 700px), (pointer: coarse) {
  .game-stage {
    height:100dvh;
    min-height:100dvh;
    background:#05070d;
  }

  /* küçük, yayıncı tipi skorboard */
  .hud-top {
    top:max(calc(var(--safe-t) + 7px), 7px);
    width:calc(100vw - 12px);
    max-width:none;
    height:50px;
    min-height:0;
    padding:3px;
    border-radius:14px;
    grid-template-columns:minmax(0,1fr) 31px 58px 31px minmax(0,1fr);
    background:rgba(7,10,17,.90);
    box-shadow:0 10px 28px rgba(0,0,0,.38), inset 0 1px rgba(255,255,255,.06);
    backdrop-filter:blur(12px);
  }
  .hud-top::before,.hud-top::after { width:2px; opacity:.65; }
  .hud-team { padding:0 5px; gap:4px; min-width:0; }
  .hud-crest {
    width:24px; height:24px; flex-basis:24px;
    padding:2px; border-radius:7px;
  }
  .hud-name { max-width:52px; font-size:.48rem; letter-spacing:.03em; }
  .hud-side-label { display:none; }
  .hud-score {
    height:42px;
    min-width:31px;
    border-radius:9px;
    font-size:1.52rem;
  }
  .hud-score::before { display:none; }
  .hud-clock-wrap { min-width:0; gap:1px; }
  .hud-match-label,.hud-live { display:none; }
  .hud-clock {
    width:52px; min-width:52px; height:26px;
    padding:0 4px;
    border-radius:7px;
    font-size:.76rem;
    background:rgba(255,255,255,.07);
  }
  .hud-phase { display:block; font-size:.28rem; letter-spacing:.13em; color:rgba(255,255,255,.32); }
  .hud-goal-text { top:calc(100% + 4px); font-size:.43rem; padding:5px 9px; }

  /* Enerji / stamina artık joystick'in üstünde büyük blok oluşturmuyor. */
  .hud-bars {
    top:max(calc(var(--safe-t) + 64px), 64px);
    bottom:auto;
    padding:0 9px;
    gap:8px;
    width:100%;
    justify-content:space-between;
    opacity:.96;
  }
  .hud-bars .bar-group {
    width:min(39vw,150px);
    padding:4px 6px 5px;
    border-radius:8px;
    background:rgba(6,9,15,.46);
    backdrop-filter:blur(7px);
  }
  .hud-bars .bar-label { display:none; }
  .hud-bars .bar { height:4px; margin-top:3px; }
  .hud-bars .bar:first-of-type { margin-top:0; }

  .match-social { display:none !important; }

  /* pause butonu: HUD ile çakışmayan, tek işlevli küçük kontrol */
  #btnPause {
    top:max(calc(var(--safe-t) + 7px),7px) !important;
    left:max(calc(var(--safe-l) + 7px),7px) !important;
    width:38px !important;
    height:38px !important;
    min-width:38px;
    min-height:38px;
    padding:0;
    border-radius:11px;
    background:rgba(7,10,17,.74);
    border:1px solid rgba(255,255,255,.12);
    box-shadow:0 8px 20px rgba(0,0,0,.35);
    backdrop-filter:blur(10px);
  }

  /* mobil kontrol kümesi: daha küçük ama dokunması rahat */
  .tc-left {
    left:max(calc(var(--safe-l) + 9px),9px);
    bottom:max(calc(var(--safe-b) + 9px),9px);
  }
  .tc-right {
    right:max(calc(var(--safe-r) + 9px),9px);
    bottom:max(calc(var(--safe-b) + 9px),9px);
  }
  .tc-actions { gap:7px; }
  .tc-joystick {
    width:102px; height:102px;
    border-width:1px;
    background:radial-gradient(circle at 50% 50%,rgba(0,245,138,.05),rgba(7,10,18,.66) 68%),rgba(255,255,255,.025);
    box-shadow:0 12px 26px rgba(0,0,0,.34), inset 0 0 26px rgba(255,255,255,.025);
  }
  .tc-joystick::before { inset:-13px; }
  .tc-joy-base { inset:16px; }
  .tc-joy-knob { width:44px; height:44px; border-width:1px; }
  .tc-btn,
  .tc-btn-power-menu,
  .tc-power-wrap {
    width:54px; height:54px;
  }
  .tc-btn {
    font-size:1.12rem;
    border-width:1px;
    box-shadow:0 10px 22px rgba(0,0,0,.38);
  }
  .tc-btn-kick {
    border-color:rgba(0,229,255,.20);
    background:radial-gradient(circle at 30% 24%,rgba(255,255,255,.18),transparent 32%),linear-gradient(145deg,rgba(0,99,122,.92),rgba(8,14,24,.96));
  }
  .tc-btn-jump {
    background:radial-gradient(circle at 30% 24%,rgba(255,255,255,.16),transparent 30%),linear-gradient(145deg,rgba(64,28,94,.92),rgba(9,7,14,.96));
  }
  .tc-btn-power-menu {
    font-size:1.1rem;
    border-width:1px;
    background:radial-gradient(circle at 30% 22%,rgba(255,255,255,.16),transparent 30%),linear-gradient(145deg,rgba(76,48,122,.92),rgba(10,7,18,.96));
  }
  .tc-btn-power-menu .tc-menu-count { right:3px; bottom:3px; min-width:15px; height:15px; font-size:.48rem; }
  .tc-power-tray { right:0; bottom:calc(100% + 7px); width:120px; padding:5px; gap:5px; border-radius:13px; }
  .tc-power-tray .tc-btn-power { width:51px; height:51px; font-size:1rem; }
  .tc-power-tray .tc-cost { font-size:.44rem; }
  .tc-power-tray .tc-cd { border-radius:inherit; }
  .tc-charge { opacity:.85; }

  .game-overlay { padding:10px; }
  .result-card,.pause-menu { width:min(94vw,390px); border-radius:17px; padding:16px 14px; }
  .result-title { font-size:1.4rem; }
  .result-score { font-size:2.5rem; gap:10px; }
  .pause-menu h3 { font-size:1.05rem; margin-bottom:12px; }
  .pause-menu .btn { min-height:46px; border-radius:12px; font-size:.78rem; }
}

@media (max-width: 380px) {
  .hud-top {
    width:calc(100vw - 8px);
    height:47px;
    grid-template-columns:minmax(0,1fr) 28px 54px 28px minmax(0,1fr);
  }
  .hud-crest { width:22px; height:22px; flex-basis:22px; }
  .hud-name { display:none; }
  .hud-score { min-width:28px; font-size:1.36rem; height:39px; }
  .hud-clock { width:49px; min-width:49px; height:24px; font-size:.70rem; }
  .hud-bars { top:max(calc(var(--safe-t) + 60px),60px); }
  .hud-bars .bar-group { width:42vw; padding-inline:5px; }
  .tc-joystick { width:96px; height:96px; }
  .tc-joystick::before { inset:-11px; }
  .tc-joy-base { inset:15px; }
  .tc-joy-knob { width:41px; height:41px; }
  .tc-btn,.tc-btn-power-menu,.tc-power-wrap { width:51px; height:51px; }
  .tc-actions { gap:6px; }
  .tc-power-tray .tc-btn-power { width:48px; height:48px; }
}

@media (max-height: 500px) and (orientation: landscape) {
  .hud-top { height:48px; grid-template-columns:minmax(0,1fr) 30px 58px 30px minmax(0,1fr); }
  .hud-crest { width:24px; height:24px; flex-basis:24px; }
  .hud-score { height:40px; font-size:1.45rem; }
  .hud-clock { width:52px; min-width:52px; height:25px; font-size:.72rem; }
  .hud-bars { top:max(calc(var(--safe-t) + 58px),58px); }
  .hud-bars .bar-group { padding:3px 5px; }
  .tc-joystick { width:90px; height:90px; }
  .tc-joystick::before { inset:-10px; }
  .tc-joy-base { inset:14px; }
  .tc-joy-knob { width:39px; height:39px; }
  .tc-btn,.tc-btn-power-menu,.tc-power-wrap { width:49px; height:49px; }
  .tc-power-tray .tc-btn-power { width:46px; height:46px; }
  .tc-left,.tc-right { bottom:max(calc(var(--safe-b) + 6px),6px); }
}


/* =====================================================================
   RHENXBALL MOBILE LANDSCAPE MATCH
   Telefon maç ekranı = yatay tam ekran. Portre durumda hiçbir HUD/control
   görünmez; kullanıcıya yalnızca döndürme katmanı gösterilir.
   ===================================================================== */
.orientation-lock {
  position: absolute;
  inset: 0;
  z-index: 250;
  display: none;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(90% 100% at 50% 0%, rgba(0,229,255,.14), transparent 56%),
    linear-gradient(180deg, #050811 0%, #02040a 100%);
  pointer-events: auto;
}
.orientation-lock-card {
  width: min(460px, 92vw);
  padding: 28px 24px 22px;
  text-align: center;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,.11);
  background: rgba(10,16,27,.82);
  box-shadow: 0 24px 80px rgba(0,0,0,.6), 0 0 42px rgba(0,229,255,.10);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.orientation-lock-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  border: 1px solid rgba(0,229,255,.28);
  color: var(--neon);
  font-size: 2.25rem;
  background: rgba(0,229,255,.07);
  box-shadow: 0 0 30px rgba(0,229,255,.12);
  animation: orientationTilt 1.9s ease-in-out infinite;
}
@keyframes orientationTilt {
  0%,100% { transform: rotate(0deg) scale(1); }
  35% { transform: rotate(90deg) scale(1.04); }
  65% { transform: rotate(90deg) scale(1.04); }
}
.orientation-lock-kicker {
  color: var(--neon);
  font: 800 .66rem/1 var(--font);
  letter-spacing: .24em;
  margin-bottom: 9px;
}
.orientation-lock-title {
  font: 900 clamp(1.5rem, 5vw, 2.35rem)/1.05 var(--font);
  letter-spacing: .05em;
}
.orientation-lock-sub {
  margin: 12px auto 18px;
  max-width: 36ch;
  color: var(--txt-1);
  font-size: .9rem;
  line-height: 1.5;
}
.orientation-lock-btn {
  width: 100%;
  min-height: 52px;
}
.game-stage.portrait-lock .orientation-lock { display: grid; }
.game-stage.portrait-lock #gameCanvas,
.game-stage.portrait-lock .hud,
.game-stage.portrait-lock .touch-controls,
.game-stage.portrait-lock #btnPause { visibility: hidden; }
html.rhenx-portrait-lock,
html.rhenx-portrait-lock body { overflow: hidden; }

@media (pointer: coarse) and (orientation: landscape) {
  .game-stage {
    width: 100vw;
    height: 100svh;
    min-height: 100svh;
    min-width: 100vw;
  }
  #gameCanvas { width: 100vw; height: 100svh; }

  .hud-top {
    top: max(calc(var(--safe-t) + 8px), 8px);
    width: min(58vw, 620px);
    height: 54px;
    padding: 4px 7px;
    border-radius: 17px;
    gap: 3px;
  }
  .hud-team { padding: 0 7px; }
  .hud-crest { width: 28px; height: 28px; }
  .hud-name { font-size: .53rem; max-width: 68px; }
  .hud-score { min-width: 38px; font-size: 1.62rem; height: 43px; }
  .hud-clock { width: 64px; min-width: 64px; height: 28px; font-size: .82rem; }

  .hud-bars {
    top: auto;
    bottom: max(calc(var(--safe-b) + 102px), 102px);
    width: 100%;
    padding: 0 max(76px, 8vw);
    gap: 10vw;
  }
  .hud-bars .bar-group {
    width: min(22vw, 195px);
    padding: 5px 7px 6px;
    border-radius: 9px;
  }
  .hud-bars .bar { height: 5px; }

  .tc-left {
    left: max(calc(var(--safe-l) + 14px), 14px);
    bottom: max(calc(var(--safe-b) + 12px), 12px);
  }
  .tc-right {
    right: max(calc(var(--safe-r) + 14px), 14px);
    bottom: max(calc(var(--safe-b) + 12px), 12px);
  }
  .tc-joystick { width: 112px; height: 112px; }
  .tc-joy-base { inset: 17px; }
  .tc-joy-knob { width: 48px; height: 48px; }
  .tc-actions { gap: 9px; }
  .tc-btn, .tc-btn-power-menu, .tc-power-wrap { width: 60px; height: 60px; }
  .tc-btn { font-size: 1.18rem; }
  .tc-power-tray { width: 138px; gap: 7px; padding: 7px; }
  .tc-power-tray .tc-btn-power { width: 54px; height: 54px; }
  .tc-power-tray .tc-cost { font-size: .45rem; }

  #btnPause {
    top: max(calc(var(--safe-t) + 10px), 10px) !important;
    left: max(calc(var(--safe-l) + 10px), 10px) !important;
    width: 42px !important;
    height: 42px !important;
    border-radius: 12px;
  }
}

@media (pointer: coarse) and (orientation: landscape) and (max-height: 430px) {
  .hud-top { height: 48px; width: min(58vw, 560px); }
  .hud-crest { width: 24px; height: 24px; }
  .hud-score { height: 39px; font-size: 1.45rem; }
  .hud-clock { width: 56px; min-width: 56px; height: 25px; font-size: .73rem; }
  .hud-bars { bottom: max(calc(var(--safe-b) + 88px), 88px); }
  .tc-joystick { width: 94px; height: 94px; }
  .tc-joy-base { inset: 14px; }
  .tc-joy-knob { width: 40px; height: 40px; }
  .tc-btn, .tc-btn-power-menu, .tc-power-wrap { width: 50px; height: 50px; }
  .tc-power-tray { width: 118px; }
  .tc-power-tray .tc-btn-power { width: 46px; height: 46px; }
}

/* Portraitte maçın eski responsive düzenini özellikle ez: maç HUD'u ve
   kontrol kümeleri kullanıcı telefonu döndürene kadar görünmemeli. */
@media (pointer: coarse) and (orientation: portrait) {
  .game-stage { min-height: 100dvh; }
  .game-stage.portrait-lock .hud,
  .game-stage.portrait-lock .touch-controls,
  .game-stage.portrait-lock #btnPause { display: none !important; }
}

/* ======================================================================
   MOBİL DİKEY: pause butonu sol takım armasının üstüne biniyordu.
   Skor çubuğunun hemen altına, enerji barları arasındaki boşluğa alınır.
   ====================================================================== */
@media (pointer: coarse) and (orientation: portrait) {
  .game-stage:not(.force-landscape) #btnPause {
    top: calc(var(--safe-t, 0px) + 64px) !important;
    left: 50% !important;
    transform: translateX(-50%);
    width: 36px !important;
    height: 36px !important;
    min-width: 36px;
    min-height: 36px;
  }
}

/* ======================================================================
   MOBİL KONTROL: yatay (sol/sağ) kaydırıcı
   Eski yuvarlak joystick yukarı çekilince zıplatıyordu. Artık yalnızca
   sağ/sol hareket eder; zıplama ▲ düğmesindedir. Dosyanın sonunda olduğu
   için önceki joystick boyut kurallarını (çok sayıda @media) ezer.
   ====================================================================== */
.touch-controls .tc-joystick {
  width: 188px !important;
  height: 76px !important;
  border-radius: 999px !important;
  display: grid;
  place-items: center;
}
.touch-controls .tc-joystick::before { inset: -14px !important; border-radius: 999px; }
.touch-controls .tc-joy-base {
  position: absolute;
  inset: 10px 14px !important;
  border-radius: 999px !important;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  pointer-events: none;
}
.touch-controls .tc-arr {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1;
}
.touch-controls .tc-joystick.active .tc-arr { color: rgba(255, 255, 255, 0.8); }
.touch-controls .tc-joy-knob {
  width: 54px !important;
  height: 54px !important;
  top: 50% !important;
  left: 50% !important;
}
@media (max-width: 420px), (max-height: 420px) {
  .touch-controls .tc-joystick { width: 160px !important; height: 66px !important; }
  .touch-controls .tc-joy-knob { width: 46px !important; height: 46px !important; }
}

/* MOBİL YATAY: enerji barları oyuncuların hizasına biniyordu; zemin artık
   yukarıda olduğundan barlar skor çubuğunun altına, köşelere alınır. */
@media (pointer: coarse) and (orientation: landscape) {
  .hud-bars {
    bottom: auto !important;
    top: calc(var(--safe-t, 0px) + 62px) !important;
  }
  .hud-bars .bar-group { width: 130px !important; padding: 4px 6px; }
}

/* ======================================================================
   MOBİL: tam ekran sahne + dikey telefonda otomatik yatay (yedek)
   Ekran kilidi (Screen Orientation API) çalışmazsa — iOS Safari gibi —
   telefon dikeyken oyun sahnesi 90° döndürülür; kullanıcı telefonu
   çevirdiğinde sınıf kalkar ve normal yatay moda geçilir.
   ====================================================================== */
.game-stage {
  height: 100vh;
  height: 100dvh;
  min-height: 0 !important;
  background: #05080f;
}
.game-stage.force-landscape {
  width: 100vh !important;
  width: 100dvh !important;
  height: 100vw !important;
  height: 100dvw !important;
  top: 0 !important;
  left: 0 !important;
  transform-origin: top left;
  transform: translateX(100vw) rotate(90deg) !important;
  transform: translateX(100dvw) rotate(90deg) !important;
}

/* ======================================================================
   MOBİL SKORBORD: kompakt, ekran dışına taşmaz, logolar kırpılmaz
   [arma][KISA]  0  1:30  0  [KISA][arma]
   ====================================================================== */
@media (pointer: coarse), (max-width: 700px) {
  .hud-top {
    top: calc(var(--safe-t, 0px) + 6px) !important;
    height: 46px !important;
    min-width: 0 !important;
    max-width: none !important;
    width: min(440px, calc(100vw - 2 * (var(--safe-l, 0px) + 150px))) !important;
    padding: 3px 8px !important;
    gap: 4px !important;
    border-radius: 14px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto auto minmax(0, 1fr) !important;
    align-items: center !important;
    overflow: hidden !important;
  }
  .hud-top::before, .hud-top::after { display: none !important; }
  .hud-team {
    min-width: 0 !important;
    padding: 0 !important;
    gap: 6px !important;
    justify-content: flex-start;
    overflow: hidden;
  }
  .hud-team.right { justify-content: flex-start; flex-direction: row-reverse !important; }
  .hud-team-accent { display: none !important; }
  .hud-crest {
    width: 32px !important;
    height: 32px !important;
    flex: 0 0 32px !important;
    overflow: hidden !important;
    display: grid;
    place-items: center;
  }
  .hud-crest > *, .hud-crest canvas, .hud-crest svg, .hud-crest img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain;
  }
  .hud-name-wrap { min-width: 0; display: block !important; }
  .hud-name {
    max-width: 100% !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.04em !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .hud-team.right .hud-name { text-align: right; }
  .hud-side-label, .hud-live, .hud-match-label { display: none !important; }
  .hud-score {
    min-width: 30px !important;
    height: 36px !important;
    padding: 0 6px !important;
    font-size: 1.35rem !important;
    line-height: 36px !important;
    border-radius: 10px !important;
  }
  .hud-clock-wrap { padding: 0 2px !important; min-width: 52px; text-align: center; }
  .hud-clock { font-size: 0.95rem !important; line-height: 1 !important; }
  .hud-phase { font-size: 0.5rem !important; }
}

/* ======================================================================
   MOBİL GÜÇ SEKMESİ: sol üstte (pause butonunun yanında), tıklayınca
   güçler aşağı doğru listelenir; birine dokununca kullanılır.
   ====================================================================== */
.touch-controls .tc-top-powers {
  position: absolute;
  top: calc(var(--safe-t, 0px) + 7px);
  left: calc(var(--safe-l, 0px) + 54px);
  z-index: 7;
}
.touch-controls .tc-top-powers .tc-power-wrap {
  position: relative !important;
  width: auto !important;
  height: auto !important;
}
.touch-controls .tc-top-powers .tc-btn-power-menu {
  position: relative !important;
  width: auto !important;
  height: 38px !important;
  min-width: 0;
  padding: 0 10px 0 8px !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
  background: rgba(7, 10, 17, 0.78) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.touch-controls .tc-top-powers .tc-btn-power-menu .tc-icon { font-size: 1.05rem; position: static; }
.touch-controls .tc-top-powers .tc-menu-count {
  position: static !important;
  min-width: 18px; height: 18px;
  display: inline-grid; place-items: center;
  border-radius: 999px;
  font-size: 0.62rem;
  background: var(--neon, #00e5ff);
  color: #04121a;
}
.touch-controls .tc-top-powers .tc-pm-caret { font-size: 0.7rem; opacity: 0.7; transition: transform .2s; }
.touch-controls .tc-top-powers .tc-btn-power-menu[aria-expanded="true"] .tc-pm-caret { transform: rotate(180deg); }
.touch-controls .tc-top-powers .tc-power-tray {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  left: 0 !important;
  right: auto !important;
  bottom: auto !important;
  width: max-content !important;
  min-width: 168px;
  display: flex !important;
  flex-direction: column;
  gap: 6px !important;
  padding: 6px !important;
  border-radius: 14px !important;
  background: rgba(7, 10, 17, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.touch-controls .tc-top-powers .tc-power-tray.open {
  opacity: 1; visibility: visible; pointer-events: auto; transform: none;
}
.touch-controls .tc-top-powers .tc-power-tray .tc-btn-power {
  position: relative !important;
  width: 100% !important;
  height: 40px !important;
  border-radius: 11px !important;
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding: 0 10px !important;
  overflow: hidden;
  font-size: 1rem;
}
.touch-controls .tc-top-powers .tc-btn-power .tc-icon { position: static; font-size: 1.1rem; flex: 0 0 auto; }
.touch-controls .tc-top-powers .tc-btn-power .tc-pname {
  flex: 1 1 auto;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.touch-controls .tc-top-powers .tc-btn-power .tc-cost {
  position: static !important;
  flex: 0 0 auto;
  font-size: 0.66rem !important;
  opacity: 0.85;
}
.touch-controls .tc-top-powers .tc-btn-power.locked { opacity: 0.45; }

/* force-landscape iken de yatay yerleşim kuralları geçerli olsun */
.game-stage.force-landscape .hud-bars {
  bottom: auto !important;
  top: calc(var(--safe-t, 0px) + 62px) !important;
}
.game-stage.force-landscape .hud-bars .bar-group { width: 130px !important; padding: 4px 6px; }
.game-stage.force-landscape #btnPause {
  top: 7px !important; left: 7px !important; transform: none !important;
  width: 38px !important; height: 38px !important;
}

/* Dar yatay ekranlarda güç sekmesi sadece ikon+sayı gösterir (skorborda binmesin) */
@media (max-width: 700px) {
  .touch-controls .tc-top-powers .tc-pm-label { display: none; }
  .hud-top { width: min(440px, calc(100vw - 2 * (var(--safe-l, 0px) + 134px))) !important; }
}