/* ═══════════════════════════════════════════
   PONG ARENA — style.css v5.0
   ═══════════════════════════════════════════ */

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

:root {
  --cyan:    #00ffff;
  --magenta: #ff00ff;
  --gold:    #ffd700;
  --green:   #00ff88;
  --card-bg: rgba(255,255,255,.05);
  --border:  rgba(0,255,255,.2);
  --text:    rgba(255,255,255,.88);
  --muted:   rgba(255,255,255,.32);
  --radius:  14px;
}

html {
  background: radial-gradient(ellipse at 50% 30%, #1a1a3a 0%, #0a0a18 60%, #000 100%);
  min-height: 100%;
}

body {
  font-family: 'Courier New', Courier, monospace;
  color: var(--text);
  min-height: 100vh;
  overflow: hidden;
}

body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(0,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,255,.04) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridPulse 4s ease-in-out infinite;
}
@keyframes gridPulse { 0%,100%{opacity:.4} 50%{opacity:1} }

/* ─────────────────────────────────────────
   SCREEN SYSTEM
───────────────────────────────────────── */
.screen { display: none; }

#screen-auth {
  display: none;
  position: relative;
  min-height: 100vh;
  width: 100%;
  z-index: 10;
}
#screen-auth.active { display: block; }

#screen-lobby,
#screen-room,
#screen-gameover {
  position: fixed; inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 10;
  overflow-y: auto;
  animation: fadeUp .3s ease both;
}
#screen-lobby.active,
#screen-room.active,
#screen-gameover.active { display: flex; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* ─────────────────────────────────────────
   TYPOGRAPHY
───────────────────────────────────────── */
.game-title {
  font-size: clamp(36px, 6vw, 68px);
  letter-spacing: .15em;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--magenta) 50%, var(--cyan) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: titleGlow 3s ease-in-out infinite;
  flex-shrink: 0;
}
.game-title.small { font-size: clamp(22px, 3.5vw, 36px); letter-spacing: .1em; }

@keyframes titleGlow {
  0%,100% { filter: drop-shadow(0 0 12px rgba(0,255,255,.4)); }
  50%     { filter: drop-shadow(0 0 28px rgba(0,255,255,.9)) drop-shadow(0 0 50px rgba(255,0,255,.5)); }
}

.version-tag {
  font-size: 11px; letter-spacing: .35em; color: var(--cyan);
  opacity: .7; margin-top: 4px;
  text-shadow: 0 0 12px rgba(0,255,255,.5);
}
.muted       { color: var(--muted); font-size: 13px; text-align: center; padding: 8px 0; }
.mt-10 { margin-top: 10px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.panel-title { font-size: 11px; letter-spacing: .3em; color: var(--cyan); text-transform: uppercase; }

/* ─────────────────────────────────────────
   INPUTS
───────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-family: inherit;
  letter-spacing: .05em;
  background: rgba(0,0,0,.6);
  color: #fff;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 10px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
input[type="text"] {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 18px;
  color: var(--cyan);
  text-align: center;
}
input::placeholder { color: rgba(255,255,255,.25); font-size: 13px; letter-spacing: .08em; }
input:focus {
  border-color: rgba(0,255,255,.5);
  box-shadow: 0 0 16px rgba(0,255,255,.2);
}

/* ─────────────────────────────────────────
   BUTTONS
───────────────────────────────────────── */
.btn-primary {
  padding: 13px 28px; font-size: 14px; font-weight: bold;
  font-family: inherit; letter-spacing: .12em; text-transform: uppercase;
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
  color: #000; border: none; border-radius: 10px; cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 0 24px rgba(0,255,255,.5); }
.btn-primary:disabled { background: rgba(70,70,70,.6); color: rgba(130,130,130,.7); cursor: not-allowed; }
.btn-primary.small  { padding: 9px 18px; font-size: 12px; }
.btn-primary.locked { background: linear-gradient(135deg, var(--green), var(--cyan)); }
.w100 { width: 100%; }

.btn-ghost {
  padding: 8px 18px; font-size: 11px; font-family: inherit;
  letter-spacing: .15em; text-transform: uppercase;
  background: transparent; color: var(--muted);
  border: 1px solid rgba(255,255,255,.12); border-radius: 8px; cursor: pointer;
  transition: color .2s, border-color .2s; white-space: nowrap;
}
.btn-ghost:hover { color: var(--cyan); border-color: rgba(0,255,255,.35); }
.btn-ghost.tiny  { padding: 5px 10px; font-size: 11px; }
.btn-ghost.small { padding: 7px 14px; font-size: 11px; }

.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 11px 20px; font-size: 12px; font-weight: bold;
  font-family: inherit; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(255,255,255,.06); color: rgba(255,255,255,.82);
  border: 1px solid rgba(255,255,255,.18); border-radius: 10px;
  cursor: pointer; transition: background .2s, border-color .2s; width: 100%;
}
.btn-google:hover { background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.32); }

.btn-danger {
  padding: 11px 20px; font-size: 12px; font-weight: bold;
  font-family: inherit; letter-spacing: .12em; text-transform: uppercase;
  background: rgba(255,40,40,.12); color: #ff4466;
  border: 1px solid rgba(255,40,40,.28); border-radius: 10px;
  cursor: pointer; transition: all .2s;
}
.btn-danger:hover:not(:disabled) { background: rgba(255,40,40,.25); border-color: #ff4466; }
.btn-danger:disabled { opacity: .45; cursor: not-allowed; }

/* ─────────────────────────────────────────
   CARDS
───────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 36px;
  backdrop-filter: blur(14px);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  box-shadow: 0 0 40px rgba(0,255,255,.06);
}
.card-title { font-size: 13px; letter-spacing: .3em; color: rgba(255,255,255,.5); margin-bottom: 4px; }

/* ─────────────────────────────────────────
   AUTH SCREEN
───────────────────────────────────────── */
#bg-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  opacity: 0.3; pointer-events: none; z-index: 0;
}

.auth-layout {
  position: relative; z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 64px;
  min-height: 100vh;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 32px;
}

.auth-brand {
  flex: 1 1 320px;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-icon {
  font-size: 48px;
  line-height: 1;
  filter: drop-shadow(0 0 18px rgba(0,255,255,.6));
}

.auth-title {
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: .1em;
  text-align: left;
  -webkit-text-fill-color: transparent;
}

.auth-tagline {
  color: rgba(255,255,255,.8);
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: .02em;
  font-family: Arial, sans-serif;
  font-weight: bold;
}

.feature-list { display: flex; flex-direction: column; gap: 14px; }

.feature-item {
  display: flex; align-items: center; gap: 14px;
  font-size: 13px; letter-spacing: .04em;
  color: rgba(255,255,255,.65);
  font-family: Arial, sans-serif;
}

.fi-icon {
  font-size: 20px; width: 30px; text-align: center; flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(0,255,255,.4));
}

.auth-right {
  flex: 0 1 360px;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.auth-card {
  width: 100%;
  gap: 12px;
  align-items: stretch;
  padding: 28px 28px;
}

.auth-error {
  min-height: 18px;
  font-size: 12px;
  letter-spacing: .04em;
  text-align: center;
  color: #ff4466;
}

.auth-hint {
  font-size: 12px; color: var(--muted);
  letter-spacing: .06em; text-align: center;
  font-family: Arial, sans-serif; line-height: 1.5;
}

.auth-divider {
  display: flex; align-items: center; gap: 10px;
  width: 100%; color: var(--muted); font-size: 11px; letter-spacing: .1em;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(255,255,255,.08);
}

.auth-switch {
  font-size: 12px; color: var(--muted); text-align: center;
  font-family: Arial, sans-serif;
}
.auth-switch a {
  color: var(--cyan); cursor: pointer; text-decoration: underline;
}

.input-hint-wrap { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.input-hint { font-size: 11px; color: var(--muted); padding-left: 4px; }

/* ─────────────────────────────────────────
   LOBBY
───────────────────────────────────────── */
#screen-lobby {
  justify-content: flex-start;
  padding-top: 18px;
  gap: 14px;
}

.lobby-topbar {
  width: 100%; max-width: 960px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}

.topbar-right { display: flex; align-items: center; gap: 8px; }

.player-badge {
  font-size: 12px; letter-spacing: .12em; color: var(--cyan);
  background: rgba(0,255,255,.07); border: 1px solid rgba(0,255,255,.2);
  padding: 7px 16px; border-radius: 20px;
}
.player-badge.clickable {
  cursor: pointer; transition: background .2s, box-shadow .2s;
}
.player-badge.clickable:hover {
  background: rgba(0,255,255,.14);
  box-shadow: 0 0 14px rgba(0,255,255,.25);
}

.lobby-cols {
  display: flex; gap: 20px; width: 100%; max-width: 960px;
  align-items: flex-start; flex-wrap: wrap;
}

.lobby-panel {
  flex: 1 1 260px;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; backdrop-filter: blur(10px);
  max-height: calc(100vh - 160px); overflow-y: auto;
}
.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }

.lobby-panel::-webkit-scrollbar { width: 3px; }
.lobby-panel::-webkit-scrollbar-thumb { background: rgba(0,255,255,.2); border-radius: 2px; }

.room-row {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(0,0,0,.3); border: 1px solid rgba(0,255,255,.1);
  border-radius: 10px; padding: 11px 14px; margin-bottom: 8px;
  transition: border-color .2s;
}
.room-row:hover { border-color: rgba(0,255,255,.3); }
.room-host { font-size: 14px; color: var(--cyan); letter-spacing: .05em; }
.room-host-level {
  font-size: 9px;
  background: rgba(255,215,0,.2);
  color: var(--gold);
  padding: 2px 6px;
  border-radius: 12px;
  margin-left: 6px;
}
.room-host-rank { font-size: 12px; margin-left: 4px; }
.room-id { font-size: 10px; color: var(--muted); margin-top: 2px; }

/* ─────────────────────────────────────────
   ROOM WAITING
───────────────────────────────────────── */
#screen-room { gap: 0; }
.room-card { min-width: min(460px, 94vw); gap: 20px; }
.room-code-line { font-size: 12px; letter-spacing: .2em; color: var(--muted); }
.code-val { color: var(--cyan); font-weight: bold; }

.room-slots { display: flex; align-items: center; gap: 24px; width: 100%; }

.slot {
  flex: 1; background: rgba(0,0,0,.3); border-radius: 12px;
  padding: 16px 10px; text-align: center; border: 2px solid transparent;
}
.slot.p1 { border-color: rgba(0,255,255,.25); }
.slot.p2 { border-color: rgba(255,0,255,.25); }
.slot-label { font-size: 9px; letter-spacing: .3em; color: var(--muted); margin-bottom: 8px; }
.slot-name  { font-size: 16px; font-weight: bold; letter-spacing: .08em; min-height: 24px; }
.slot-status { display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 20px; font-size: 10px; letter-spacing: .15em; }
.s-wait  { background: rgba(255,255,255,.04); color: var(--muted);  border: 1px solid rgba(255,255,255,.08); }
.s-host  { background: rgba(0,255,255,.08);   color: var(--cyan);   border: 1px solid rgba(0,255,255,.25);  }
.s-join  { background: rgba(0,255,136,.07);   color: var(--green);  border: 1px solid rgba(0,255,136,.25);  }
.s-ready { background: rgba(255,215,0,.08);   color: var(--gold);   border: 1px solid rgba(255,215,0,.35);  }

.room-card .btn-primary { width: 100%; }

.vs-orb {
  font-size: 32px; font-weight: bold; flex-shrink: 0;
  background: linear-gradient(135deg, #ff0055, #ff6600);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: vsPulse 1.1s ease-in-out infinite;
}
@keyframes vsPulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.15)} }

#room-countdown-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.8);
  display: none; align-items: center; justify-content: center; z-index: 500;
}
#room-countdown-num {
  font-size: clamp(120px, 20vw, 200px); font-weight: bold;
  background: linear-gradient(135deg, var(--gold), #ff6600);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: cdPulse .9s ease-in-out infinite;
}
@keyframes cdPulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.2)} }

/* ─────────────────────────────────────────
   GAME SCREEN — HUD layout
───────────────────────────────────────── */
#screen-game {
  display: none !important;
  padding: 0; overflow: hidden;
}
#screen-game[style*="block"] {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed; inset: 0;
  background: #07091a;
}

/* HUD band */
#game-hud {
  width: 800px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0,255,255,.1);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  height: 54px;
  flex-shrink: 0;
}

.hud-player {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  min-width: 200px;
}
.hud-p2 { flex-direction: row-reverse; }

.hud-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0;
  letter-spacing: .04em;
}
.hud-av-cyan    { background: rgba(0,255,255,.15); border: 1.5px solid rgba(0,255,255,.5); color: #00ffff; }
.hud-av-magenta { background: rgba(255,0,255,.15); border: 1.5px solid rgba(255,0,255,.5); color: #ff00ff; }

.hud-pinfo        { display: flex; flex-direction: column; }
.hud-pinfo-right  { align-items: flex-end; }
.hud-pname  { font-size: 13px; font-weight: 700; letter-spacing: .07em; }
.hud-cyan    { color: #00e5ff; }
.hud-magenta { color: #ff40ff; }
.hud-plevel { font-size: 10px; color: rgba(255,255,255,.4); margin-top: 1px; }
.hud-plevel .hud-medal { color: rgba(255,215,0,.75); }

.hud-centre {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  flex: 1;
}
.hud-score-row { display: flex; align-items: center; gap: 10px; }
.hud-score     { font-size: 22px; font-weight: 700; width: 28px; text-align: center; }
.hud-score-cyan    { color: #00e5ff; }
.hud-score-magenta { color: #ff40ff; }
.hud-score-sep { font-size: 16px; color: rgba(255,255,255,.25); }

.hud-timer {
  display: flex; align-items: center; gap: 5px;
  font-size: 10px; color: rgba(255,255,255,.4);
}
.hud-timer-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #ff4444;
  animation: hudTimerPulse 1s ease-in-out infinite;
}
@keyframes hudTimerPulse { 0%,100%{opacity:1} 50%{opacity:.2} }

/* Power-up strip */
#game-pu-strip {
  width: 800px;
  display: flex;
  justify-content: space-between;
  padding: 5px 14px;
  background: rgba(0,0,0,.45);
  border-left: 1px solid rgba(0,255,255,.1);
  border-right: 1px solid rgba(0,255,255,.1);
  flex-shrink: 0;
  min-height: 32px;
}
.pu-strip-side       { display: flex; gap: 6px; align-items: center; }
.pu-strip-right      { flex-direction: row-reverse; }

.pu-hud-chip {
  display: flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 6px; padding: 3px 8px;
  font-size: 11px; color: rgba(255,255,255,.65);
  letter-spacing: .04em;
}
.pu-hud-chip.pu-chip-active {
  background: rgba(255,100,0,.18);
  border-color: rgba(255,150,0,.5);
  color: #ffaa44;
}
.pu-hud-chip.pu-chip-ready {
  background: rgba(0,255,120,.1);
  border-color: rgba(0,255,120,.4);
  color: #40ffaa;
}
.pu-hud-icon { font-size: 13px; line-height: 1; }
.pu-hud-key {
  font-size: 9px; color: rgba(255,255,255,.3);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 3px; padding: 0 3px;
  line-height: 1.4;
}

/* Canvas */
#pongCanvas {
  display: block;
  border-left: 1px solid rgba(0,255,255,.18);
  border-right: 1px solid rgba(0,255,255,.18);
  flex-shrink: 0;
}

/* Stat ticker */
#game-stat-ticker {
  width: 800px;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 5px 14px;
  background: rgba(0,0,0,.5);
  border: 1px solid rgba(0,255,255,.1);
  border-top: none;
  border-radius: 0 0 10px 10px;
  flex-shrink: 0;
}
.stat-tick-item {
  font-size: 10px;
  color: rgba(255,255,255,.38);
  letter-spacing: .04em;
  white-space: nowrap;
}
.stat-tick-item strong {
  color: rgba(255,255,255,.72);
  font-weight: 600;
}
.stat-tick-sep {
  font-size: 12px;
  color: rgba(255,255,255,.15);
  margin: 0 10px;
}

/* Leave button inside ticker */
.btn-leave-game {
  margin-left: auto;
  padding: 4px 12px; font-size: 10px; font-family: inherit;
  letter-spacing: .1em; font-weight: 700;
  background: rgba(255,40,40,.1); color: rgba(255,100,100,.65);
  border: 1px solid rgba(255,40,40,.2); border-radius: 6px;
  cursor: pointer; transition: all .2s;
}
.btn-leave-game:hover {
  background: rgba(255,40,40,.25); color: #ff4466;
  border-color: rgba(255,40,40,.5);
}

/* Match-point banner */
#match-point-banner {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 22px; font-weight: 700; letter-spacing: .25em;
  color: #ffd700;
  text-shadow: 0 0 30px rgba(255,215,0,.8), 0 0 60px rgba(255,215,0,.4);
  pointer-events: none;
  animation: mpFade 1.5s ease forwards;
  z-index: 30;
  white-space: nowrap;
}
@keyframes mpFade {
  0%  { opacity: 0; transform: translate(-50%,-50%) scale(.8); }
  20% { opacity: 1; transform: translate(-50%,-50%) scale(1.05); }
  70% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  100%{ opacity: 0; transform: translate(-50%,-50%) scale(.95); }
}

/* Responsive — smaller screens */
@media (max-width: 820px) {
  #game-hud,
  #game-pu-strip,
  #game-stat-ticker { width: 100vw; border-radius: 0; }
  #pongCanvas { width: 100vw !important; height: auto !important; }
}

/* ─────────────────────────────────────────
   GAME OVER
───────────────────────────────────────── */
#screen-gameover {
  gap: 12px; padding: 28px 32px;
  display: none; flex-direction: column;
  overflow-y: auto; max-height: 100vh;
}
#screen-gameover.active { display: flex; }

.gameover-title {
  font-size: clamp(40px, 7vw, 68px); letter-spacing: .15em;
  background: linear-gradient(135deg, #ff0055, #ff8800, #ff0055);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: goPulse 1s ease-in-out infinite;
}
@keyframes goPulse { 0%,100%{filter:drop-shadow(0 0 16px rgba(255,0,85,.4))} 50%{filter:drop-shadow(0 0 35px rgba(255,0,85,.8))} }

.winner-text {
  font-size: clamp(20px, 3.5vw, 36px); letter-spacing: .1em;
  background: linear-gradient(135deg, var(--gold), #ff8800);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.trophy { font-size: clamp(60px, 10vw, 100px); animation: trophyFloat 2s ease-in-out infinite; }
@keyframes trophyFloat { 0%,100%{transform:translateY(0) rotate(-4deg)} 50%{transform:translateY(-12px) rotate(4deg)} }

.final-scores { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center; }
.fscore-box {
  background: var(--card-bg); border: 2px solid var(--border);
  border-radius: 12px; padding: 14px 28px; min-width: 110px; text-align: center;
}
.p1-box { border-color: rgba(0,255,255,.28); }
.p2-box { border-color: rgba(255,0,255,.28); }
.fscore-name { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.fscore-num {
  font-size: clamp(40px, 7vw, 60px); font-weight: bold;
  background: linear-gradient(135deg, var(--gold), #ff8800);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.fscore-dash { font-size: 32px; color: var(--muted); }
.lb-section { width: 100%; max-width: 500px; text-align: center; }

/* ─────────────────────────────────────────
   LEADERBOARD TABLE
───────────────────────────────────────── */
.lb-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.lb-tbl th {
  font-size: 10px; letter-spacing: .2em; color: rgba(0,255,255,.6);
  padding: 6px 10px; border-bottom: 1px solid rgba(0,255,255,.1); text-align: left;
}
.lb-tbl td { padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,.04); }
.lb-tbl tr:hover td { background: rgba(0,255,255,.03); }
.lb-tbl .rank-1 td { color: var(--gold); }
.lb-tbl .rank-2 td { color: #ddd; }
.lb-tbl .rank-3 td { color: #cd7f32; }
.cell-w { color: var(--green); }
.cell-l { color: rgba(255,100,100,.8); }

/* ─────────────────────────────────────────
   MODALS
───────────────────────────────────────── */
#lb-modal,
#settings-modal,
#profile-modal,
#payment-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.8);
  display: none; align-items: center; justify-content: center;
  z-index: 900; padding: 20px;
}

.modal-box {
  background: #0d0d20; border: 1px solid rgba(0,255,255,.25);
  border-radius: 18px; padding: 30px 36px;
  width: 100%; max-width: 460px; max-height: 88vh; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  box-shadow: 0 0 50px rgba(0,255,255,.15);
}
.modal-title { font-size: 20px; letter-spacing: .25em; color: var(--gold); }

/* Settings specific */
.settings-box {
  max-width: 500px;
  align-items: stretch;
  gap: 0;
}
.settings-section {
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,.05);
}
.settings-section:last-of-type { border-bottom: none; }
.settings-label { font-size: 9px; letter-spacing: .3em; color: var(--cyan); margin-bottom: 2px; }
.danger-label   { color: #ff4466; }
.settings-info  {
  background: rgba(0,0,0,.3); border-radius: 8px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.sinfo-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.sinfo-label { color: var(--muted); letter-spacing: .08em; }
.sinfo-val   { color: #fff; font-weight: bold; }
.settings-warning { font-size: 12px; color: rgba(255,100,100,.65); line-height: 1.6; font-family: Arial, sans-serif; }
.settings-divider { height: 1px; background: rgba(255,0,0,.12); }

/* Profile Hub Modal */
.profile-box {
  max-width: 620px; width: 100%;
  gap: 0; padding: 0;
  align-items: stretch;
  max-height: 88vh;
  overflow: hidden;
  display: flex; flex-direction: column;
}

.profile-box-header {
  padding: 28px 32px 0;
  flex-shrink: 0;
}

.profile-box-tabs {
  padding: 0 32px;
  flex-shrink: 0;
}

.profile-box-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 32px;
  min-height: 0;
}

.profile-box-footer {
  padding: 12px 32px 24px;
  flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,.05);
}

.profile-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}

.profile-tabs {
  display: flex; gap: 4px; margin-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,.08); padding-bottom: 0;
}
.profile-tab {
  padding: 8px 18px; font-size: 11px; font-family: inherit;
  letter-spacing: .15em; text-transform: uppercase;
  background: transparent; color: var(--muted);
  border: none; border-bottom: 2px solid transparent;
  cursor: pointer; transition: color .2s, border-color .2s;
  margin-bottom: -1px;
}
.profile-tab:hover  { color: var(--text); }
.profile-tab.active { color: var(--cyan); border-bottom-color: var(--cyan); }

.profile-tab-content { min-height: 220px; }

/* Season sub-view toggle */
.season-subviews {
  display: flex; gap: 6px; margin-bottom: 20px;
}
.season-sv {
  padding: 5px 14px; font-size: 10px; font-family: inherit;
  letter-spacing: .12em; text-transform: uppercase;
  background: rgba(255,255,255,.04);
  color: var(--muted); border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px; cursor: pointer; transition: all .2s;
}
.season-sv:hover  { color: var(--text); border-color: rgba(255,255,255,.25); }
.season-sv.active { color: var(--gold); border-color: rgba(255,215,0,.4); background: rgba(255,215,0,.08); }

/* MY RANK view */
.season-rank-display {
  text-align: center; padding: 16px 0 12px;
}
.season-rank-emoji { font-size: 56px; line-height: 1; margin-bottom: 6px; }
.season-rank-name  { font-size: 22px; letter-spacing: .2em; font-weight: bold; color: var(--gold); }
.season-rank-pts   { font-size: 13px; color: var(--muted); margin-top: 4px; letter-spacing: .1em; }

.season-progress-wrap { margin: 16px 0 8px; }
.season-progress-bar  {
  height: 8px; background: rgba(255,255,255,.08);
  border-radius: 4px; overflow: hidden; margin-bottom: 8px;
}
.season-progress-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--gold), #ff8800);
  transition: width .5s ease;
}
.season-time-fill { background: linear-gradient(90deg, var(--cyan), var(--magenta)); }
.season-progress-label { font-size: 11px; color: var(--muted); letter-spacing: .06em; text-align: center; }

.season-pts-breakdown {
  display: flex; justify-content: center; gap: 32px; margin-top: 16px;
  padding-top: 16px; border-top: 1px solid rgba(255,255,255,.06);
}
.pts-item { text-align: center; }
.pts-val  { display: block; font-size: 20px; font-weight: bold; color: var(--green); }
.pts-desc { font-size: 10px; color: var(--muted); letter-spacing: .1em; }

/* COUNTDOWN view */
.season-countdown { text-align: center; padding: 12px 0; }
.countdown-number { font-size: 64px; font-weight: bold; color: var(--cyan); line-height: 1; }
.countdown-label  { font-size: 12px; letter-spacing: .3em; color: var(--muted); margin: 4px 0; }
.countdown-sub    { font-size: 12px; color: var(--muted); }
.countdown-end    { font-size: 12px; color: var(--muted); text-align: center; margin-top: 12px; letter-spacing: .04em; font-family: Arial, sans-serif; }

/* TOP 3 view */
.top3-list { display: flex; flex-direction: column; gap: 10px; }
.top3-row {
  display: flex; align-items: center; gap: 12px;
  background: rgba(0,0,0,.25); border-radius: 10px; padding: 12px 16px;
  transition: all 0.3s ease;
  animation: fadeInUp 0.5s ease;
}
.top3-row:hover {
  background: rgba(0,255,255,.1);
  transform: translateX(4px);
}
.top3-pos  { font-size: 28px; width: 40px; text-align: center; filter: drop-shadow(0 0 8px rgba(255,215,0,.5)); }
.top3-name { flex: 1; font-size: 14px; font-weight: bold; letter-spacing: .08em; color: var(--text); }
.top3-rank { font-size: 12px; padding: 4px 10px; background: rgba(255,215,0,.1); border-radius: 20px; color: var(--gold); }
.top3-pts  { font-size: 14px; font-weight: bold; color: var(--cyan); letter-spacing: .06em; min-width: 70px; text-align: right; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Shop styles */
.shop-box {
  max-width: 600px;
  width: 100%;
  gap: 0;
  padding: 28px 32px;
  align-items: stretch;
  max-height: 88vh;
  overflow-y: auto;
}

.shop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.shop-coins {
  font-size: 16px;
  color: var(--gold);
  letter-spacing: .08em;
  font-weight: bold;
}

.shop-section { margin-bottom: 24px; }

.shop-section-title {
  font-size: 11px;
  letter-spacing: .25em;
  color: var(--cyan);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0,255,255,.12);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
}

.shop-item {
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: border-color .2s;
}
.shop-item:hover { border-color: rgba(0,255,255,.25); }
.shop-item.is-equipped { border-color: rgba(0,255,136,.4); background: rgba(0,255,136,.06); }
.shop-item.is-locked   { opacity: .45; }

.shop-item-emoji { font-size: 26px; line-height: 1; }
.shop-item-name  { font-size: 10px; letter-spacing: .1em; color: var(--text); }
.shop-item-req   { font-size: 9px; color: var(--muted); letter-spacing: .08em; }

.shop-btn {
  width: 100%;
  padding: 5px 4px;
  font-size: 9px;
  font-family: inherit;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .2s;
  font-weight: bold;
}
.shop-btn.equipped { background: rgba(0,255,136,.12); color: var(--green); border-color: rgba(0,255,136,.3); cursor: default; }
.shop-btn.equip    { background: rgba(0,255,255,.12); color: var(--cyan);  border-color: rgba(0,255,255,.3); }
.shop-btn.equip:hover { background: rgba(0,255,255,.22); }
.shop-btn.buy      { background: rgba(255,215,0,.12); color: var(--gold);  border-color: rgba(255,215,0,.3); }
.shop-btn.buy:hover { background: rgba(255,215,0,.22); }
.shop-btn.locked   { background: rgba(255,255,255,.04); color: var(--muted); cursor: not-allowed; }

/* Season Strip */
.season-strip {
  width: 100%; max-width: 960px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: rgba(255,215,0,.05);
  border: 1px solid rgba(255,215,0,.15);
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 12px; letter-spacing: .06em;
}
.strip-rank  { color: var(--gold); font-weight: bold; }
.strip-pts   { color: var(--text); }
.strip-sep   { color: var(--muted); }
.strip-info  { color: var(--muted); font-family: Arial, sans-serif; }
.strip-info strong { color: var(--cyan); }
.strip-hint  { margin-left: auto; color: rgba(255,215,0,.45); font-size: 10px; letter-spacing: .08em; }

/* XP & Level */
.badge-level {
  font-size: 10px;
  background: linear-gradient(135deg, var(--gold), #ff8800);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  font-weight: bold; letter-spacing: .05em;
  margin-right: 4px;
}
.badge-coins {
  font-size: 11px;
  color: var(--gold);
  letter-spacing: .05em;
  margin-left: 6px;
}

#xp-result-panel {
  text-align: center;
  padding: 14px 24px;
  background: rgba(255,215,0,.07);
  border: 1px solid rgba(255,215,0,.25);
  border-radius: 12px;
  width: 100%; max-width: 320px;
}

.xp-earned {
  font-size: 28px; font-weight: bold; letter-spacing: .1em;
  background: linear-gradient(135deg, var(--gold), #ff8800);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.coins-earned {
  font-size: 22px; font-weight: bold;
  color: var(--gold);
  text-shadow: 0 0 12px rgba(255,215,0,.5);
}
.xp-coins-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  align-items: baseline;
}
.level-up-badge {
  margin-top: 6px;
  font-size: 14px; letter-spacing: .1em;
  color: var(--gold);
  animation: levelPulse 1s ease-in-out infinite;
}
@keyframes levelPulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%     { opacity: .8; transform: scale(1.05); }
}
.xp-level-line {
  margin-top: 6px;
  font-size: 12px; letter-spacing: .08em; color: var(--muted);
}
.daily-bonus {
  margin-top: 6px;
  font-size: 13px; letter-spacing: .08em;
  color: var(--gold);
}
.season-result-line {
  margin-top: 8px; font-size: 13px;
  color: var(--gold); letter-spacing: .08em; text-align: center;
}
.season-pts-delta {
  color: var(--green); font-size: 11px; margin-left: 6px;
}
.rank-up-badge {
  margin-top: 6px; font-size: 15px; font-weight: bold;
  color: var(--gold); text-align: center; letter-spacing: .1em;
  animation: levelPulse 1s ease-in-out infinite;
}

/* Toast notification */
#toast-notification {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: rgba(10,10,28,.95);
  border: 1px solid rgba(255,215,0,.4);
  color: var(--gold);
  padding: 14px 28px;
  border-radius: 30px;
  font-size: 14px;
  letter-spacing: .08em;
  box-shadow: 0 0 30px rgba(255,215,0,.2);
  z-index: 9999;
  opacity: 0;
  transition: transform .4s ease, opacity .4s ease;
  pointer-events: none;
  white-space: nowrap;
}
#toast-notification.toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Season intro */
#season-intro-toast {
  position: fixed;
  bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(120px);
  z-index: 9998;
  opacity: 0;
  transition: transform .4s ease, opacity .4s ease;
  pointer-events: none;
}
#season-intro-toast.season-intro-show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.season-intro-content {
  background: #0d0d22;
  border: 1px solid rgba(255,215,0,.35);
  border-radius: 16px;
  padding: 22px 28px;
  max-width: min(420px, 90vw);
  text-align: center;
  box-shadow: 0 0 40px rgba(255,215,0,.15);
  display: flex; flex-direction: column; gap: 12px;
}
.season-intro-title {
  font-size: 15px; letter-spacing: .2em; color: var(--gold); font-weight: bold;
}
.season-intro-body {
  font-size: 13px; color: rgba(255,255,255,.65);
  font-family: Arial, sans-serif; line-height: 1.7;
}
.season-intro-body strong { color: var(--cyan); }

.season-loading {
  text-align: center;
  padding: 40px;
  color: var(--muted);
}
.season-loading::after {
  content: '...';
  animation: dots 1.5s steps(4, end) infinite;
}
@keyframes dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

.cell-lv { color: var(--gold); font-size: 11px; }

/* Responsive */
@media (max-width: 960px) {
  .auth-layout {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 40px;
    padding: 40px 24px 60px;
    min-height: 100vh;
  }
  .auth-brand { max-width: 100%; flex: none; }
  .auth-right { flex: none; width: 100%; max-width: 460px; }
  .auth-card  { padding: 28px 24px; }
  .auth-title { font-size: clamp(40px, 10vw, 60px); }
  .auth-tagline { font-size: 17px; }
}

@media (max-width: 600px) {
  .lobby-cols { flex-direction: column; }
  .room-slots { flex-direction: column; gap: 12px; }
  .vs-orb { font-size: 22px; }
  .card { padding: 20px 16px; }
  #hud-pname { font-size: 11px; }
  .hud-score { font-size: 17px !important; }
  .auth-layout { padding: 24px 16px 40px; gap: 24px; }
  .auth-title  { font-size: 28px; }
  #toast-notification { white-space: normal; text-align: center; max-width: 90vw; }
  .top3-row { flex-wrap: wrap; }
  .top3-pts { margin-left: auto; }
}

/* Create Room Button Styling */
.create-room-btn {
  width: 100%;
  margin-bottom: 20px;
  padding: 16px 28px;
  font-size: 16px;
  font-weight: bold;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  box-shadow: 0 0 20px rgba(0,255,136,0.3);
  transition: all 0.3s ease;
}

.create-room-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0,255,136,0.5);
}

/* Rooms Divider */
.rooms-divider {
  margin: 16px 0;
  border-top: 1px solid rgba(0,255,255,0.2);
  position: relative;
}

.rooms-divider::after {
  content: 'AVAILABLE ROOMS';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10,10,28,0.9);
  padding: 0 12px;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--muted);
  font-weight: normal;
}

/* Room List Enhancement */
#room-list {
  margin-top: 8px;
  max-height: calc(100% - 120px);
  overflow-y: auto;
}

#room-list::-webkit-scrollbar {
  width: 3px;
}

#room-list::-webkit-scrollbar-thumb {
  background: rgba(0,255,255,.2);
  border-radius: 2px;
}

/* Room Row Hover Effect Enhancement */
.room-row {
  transition: all 0.2s ease;
}

.room-row:hover {
  transform: translateX(4px);
  border-color: rgba(0,255,255,.4);
  background: rgba(0,255,255,.05);
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .create-room-btn {
    padding: 12px 20px;
    font-size: 14px;
  }
  
  .rooms-divider::after {
    font-size: 8px;
    padding: 0 8px;
  }
}

/* Room count badge */
.room-count {
  font-size: 10px;
  background: rgba(0,255,255,0.2);
  padding: 2px 6px;
  border-radius: 12px;
  margin-left: 6px;
  color: var(--cyan);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: rgba(0,0,0,.3);
  border: 1px solid rgba(0,255,255,.15);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  transition: all 0.2s ease;
}

.stat-card:hover {
  border-color: rgba(0,255,255,.35);
  transform: translateY(-2px);
}

.stat-icon {
  font-size: 24px;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 22px;
  font-weight: bold;
  color: var(--cyan);
  letter-spacing: .05em;
}

.stat-label {
  font-size: 9px;
  letter-spacing: .1em;
  color: var(--muted);
  margin-top: 4px;
  text-transform: uppercase;
}

/* Match History */
.match-history-section {
  margin-top: 20px;
  border-top: 1px solid rgba(0,255,255,.15);
  padding-top: 16px;
}

.match-history-title {
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--gold);
  margin-bottom: 12px;
}

.match-history-list {
  max-height: 300px;
  overflow-y: auto;
}

.match-history-item {
  background: rgba(0,0,0,.2);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  border-left: 3px solid transparent;
}

.match-history-item.match-win {
  border-left-color: var(--green);
  background: rgba(0,255,136,.05);
}

.match-history-item.match-loss {
  border-left-color: #ff4466;
  background: rgba(255,68,102,.05);
}

.match-date {
  font-size: 10px;
  color: var(--muted);
  font-family: monospace;
}

.match-players {
  font-size: 12px;
  color: var(--text);
  flex: 1;
}

.match-score {
  font-size: 14px;
  font-weight: bold;
  color: var(--gold);
}

.match-result {
  font-size: 11px;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 12px;
}

.match-win .match-result {
  color: var(--green);
}

.match-loss .match-result {
  color: #ff6688;
}

/* Scrollbar for match history */
.match-history-list::-webkit-scrollbar {
  width: 3px;
}

.match-history-list::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.2);
  border-radius: 2px;
}

.match-history-list::-webkit-scrollbar-thumb {
  background: rgba(0,255,255,.3);
  border-radius: 2px;
}

/* Player Level Section */
.player-level-section {
  background: rgba(0,0,0,.3);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  text-align: center;
}

.level-badge-large {
  font-size: 32px;
  font-weight: bold;
  background: linear-gradient(135deg, var(--gold), #ff8800);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  letter-spacing: .1em;
}

.xp-progress {
  width: 100%;
}

.xp-bar {
  height: 8px;
  background: rgba(255,255,255,.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  border-radius: 4px;
  transition: width 0.5s ease;
}

.xp-text {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .05em;
}

/* Form styles for better keyboard navigation */
#login-form,
#register-form,
#google-username-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#login-form input,
#register-form input,
#google-username-form input {
  width: 100%;
}

/* Focus states for better keyboard navigation */
input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(0, 255, 255, 0.2);
}

button:focus {
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 2px rgba(0, 255, 255, 0.3);
}

/* Remove default button focus outline */
button::-moz-focus-inner {
  border: 0;
}

/* Visual feedback for focused inputs */
input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.2);
  transform: scale(1.01);
  transition: all 0.2s ease;
}

/* Ensure inputs are clearly clickable */
input {
  cursor: text;
  transition: all 0.2s ease;
}
/* ── Payment / Store Modal ───────────────── */
#payment-modal { }

.payment-box {
  max-width: 620px; width: 100%;
  gap: 0; padding: 28px 28px;
  align-items: stretch; max-height: 88vh; overflow-y: auto;
}

.payment-balance {
  font-size: 15px; color: var(--gold);
  font-weight: bold; letter-spacing: .06em;
}

.payment-section { margin-bottom: 24px; }

.payment-section-title {
  font-size: 11px; letter-spacing: .25em; color: var(--cyan);
  margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 1px solid rgba(0,255,255,.12);
}

/* Season Pass card */
.payment-pass-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  background: rgba(255,215,0,.06);
  border: 1px solid rgba(255,215,0,.2);
  border-radius: 14px; padding: 18px 20px;
  transition: border-color .2s;
}
.payment-pass-card:hover { border-color: rgba(255,215,0,.4); }
.payment-pass-card.pass-active { border-color: rgba(0,255,136,.35); background: rgba(0,255,136,.05); }

.pass-info { flex: 1; }
.pass-title { font-size: 16px; font-weight: bold; letter-spacing: .1em; color: var(--gold); margin-bottom: 8px; }
.pass-perks { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pass-perk {
  font-size: 11px; padding: 3px 10px; border-radius: 20px;
  background: rgba(255,215,0,.1); color: rgba(255,215,0,.8);
  border: 1px solid rgba(255,215,0,.2); letter-spacing: .05em;
}
.pass-price { font-size: 22px; font-weight: bold; color: var(--gold); }
.pass-active-label { font-size: 12px; color: var(--green); letter-spacing: .06em; }

.payment-btn {
  padding: 10px 20px; font-size: 12px; font-weight: bold;
  font-family: inherit; letter-spacing: .1em; text-transform: uppercase;
  border-radius: 10px; cursor: pointer; border: none; transition: all .2s;
}
.pass-btn { background: rgba(0,255,136,.15); color: var(--green); border: 1px solid rgba(0,255,136,.3); cursor: default; }

/* Season pass PayPal button */
.payment-pass-card .paypal-btn-wrap {
  min-width: 140px;
  width: 160px;
  flex-shrink: 0;
}

/* Coin packs grid */
.payment-packs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.payment-pack-card {
  background: rgba(0,0,0,.3);
  border: 1px solid rgba(255,215,0,.15);
  border-radius: 12px; padding: 18px 14px 14px;
  text-align: center; display: flex;
  flex-direction: column; align-items: center; gap: 5px;
  transition: border-color .2s;
  min-width: 0;
}
.payment-pack-card:hover { border-color: rgba(255,215,0,.35); }

.pack-coins { font-size: 32px; font-weight: bold; color: var(--gold); line-height: 1; }
.pack-label { font-size: 10px; color: var(--muted); letter-spacing: .1em; margin-bottom: 2px; }
.pack-price  { font-size: 16px; color: var(--text); font-weight: bold; margin-bottom: 6px; }

/* Single PayPal button per pack — width fills the card, min-height for the iframe */
.paypal-btn-wrap {
  width: 100%;
  min-height: 44px;
}
.paypal-btn-wrap > div,
.paypal-btn-wrap iframe {
  width: 100% !important;
  min-width: 0 !important;
}

/* Season pass badge in lobby */
.badge-pass {
  font-size: 12px;
  filter: drop-shadow(0 0 6px rgba(255,215,0,.6));
}

/* Add payment-modal to modal overlay rule */

/* ── Sign out button in settings ─────────── */
.btn-logout-settings {
  padding: 11px 20px; font-size: 12px; font-weight: bold;
  font-family: inherit; letter-spacing: .15em; text-transform: uppercase;
  background: rgba(255,255,255,.04);
  color: var(--muted); border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px; cursor: pointer; transition: all .2s;
}
.btn-logout-settings:hover {
  color: #ff4466; border-color: rgba(255,50,50,.3);
  background: rgba(255,50,50,.06);
}

/* ── Power-up Loadout UI ─────────────────── */
.loadout-section { margin-bottom: 8px; }

.loadout-section-title {
  font-size: 11px; letter-spacing: .2em; color: var(--cyan);
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 1px solid rgba(0,255,255,.12);
  display: flex; align-items: center; gap: 8px;
}

.loadout-hint {
  font-size: 10px; color: var(--muted); letter-spacing: .06em;
  font-weight: normal;
}

.loadout-slots {
  display: flex; gap: 12px; margin-bottom: 10px;
}

.pu-slot {
  flex: 1; background: rgba(0,0,0,.3);
  border: 1px solid rgba(0,255,255,.15);
  border-radius: 10px; padding: 10px 14px;
}

.pu-slot-label {
  font-size: 9px; letter-spacing: .2em; color: var(--muted); margin-bottom: 4px;
}

.pu-slot-current {
  font-size: 13px; color: var(--cyan); letter-spacing: .06em;
}

.pu-cost-line {
  font-size: 12px; margin-bottom: 12px; letter-spacing: .06em;
}
.cost-ok   { color: var(--green); }
.cost-high { color: #ff4466; }

.pu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
}

.pu-card {
  background: rgba(0,0,0,.3);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px; padding: 10px 6px;
  text-align: center; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: all .2s;
}
.pu-card:hover    { border-color: rgba(0,255,255,.3); background: rgba(0,255,255,.05); }
.pu-card.pu-selected {
  border-color: rgba(0,255,136,.5);
  background: rgba(0,255,136,.08);
  box-shadow: 0 0 12px rgba(0,255,136,.2);
}

.pu-emoji { font-size: 22px; line-height: 1; }
.pu-name  { font-size: 10px; letter-spacing: .06em; color: var(--text); }
.pu-cost  { font-size: 9px; color: var(--gold); letter-spacing: .04em; }

.pu-how-to {
  font-size: 11px; color: var(--muted);
  font-family: Arial, sans-serif; line-height: 1.6;
  text-align: center; margin-top: 10px;
  padding: 8px 12px;
  background: rgba(255,255,255,.03);
  border-radius: 8px;
}

/* ── Auth live stats ─────────────────────── */
.auth-live-stats {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px;
  background: rgba(0,255,255,.05);
  border: 1px solid rgba(0,255,255,.15);
  border-radius: 10px;
  width: fit-content;
}
.live-stat { display: flex; align-items: center; gap: 8px; }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: livePulse 1.5s ease-in-out infinite;
}
@keyframes livePulse { 0%,100%{opacity:1} 50%{opacity:.3} }
.live-number { font-size: 18px; font-weight: bold; color: var(--cyan); letter-spacing: .05em; }
.live-label  { font-size: 12px; color: var(--muted); letter-spacing: .06em; font-family: Arial, sans-serif; }
.live-stat-sep { color: var(--muted); font-size: 14px; }

/* ── Game over personal result ───────────── */
.gameover-win  {
  background: linear-gradient(135deg, var(--gold), #ff8800) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}
.gameover-loss {
  background: linear-gradient(135deg, #ff0055, #ff4400) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.gameover-rank-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,215,0,.2);
  border-radius: 14px;
  padding: 16px 32px;
  text-align: center;
  min-width: 200px;
}
.rank-card-inner { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rank-card-emoji { font-size: 36px; line-height: 1; }
.rank-card-name  { font-size: 16px; font-weight: bold; letter-spacing: .15em; color: var(--gold); }
.rank-card-pts   { font-size: 12px; color: var(--muted); letter-spacing: .08em; }

/* ── Game over opponent line ─────────────── */
.gameover-opponent {
  font-size: 16px; letter-spacing: .12em;
  color: rgba(255,255,255,.6);
  font-family: Arial, sans-serif;
  margin-top: -8px; margin-bottom: 4px;
}

/* Victory gets gold glow on trophy */
.gameover-win ~ .trophy {
  filter: drop-shadow(0 0 20px rgba(255,215,0,.8));
  animation: trophyFloat 2s ease-in-out infinite;
}

/* ── Leave game / forfeit modal ──────────── */
#forfeit-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.forfeit-box {
  background: #0d0d20;
  border: 1px solid rgba(255,50,50,.3);
  border-radius: 16px; padding: 32px 36px;
  max-width: 380px; width: 90%;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  box-shadow: 0 0 50px rgba(255,0,0,.15);
  text-align: center;
}

.forfeit-title {
  font-size: 18px; letter-spacing: .2em;
  color: #ff4466; font-weight: bold;
}

.forfeit-body {
  font-size: 14px; color: rgba(255,255,255,.7);
  font-family: Arial, sans-serif; line-height: 1.7;
}
.forfeit-body strong { color: #ff4466; }

.forfeit-actions {
  display: flex; gap: 12px; width: 100%; justify-content: center;
  margin-top: 4px;
}
.forfeit-actions .btn-danger  { flex: 1; }
.forfeit-actions .btn-ghost   { flex: 1; }
