/* ==========================================================================
   Titan Clash — Oyun içi arayüz
   Lobiyle aynı kimlik: gece mavisi yarı saydam paneller, dar başlık yazısı
   (Big Shoulders), sade gövde yazısı (Familjen Grotesk), oyuncunun kendi rengi vurgu.
   ========================================================================== */

:root {
  --g-ink:    #EAF0F7;
  --g-muted:  #8C99AE;
  --g-line:   rgba(234, 240, 247, 0.12);
  --g-panel:  rgba(8, 18, 32, 0.9);   /* %10 saydam */
  --g-accent: #00D0FF;
  --g-red:    #FF5A6A;
  --g-green:  #3DDC84;
  --g-body:   'Familjen Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --g-cond:   'Big Shoulders', 'Big Shoulders Display', 'Arial Narrow', sans-serif;
}

html, body, #gameCanvas { background: #0A1F36; }

.g-panel {
  position: fixed;
  z-index: 10;
  border: 1px solid var(--g-line);
  border-radius: 12px;
  background: var(--g-panel);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  color: var(--g-ink);
  font-family: var(--g-body);
  -webkit-font-smoothing: antialiased;
}
.g-panel button { font: inherit; color: inherit; }
.g-panel b { font-weight: 600; color: var(--g-ink); }

/* Oyun başlamadan gizli */
.g-card, .g-power { opacity: 0; pointer-events: none; transition: opacity 0.35s ease, transform 0.35s ease; }
.g-card.visible, .g-power.visible { opacity: 1; pointer-events: auto; }

/* ── Geliştirici bilgisi ─────────────────────────────────────────────────── */
#hud {
  position: fixed; left: 16px; bottom: 64px; z-index: 10;
  display: flex; flex-direction: column; gap: 2px;
  font: 11px ui-monospace, Consolas, monospace;
  color: rgba(234, 240, 247, 0.6);
  pointer-events: none;
}
#hud[hidden] { display: none; }

/* ── Ülke kartı (sol üst) ────────────────────────────────────────────────── */
.g-card {
  top: 16px; left: 16px;
  width: 268px;
  padding: 14px 16px 14px;
  overflow: hidden;
  transform: translateY(-6px);
}
.g-card.visible { transform: none; }
.g-card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--g-accent);
}

.g-card-head { display: flex; align-items: center; gap: 8px; }
.g-swatch { width: 10px; height: 10px; border-radius: 3px; background: var(--g-accent); flex: none; box-shadow: 0 0 0 1px rgba(234, 240, 247, 0.45); }
.g-name { font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-rank { margin-left: auto; font-size: 0.8rem; color: var(--g-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.g-troops { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; }
#hud-troops {
  font-family: var(--g-cond);
  font-weight: 900;
  font-size: 3rem;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
  transition: color 0.2s;
}
#hud-troops.is-drop { color: var(--g-red); }
.g-rate { font-size: 0.9rem; font-weight: 600; color: var(--g-green); font-variant-numeric: tabular-nums; }
.g-rate.full { color: #F5B700; }

.g-cap { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.g-cap-bar { flex: 1; height: 4px; border-radius: 2px; background: rgba(234, 240, 247, 0.1); overflow: hidden; }
.g-cap-bar span { display: block; height: 100%; width: 0; background: var(--g-accent); border-radius: inherit; transition: width 0.15s linear; }
#hud-cap { font-size: 0.78rem; color: var(--g-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Süren saldırılar (kartın içinde) */
.g-attacks { display: flex; flex-direction: column; gap: 6px; }
.g-attacks:not(:empty) { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--g-line); }
.g-attack { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; column-gap: 8px; animation: g-in 0.2s ease; }
@keyframes g-in { from { opacity: 0; transform: translateY(-4px); } }
.g-attack-icon { width: 18px; height: 18px; display: grid; place-items: center; color: var(--g-red); }
.g-attack.is-neutral .g-attack-icon { color: var(--g-green); }
.g-attack-name { font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-attack-name i { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 2px; vertical-align: 0; box-shadow: 0 0 0 1px rgba(234, 240, 247, 0.35); }
.g-attack-troops { font-family: var(--g-cond); font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.g-attack-bar { grid-column: 2 / 5; height: 3px; margin-top: 4px; border-radius: 2px; background: rgba(234, 240, 247, 0.08); overflow: hidden; }
.g-attack-bar span { display: block; height: 100%; background: var(--g-red); border-radius: inherit; transition: width 0.12s linear; }
.g-attack.is-neutral .g-attack-bar span { background: var(--g-green); }

/* ── Sıralama (sağ üst) ──────────────────────────────────────────────────── */
.g-board { top: 16px; right: 16px; width: 264px; padding: 6px 6px 0; }
.g-board-head { display: flex; align-items: baseline; justify-content: space-between; padding: 8px 10px 6px; }
.g-board-title { font-family: var(--g-cond); font-weight: 900; font-size: 1.3rem; letter-spacing: 0.02em; }
.g-board-time { font-size: 0.82rem; color: var(--g-muted); font-variant-numeric: tabular-nums; }

#scoreboard-list { list-style: none; margin: 0; padding: 0; }
.g-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  column-gap: 8px;
  padding: 5px 10px 6px;
  border-radius: 7px;
  font-size: 0.86rem;
}
.g-row-rank { color: var(--g-muted); font-variant-numeric: tabular-nums; font-size: 0.78rem; }
.g-row:first-child .g-row-rank { color: #F5C518; font-weight: 700; }
.g-row-name { display: flex; align-items: center; gap: 7px; min-width: 0; }
.g-row-name span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-row-dot { width: 8px; height: 8px; border-radius: 2px; flex: none; box-shadow: 0 0 0 1px rgba(234, 240, 247, 0.35); }
.g-row-pct { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 0.82rem; }
.g-row-bar { grid-column: 2 / 4; height: 2px; margin-top: 4px; border-radius: 1px; background: rgba(234, 240, 247, 0.06); overflow: hidden; }
.g-row-bar span { display: block; height: 100%; border-radius: inherit; }
.g-row.is-player { background: color-mix(in srgb, var(--g-accent) 16%, transparent); }
.g-row.is-player .g-row-name { font-weight: 600; }
.g-row-gap { height: 1px; margin: 3px 10px; background: var(--g-line); list-style: none; }

.g-board-foot {
  display: flex; justify-content: space-between; gap: 8px;
  margin: 6px -6px 0;
  padding: 9px 16px 10px;
  border-top: 1px solid var(--g-line);
  font-size: 0.78rem;
  color: var(--g-muted);
  font-variant-numeric: tabular-nums;
}

/* ── Mesajlar (üst orta) ─────────────────────────────────────────────────── */
.g-toasts {
  position: fixed;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 11;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  pointer-events: none;
  font-family: var(--g-body);
}
.g-toast {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px 8px;
  border: 1px solid var(--g-line);
  border-radius: 999px;
  background: var(--g-panel);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--g-ink);
  font-size: 0.9rem;
  white-space: nowrap;
  animation: g-in 0.25s ease;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.g-toast::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--g-muted); flex: none; }
.g-toast.is-good::before { background: var(--g-green); }
.g-toast.is-bad::before  { background: var(--g-red); }
.g-toast.is-info::before { background: var(--g-accent); }
.g-toast.is-old { opacity: 0; transform: translateY(-6px); }

/* ── Saldırı gücü (alt orta) ─────────────────────────────────────────────── */
.g-power {
  left: 50%; bottom: 16px;
  width: min(440px, calc(100vw - 200px));
  padding: 12px 16px 12px;
  transform: translate(-50%, 6px);
}
.g-power.visible { transform: translate(-50%, 0); }
.g-power-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.g-power-top label { font-size: 0.85rem; color: var(--g-muted); }
.g-power-val { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
#spend-val { font-family: var(--g-cond); font-weight: 900; font-size: 1.5rem; line-height: 1; }
#spend-abs { font-size: 0.82rem; color: var(--g-muted); }

#spend-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 22px;
  margin: 4px 0 6px;
  background: transparent;
  cursor: pointer;
  --fill: 50%;
}
#spend-slider::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, var(--g-accent) var(--fill), rgba(234, 240, 247, 0.12) var(--fill));
}
#spend-slider::-moz-range-track { height: 6px; border-radius: 3px; background: rgba(234, 240, 247, 0.12); }
#spend-slider::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--g-accent); }
#spend-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px; margin-top: -6px;
  border-radius: 50%; background: #fff; border: 4px solid var(--g-accent);
}
#spend-slider::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 4px solid var(--g-accent); }
#spend-slider:focus-visible { outline: 2px solid var(--g-accent); outline-offset: 4px; border-radius: 4px; }

.g-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.g-presets button {
  height: 30px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--g-line);
  border-radius: 7px;
  background: transparent;
  font-size: 0.82rem; font-weight: 600;
  color: var(--g-muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}
.g-presets kbd {
  font: 600 0.68rem var(--g-body);
  padding: 0 4px;
  border: 1px solid currentColor;
  border-radius: 3px;
  opacity: 0.6;
}
.g-presets button:hover { color: var(--g-ink); border-color: rgba(234, 240, 247, 0.3); }
.g-presets button.active { color: var(--g-on-accent, #06101E); background: var(--g-accent); border-color: var(--g-accent); }

/* ── Yakınlaştırma (sağ alt) ─────────────────────────────────────────────── */
.g-zoom {
  position: fixed; right: 16px; bottom: 16px; z-index: 10;
  display: flex; flex-direction: column;
  border: 1px solid var(--g-line);
  border-radius: 10px;
  background: var(--g-panel);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  overflow: hidden;
}
.g-zoom button {
  width: 42px; height: 40px;
  border: 0; background: transparent;
  color: var(--g-ink);
  font: 500 1.4rem/1 var(--g-body);
  cursor: pointer;
}
.g-zoom button + button { border-top: 1px solid var(--g-line); }
.g-zoom button:hover { background: rgba(234, 240, 247, 0.07); }

/* ── Çıkış (sol alt) ─────────────────────────────────────────────────────── */
.g-exit {
  position: fixed; left: 16px; bottom: 16px; z-index: 10;
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 14px;
  border: 1px solid var(--g-line);
  border-radius: 999px;
  background: var(--g-panel);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--g-muted);
  font: 500 0.85rem var(--g-body);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.g-exit:hover { color: #FF7A85; border-color: rgba(255, 122, 133, 0.5); }

/* ── Fare bilgisi (imlecin yanında) ──────────────────────────────────────── */
.g-tip {
  position: fixed; z-index: 12;
  padding: 6px 10px 7px;
  border: 1px solid var(--g-line);
  border-radius: 8px;
  background: rgba(8, 18, 32, 0.92);
  color: var(--g-ink);
  font: 500 0.82rem var(--g-body);
  white-space: nowrap;
  pointer-events: none;
}
.g-tip[hidden] { display: none; }
.g-tip small { display: block; color: var(--g-muted); font-size: 0.76rem; margin-top: 1px; }

/* ── Elendin ─────────────────────────────────────────────────────────────── */
#game-over {
  position: fixed; inset: 0; z-index: 10000;
  display: grid; place-items: center;
  background: rgba(3, 8, 16, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-family: var(--g-body);
}
.g-over {
  width: min(420px, calc(100vw - 32px));
  padding: 32px;
  border: 1px solid var(--g-line);
  border-top: 2px solid var(--g-red);
  border-radius: 12px;
  background: #0C1A30;
  color: var(--g-ink);
  text-align: center;
}
.g-over-title {
  font-family: 'Big Shoulders Stencil', 'Big Shoulders Stencil Display', var(--g-cond);
  font-weight: 900; font-size: 4.5rem; line-height: 0.9;
  color: var(--g-red);
}
.g-over p { margin: 14px 0 24px; color: var(--g-muted); line-height: 1.5; }
#btn-restart {
  height: 48px; padding: 0 26px;
  border: 0; border-radius: 8px;
  background: var(--g-ink); color: #06101E;
  font: 800 1.25rem var(--g-cond);
  cursor: pointer;
}

@media (max-width: 860px) {
  .g-card { width: 210px; }
  #hud-troops { font-size: 2.2rem; }
  .g-board { width: 200px; }
  .g-board-foot { display: none; }
  .g-power { width: calc(100vw - 32px); bottom: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .g-card, .g-power, .g-toast, .g-attack { transition: none; animation: none; }
}

/* Saldırı / gemi iptal düğmesi */
.g-attack-cancel {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border: 1px solid var(--g-line);
  border-radius: 6px;
  background: transparent;
  color: var(--g-muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}
.g-attack-cancel:hover { color: #fff; background: var(--g-red); border-color: var(--g-red); }
.g-attack.is-ship .g-attack-icon { color: #7CC4FF; }
.g-attack.is-ship .g-attack-bar span { background: #7CC4FF; }

/* ── Bildirimler (sağ alt, yakınlaştırma düğmelerinin üstü) ──────────────── */
.g-notices {
  position: fixed;
  right: 16px; bottom: 112px;
  z-index: 11;
  width: min(340px, calc(100vw - 32px));
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
  pointer-events: none;
  font-family: var(--g-body);
}
.g-notice {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 10px;
  max-width: 100%;
  padding: 9px 14px 10px 12px;
  border: 1px solid var(--g-line);
  border-left: 3px solid var(--g-muted);
  border-radius: 10px;
  background: var(--g-panel);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
  color: var(--g-ink);
  font-size: 0.88rem;
  line-height: 1.35;
  animation: g-notice-in 0.25s ease;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.g-notice.is-bad  { border-left-color: var(--g-red); }
.g-notice.is-good { border-left-color: var(--g-green); }
.g-notice.is-info { border-left-color: var(--g-accent); }
.g-notice.is-gold { border-left-color: #F5C518; }
.g-notice-dot { width: 10px; height: 10px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(234, 240, 247, 0.4); }
.g-notice b { font-weight: 600; }
.g-notice.is-old { opacity: 0; transform: translateX(12px); }
@keyframes g-notice-in { from { opacity: 0; transform: translateX(16px); } }
@media (prefers-reduced-motion: reduce) { .g-notice { animation: none; transition: none; } }

/* Sana yönelen saldırılar */
.g-attack.is-incoming {
  margin: 0 -8px;
  padding: 6px 8px 7px;
  border-radius: 8px;
  background: rgba(255, 90, 106, 0.12);
}
.g-attack.is-incoming .g-attack-icon { color: var(--g-red); }
.g-attack.is-incoming .g-attack-troops { color: #FF9AA4; }
.g-attack.is-incoming .g-attack-bar span { background: var(--g-red); }
.g-attack-counter {
  height: 24px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: var(--g-red);
  color: #fff;
  font: 600 0.76rem var(--g-body);
  cursor: pointer;
  white-space: nowrap;
}
.g-attack-counter:hover { filter: brightness(1.12); }

/* Tıklanınca haritada gösterilen öğeler */
.g-notice.is-link { pointer-events: auto; cursor: pointer; }
.g-notice.is-link:hover { border-color: rgba(234, 240, 247, 0.35); background: rgba(14, 28, 50, 0.92); }
.g-row[data-id] { cursor: pointer; }
.g-row[data-id]:hover { background: rgba(234, 240, 247, 0.06); }
.g-row.is-player[data-id]:hover { background: color-mix(in srgb, var(--g-accent) 22%, transparent); }
.g-attack { cursor: pointer; border-radius: 6px; }
.g-attack:hover .g-attack-name { text-decoration: underline; text-underline-offset: 2px; }

/* ── Vinyet: kenarlara doğru yumuşak kararma (odak ortadaki savaşta) ─────── */
#vignette {
  position: fixed; inset: 0;
  z-index: 5;
  pointer-events: none;
  background:
    radial-gradient(ellipse 75% 70% at 50% 50%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.28) 82%, rgba(0, 0, 0, 0.55) 100%);
}

/* ── Sıralamada unvan ───────────────────────────────────────────────────── */
.g-row-title { font-style: normal; font-weight: 800; font-size: 0.72rem; letter-spacing: 0.02em; color: #FFC24B; }

/* ── Taktik emoji (sol alt, Savaş Bileti göstergesinin üstünde) ─────────── */
.g-emote { position: fixed; left: 16px; bottom: 108px; z-index: 11; display: none; align-items: center; gap: 2px; }
.g-emote.visible { display: inline-flex; }
.g-emote-btn, .g-emote-more {
  height: 38px; border: 1px solid var(--g-line); background: var(--g-panel);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); color: var(--g-ink); cursor: pointer;
}
.g-emote-btn { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px 0 9px; border-radius: 999px 6px 6px 999px; overflow: hidden; }
.g-emote-btn span { font-size: 20px; line-height: 1; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.g-emote-btn kbd { font: 600 0.68rem var(--g-body); color: var(--g-muted); border: 1px solid var(--g-line); border-radius: 4px; padding: 1px 5px; }
.g-emote-btn.is-empty span { filter: grayscale(1); opacity: 0.5; }
.g-emote-btn::after { content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: #FFC24B; }
.g-emote-btn.is-cool::after { animation: g-emote-cool 2.5s linear; }
@keyframes g-emote-cool { from { width: 100%; } to { width: 0; } }
.g-emote-btn:hover, .g-emote-more:hover { border-color: rgba(255, 194, 75, 0.55); }
.g-emote-more { width: 30px; display: grid; place-items: center; border-radius: 6px 999px 999px 6px; color: var(--g-muted); }
.g-emote-menu {
  position: absolute; left: 0; bottom: calc(100% + 8px); width: 236px; padding: 10px;
  border: 1px solid var(--g-line); border-radius: 12px; background: rgba(8, 18, 32, 0.96);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); color: var(--g-ink); font: 500 0.8rem var(--g-body);
}
.g-emote-menu[hidden] { display: none; }
.g-emote-menu p { margin: 0 0 8px; color: var(--g-muted); font-size: 0.74rem; }
.g-emote-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.g-emote-grid button {
  height: 38px; border: 1px solid var(--g-line); border-radius: 9px; background: rgba(234, 240, 247, 0.04);
  font-size: 20px; cursor: pointer; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
.g-emote-grid button:hover { background: rgba(234, 240, 247, 0.1); }
.g-emote-grid button.is-on { border-color: #3DDC84; box-shadow: 0 0 0 1px #3DDC84 inset; }
.g-emote-get { height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: #FFC24B; color: #241500; font: 700 0.78rem var(--g-body); cursor: pointer; }

/* ── Süreli mod: son saniyeler ──────────────────────────────────────────── */
#stat-time.is-urgent { color: var(--g-red); font-weight: 700; animation: g-urgent 1s ease-in-out infinite; }
@keyframes g-urgent { 50% { opacity: 0.45; } }

/* ── Harita yükleniyor ──────────────────────────────────────────────────── */
.g-loading { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; background: rgba(5, 12, 24, 0.82); backdrop-filter: blur(6px); }
.g-loading.hidden { display: none; }
.g-loading-in { display: grid; justify-items: center; gap: 10px; color: var(--g-ink); font-family: var(--g-body); }
.g-loading-in b { font-family: var(--g-cond); font-weight: 900; font-size: 1.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.g-loading-in span:last-child { color: var(--g-muted); }
.g-spinner { width: 42px; height: 42px; border-radius: 50%; border: 3px solid rgba(234, 240, 247, 0.15); border-top-color: var(--g-accent); animation: g-spin 0.8s linear infinite; }
@keyframes g-spin { to { transform: rotate(360deg); } }

/* ── Maç sonu ───────────────────────────────────────────────────────────── */
#match-end { font-family: var(--g-body); position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(5, 12, 24, 0.6); backdrop-filter: blur(3px); }
#match-end.hidden { display: none; }
.g-end { width: min(480px, calc(100vw - 32px)); text-align: center; }
.g-end-k { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--g-muted); }
#match-end.is-win .g-over-title { color: #FFC24B; text-shadow: 0 0 30px rgba(255, 194, 75, 0.45); }
.g-end-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 22px; }
.g-end-stats div { padding: 10px 6px; border-radius: 12px; border: 1px solid var(--g-line); background: rgba(234, 240, 247, 0.04); }
.g-end-stats dt { font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--g-muted); }
.g-end-stats dd { margin: 3px 0 0; font-family: var(--g-cond); font-weight: 800; font-size: 1.35rem; }
.g-end-actions { display: flex; gap: 10px; justify-content: center; }
.g-end-actions button { height: 44px; padding: 0 22px; border: 0; border-radius: 12px; background: var(--g-accent); color: var(--g-on-accent, #04121A); font: 700 0.95rem var(--g-body); cursor: pointer; }
.g-end-actions button.is-ghost { background: none; border: 1px solid rgba(255, 194, 75, 0.55); color: #FFC24B; }
#match-end .g-over-title { color: var(--g-ink); font-size: 4rem; }
#match-end .g-over { border-top-color: var(--g-accent); }
#match-end.is-win .g-over { border-top-color: #FFC24B; }
