/* Oyun içi arayüzün tek tasarım dili: ortak yazı tipi, yuvarlatılmış yarı saydam koyu paneller (.panel), tutarlı
   ikonlar (js/icons.js, currentColor), yumuşak giriş-çıkış (.fx → .on). Boyutlar clamp() ile ekrana göre ölçeklenir. */
:root {
  --ui-font: "Avenir Next", "Nunito", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --ui-bg: rgba(18, 22, 34, 0.68);
  --ui-bg-strong: rgba(18, 22, 34, 0.86);
  --ui-line: rgba(255, 255, 255, 0.13);
  --ui-text: #f6f1e7;
  --ui-dim: rgba(246, 241, 231, 0.6);
  --ui-accent: #ffd23f;
  --ui-good: #48d17a;
  --ui-warn: #ffc53d;
  --ui-bad: #ff5b4f;
  --ui-r: 14px;
  --ui-edge: clamp(8px, 1.8vmin, 16px);              /* ekran kenar boşluğu */
  --ui-fs: clamp(11.5px, 0.9vmin + 7px, 14px);       /* temel yazı boyu */
  --ui-map: clamp(110px, 24vmin, 200px);             /* mini harita çapı */
  --ui-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}
.panel { box-sizing: border-box; font-family: var(--ui-font); font-size: var(--ui-fs); color: var(--ui-text);
  background: var(--ui-bg); border: 1px solid var(--ui-line); border-radius: var(--ui-r);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); backdrop-filter: blur(8px) saturate(1.2); -webkit-backdrop-filter: blur(8px) saturate(1.2);
  pointer-events: none; }
.fx { opacity: 0; visibility: hidden; transform: translateY(6px) scale(0.97);
  transition: opacity 0.22s var(--ui-ease), transform 0.22s var(--ui-ease), visibility 0s linear 0.22s; }
.fx.on { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
kbd { display: inline-block; min-width: 1.5em; padding: 0.1em 0.45em; border-radius: 6px; box-sizing: border-box; text-align: center;
  font: 700 0.9em/1.45 var(--ui-font); color: var(--ui-text); background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18); border-bottom-width: 2px; }
kbd + kbd { margin-left: 3px; }
kbd.ph { background: rgba(255, 210, 63, 0.18); border-color: rgba(255, 210, 63, 0.45); white-space: nowrap; }

/* Kontrol ipuçları (sol alt) */
.hints { position: fixed; left: var(--ui-edge); bottom: var(--ui-edge); max-width: calc(100vw - 2 * var(--ui-edge) - 190px);
  padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 6px 14px; line-height: 1.5; }
.hint { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.hint.ctx { color: var(--ui-accent); font-weight: 700; }
.hint.dim { opacity: 0.55; }
body.ui-no-hints .hints, body.ui-no-map .minimap, body.ui-no-obj .objective { display: none !important; }

/* Can (sol üst) */
.health { position: fixed; top: var(--ui-edge); left: var(--ui-edge); width: var(--ui-map); min-width: 150px; height: 34px;
  display: flex; align-items: center; gap: 8px; padding: 0 10px; border-radius: 999px; --hp: var(--ui-good); }
.health[data-lv="mid"] { --hp: var(--ui-warn); }
.health[data-lv="low"] { --hp: var(--ui-bad); }
.health-ico { color: var(--hp); display: flex; transition: color 0.3s; }
.health[data-lv="low"] .health-ico { animation: beat 0.8s infinite; }
.health-bar { flex: 1; height: 10px; border-radius: 5px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.health-fill { height: 100%; width: 100%; border-radius: 5px; background: var(--hp); transition: width 0.25s var(--ui-ease), background 0.3s; }
.health-text { min-width: 2.2em; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.health.hit { animation: shake 0.3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes beat { 50% { transform: scale(1.2); } }

/* Mini harita (can barının altı) */
.minimap { position: fixed; left: var(--ui-edge); top: calc(var(--ui-edge) + 42px); width: var(--ui-map); height: var(--ui-map);
  box-sizing: border-box; border-radius: 50%; border: 2px solid var(--ui-line); background: #9fcf7f;
  box-shadow: 0 0 0 4px var(--ui-bg), 0 6px 20px rgba(0, 0, 0, 0.3); pointer-events: auto; cursor: zoom-in; }

/* Silah / mermi (sağ alt) */
.weapon { position: fixed; right: var(--ui-edge); bottom: var(--ui-edge); display: flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px; border-radius: 999px; font-weight: 800; }
.chip { width: 2.3em; height: 2.3em; display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: rgba(255, 255, 255, 0.12); font-size: 1.15em; }
.weapon-name i { display: block; font-style: normal; font-size: 0.7em; letter-spacing: 0.12em; color: var(--ui-good); }
.weapon-ammo { display: flex; align-items: center; gap: 4px; color: var(--ui-accent); }
.weapon-ammo b { font-size: 1.2em; font-variant-numeric: tabular-nums; }

/* Aranma yıldızları ve görev metni (sağ üst) */
.wanted { position: fixed; top: var(--ui-edge); right: var(--ui-edge); display: flex; gap: 2px; padding: 5px 10px; border-radius: 999px;
  font-size: clamp(18px, 3vmin, 26px); }
.wanted span { display: flex; color: rgba(246, 241, 231, 0.2); transition: color 0.15s, filter 0.15s; }
.wanted span.on { color: var(--ui-accent); filter: drop-shadow(0 0 6px rgba(255, 210, 63, 0.7)); }
.wanted span.dim { color: rgba(255, 210, 63, 0.35); filter: none; }
.wanted.up { animation: pop 0.45s; }
@keyframes pop { 40% { transform: scale(1.3); } }
.objective { position: fixed; top: var(--ui-edge); right: var(--ui-edge); width: max-content;
  max-width: min(300px, calc(100vw - var(--ui-map) - 3 * var(--ui-edge))); padding: 10px 14px; line-height: 1.4; }
.objective-title { display: flex; align-items: center; gap: 6px; font-size: 0.78em; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ui-accent); margin-bottom: 3px; }
.objective-text { overflow-wrap: anywhere; }
.objective-timer { display: flex; align-items: center; gap: 5px; margin-top: 5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.objective-timer.low { color: var(--ui-bad); animation: beat 1s infinite; transform-origin: left; }

/* Sayı sayacı (üst orta), kısa mesaj */
.score { position: fixed; top: var(--ui-edge); left: 50%; translate: -50% 0; padding: 7px 16px; border-radius: 999px; white-space: nowrap; }
.score b { color: var(--ui-accent); font-variant-numeric: tabular-nums; }
.score .sep { display: inline-block; width: 1px; height: 1em; margin: 0 10px; vertical-align: -0.15em; background: var(--ui-line); }
.toast { position: fixed; top: 22%; left: 50%; translate: -50% 0; max-width: calc(100vw - 32px); padding: 10px 20px; border-radius: 999px;
  background: var(--ui-bg-strong); color: var(--ui-accent); font-weight: 800; font-size: clamp(15px, 2.4vmin, 20px); text-align: center; }

/* Diyalog kutusu (alt orta) */
.dialog { position: fixed; left: 50%; bottom: calc(var(--ui-edge) + 56px); translate: -50% 0; width: min(560px, calc(100vw - 2 * var(--ui-edge)));
  padding: 14px 18px 10px; background: var(--ui-bg-strong); font-size: calc(var(--ui-fs) + 2px); line-height: 1.45; }
.dialog-name { font-weight: 900; margin-bottom: 2px; }
.dialog-next { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 6px; font-size: 0.8em; color: var(--ui-dim); }
.dialog-next .ico { animation: nudge 1s infinite; }
@keyframes nudge { 50% { transform: translateX(3px); } }

/* Atış barı (basket + penaltı) */
.shotbar { position: fixed; left: 50%; bottom: max(84px, 16vh); translate: -50% 0; width: min(520px, calc(100vw - 2 * var(--ui-edge)));
  padding: 10px 14px 12px; }
.sb-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.sb-title { font-size: 0.8em; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ui-accent); }
.sb-legend { display: flex; align-items: center; gap: 4px; font-size: 0.78em; color: var(--ui-dim); white-space: nowrap; }
.sb-legend i { width: 10px; height: 10px; border-radius: 3px; margin-left: 6px; }
.sb-legend i.g, .sb-green { background: var(--ui-good); }
.sb-legend i.y, .sb-luck { background: var(--ui-warn); }
.sb-legend i.r, .sb-track { background: var(--ui-bad); }
.sb-track { position: relative; height: clamp(26px, 4.5vmin, 36px); border-radius: 10px; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.25);
  background-image: repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.12) 0 6px, transparent 6px 12px); }
.sb-green, .sb-luck { position: absolute; top: 0; bottom: 0; }
.sb-luck { background-image: repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.1) 0 6px, transparent 6px 12px); }
.sb-green { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85); border-radius: 4px; z-index: 1; }
.sb-mark { position: absolute; top: -9px; bottom: -9px; width: 0; z-index: 2; }
.sb-mark::before { content: ""; position: absolute; left: -4px; top: 0; bottom: 0; width: 8px; border-radius: 4px; background: #fff;
  box-shadow: 0 0 0 2px #12151f, 0 0 12px rgba(255, 255, 255, 0.9); }
.sb-mark i { position: absolute; left: -8px; top: -10px; border: 8px solid transparent; border-top: 9px solid #fff; border-bottom: 0;
  filter: drop-shadow(0 1px 0 #12151f); }
.sb-mark[data-z="green"]::before { box-shadow: 0 0 0 2px #12151f, 0 0 16px var(--ui-good); }
.sb-help { margin-top: 10px; text-align: center; font-weight: 700; }
.sb-help .g, .shottut .g { color: var(--ui-good); } .shottut .y { color: var(--ui-warn); } .shottut .r { color: var(--ui-bad); }
.sb-verb { color: var(--ui-dim); font-weight: 600; }
.shotfb { position: fixed; left: 50%; bottom: calc(max(84px, 16vh) + 100px); translate: -50% 0; pointer-events: none;
  font: 900 clamp(26px, 5vmin, 40px) var(--ui-font); letter-spacing: 0.02em; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.35), 0 0 18px currentColor; }
.shotfb.on { animation: fbpop 0.35s var(--ui-ease); }
.shotfb[data-c="g"] { color: var(--ui-good); } .shotfb[data-c="y"] { color: var(--ui-warn); } .shotfb[data-c="r"] { color: var(--ui-bad); }
@keyframes fbpop { 0% { transform: scale(0.6); } 60% { transform: scale(1.12); } }
.shottut { position: fixed; left: 50%; bottom: calc(max(84px, 16vh) + 112px); translate: -50% 0; width: min(380px, calc(100vw - 2 * var(--ui-edge)));
  padding: 12px 16px; background: var(--ui-bg-strong); border-color: rgba(255, 210, 63, 0.5); line-height: 1.5; }
.shottut b { color: var(--ui-accent); }
.shottut ol { margin: 4px 0 8px; padding-left: 1.3em; }
.tut-time { height: 3px; border-radius: 2px; background: var(--ui-accent); transform-origin: left; }
.shottut.on .tut-time { animation: tut 3s linear forwards; }
@keyframes tut { to { transform: scaleX(0); } }

/* "Başlamak için tıkla" ekranı ve ses uyarısı */
.gate { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: radial-gradient(ellipse at center, rgba(18, 22, 34, 0.35), rgba(18, 22, 34, 0.82)); transition: opacity 0.4s var(--ui-ease); }
.gate.out { opacity: 0; }
.gate-card { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; padding: 16px; font-family: var(--ui-font); color: var(--ui-text); }
.gate h1 { margin: 0; font-size: clamp(48px, 12vw, 96px); font-weight: 900; letter-spacing: -0.02em;
  text-shadow: 0 5px 0 #1e2230, 0 10px 24px rgba(0, 0, 0, 0.35); }
.gate h1 span { color: var(--ui-accent); }
.gate-go { position: relative; padding: 14px 28px; border-radius: 999px; border: 0; cursor: pointer; font: 800 clamp(16px, 2.6vmin, 20px) var(--ui-font);
  color: #1e2230; background: var(--ui-accent); box-shadow: 0 5px 0 #1e2230; }
.gate-pulse { position: absolute; inset: -6px; border-radius: inherit; border: 2px solid var(--ui-accent); animation: ring 1.6s infinite; }
@keyframes ring { from { opacity: 0.9; transform: scale(0.96); } to { opacity: 0; transform: scale(1.18); } }
.gate small { opacity: 0.75; font-size: 13px; }
body.gated .menu, body.gated .phone-link { visibility: hidden !important; }
.sound-pill { position: fixed; top: var(--ui-edge); left: 50%; translate: -50% 0; z-index: 21; padding: 7px 14px; border-radius: 999px;
  background: var(--ui-bg-strong); color: var(--ui-text); font: 700 13px var(--ui-font); pointer-events: none; }

/* Duraklatma: Arayüz bölümü */
.prefs { width: 100%; margin-top: 14px; padding-top: 12px; border-top: 2px dashed rgba(30, 34, 48, 0.2); display: flex; flex-direction: column; gap: 6px; }
.prefs-title { font-weight: 900; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.7; }
.pause .prefs button.toggle { display: flex; align-items: center; justify-content: space-between; padding: 7px 12px; font-size: 14px;
  box-shadow: 0 3px 0 #1e2230; }
.prefs .toggle i { font-style: normal; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #e9e1d3; }
.prefs .toggle.on i { background: var(--ui-good); color: #fff; }

/* Dar / alçak ekranlar */
@media (max-width: 640px) {
  .hints { max-width: calc(100vw - 2 * var(--ui-edge)); bottom: calc(var(--ui-edge) + 52px); }
  .sb-legend { display: none; }
}
@media (max-height: 520px) {
  :root { --ui-map: clamp(90px, 22vmin, 130px); }
  .dialog { bottom: calc(var(--ui-edge) + 8px); }
  .shotbar { bottom: calc(var(--ui-edge) + 48px); }
  .shotfb, .shottut { bottom: calc(var(--ui-edge) + 150px); }
}

/* Büyük harita (tam ekran) */
.bigmap { position: fixed; inset: 0; z-index: 12; background: #6f9c5a; font-family: var(--ui-font); }
.bigmap canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.bm-head { position: absolute; top: var(--ui-edge); left: 50%; translate: -50% 0; max-width: calc(100vw - 2 * var(--ui-edge) - 60px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; padding: 8px 16px; border-radius: 999px; text-align: center; }
.bm-head b { color: var(--ui-accent); letter-spacing: 0.08em; text-transform: uppercase; }
.bm-help { color: var(--ui-dim); }
.bm-legend { position: absolute; left: var(--ui-edge); bottom: var(--ui-edge); display: flex; gap: 14px; padding: 8px 14px; border-radius: 999px; }
.bm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.bm-legend i { width: 18px; height: 5px; border-radius: 3px; box-shadow: 0 0 0 1.5px #fff; }
.bm-dist:empty { display: none; }
.bm-zoom { position: absolute; right: var(--ui-edge); bottom: var(--ui-edge); display: flex; flex-direction: column; gap: 8px; }
.bm-zoom button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--ui-line); background: var(--ui-bg-strong); color: var(--ui-text);
  font: 800 22px var(--ui-font); cursor: pointer; }
.bm-zoom .bm-close { margin-top: 8px; font-size: 16px; }
.bm-cursor { position: absolute; left: -16px; top: -16px; width: 32px; height: 32px; pointer-events: none; display: none;
  border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 2px #12151f, inset 0 0 0 2px #12151f; }
.bm-cursor::after { content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: #35d0ff; }

/* Drift puanı (üst orta, alan içindeyken) */
.drift { position: fixed; top: calc(var(--ui-edge) + 44px); left: 50%; translate: -50% 0; min-width: 220px; padding: 8px 18px 10px; text-align: center; }
.drift-title { font-size: 0.75em; font-weight: 800; letter-spacing: 0.14em; color: #ff9a4a; }
.drift-combo { font: 900 clamp(26px, 4.5vmin, 38px)/1.1 var(--ui-font); font-variant-numeric: tabular-nums; transition: color 0.2s; }
.drift-combo small { font-size: 0.5em; color: var(--ui-accent); margin-left: 6px; }
.drift.live .drift-combo { color: var(--ui-accent); }
.drift.lost .drift-combo { color: var(--ui-bad); animation: shake 0.3s; }
.drift-meta { display: flex; justify-content: center; gap: 14px; font-size: 0.85em; color: var(--ui-dim); }
.drift-meta b { color: var(--ui-text); font-variant-numeric: tabular-nums; }
.drift-bar { height: 4px; margin-top: 6px; border-radius: 2px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.drift-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffd23f, #ff7a1a); }

/* Helikopter: irtifa göstergesi (sağ kenar, ortada) */
.alt { position: fixed; right: var(--ui-edge); top: 50%; translate: 0 -50%; width: 112px; padding: 10px 12px; text-align: center; background: var(--ui-bg-strong); }
.alt-title { font-size: 0.72em; font-weight: 800; letter-spacing: 0.14em; color: var(--ui-accent); }
.alt-body { display: flex; align-items: stretch; gap: 10px; margin: 6px 0 8px; }
.alt-bar { position: relative; width: 12px; height: clamp(90px, 22vh, 170px); border-radius: 6px; background: rgba(255, 255, 255, 0.12); }
.alt-bar b { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 6px; background: linear-gradient(0deg, #35d0ff, #8fe6ff); transition: height 0.15s; }
.alt-free { position: absolute; left: -4px; right: -4px; height: 2px; background: var(--ui-good); box-shadow: 0 0 6px var(--ui-good); }
.alt-mark { position: absolute; left: -6px; width: 24px; height: 4px; margin-bottom: -2px; border-radius: 2px; background: #fff; box-shadow: 0 0 0 1.5px #12151f; transition: bottom 0.15s; }
.alt-read { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.alt-read strong { font: 900 clamp(24px, 4vmin, 32px)/1 var(--ui-font); font-variant-numeric: tabular-nums; }
.alt-read small { color: var(--ui-dim); font-weight: 700; }
.alt-read em { margin-top: 8px; font-style: normal; font-size: 0.8em; color: var(--ui-dim); font-variant-numeric: tabular-nums; }
.alt.high .alt-read strong { color: var(--ui-good); }
.alt-hull { display: flex; align-items: center; gap: 6px; font-size: 0.75em; color: var(--ui-dim); }
.alt-hull div { flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.alt-hull i { display: block; height: 100%; background: var(--ui-good); transition: width 0.25s; }
.alt[data-hp="mid"] .alt-hull i { background: var(--ui-warn); } .alt[data-hp="low"] .alt-hull i { background: var(--ui-bad); }
.alt-state { margin-top: 6px; font-size: 0.75em; font-weight: 700; line-height: 1.25; }
@media (max-height: 520px) { .alt { top: auto; bottom: calc(var(--ui-edge) + 56px); translate: none; } }
