* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Agar.io klasiği: düz koyu-gri panel, nötr beyaz vurgu, cyan-neon yok */
  --bg: #14161c;
  --panel: #1c1f27;
  --line: rgba(255, 255, 255, 0.1);
  --text: #eef1f6;
  --dim: rgba(235, 240, 248, 0.5);
  --accent: #f2f5fa;
  --danger: #ff5566;
}

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  touch-action: none;
}

#game { display: block; cursor: crosshair; }

.hidden { display: none !important; }

/* --- HUD --- */

#hud { position: fixed; inset: 0; pointer-events: none; }

.stats {
  position: absolute;
  top: 18px; left: 18px;
  display: flex;
  gap: 10px;
}

.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 14px;
  min-width: 84px;
}

.stat .label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--dim);
  margin-bottom: 2px;
}

.stat .value {
  display: block;
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Round göstergesi — üst orta */
.roundbar {
  position: absolute;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  width: 230px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px 10px;
}

.rb-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 7px;
}

.roundbar .map-name {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.roundbar .timer {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.roundbar .bar {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.roundbar .fill {
  height: 100%;
  width: 100%;
  background: var(--accent);
  transition: width 0.2s linear, background-color 0.4s ease;
}

/* Arena daralmaya başladığında çubuk uyarıya döner */
.roundbar .fill.shrinking { background: var(--danger); }

/* Round sonu kütle çarpanı — yaklaştıkça daha dikkat çekici */
#mult {
  margin-top: 6px;
  text-align: center;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--dim);
}

#mult b {
  font-size: 13px;
  letter-spacing: 0;
  color: #ffd166;
}

#mult.hot b { color: #ff8a3d; }

#mult.blazing b {
  color: #ff4a5e;
  animation: multPulse 0.7s ease-in-out infinite;
}

@keyframes multPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.72; transform: scale(1.14); }
}

/* Ölüm sonrası geri sayım */
#respawn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

#respawn .rs-label {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--dim);
  margin-bottom: 4px;
}

#respawn .rs-count {
  font-size: 72px;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
}

.board {
  position: absolute;
  top: 18px; right: 18px;
  width: 190px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

.board h3 {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--dim);
  font-weight: 600;
  margin-bottom: 8px;
}

.board ol { list-style: none; }

.board li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  padding: 3px 0;
  color: rgba(220, 230, 247, 0.72);
}

.board li.me { color: #fff; font-weight: 700; }
.board li.dead { opacity: 0.45; }   /* ölü ama yeniden doğacak: sırası korunur */

.board .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.board .nm {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board .ms {
  font-variant-numeric: tabular-nums;
  color: var(--dim);
}

.board li.me .ms { color: var(--accent); }

#minimap {
  position: absolute;
  bottom: 18px; right: 18px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(6, 10, 18, 0.7);
}

#dash-btn {
  display: none;
  position: absolute;
  bottom: 26px; left: 26px;
  width: 92px; height: 92px;
  border-radius: 50%;
  border: 2px solid rgba(120, 255, 190, 0.5);
  background: rgba(20, 60, 50, 0.6);
  color: #7cffbe;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  pointer-events: auto;
}

/* --- Katmanlar --- */

.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(10, 12, 16, 0.82);
  padding: 20px;
}

/* Menü: reklam | panel | reklam. Reklam yoksa panel yine ortada kalır. */
#menu {
  grid-auto-flow: column;
  gap: 26px;
  align-items: center;
  justify-content: center;
}

/* --- Google AdSense yuvaları ---
   Boşken hiç yer kaplamazlar (:empty). AdSense kodu içine konunca
   160x600 dikey banner boyutunda görünür olurlar. */
.ad-rail {
  display: none;
  flex-shrink: 0;
}

.ad-slot {
  width: 160px;
  min-height: 600px;
  border-radius: 12px;
  overflow: hidden;
}

/* Yuva boşken tamamen kaybolsun — yer tutup düzeni kaydırmasın */
.ad-slot:empty { display: none; }

/* Reklamlara ancak geniş ekranda yer var */
@media (min-width: 1180px) {
  .ad-rail { display: block; }
}

.panel {
  width: 100%;
  max-width: 400px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.panel h1 {
  font-size: 54px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text);
}

.panel h2 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--danger);
}

.tag {
  color: var(--dim);
  font-size: 14px;
  margin: 6px 0 16px;
}

/* --- Cüzdan --- */
.wallet {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(5, 10, 20, 0.6);
  border: 1px solid var(--line);
}

.wallet .w-label {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--dim);
}

.wallet .w-value {
  flex: 1;
  text-align: left;
  font-size: 19px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #ffd166;
}

#shop-btn {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 209, 102, 0.4);
  background: rgba(60, 48, 18, 0.6);
  color: #ffd166;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  cursor: pointer;
}

#shop-btn:hover { filter: brightness(1.18); }

/* --- Mağaza --- */
.shop-panel {
  max-width: 620px;
  text-align: left;
}

.shop-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.shop-head h2 {
  flex: 1;
  font-size: 26px;
  color: var(--text);
  text-align: left;
}

.shop-wallet {
  font-size: 14px;
  font-weight: 700;
  color: #ffd166;
  font-variant-numeric: tabular-nums;
}

.shop-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.shop-tabs .tab {
  padding: 7px 13px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(5, 10, 20, 0.5);
  color: var(--dim);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.shop-tabs .tab.active {
  background: rgba(30, 80, 120, 0.5);
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--text);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(94px, 1fr));
  gap: 8px;
  max-height: 46vh;
  overflow-y: auto;
  padding-right: 4px;
}

.item {
  padding: 9px 6px 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(5, 10, 20, 0.55);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.item:hover { border-color: rgba(255, 255, 255, 0.32); }

.item .glyph {
  display: block;
  font-size: 30px;
  line-height: 1.15;
  margin-bottom: 4px;
}

/* Renk görünümleri için emoji yerine daire */
.item .swatch {
  display: block;
  width: 32px; height: 32px;
  margin: 2px auto 6px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
}

.item .nm {
  display: block;
  font-size: 10.5px;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item .price {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 700;
  color: #ffd166;
}

.item.owned .price { color: rgba(120, 255, 190, 0.85); }

.item.equipped {
  border-color: rgba(120, 255, 190, 0.7);
  background: rgba(20, 60, 50, 0.45);
}

.item.locked { opacity: 0.5; }
.item.locked .price { color: var(--danger); }

.shop-note {
  margin-top: 14px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--dim);
}

@media (max-width: 560px) {
  .shop-panel { max-width: 100%; }
  .shop-grid { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); max-height: 40vh; }
  .item .glyph { font-size: 25px; }
}

#name-input {
  width: 100%;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(5, 10, 20, 0.8);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  text-align: center;
  outline: none;
}

#name-input:focus { border-color: rgba(255, 255, 255, 0.35); }

#play-btn, #retry-btn {
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: #4cae4f;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.15s ease;
}

#play-btn:hover, #retry-btn:hover, #online-btn:hover { filter: brightness(1.12); }
#play-btn:active, #retry-btn:active, #online-btn:active { transform: translateY(1px); }

#online-btn {
  width: 100%;
  margin-top: 9px;
  padding: 13px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(20, 40, 62, 0.7);
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.15s ease;
}

#online-btn:disabled { opacity: 0.6; cursor: default; }

.net-note {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--danger);
}

#lobby-badge {
  position: absolute;
  bottom: 18px; left: 18px;
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid rgba(120, 255, 190, 0.35);
  color: #7cffbe;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

body.touch #lobby-badge {
  bottom: auto; top: 52px; left: 10px;
  font-size: 9px;
  padding: 4px 9px;
}

/* --- Lobi seçici --- */
.lobbies {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* Lobi seçimi opsiyonel: varsayılan kapalı, oktan açılır */
.lob-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border: none;
  background: none;
  color: var(--dim);
  font-family: inherit;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  cursor: pointer;
}

.lob-toggle:hover { color: var(--text); }

/* Seçili lobi varsa toggle satırında görünür */
.lob-toggle .lob-pick {
  flex: 1;
  text-align: right;
  letter-spacing: 0;
  font-size: 11.5px;
  font-weight: 700;
  color: #7cffbe;
}

.lob-toggle .chev {
  font-size: 15px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.lob-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }

.lob-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 9px;
}

.lob-grid.hidden { display: none; }

.lob {
  padding: 7px 3px 6px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(5, 10, 20, 0.55);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.lob:hover { border-color: rgba(255, 255, 255, 0.35); }

.lob .ln {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.lob .lc {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  color: var(--dim);
}

.lob.sel {
  border-color: rgba(120, 255, 190, 0.7);
  background: rgba(20, 60, 50, 0.45);
}

.lob.sel .lc { color: #7cffbe; }

.lob.full {
  opacity: 0.42;
  cursor: default;
}

.lob.full .lc { color: var(--danger); }

/* --- Dil seçici --- */
#lang-select {
  margin-top: 16px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(5, 10, 20, 0.7);
  color: var(--dim);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}

#lang-select:focus { outline: none; border-color: rgba(255, 255, 255, 0.35); }

.fine-link {
  display: block;
  margin: 10px auto 0;
  padding: 4px;
  border: none;
  background: none;
  color: var(--dim);
  font-family: inherit;
  font-size: 11px;
  text-decoration: underline;
  cursor: pointer;
}

.fine-link:hover { color: var(--text); }

/* --- Çerez izni: sağ altta küçük kart --- */
.consent {
  position: fixed;
  right: 16px; bottom: 16px;
  z-index: 40;
  width: 260px;
  padding: 12px 13px 11px;
  border-radius: 12px;
  background: rgba(10, 16, 26, 0.96);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.consent.hidden { display: none; }

.consent .c-emoji {
  font-size: 20px;
  line-height: 1;
  float: left;
  margin: 1px 9px 0 0;
}

.consent .c-text {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--dim);
  margin-bottom: 10px;
}

.c-btns { display: flex; gap: 7px; clear: both; }

.c-btns button {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(10, 18, 30, 0.8);
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.c-btns button:hover { filter: brightness(1.2); }

.c-btns .primary {
  border: none;
  background: #4cae4f;
  color: #ffffff;
}

.c-btns .ghost { color: var(--dim); }

/* Çerez kartı yalnızca menüde görünür (oynarken değil), o yüzden mobilde de
   sağ altta kalabilir — joystick menüde yok. */
@media (max-width: 560px) {
  .consent { width: 210px; right: 10px; bottom: 10px; }
  .consent .c-text { font-size: 11px; }
}

.how {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: left;
  display: grid;
  gap: 9px;
}

.how .row {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--dim);
}

.how .row b { color: var(--text); font-weight: 600; }
.how .row.danger b { color: var(--danger); }

/* Round sonu ekranı */
.re-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--dim);
  margin-bottom: 8px;
}

#re-winner {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
}

.earned {
  margin-top: 12px;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--dim);
}

.earned b {
  font-size: 17px;
  letter-spacing: 0;
  color: #ffd166;
  margin-left: 6px;
}

.next-map {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.next-map .label {
  display: block;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--dim);
  margin-bottom: 5px;
}

.next-map b {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.next-map .desc {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--dim);
  line-height: 1.4;
}

.final {
  display: flex;
  gap: 12px;
  margin: 22px 0 6px;
}

.final > div {
  flex: 1;
  background: rgba(5, 10, 20, 0.6);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}

.final .label {
  display: block;
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--dim);
  margin-bottom: 4px;
}

.final .value {
  display: block;
  font-size: 26px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.panel h1 { font-size: 54px; }

@media (max-width: 560px) {
  .roundbar .map-name { font-size: 11px; }
  .roundbar .timer { font-size: 13px; }
}

/* ---------------------------------------------------------------
   Dokunmatik düzen. JS `body.touch` ekliyor (pointer media query'si
   her tarayıcıda güvenilir değil). Bu bloktaki her şey mobile özel;
   masaüstü görünümü hiç etkilenmiyor.
   --------------------------------------------------------------- */

#dash-btn, #stick, #kill-chip { display: none; }

#menu-btn {
  display: none;
  position: absolute;
  top: 10px; right: 10px;
  width: 34px; height: 34px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 16px;
  line-height: 1;
  pointer-events: auto;
  z-index: 5;
}

body.touch #menu-btn,
body.touch #dash-btn,
body.touch #stick { display: block; }
/* flex olduğu için ayrı yazılmalı — blok kuralı burada yanlış düzen verirdi */
body.touch #kill-chip { display: flex; }

/* Mobilde ekranı boşaltıyoruz: üst istatistikler, sıralama ve ağ rozeti gizli */
body.touch .stats,
body.touch .board,
body.touch #net-badge { display: none; }

/* Tek kalan sayaç: düşürme, sol üstte küçük */
#kill-chip {
  position: absolute;
  top: 10px; left: 10px;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

#kill-chip .skull { font-size: 13px; }

body.touch .roundbar {
  top: 8px; left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: 150px;
  padding: 5px 10px 7px;
}

/* Harita altta, ortadan biraz solda — kumandaya nefes payı bırakır */
body.touch #minimap {
  bottom: 16px;
  left: 50%;
  right: auto;
  transform: translateX(-50%) translateX(-26px);
}

/* Dash: sol altta, cooldown'da kilitli görünür */
body.touch #dash-btn {
  width: 76px; height: 76px;
  bottom: 20px; left: 16px;
  font-size: 12px;
  /* Konik dolgu geri sayımı gösterir; --cd 0..1 arası JS'ten gelir */
  background:
    conic-gradient(rgba(120, 255, 190, 0.22) calc(var(--cd, 0) * 360deg), rgba(20, 60, 50, 0.55) 0);
  transition: border-color 0.2s ease, color 0.2s ease;
}

body.touch #dash-btn.locked {
  border-color: rgba(140, 160, 180, 0.35);
  color: rgba(190, 205, 220, 0.75);
  font-size: 22px;
  font-weight: 800;
}

/* Sanal kumanda: sağ altta */
body.touch #stick {
  position: absolute;
  bottom: 16px; right: 12px;
  width: 130px; height: 130px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(10, 18, 30, 0.55);
  pointer-events: auto;
  touch-action: none;
}

#stick .ax {
  position: absolute;
  color: rgba(140, 190, 240, 0.35);
  font-size: 10px;
  line-height: 1;
}

#stick .up    { top: 8px;  left: 50%; transform: translateX(-50%); }
#stick .down  { bottom: 8px; left: 50%; transform: translateX(-50%); }
#stick .left  { left: 8px;  top: 50%; transform: translateY(-50%); }
#stick .right { right: 8px; top: 50%; transform: translateY(-50%); }

#stick-knob {
  position: absolute;
  top: 50%; left: 50%;
  width: 52px; height: 52px;
  margin: -26px 0 0 -26px;
  border-radius: 50%;
  background: #dfe6ee;
  border: 2px solid rgba(180, 240, 255, 0.6);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  will-change: transform;
}

/* Küçük ekranda panelleri sıkıştır */
@media (max-width: 560px) {
  #respawn .rs-count { font-size: 56px; }
  #respawn .rs-label { font-size: 10px; }

  .panel { padding: 24px 20px; }
  .panel h1 { font-size: 40px; }
  .how .row { grid-template-columns: 96px 1fr; font-size: 11.5px; }
}

/* --- Açılış animasyonu (js/intro.js) --- */
#intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 28px;
  justify-content: center;
  background: var(--bg);
  transition: opacity 0.4s ease;
}
#intro.out { opacity: 0; pointer-events: none; }
.intro-logo { width: min(62vw, 62vh, 340px); height: auto; overflow: visible; }
.intro-logo * { transform-box: fill-box; transform-origin: center; }

/* Gezegen savrularak gelir: dönerek büyür, hafif taşar, yerine oturur */
.intro-rock { animation: intro-fling 0.75s cubic-bezier(0.2, 0.9, 0.3, 1.25) both; }
@keyframes intro-fling {
  0%   { transform: translateX(-60%) scale(0.25) rotate(-200deg); opacity: 0; }
  60%  { opacity: 1; }
  100% { transform: none; }
}

/* Oturduğu anda çarpma halkası */
.intro-wave {
  fill: none;
  stroke: rgba(120, 255, 190, 0.85);
  stroke-width: 4;
  opacity: 0;
  animation: intro-wave 0.7s ease-out 0.55s both;
}
@keyframes intro-wave {
  0%   { transform: scale(0.85); opacity: 0.9; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* Yazı: oyundaki isimler gibi kalın beyaz + koyu kontur, pıt diye belirir */
.intro-word {
  font: 900 58px system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 2px;
  fill: #fff;
  stroke: rgba(20, 10, 40, 0.75);
  stroke-width: 7px;
  stroke-linejoin: round;
  paint-order: stroke;
  animation: intro-pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) 0.6s both;
}
@keyframes intro-pop {
  0%   { transform: scale(0.3); opacity: 0; }
  100% { transform: none; opacity: 1; }
}

/* Oturduktan sonra: gezegen yavaşça döner, yem noktaları etrafında dolaşır,
   yazı hafifçe nefes alır — 5 saniye boyunca sahne canlı kalsın */
.intro-spin { animation: intro-spin 14s linear 0.75s infinite; }
@keyframes intro-spin { to { transform: rotate(360deg); } }

.intro-orbit {
  transform-box: view-box;
  transform-origin: 200px 200px;
  opacity: 0;
  animation: intro-fade 0.5s ease 0.9s both, intro-spin 6s linear 0.9s infinite;
}
@keyframes intro-fade { to { opacity: 1; } }

.intro-breathe { animation: intro-breathe 2.2s ease-in-out 1.1s infinite; }
@keyframes intro-breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}

/* Yükleme çubuğu: 4.6 sn'de dolar, sonra ekran solar */
.intro-bar {
  width: min(46vw, 220px);
  height: 5px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}
.intro-bar > div {
  height: 100%;
  background: rgba(120, 255, 190, 0.85);
  transform-origin: left;
  animation: intro-load 4.4s cubic-bezier(0.4, 0, 0.3, 1) 0.2s both;
}
@keyframes intro-load {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .intro-rock, .intro-spin, .intro-orbit, .intro-breathe, .intro-wave, .intro-word { animation: none; }
  .intro-orbit { opacity: 1; }
}

/* Açılışta rastgele ipucu — yükleme çubuğunun altında */
.intro-tip {
  max-width: min(86vw, 440px);
  margin-top: -10px;
  padding: 0 16px;
  text-align: center;
  font-size: 15px;
  line-height: 1.45;
  color: var(--dim);
  animation: intro-fade 0.6s ease 0.9s both;
  opacity: 0;
}

/* --- Round sonu podyumu (js/podium.js) --- */
#podium {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  gap: 18px;
  padding: 20px 16px;
  background: rgba(10, 12, 16, 0.82);
  overflow-x: hidden;
  overflow-y: auto;
}
.pd-confetti {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}
.pd-head { text-align: center; }
.pd-round {
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--dim);
  font-weight: 700;
}
.pd-title {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 2px;
  margin-top: 4px;
}

.pd-stage {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 560px;
  border-bottom: 3px solid rgba(255, 255, 255, 0.14);   /* podyum zemini */
}
.pd-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Basamaklar: ortadaki (1.) en uzun, soldaki (2.) biraz kısa, sağdaki (3.) daha da kısa */
.pd-step {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  padding-top: 12px;
  border-radius: 10px 10px 0 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-bottom: none;
  transform-origin: bottom;
}
.p1 .pd-step { height: 190px; background: #2a2616; border-color: rgba(245, 197, 66, 0.45); }
.p2 .pd-step { height: 150px; background: #22262e; border-color: rgba(207, 214, 224, 0.4); }
.p3 .pd-step { height: 118px; background: #2a2019; border-color: rgba(208, 138, 74, 0.45); }
.pd-num { font-size: 44px; font-weight: 900; line-height: 1; }
.p1 .pd-num { color: #f5c542; font-size: 56px; }
.p2 .pd-num { color: #cfd6e0; }
.p3 .pd-num { color: #d08a4a; }
.pd-pts { font-size: 13px; font-weight: 700; color: var(--dim); letter-spacing: 1px; }

.pd-name {
  max-width: 100%;
  margin: 8px 0 8px;
  font-weight: 800;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}
.p1 .pd-name { font-size: 19px; }
.pd-col.me .pd-name::after { content: " ★"; color: #78ffbe; }

/* Karakter + madalya */
.pd-char { position: relative; }
.pd-char canvas { display: block; }
.pd-medal {
  position: absolute;
  left: 50%;
  bottom: 4%;
  width: 34%;
  aspect-ratio: 1;
  transform: translateX(-50%);
}
.pd-medal b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 900;
  color: rgba(40, 25, 0, 0.85);
  border: 3px solid rgba(0, 0, 0, 0.25);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
  z-index: 1;
}
.p1 .pd-medal b { background: #f5c542; font-size: 18px; }
.p2 .pd-medal b { background: #cfd6e0; color: rgba(30, 35, 45, 0.85); }
.p3 .pd-medal b { background: #d08a4a; color: rgba(45, 20, 0, 0.85); }
/* Kurdeleler: gövdenin üst yanlarından madalyaya iner (boyuna asılmış gibi) */
.pd-medal .rib {
  position: absolute;
  bottom: 50%;
  width: 36%;
  height: 190%;
  background: linear-gradient(90deg, #d8394f 0 33%, #f2f5fa 33% 66%, #3a6fd8 66%);
  border-radius: 2px;
  transform-origin: bottom center;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}
.pd-medal .rib.l { left: 32%; transform: rotate(28deg); }
.pd-medal .rib.r { right: 32%; transform: rotate(-28deg); }

/* --- Zamanlama (toplam 5 sn): basamaklar yükselir → karakterler iner → dans --- */
#podium.play .pd-head { animation: pd-fade 0.4s ease both; }
#podium.play .pd-step { animation: pd-rise 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.15) both; }
#podium.play .p3 .pd-step { animation-delay: 0.05s; }
#podium.play .p2 .pd-step { animation-delay: 0.15s; }
#podium.play .p1 .pd-step { animation-delay: 0.25s; }
#podium.play .pd-name { animation: pd-fade 0.4s ease both; }
#podium.play .p3 .pd-name { animation-delay: 0.45s; }
#podium.play .p2 .pd-name { animation-delay: 0.6s; }
#podium.play .p1 .pd-name { animation-delay: 0.75s; }

#podium.play .pd-dancer { animation: pd-drop 0.5s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
#podium.play .p3 .pd-dancer { animation-delay: 0.45s; }
#podium.play .p2 .pd-dancer { animation-delay: 0.6s; }
#podium.play .p1 .pd-dancer { animation-delay: 0.75s; }

/* Dans: zıpla + ezil/uzan + sağa sola sallan. Birinci daha coşkulu. */
.pd-char { transform-origin: 50% 100%; }
#podium.play .pd-char { animation: pd-dance 0.62s ease-in-out 1.1s infinite; }
#podium.play .p2 .pd-char { animation-delay: 1.25s; animation-duration: 0.7s; }
#podium.play .p3 .pd-char { animation-delay: 1.4s; animation-duration: 0.74s; }
#podium.play .p1 .pd-char { animation-name: pd-dance-big; }

@keyframes pd-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pd-rise {
  from { transform: scaleY(0); opacity: 0; }
  to   { transform: scaleY(1); opacity: 1; }
}
@keyframes pd-drop {
  from { transform: translateY(-120px) scale(0.6); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
@keyframes pd-dance {
  0%, 100% { transform: translateY(0) rotate(0) scale(1, 1); }
  20%      { transform: translateY(0) rotate(0) scale(1.08, 0.92); }
  45%      { transform: translateY(-16px) rotate(-8deg) scale(0.96, 1.05); }
  70%      { transform: translateY(0) rotate(0) scale(1.06, 0.94); }
  85%      { transform: translateY(-6px) rotate(7deg) scale(1, 1); }
}
@keyframes pd-dance-big {
  0%, 100% { transform: translateY(0) rotate(0) scale(1, 1); }
  20%      { transform: translateY(0) rotate(0) scale(1.1, 0.9); }
  45%      { transform: translateY(-26px) rotate(10deg) scale(0.95, 1.07); }
  70%      { transform: translateY(0) rotate(0) scale(1.08, 0.92); }
  85%      { transform: translateY(-10px) rotate(-9deg) scale(1, 1); }
}

@media (max-width: 480px) {
  .pd-stage { gap: 6px; }
  .p1 .pd-step { height: 150px; }
  .p2 .pd-step { height: 118px; }
  .p3 .pd-step { height: 92px; }
  .pd-name { font-size: 13px; }
  .p1 .pd-name { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  #podium.play .pd-char { animation: none; }
}

/* --- Birleşik round sonu: podyum solda, özet + geri sayım sağda --- */
.pd-layout {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  width: 100%;
  max-width: 1000px;
}
.pd-main {
  flex: 1 1 520px;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.pd-side {
  flex: 0 1 340px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#podium.play .pd-side { animation: pd-fade 0.5s ease 0.9s both; }

/* #roundend paneli buraya taşınınca tam ekran overlay olmaktan çıkar */
#podium #roundend {
  position: static;
  inset: auto;
  display: block;
  padding: 0;
  background: none;
}
#podium #roundend .panel {
  max-width: none;
  padding: 18px 18px 16px;
  box-shadow: none;
}
#podium .re-label,
#podium #re-winner { display: none; }
#podium .final { margin: 0 0 4px; gap: 8px; }
#podium .final > div { padding: 10px 6px; }
#podium .final .value { font-size: 22px; }
#podium .next-map { margin-top: 14px; padding-top: 12px; }

/* Geri sayım */
.pd-count {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 12px;
  padding: 14px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.pd-count-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--dim);
}
.pd-count-num {
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #78ffbe;
  min-width: 1.3em;
  text-align: right;
}
.pd-count-num.tick { animation: pd-tick 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes pd-tick {
  from { transform: scale(1.45); opacity: 0.4; }
  to   { transform: none; opacity: 1; }
}
.pd-count-bar {
  grid-column: 1 / -1;
  height: 5px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}
.pd-count-bar > div {
  height: 100%;
  background: rgba(120, 255, 190, 0.85);
  transform-origin: left;
}

/* Dar ekran: alt alta, basamaklar kısalır ki hepsi sığsın */
@media (max-width: 860px) {
  .pd-layout { flex-direction: column; gap: 16px; }
  .pd-main { flex: none; width: 100%; }
  .pd-side { flex: none; width: 100%; max-width: 440px; }
  .p1 .pd-step { height: 140px; }
  .p2 .pd-step { height: 110px; }
  .p3 .pd-step { height: 86px; }
  .pd-title { font-size: 24px; }
  #podium .next-map .desc { display: none; }
}

/* --- Arkadaşlarla oyna (özel lobi) --- */
.friends {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.fr-label {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--dim);
  margin-bottom: 9px;
}
.fr-row {
  display: grid;
  grid-template-columns: 1fr 88px auto;
  gap: 6px;
}
#create-btn, #join-code-btn {
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid rgba(120, 255, 190, 0.35);
  background: rgba(120, 255, 190, 0.08);
  color: #7cffbe;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.15s ease, transform 0.08s ease;
}
#join-code-btn {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}
#create-btn:hover, #join-code-btn:hover { filter: brightness(1.2); }
#create-btn:active, #join-code-btn:active { transform: translateY(1px); }
#create-btn:disabled, #join-code-btn:disabled, #play-btn:disabled { opacity: 0.6; cursor: default; }
#code-input {
  min-width: 0;
  padding: 11px 6px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(5, 10, 20, 0.8);
  color: var(--text);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-align: center;
  text-transform: uppercase;
  outline: none;
}
#code-input::placeholder { letter-spacing: 0.1em; font-family: inherit; font-weight: 600; }
#code-input:focus { border-color: rgba(255, 255, 255, 0.35); }

/* Özel lobi rozeti: kod + davet (tıklanabilir) */
#lobby-badge.invite {
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.1em;
}
#lobby-badge.invite b {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  letter-spacing: 0.16em;
  color: #fff;
}
#lobby-badge.invite .inv {
  padding-left: 8px;
  border-left: 1px solid rgba(120, 255, 190, 0.3);
}
#lobby-badge.invite:hover { filter: brightness(1.25); }

#toast {
  position: fixed;
  left: 50%;
  bottom: 70px;
  z-index: 50;
  max-width: min(92vw, 520px);
  transform: translateX(-50%);
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid rgba(120, 255, 190, 0.35);
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  word-break: break-all;
  pointer-events: auto;
  user-select: text;
  animation: pd-fade 0.2s ease both;
}

/* ===============================================================
   Yeni menü: takma ad ekranı → sunucular (Resmi / Topluluk / Arkadaşlarla)
   =============================================================== */
.menu-panel { max-width: 420px; padding: 18px 26px 22px; transition: max-width 0.2s ease; }
.menu-panel.wide { max-width: 640px; }

.menu-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
}
.mt-back {
  width: 34px; height: 34px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 17px;
  cursor: pointer;
}
.mt-wallet {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(255, 180, 90, 0.1);
  border: 1px solid rgba(255, 180, 90, 0.35);
  font-variant-numeric: tabular-nums;
}
.mt-wallet b { font-size: 14px; color: #ffcf8a; }
.mt-market {
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 180, 90, 0.45);
  background: rgba(255, 180, 90, 0.14);
  color: #ffcf8a;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.mt-market:hover, .mt-back:hover { filter: brightness(1.2); }

/* Ekran 1: dönen logo */
.menu-logo { display: flex; justify-content: center; margin: 4px 0 2px; }
.menu-logo .intro-logo { width: 190px; height: auto; }
.menu-logo .intro-spin { animation-duration: 10s; }
.menu-logo .intro-wave { display: none; }
.menu-panel .tag { margin: 4px 0 18px; font-size: 14.5px; color: var(--text); opacity: 0.8; }

.nick-label {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--dim);
  font-weight: 700;
  margin-bottom: 8px;
}
.nick-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
#ok-btn {
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
}
#ok-btn:hover { background: rgba(255, 255, 255, 0.14); }
.qp-hint { margin-top: 8px; font-size: 12px; color: var(--dim); min-height: 1em; }
.menu-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.menu-foot #lang-select { margin: 0; width: auto; }
.menu-foot .fine-link { margin: 0; }

/* Ekran 2: sunucular */
.srv-hello { font-size: 13px; color: var(--dim); margin: 6px 0 12px; }
.srv-hello b { color: var(--text); }
.srv-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(5, 10, 20, 0.6);
  border: 1px solid var(--line);
  margin-bottom: 12px;
}
.srv-tab {
  padding: 10px 6px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--dim);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.srv-tab.active { background: rgba(255, 255, 255, 0.1); color: var(--text); }
.srv-body { text-align: left; max-height: min(56vh, 460px); overflow-y: auto; }

.off-list { display: flex; flex-direction: column; gap: 6px; }
.off-row {
  display: grid;
  grid-template-columns: 1fr 90px 44px auto;
  align-items: center;
  gap: 12px;
  padding: 9px 10px 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(5, 10, 20, 0.45);
}
.off-row.rec { border-color: rgba(120, 255, 190, 0.45); background: rgba(120, 255, 190, 0.06); }
.off-row.full { opacity: 0.5; }
.or-main { display: flex; flex-direction: column; min-width: 0; }
.or-name { font-weight: 700; font-size: 14px; }
.or-badge {
  font-style: normal;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #0c1a12;
  background: #7cffbe;
  border-radius: 6px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: 2px;
  text-transform: uppercase;
}
.or-badge.real { background: #8fb8ff; color: #0b1426; }
.or-map { font-size: 11.5px; color: var(--dim); margin-top: 1px; }
.or-fill { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.or-fill i { display: block; height: 100%; background: #7cffbe; }
.or-count { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.or-join {
  padding: 8px 14px;
  border: none;
  border-radius: 9px;
  background: #4cae4f;
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
  white-space: nowrap;
}
.or-join:disabled { background: rgba(255, 255, 255, 0.1); cursor: default; }
.fr-desc { font-size: 13px; color: var(--dim); line-height: 1.5; margin: 4px 0 12px; }
.srv-body .friends { margin-top: 0; padding-top: 0; border-top: none; }

@media (max-width: 560px) {
  .off-row { grid-template-columns: 1fr 40px auto; }
  .or-fill { display: none; }
  .srv-tab { font-size: 10px; letter-spacing: 0.04em; }
}

/* Sol alt: tuş görselleri */
.controls-hint {
  position: fixed;
  left: 22px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  color: var(--dim);
}
.ch-group { display: flex; align-items: center; gap: 10px; }
.controls-hint kbd {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 7px;
  border-radius: 7px;
  background: #232733;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 3px 0 #0c0e13;
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
}
.controls-hint kbd.k-wide { min-width: 92px; font-size: 10.5px; letter-spacing: 0.12em; }
.keys-arrows {
  display: grid;
  grid-template-columns: repeat(3, 30px);
  grid-template-rows: repeat(2, 30px);
  gap: 5px;
}
.keys-arrows .k-up { grid-column: 2; grid-row: 1; }
.keys-arrows .k-left { grid-column: 1; grid-row: 2; }
.keys-arrows .k-down { grid-column: 2; grid-row: 2; }
.keys-arrows .k-right { grid-column: 3; grid-row: 2; }
.ch-or { font-size: 18px; opacity: 0.6; }
.mouse { width: 24px; height: 36px; }
.mouse rect, .mouse line { fill: none; stroke: var(--text); stroke-width: 1.6; }
.mouse.left .btn { fill: #7cffbe; stroke: none; }
.ch-label { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
body.touch .controls-hint { display: none; }
@media (max-width: 1100px), (max-height: 560px) { .controls-hint { display: none; } }

/* Market */
.mk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
  margin: 10px 0 8px;
  max-height: min(58vh, 520px);
  overflow-y: auto;
  padding-right: 4px;
}
.mk-art { width: 88px; height: 88px; }
.mk-tools { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
#mk-search {
  flex: 1;
  min-width: 160px;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(5, 10, 20, 0.8);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
}
.mk-owned { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--dim); cursor: pointer; }
.mk-count { font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.shop-panel { max-width: min(720px, 100%); }
.mk-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(5, 10, 20, 0.5);
}
.mk-item.on { border-color: rgba(120, 255, 190, 0.55); background: rgba(120, 255, 190, 0.06); }
.mk-name { font-weight: 700; font-size: 14px; }
.mk-btn {
  width: 100%;
  padding: 9px;
  border-radius: 9px;
  border: 1px solid rgba(255, 180, 90, 0.5);
  background: rgba(255, 180, 90, 0.16);
  color: #ffcf8a;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.mk-item.on .mk-btn { border-color: rgba(120, 255, 190, 0.5); background: rgba(120, 255, 190, 0.12); color: #7cffbe; }
.mk-btn.poor { opacity: 0.5; cursor: default; }
.mk-need { font-size: 11px; color: var(--dim); }

/* HUD: Meteor Taşı sayacı + kazanç bildirimi */
.stat.met .value { color: #ffcf8a; }
#met-pop {
  position: absolute;
  top: 86px;
  left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}
#met-pop .mp {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 180, 90, 0.15);
  border: 1px solid rgba(255, 180, 90, 0.4);
  color: #ffcf8a;
  font-size: 12.5px;
  font-weight: 800;
  animation: met-pop 1.8s ease both;
}
#met-pop .mp.big { font-size: 15px; background: rgba(255, 180, 90, 0.25); }
@keyframes met-pop {
  0%   { opacity: 0; transform: translateY(6px) scale(0.9); }
  12%  { opacity: 1; transform: none; }
  75%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-8px); }
}
body.touch .stat.met { display: none; }
body.touch #met-pop { top: 96px; left: 10px; }

/* --- Meteor Taşı simgesi (img/meteor-coin.svg) --- */
.mc {
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  background: url(../img/meteor-coin.svg) center / contain no-repeat;
  vertical-align: -0.2em;
  flex-shrink: 0;
}
.mc.big { width: 1.35em; height: 1.35em; vertical-align: -0.3em; }

/* --- Market: tabela, kategoriler, özel ve arka plan kartları --- */
.mk-hero { display: block; width: min(220px, 60%); height: auto; margin: -6px auto 4px; }
.mk-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(5, 10, 20, 0.6);
  border: 1px solid var(--line);
}
.mk-tab {
  flex: 1;
  padding: 9px 8px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--dim);
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
  white-space: nowrap;
}
.mk-tab.active { background: rgba(255, 180, 90, 0.16); color: #ffcf8a; }
.mk-btn .mc { width: 1.2em; height: 1.2em; }

.mk-item.mk-bg .mk-art { width: 100%; height: auto; }
.mk-item.mk-bg .mk-art canvas { width: 100%; height: 88px; border-radius: 8px; display: block; }
.mk-item.mk-custom {
  grid-column: 1 / -1;
  flex-direction: row;
  gap: 18px;
  padding: 18px;
  align-items: center;
}
.mk-item.mk-custom .mk-art { width: 88px; height: 88px; flex-shrink: 0; }
.mk-body { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; flex: 1; }
.mk-hint { font-size: 12.5px; color: var(--dim); }
.mk-row { display: flex; gap: 8px; width: 100%; }
.mk-row .mk-btn { flex: 1; }
.mk-btn.draw { background: rgba(120, 255, 190, 0.12); border-color: rgba(120, 255, 190, 0.5); color: #7cffbe; }
.mk-need { display: flex; align-items: center; gap: 4px; justify-content: center; }

/* --- Özel skin editörü --- */
#skin-editor { z-index: 45; }
.se-panel { max-width: 640px; text-align: left; padding: 20px 22px; }
.se-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.se-head h2 { color: var(--text); font-size: 20px; letter-spacing: 0.04em; }
.se-x {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
}
.se-main { display: flex; gap: 16px; align-items: flex-start; }
.se-canvas {
  width: min(320px, 58vw);
  height: min(320px, 58vw);
  border-radius: 50%;
  background: #0d0f14;
  touch-action: none;
  cursor: crosshair;
  flex-shrink: 0;
}
.se-side { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 0; }
.se-tools, .se-row { display: flex; gap: 6px; flex-wrap: wrap; }
.se-tools button, .se-row button, .se-foot button {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.se-tools button.active { border-color: rgba(120, 255, 190, 0.6); background: rgba(120, 255, 190, 0.12); }
.se-palette { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.se-palette button {
  aspect-ratio: 1;
  border-radius: 7px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
}
.se-palette button.active { border-color: #fff; box-shadow: 0 0 0 2px rgba(120, 255, 190, 0.8); }
.se-widths { display: flex; gap: 6px; }
.se-widths button {
  flex: 1;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}
.se-widths button i { display: block; border-radius: 50%; background: var(--text); }
.se-widths button.active { border-color: rgba(120, 255, 190, 0.6); background: rgba(120, 255, 190, 0.12); }
.se-preview { display: flex; justify-content: center; }
.se-bytes { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.se-bytes i { display: block; height: 100%; background: #7cffbe; }
.se-bytes.full i { background: var(--danger); }
.se-msg { font-size: 12.5px; color: var(--danger); min-height: 1em; }
.se-foot { display: flex; gap: 8px; margin-top: 14px; }
.se-save { background: #4cae4f !important; border-color: #4cae4f !important; color: #fff !important; }
@media (max-width: 600px) {
  .se-main { flex-direction: column; align-items: center; }
  .se-canvas { width: 78vw; height: 78vw; }
  .mk-item.mk-custom { flex-direction: column; }
}

/* Market düğmesi artık resim (img/market-btn.svg) */
.mt-market {
  padding: 3px 6px;
  line-height: 0;
  transition: transform 0.12s ease, filter 0.15s ease;
}
.mt-market img { display: block; width: 78px; height: 50px; }
.mt-market:hover { transform: translateY(-1px) scale(1.04); }

/* --- Menü: coin üstte, sağda dışarı taşan kategori sekmeleri --- */
.menu-wrap {
  position: relative;
  width: min(420px, calc(100vw - 40px));
  display: flex;
  flex-direction: column;
}
.menu-wrap:has(.menu-panel.wide) { width: min(640px, calc(100vw - 40px)); }
.menu-wrap .menu-panel { width: 100%; max-width: none; order: 1; }
.menu-panel .menu-top { min-height: 0; }
.menu-panel .menu-top:not(:has(#back-btn:not(.hidden))) { display: none; }

.menu-coin {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 24px;
  font-weight: 900;
  color: #ffcf8a;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}
.menu-coin .mc.big { width: 1.4em; height: 1.4em; }

.menu-dock {
  position: absolute;
  left: calc(100% - 1px);
  top: 36px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1;
}
.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 112px;
  padding: 10px 10px 9px 8px;
  border: 1px solid var(--line);
  border-left: none;
  border-radius: 0 14px 14px 0;
  background: var(--panel);
  color: var(--dim);
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  cursor: pointer;
  box-shadow: 8px 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.dock-item:hover { transform: translateX(5px); color: var(--text); }
.dock-item.active { color: #7cffbe; background: #202530; }
.dock-market { color: #ffcf8a; }
.dock-market img { width: 78px; height: 50px; display: block; }
.dock-ico { width: 40px; height: 40px; }
.dock-ico rect { fill: #2a3040; stroke: currentColor; stroke-width: 2; }
.dock-ico path { stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.dock-ico .led { fill: #7cffbe; }

/* Dar ekran: sekmeler panelin altına yatay sıra olarak iner */
@media (max-width: 900px) {
  .menu-dock {
    position: static;
    order: 2;
    flex-direction: row;
    justify-content: center;
    margin-top: 10px;
  }
  .dock-item { border: 1px solid var(--line); border-radius: 14px; }
  .dock-item:hover { transform: translateY(-2px); }
}

/* --- Market: geri butonu (Sunucular sayfasındakiyle aynı yer) --- */
.shop-panel { position: relative; }
.shop-top { display: flex; margin: -10px 0 -30px; position: relative; z-index: 1; }

/* --- Sayfa geçişleri --- */
@keyframes scr-in-r { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
@keyframes scr-in-l { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }
@keyframes scr-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes ov-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ov-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes pnl-in { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }
.screen.in-r { animation: scr-in-r 0.24s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
.screen.in-l { animation: scr-in-l 0.24s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
.srv-body.in-fade { animation: scr-fade 0.2s ease both; }
#shop.show { animation: ov-in 0.18s ease both; }
#shop.show .shop-panel { animation: pnl-in 0.26s cubic-bezier(0.2, 0.9, 0.3, 1.05) both; }
#shop.leaving { animation: ov-out 0.17s ease both; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .screen.in-r, .screen.in-l, .srv-body.in-fade, #shop.show, #shop.show .shop-panel, #shop.leaving { animation: none; }
}

/* --- Market penceresi Sunucular ile aynı boyda: ekrana sığar, liste içinde kayar --- */
#shop .shop-panel {
  width: min(640px, calc(100vw - 40px));
  max-width: none;
  height: var(--page-h);
  display: flex;
  flex-direction: column;
  padding: 18px 26px 18px;
  text-align: left;
}
#shop .shop-top { margin: 0 0 -34px; }
#shop .mk-hero { width: 150px; margin: 0 auto 2px; flex-shrink: 0; }
#shop .shop-head { margin-bottom: 0; }
#shop .shop-head h2 { font-size: 22px; }
#shop .mk-tabs { margin-top: 10px; }
#shop .mk-tab { font-size: 10.5px; padding: 8px 6px; }
#shop .mk-tools { margin-top: 10px; }
#shop .mk-grid {
  flex: 1;
  min-height: 0;
  max-height: none;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px;
  margin: 10px 0 6px;
  align-content: start;
}
#shop .mk-item { padding: 10px 8px 9px; gap: 6px; }
#shop .mk-art, #shop .mk-art canvas { width: 72px; height: 72px; }
#shop .mk-item.mk-bg .mk-art { width: 100%; height: auto; }
#shop .mk-item.mk-bg .mk-art canvas { width: 100%; height: 72px; }
#shop .mk-item.mk-custom .mk-art, #shop .mk-item.mk-custom .mk-art canvas { width: 80px; height: 80px; }
#shop .mk-name { font-size: 13px; }
#shop .mk-btn { padding: 7px; font-size: 12px; }
#shop .shop-note { margin-top: 2px; flex-shrink: 0; }
@media (max-height: 640px) { #shop .mk-hero { display: none; } #shop .shop-top { margin-bottom: 4px; } }

/* Sunucular ve market aynı boyda: ortak sayfa yüksekliği */
:root { --page-h: min(640px, calc(100vh - 110px)); }
.menu-panel.wide { height: var(--page-h); display: flex; flex-direction: column; }
.menu-panel.wide #screen-servers { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.menu-panel.wide #screen-servers.hidden { display: none; }
.menu-panel.wide .srv-body { flex: 1; min-height: 0; max-height: none; }

/* --- Eleme haritaları: kalan kişi / can (round çubuğunun altında) --- */
#mode-info {
  margin-top: 6px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
}
#mode-info .hearts { color: #ff4d5e; letter-spacing: 1px; }
#mode-info .hearts i { font-style: normal; color: rgba(255, 255, 255, 0.18); }

/* Elendin: izleyici modu */
#respawn.out .rs-count { font-size: 22px; letter-spacing: 0.14em; color: #ff8a8a; margin-top: 6px; }
#respawn.out .rs-label { color: #ff5a64; font-size: 15px; font-weight: 800; }

/* --- Tepki butonları (1-2-3) --- */
#emote-bar {
  position: absolute;
  bottom: 18px; left: 50%;
  transform: translateX(-50%);   /* altta ortada: odada sol alt sohbete ayrılmış */
  display: flex;
  gap: 8px;
  pointer-events: auto;
  z-index: 4;
}
#emote-bar.hidden { display: none; }
#emote-bar button {
  position: relative;
  width: 46px; height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s ease, border-color 0.12s ease;
}
#emote-bar button:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.35); }
#emote-bar button.hit { animation: emoteHit 0.35s ease; }
#emote-bar kbd {
  position: absolute;
  top: -7px; right: -7px;
  min-width: 18px; height: 18px;
  border-radius: 6px;
  background: #1c2230;
  border: 1px solid var(--line);
  font: 700 10px/16px system-ui, sans-serif;
  color: var(--dim);
  text-align: center;
}
@keyframes emoteHit {
  0% { transform: scale(1); }
  40% { transform: scale(1.22); }
  100% { transform: scale(1); }
}
/* Dokunmatikte sağ üstte dikey, klavye rozeti yok */
body.touch #emote-bar { bottom: auto; left: auto; transform: none; top: 52px; right: 10px; flex-direction: column; gap: 6px; }
body.touch #emote-bar button { width: 40px; height: 40px; }
body.touch #emote-bar kbd { display: none; }
#respawn.out { top: 24%; }   /* izlenen top ekranın ortasında: yazı üstüne binmesin */

/* --- Round sonu harita oylaması --- */
.vote { margin-top: 12px; text-align: center; }
.vote .label { display: block; font-size: 10.5px; letter-spacing: 0.16em; color: var(--dim); margin-bottom: 8px; }
.vote-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.vote-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 6px 8px; border-radius: 12px; cursor: pointer;
  background: rgba(255,255,255,0.04); border: 2px solid rgba(255,255,255,0.1);
  color: var(--text); font: inherit; pointer-events: auto;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.vote-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.3); }
.vote-card canvas { width: 100%; max-width: 132px; aspect-ratio: 132 / 96; border-radius: 8px; display: block; }
.vote-card b { font-size: 11.5px; letter-spacing: 0.06em; line-height: 1.15; }
.vote-card .vc-n { font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
.vote-card.lead { border-color: rgba(255, 209, 102, 0.7); }
.vote-card.lead .vc-n { color: #ffd166; }
.vote-card.mine { border-color: var(--accent); background: rgba(70, 200, 240, 0.12); }
.vote-card { position: relative; }
.vote-card.mine::after {
  content: '✓'; position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #04121c; font: 900 13px/22px system-ui, sans-serif;
}

/* Gecikme: sağ altta, çerçevesiz küçük yazı */
#ping {
  position: absolute;
  right: 20px; bottom: 3px;
  font: 700 10.5px/1 system-ui, sans-serif;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
  pointer-events: none;
}
#ping:empty { display: none; }
#ping.good { color: #5fe08a; }
#ping.mid { color: #ffb347; }
#ping.bad { color: #ff5a5f; }
body.touch #ping { right: 10px; bottom: 4px; }

/* Menü altı: yasal sayfalar */
.legal-links { margin-top: 10px; font-size: 11.5px; color: var(--dim); text-align: center; }
.legal-links a { color: var(--dim); text-decoration: none; }
.legal-links a:hover { color: var(--text); text-decoration: underline; }
.consent .c-text a { color: inherit; opacity: 0.8; }

/* --- Discord düğmesi (menüde sağ alt) --- */
#discord-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 40;
  width: 58px; height: 58px; border-radius: 50%;
  border: none; cursor: pointer; padding: 0;
  background: #5865f2; display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  pointer-events: auto;
}
#discord-fab:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 10px 26px rgba(88, 101, 242, 0.6); }
#discord-fab svg { width: 30px; height: 30px; }
#discord-fab .df-badge {
  position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 3px; white-space: nowrap;
  color: #ffd166; font: 800 13px/1 system-ui, sans-serif;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
#discord-fab .df-badge .mc { width: 15px; height: 15px; margin: 0; }
#discord-fab .df-badge.hidden { display: none; }
#discord-card {
  position: fixed; right: 22px; bottom: 92px; z-index: 41; width: min(320px, calc(100vw - 32px));
  background: var(--panel); border: 1px solid rgba(88, 101, 242, 0.5); border-radius: 16px;
  padding: 16px 16px 14px; box-shadow: 0 16px 40px rgba(0,0,0,0.5); pointer-events: auto;
  font-size: 13.5px; color: var(--text);
}
#discord-card.hidden { display: none; }
#discord-card .dc-title { display: block; font-size: 15px; margin-bottom: 6px; }
#discord-card p { margin: 0 0 10px; line-height: 1.45; }
#discord-card .dc-note { background: rgba(255, 209, 102, 0.12); border-radius: 8px; padding: 8px 10px; color: #ffd166; }
#discord-card .dc-fine { font-size: 11px; color: var(--dim); margin: 8px 0 0; }
#discord-card .dc-x { position: absolute; top: 8px; right: 10px; background: none; border: none; color: var(--dim); font-size: 15px; cursor: pointer; }
#discord-card .dc-btn { display: block; text-align: center; text-decoration: none; font-weight: 800; padding: 10px; border-radius: 10px; margin-top: 8px; }
#discord-card .dc-btn.join { background: #5865f2; color: #fff; }
#discord-card .dc-btn.verify { background: #4cae4f; color: #fff; }
body.touch #discord-fab { right: 14px; bottom: 14px; width: 50px; height: 50px; }
/* Oyundayken gizli (menü kapanınca düğme de kaybolur) */
#menu.hidden #discord-fab, #menu.hidden #discord-card { display: none; }

/* =====================================================================
   Telefon — yatay ekran (Android uygulaması yatay oynanır). Kısa ve geniş
   ekranda: kumanda solda, dash sağda, mini harita sol üstte, menü sıkı.
   ===================================================================== */
@media (orientation: landscape) and (max-height: 520px) {
  body.touch #stick { left: 18px; right: auto; bottom: 14px; width: 120px; height: 120px; }
  body.touch #dash-btn { left: auto; right: 22px; bottom: 22px; width: 84px; height: 84px; }
  body.touch #minimap { top: 50px; left: 10px; bottom: auto; transform: none; }
  body.touch #lobby-badge { display: none; }
  body.touch #emote-bar { top: 50px; right: 10px; }
  body.touch .roundbar { top: 6px; }

  /* Menü: logo küçük, boşluklar dar, sığmazsa kaydırılır */
  #menu { overflow-y: auto; align-items: start; padding-top: 12px; padding-bottom: 12px; }
  .menu-panel { padding: 10px 18px 12px; }
  .menu-logo .intro-logo { width: 96px; }
  .menu-coin { bottom: auto; top: 10px; left: auto; right: 16px; transform: none; font-size: 17px; }   /* panelin üstü ekran dışında kalıyordu */
  .menu-panel .tag { margin: 2px 0 8px; font-size: 13px; }
  .nick-label { margin-top: 2px; }
  #play-btn { padding-top: 10px; padding-bottom: 10px; }
  .menu-foot { margin-top: 8px; }
  .legal-links { margin-top: 6px; }
  .controls-hint { display: none; }
  #discord-fab { right: 14px; bottom: 14px; width: 48px; height: 48px; }
  #discord-fab svg { width: 25px; height: 25px; }
  #discord-card { bottom: 74px; right: 14px; max-height: calc(100vh - 90px); overflow-y: auto; }
  /* Round sonu: podyum ve oylama yan yana sığsın */
  #podium { overflow-y: auto; justify-content: start; padding-top: 10px; }
}

/* Android uygulaması dik tutulursa: yan çevir uyarısı (uygulama yatay kilitli, bu yedek) */
#rotate-hint { display: none; }
@media (orientation: portrait) {
  body.app #rotate-hint {
    display: flex; position: fixed; inset: 0; z-index: 9999;
    flex-direction: column; align-items: center; justify-content: center; gap: 14px;
    background: #0b0d12; color: #fff; font: 800 18px system-ui, sans-serif; text-align: center; padding: 30px;
  }
  body.app #rotate-hint .rh-icon { font-size: 54px; animation: rhTurn 1.6s ease-in-out infinite; }
}
@keyframes rhTurn { 0%, 30% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }
