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

:root {
  --bg: #070707;
  --card: #111111;
  --card-border: #1e1e1e;
  --gold: #F0B429;
  --gold-dark: #c8841a;
  --green: #14F195;
  --purple: #7C3AED;
  --text: #ffffff;
  --muted: #6b7280;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  transition: opacity 0.65s ease;
}

#bg-canvas-2 {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.65s ease;
}

#snake-canvas {
  transition: opacity 0.65s ease;
}

#snake-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hidden { display: none !important; }

/* ── Decorative snakes ────────────────────────────────────────────────── */
.deco-snake {
  position: fixed;
  width: 280px;
  height: 140px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.75;
  animation: snake-float 4s ease-in-out infinite;
}
@keyframes snake-float {
  0%,100% { transform: translateY(0) rotate(0deg); }
  33%      { transform: translateY(-6px) rotate(1deg); }
  66%      { transform: translateY(4px) rotate(-1deg); }
}

/* ── Top bar ──────────────────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 52px;
  z-index: 200;
  background: rgba(8,9,13,0.92);
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  backdrop-filter: blur(10px);
}
.topbar-left { display: flex; align-items: center; gap: 10px; }
.topbar-snake-icon { font-size: 1.3rem; }
.topbar-welcome { font-size: 0.9rem; color: #aaa; }
.topbar-welcome strong { color: var(--gold); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
#topbar-user { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: #ccc; }
#topbar-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.btn-google-top {
  display: flex; align-items: center; gap: 6px;
  background: #fff; color: #333;
  border: none; border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.82rem; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: opacity 0.2s;
}
.btn-google-top:hover { opacity: 0.9; }

/* ── Login screen ─────────────────────────────────────────────────────── */
.screen-center {
  position: relative; z-index: 5;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 32px;
}
.login-title { text-align: center; }
.login-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 32px 40px;
  display: flex; flex-direction: column;
  align-items: center; gap: 16px;
  min-width: 320px;
}
.login-desc { color: var(--muted); font-size: 0.9rem; text-align: center; }
.login-online { color: #444; font-size: 0.8rem; }
.login-online span { color: var(--green); font-weight: 700; }
.btn-google {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 13px 20px;
  background: #fff; color: #333;
  border: none; border-radius: 10px;
  font-size: 1rem; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: opacity 0.2s;
  justify-content: center;
}
.btn-google:hover { opacity: 0.92; }

/* ── Game title ───────────────────────────────────────────────────────── */
.game-title {
  font-size: 3.8rem;
  font-weight: 900;
  letter-spacing: 3px;
  font-style: italic;
  text-transform: uppercase;
  color: #fff;
  line-height: 1;
  filter: drop-shadow(0 0 30px rgba(240,180,41,0.3));
}
.game-title span { color: var(--gold); }
.game-subtitle {
  font-size: 0.8rem;
  letter-spacing: 4px;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 4px;
}

/* ── Lobby page ───────────────────────────────────────────────────────── */
.lobby-page {
  position: fixed;
  top: 52px; left: 0; right: 0; bottom: 0;
  overflow-y: auto;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  padding: 24px 16px;
  gap: 20px;
}
.lobby-title-block { text-align: center; }

/* ── Three column grid ────────────────────────────────────────────────── */
/* Exact fixed widths: 260 + 14gap + 360 + 14gap + 260 = 908px total     */
/* Center of center column = 260+14+180 = 454px = half of 908px           */
/* So JOIN GAME button is always at exact horizontal center of screen      */
.lobby-grid {
  display: grid;
  grid-template-columns: 260px 360px 260px;
  gap: 14px;
  flex-shrink: 0;
}
.lobby-col { display: flex; flex-direction: column; gap: 14px; }
.lobby-col > .card:last-child { flex: 1; }
.lobby-col-center { }

/* ── Card ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 18px;
  display: flex; flex-direction: column; gap: 14px;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
}
.card-header-left { display: flex; align-items: center; gap: 8px; }
.card-icon { font-size: 1rem; }
.card-title { font-size: 0.9rem; font-weight: 700; letter-spacing: 0.5px; }
.badge-live {
  font-size: 0.7rem; color: var(--green);
  background: rgba(20,241,149,0.12);
  border: 1px solid rgba(20,241,149,0.25);
  border-radius: 20px; padding: 2px 8px;
  font-weight: 600;
}
.btn-text-sm {
  background: none; border: none; color: var(--muted);
  font-size: 0.78rem; cursor: pointer; transition: color 0.2s;
}
.btn-text-sm:hover { color: #fff; }

/* ── Leaderboard ──────────────────────────────────────────────────────── */
.leaderboard-list {
  list-style: none; display: flex; flex-direction: column; gap: 6px;
}
.leaderboard-list li {
  display: flex; align-items: center;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  font-size: 0.85rem;
}
.rank { color: #444; width: 22px; font-weight: 700; }
.lb-name { flex: 1; margin-left: 6px; }
.lb-score { color: var(--gold); font-weight: 700; }

/* ── Account card ─────────────────────────────────────────────────────── */
.account-row {
  display: flex; align-items: center; gap: 10px;
}
.account-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, #ff4444, #ff8800);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 700; flex-shrink: 0;
}
.account-avatar-img {
  width: 42px; height: 42px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
}
.account-info { flex: 1; min-width: 0; }
.account-name { font-weight: 700; font-size: 0.95rem; truncate: ellipsis; white-space: nowrap; overflow: hidden; }
.account-email { font-size: 0.72rem; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-icon { background: none; border: none; cursor: pointer; font-size: 0.95rem; opacity: 0.6; transition: opacity 0.2s; flex-shrink: 0; }
.btn-icon:hover { opacity: 1; }
.account-stats { display: flex; gap: 10px; }
.stat-box { flex: 1; background: rgba(255,255,255,0.04); border-radius: 8px; padding: 10px; text-align: center; }
.stat-val { font-size: 1.3rem; font-weight: 700; color: var(--gold); }
.stat-lbl { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }
.btn-signout {
  display: block; text-align: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; padding: 9px;
  color: var(--muted); font-size: 0.85rem;
  text-decoration: none; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn-signout:hover { background: rgba(255,50,50,0.12); color: #ff7777; }

/* ── Play card ────────────────────────────────────────────────────────── */
.play-card { gap: 16px; }
.play-profile {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding-bottom: 4px;
}
.play-avatar-wrap {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, #ff4444, #ff8800);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 0 3px rgba(240,180,41,0.3);
}
.play-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.play-avatar-fallback { font-size: 1.8rem; font-weight: 700; }
.play-username { font-size: 1.2rem; font-weight: 700; text-align: center; }
.name-input {
  width: 100%; display: block;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 11px 14px;
  color: #fff; font-size: 0.95rem;
  outline: none; transition: border-color 0.2s;
}
.name-input:focus { border-color: var(--gold); }
.name-input::placeholder { color: #444; }
.lobby-type-row {
  display: flex; gap: 8px; width: 100%;
}
.btn-lobby-type {
  flex: 1; padding: 11px 6px;
  background: transparent;
  border: 2px solid var(--gold);
  border-radius: 8px;
  color: var(--gold);
  font-size: 0.92rem; font-weight: 800;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.5px;
}
.btn-lobby-type:hover { background: rgba(240,180,41,0.12); }
.btn-lobby-type.active {
  background: var(--gold);
  color: #000;
}

.btn-play {
  width: 100%; padding: 18px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #000;
  border: none; border-radius: 10px;
  font-size: 1.15rem; font-weight: 900;
  cursor: pointer; letter-spacing: 2px;
  text-transform: uppercase;
  transition: transform 0.1s, box-shadow 0.2s;
  box-shadow: 0 4px 24px rgba(240,180,41,0.35);
  text-align: center;
}
.btn-play:hover { box-shadow: 0 6px 32px rgba(240,180,41,0.55); }
.btn-play:active { transform: scale(0.98); }
.server-stats-row {
  display: flex; align-items: center; justify-content: center;
  gap: 0; background: rgba(255,255,255,0.03);
  border: 1px solid var(--card-border); border-radius: 10px;
  overflow: hidden; width: 100%;
}
.server-stat { flex: 1; padding: 14px; text-align: center; }
.server-stat-val { font-size: 1.4rem; font-weight: 800; color: var(--gold); }
.server-stat-lbl { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 3px; }
.server-stat-divider { width: 1px; background: var(--card-border); height: 40px; }

/* ── Wallet card ──────────────────────────────────────────────────────── */
.wallet-balance-block { text-align: center; padding: 8px 0; }
.wallet-balance-usd {
  font-size: 1.8rem; font-weight: 800; color: var(--gold);
  text-shadow: 0 0 24px rgba(240,180,41,0.3);
  line-height: 1.1;
}
.wallet-balance-sol {
  font-size: 0.82rem; color: #666; margin-top: 3px;
}
.wallet-action-row { display: flex; gap: 8px; width: 100%; }
.btn-add-funds {
  flex: 1; padding: 11px;
  background: transparent;
  border: 2px solid var(--green);
  border-radius: 8px; color: var(--green);
  font-size: 0.88rem; font-weight: 700;
  cursor: pointer; transition: background 0.2s;
  text-align: center;
}
.btn-add-funds:hover { background: rgba(20,241,149,0.1); }
.btn-cash-out {
  flex: 1; padding: 11px;
  background: var(--purple);
  border: none; border-radius: 8px;
  color: #fff; font-size: 0.88rem; font-weight: 700;
  cursor: pointer; transition: opacity 0.2s;
  text-align: center;
}
.btn-cash-out:hover { opacity: 0.88; }
.wallet-status-msg { font-size: 0.78rem; min-height: 14px; text-align: center; color: var(--muted); }

/* ── Modals ───────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 200; align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
  background: #141828;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px; padding: 28px;
  width: 320px;
  display: flex; flex-direction: column; gap: 14px;
}
.modal h3 { font-size: 1.1rem; }
.modal input[type="text"],
.modal input[type="number"] {
  width: 100%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px; padding: 10px 14px;
  color: #fff; font-size: 0.95rem; outline: none;
}
.modal-btns { display: flex; gap: 8px; }
.btn-small {
  flex: 1; padding: 10px;
  border: none; border-radius: 8px;
  font-size: 0.88rem; font-weight: 600; cursor: pointer;
}
.btn-cancel { background: rgba(255,255,255,0.1); color: #fff; }
.btn-confirm { background: var(--gold); color: #000; }

/* ── Receive modal ────────────────────────────────────────────────────── */
.modal-receive { width: 360px; max-width: 95vw; }
.receive-header { display: flex; align-items: center; gap: 12px; }
.btn-back-modal {
  background: rgba(255,255,255,0.1); border: none; color: #fff;
  font-size: 1rem; width: 30px; height: 30px; border-radius: 50%;
  cursor: pointer; flex-shrink: 0; line-height: 1;
}
.receive-subtitle { font-size: 1.1rem; font-weight: 700; }
.receive-desc { font-size: 0.8rem; color: #888; line-height: 1.5; }
#receive-qr { display: flex; justify-content: center; padding: 6px 0; }
#receive-qr canvas, #receive-qr img { border-radius: 10px; border: 4px solid rgba(255,255,255,0.15); }
.receive-wallet-label { font-size: 0.7rem; color: #555; text-transform: uppercase; letter-spacing: 1px; }
.receive-address-row {
  display: flex; align-items: center; gap: 10px;
  background: rgba(20,241,149,0.07);
  border: 1px solid rgba(20,241,149,0.2);
  border-radius: 10px; padding: 10px 14px;
}
.receive-address-short { flex: 1; font-family: monospace; font-size: 1rem; color: var(--green); letter-spacing: 1px; }
.btn-copy {
  background: rgba(20,241,149,0.15); border: 1px solid rgba(20,241,149,0.35);
  color: var(--green); border-radius: 6px; padding: 4px 12px;
  font-size: 0.8rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background 0.2s;
}
.btn-copy:hover { background: rgba(20,241,149,0.28); }
.btn-confirm-deposit {
  width: 100%; padding: 12px;
  background: var(--green); color: #000;
  font-weight: 700; font-size: 0.95rem;
  border: none; border-radius: 10px; cursor: pointer; transition: opacity 0.2s;
}
.btn-confirm-deposit:hover { opacity: 0.85; }

/* ── Customize card ───────────────────────────────────────────────────────── */
.cust-mini-canvas {
  display: block; width: 100%; height: 100px;
  border-radius: 8px; background: rgba(255,255,255,0.03);
}
.btn-change-appearance {
  width: 100%; padding: 11px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px; color: #fff;
  font-size: 0.88rem; font-weight: 600;
  cursor: pointer; transition: background 0.2s;
  text-align: center;
}
.btn-change-appearance:hover { background: rgba(255,255,255,0.12); }

/* ── Customize modal ──────────────────────────────────────────────────────── */
.modal-cust {
  width: min(860px, 95vw);
  max-height: 90vh;
  overflow-y: auto;
  gap: 0;
  padding: 0;
  background: #111;
  border: 1px solid #222;
}
.cust-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid #222;
}
.cust-header-left { display: flex; align-items: center; gap: 10px; font-size: 1rem; }
.btn-cust-close {
  background: none; border: none; color: #888; font-size: 1.1rem;
  cursor: pointer; line-height: 1; transition: color 0.2s;
}
.btn-cust-close:hover { color: #fff; }

/* top tabs (Inventory / Shop) */
.cust-top-tabs {
  display: flex; gap: 0;
  padding: 14px 22px 0;
}
.cust-top-tab {
  flex: 1; padding: 11px;
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
  font-size: 0.9rem; font-weight: 700;
  cursor: pointer; transition: background 0.2s;
}
.cust-top-tab:first-child { border-radius: 8px 0 0 8px; }
.cust-top-tab:last-child  { border-radius: 0 8px 8px 0; }
.cust-top-tab.ctt-active  { background: var(--gold); color: #000; }

/* snake preview canvas */
.cust-snake-canvas {
  display: block; width: 100%; height: 130px;
  margin: 14px 0 0;
  background: rgba(255,255,255,0.02);
}

/* category tabs (Skins / Hats / Boosts) */
.cust-cat-bar {
  display: flex; gap: 8px;
  padding: 14px 22px;
  border-bottom: 1px solid #222;
}
.cust-cat {
  padding: 9px 18px;
  background: transparent;
  border: 2px solid var(--gold);
  border-radius: 8px; color: var(--gold);
  font-size: 0.85rem; font-weight: 700;
  cursor: pointer; transition: background 0.2s;
}
.cust-cat.cc-active { background: var(--gold); color: #000; }

/* body layout */
.cust-body {
  display: flex;
  padding: 16px 22px 22px;
  gap: 16px;
  min-height: 320px;
}
.cust-grid-wrap { flex: 1; overflow-y: auto; }
.cust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.cust-swatch {
  aspect-ratio: 1;
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  border: 3px solid transparent;
  transition: border-color 0.15s, transform 0.1s;
  overflow: hidden;
}
.cust-swatch:hover   { transform: scale(1.04); }
.cust-swatch.cs-sel  { border-color: var(--gold); }
.cust-swatch.cs-lock {
  filter: brightness(0.35);
  cursor: default;
}
.cust-swatch.cs-lock::after {
  content: '🔒';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  filter: brightness(2.5);
}
.cust-placeholder {
  display: flex; align-items: center; justify-content: center;
  color: #444; font-size: 0.85rem; padding: 20px;
  grid-column: 1 / -1;
}

/* details panel */
.cust-details {
  width: 160px; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding-top: 4px;
}
.cust-det-swatch {
  width: 90px; height: 90px;
  border-radius: 12px;
  background: #222;
  border: 2px solid #333;
}
.cust-det-name  { font-size: 0.92rem; font-weight: 700; text-align: center; }
.cust-det-badge {
  background: rgba(20,241,149,0.15);
  border: 1px solid rgba(20,241,149,0.35);
  color: var(--green);
  border-radius: 20px; padding: 3px 12px;
  font-size: 0.75rem; font-weight: 700;
}
.cust-det-divider {
  font-size: 0.68rem; color: #555;
  text-transform: uppercase; letter-spacing: 1.5px;
  align-self: stretch; padding-top: 6px;
  border-top: 1px solid #222;
}
.cust-det-row {
  display: flex; justify-content: space-between;
  align-self: stretch; font-size: 0.82rem; color: #aaa;
}
.cust-det-row strong { color: #fff; }
.btn-equip {
  width: 100%; padding: 10px;
  background: var(--gold); color: #000;
  border: none; border-radius: 8px;
  font-size: 0.88rem; font-weight: 800;
  cursor: pointer; transition: opacity 0.2s; margin-top: auto;
}
.btn-equip:hover { opacity: 0.85; }

/* ── Shop panel ───────────────────────────────────────────────────────────── */
.cust-shop-panel {
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 18px;
  padding: 10px 20px 20px;
  text-align: center;
}
.cust-shop-badge {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #000; font-weight: 800; font-size: 0.95rem;
  padding: 6px 20px; border-radius: 20px;
  letter-spacing: 1px;
}
.cust-shop-price {
  font-size: 2.6rem; font-weight: 900; color: var(--gold);
  line-height: 1;
}
.cust-shop-price span {
  font-size: 1rem; font-weight: 500; color: #888;
}
.cust-shop-perks {
  list-style: none;
  display: flex; flex-direction: column; gap: 12px;
  width: 100%; max-width: 340px;
  background: rgba(255,255,255,0.03);
  border: 1px solid #222;
  border-radius: 12px;
  padding: 18px 22px;
  text-align: left;
}
.cust-shop-perks li {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.92rem; color: #ddd;
}
.perk-icon { font-size: 1.1rem; width: 24px; text-align: center; flex-shrink: 0; }
.btn-subscribe {
  width: 100%; max-width: 340px;
  padding: 16px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #000; border: none; border-radius: 10px;
  font-size: 1.05rem; font-weight: 900;
  cursor: pointer; letter-spacing: 1px;
  transition: opacity 0.2s;
  box-shadow: 0 4px 20px rgba(240,180,41,0.35);
}
.btn-subscribe:hover { opacity: 0.88; }
.cust-shop-note { font-size: 0.75rem; color: #555; }

/* Leaderboard open button inside the card */
.btn-leaderboard-open {
  display: block;
  width: 100%;
  padding: 10px 0;
  background: linear-gradient(135deg, rgba(255,200,0,0.15), rgba(255,200,0,0.05));
  border: 1px solid rgba(255,200,0,0.3);
  border-radius: 10px;
  color: #ffe066;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  margin-bottom: 12px;
  transition: background 0.15s, transform 0.1s;
}
.btn-leaderboard-open:hover {
  background: linear-gradient(135deg, rgba(255,200,0,0.28), rgba(255,200,0,0.1));
  transform: translateY(-1px);
}

/* All-time leaderboard rows in modal */
#lobby-alltime-list li {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: #ddd;
  font-size: 0.9rem;
}
#lobby-alltime-list li:first-child { background: rgba(255,200,0,0.12); color: #ffe066; }
#lobby-alltime-list li:nth-child(2) { background: rgba(200,200,200,0.07); color: #ccc; }
#lobby-alltime-list li:nth-child(3) { background: rgba(180,100,30,0.1); color: #e8a060; }
#lobby-alltime-list .al-rank  { min-width: 28px; font-weight: 700; color: #666; }
#lobby-alltime-list li:first-child .al-rank { color: #ffe066; }
#lobby-alltime-list .al-name  { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#lobby-alltime-list .al-score { font-weight: 600; color: #7dd3fc; }

/* ── Lobby navigation arrows ───────────────────────────────────────────── */
.lobby-nav-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 300;
  background: none;
  border: none;
  cursor: pointer;
  display: none; /* shown only when lobby is visible */
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0;
  animation: arrow-pulse 1.4s ease-in-out infinite;
}
.lobby-nav-arrow.visible { display: flex; }
.lobby-nav-arrow-left  { left: 18px; }
.lobby-nav-arrow-right { right: 18px; }

.lobby-nav-arrow svg {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 0 10px rgba(20,241,149,0.7));
}
.lobby-nav-arrow span {
  font-size: 0.62rem;
  letter-spacing: 2px;
  font-weight: 700;
  color: #14F195;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(20,241,149,0.8);
}

@keyframes arrow-pulse {
  0%,100% { transform: translateY(-50%) scale(1);   opacity: 0.75; }
  50%      { transform: translateY(-50%) scale(1.18); opacity: 1;    }
}

/* ── Lobby slide transitions ───────────────────────────────────────────── */
.lobby-page { transition: none; }

@keyframes slideOutLeft {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(-80px); opacity: 0; }
}
@keyframes slideInRight {
  from { transform: translateX(80px);  opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes slideOutRight {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(80px);  opacity: 0; }
}
@keyframes slideInLeft {
  from { transform: translateX(-80px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.slide-out-left  { animation: slideOutLeft  0.32s cubic-bezier(0.4,0,0.6,1) forwards; }
.slide-in-right  { animation: slideInRight  0.32s cubic-bezier(0.4,0,0.6,1) forwards; }
.slide-out-right { animation: slideOutRight 0.32s cubic-bezier(0.4,0,0.6,1) forwards; }
.slide-in-left   { animation: slideInLeft   0.32s cubic-bezier(0.4,0,0.6,1) forwards; }

/* ── Lobby 2 (Arena) — clean light theme matching agar.io world ────────── */
#lobby-screen-2 { --accent: #6366f1; }

/* Cards: white, crisp, light shadow */
#lobby-screen-2 .card {
  background: rgba(255,255,255,0.93);
  border: 1px solid rgba(99,102,241,0.18);
  box-shadow: 0 4px 28px rgba(0,0,0,0.10);
  backdrop-filter: blur(4px);
  color: #1e1b4b;
}
#lobby-screen-2 .card h4,
#lobby-screen-2 .card-title,
#lobby-screen-2 .account-name,
#lobby-screen-2 .stat-lbl,
#lobby-screen-2 .server-stat-lbl { color: #374151; }
#lobby-screen-2 .account-email   { color: #6b7280; }
#lobby-screen-2 .stat-val,
#lobby-screen-2 .server-stat-val { color: #6366f1; }
#lobby-screen-2 .account-avatar  { background: #6366f1; color: #fff; border-color: #a5b4fc; }
#lobby-screen-2 .leaderboard-list li { color: #374151; }
#lobby-screen-2 .lb-score        { color: #6366f1; }
#lobby-screen-2 .rank            { color: #9ca3af; }

/* Title on light bg */
#lobby-screen-2 .game-title      { color: #1e1b4b; text-shadow: none; }
#lobby-screen-2 .game-title span { color: #6366f1; }
#lobby-screen-2 .game-subtitle   { color: #6b7280; }
#lobby-screen-2 .lobby-title-block { text-align: center; }

/* Play username / name input */
#lobby-screen-2 .play-username   { color: #1e1b4b; }
#lobby-screen-2 .name-input      { background: #f3f4f6; color: #111; border-color: rgba(99,102,241,0.3); }
#lobby-screen-2 .name-input::placeholder { color: #9ca3af; }

/* Lobby type buttons */
#lobby-screen-2 .btn-lobby-type-2  { background: #f3f4f6; color: #374151; border-color: #d1d5db; border: 1px solid; border-radius: 8px; padding: 8px 14px; font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: all 0.15s; }
#lobby-screen-2 .btn-lobby-type-2.active { background: rgba(99,102,241,0.15); border-color: #6366f1; color: #6366f1; }

/* Play button */
#lobby-screen-2 .btn-play { background: linear-gradient(135deg,#6366f1,#818cf8); color: #fff; box-shadow: 0 4px 20px rgba(99,102,241,0.35); }
#lobby-screen-2 .btn-play:hover { box-shadow: 0 6px 28px rgba(99,102,241,0.55); }

/* Wallet */
#lobby-screen-2 .wallet-balance-usd { color: #1e1b4b; }
#lobby-screen-2 .wallet-balance-sol  { color: #6b7280; }
#lobby-screen-2 .btn-add-funds       { background: linear-gradient(135deg,#6366f1,#818cf8); color: #fff; }
#lobby-screen-2 .btn-cash-out        { background: #f3f4f6; color: #6366f1; border-color: rgba(99,102,241,0.3); }
#lobby-screen-2 .btn-text-sm         { color: #6366f1; }
#lobby-screen-2 .btn-leaderboard-open { color: #6366f1; border-color: rgba(99,102,241,0.3); background: rgba(99,102,241,0.08); }
#lobby-screen-2 .btn-change-appearance { background: rgba(99,102,241,0.1); color: #6366f1; border-color: rgba(99,102,241,0.25); }
#lobby-screen-2 .server-stat-divider  { background: #d1d5db; }

/* Arrows on light background */
.lobby-nav-arrow[data-theme="light"] svg polyline { stroke: #6366f1; }
.lobby-nav-arrow[data-theme="light"] span { color: #6366f1; text-shadow: none; }
.lobby-nav-arrow[data-theme="light"] svg { filter: drop-shadow(0 0 8px rgba(99,102,241,0.5)); }
