:root {
  --bg-0: #06070b;
  --bg-1: #0c0f17;
  --bg-2: #161a26;
  --accent: #ff3b2f;
  --accent-2: #ffb01f;
  --gold: #ffcb47;
  --text: #f6f7fb;
  --muted: #8c92a4;
  --good: #4ade80;
  --bad: #ef4444;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #000; color: var(--text); font-family: 'Inter', system-ui, sans-serif; user-select: none; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; }
button:disabled { opacity: 0.4; cursor: not-allowed; }

#game-root { position: fixed; inset: 0; }
#game-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.screen { position: absolute; inset: 0; display: none; z-index: 10; }
.screen.active { display: flex; align-items: center; justify-content: center; }
.screen.overlay { background: rgba(4, 6, 12, 0.72); backdrop-filter: blur(8px); }

#screen-title { background: radial-gradient(ellipse at 50% 30%, #1d1620 0%, #06070b 60%); }
.title-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255, 59, 47, 0.25), transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(255, 176, 31, 0.18), transparent 50%),
    linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.6) 100%);
  pointer-events: none;
  animation: bgPulse 8s ease-in-out infinite alternate;
}
@keyframes bgPulse { from { filter: hue-rotate(-10deg); } to { filter: hue-rotate(15deg); } }
.title-content { position: relative; text-align: center; z-index: 2; }
.title-logo {
  font-family: 'Anton', sans-serif;
  font-size: clamp(80px, 16vw, 240px);
  line-height: 0.9; letter-spacing: -2px;
  text-shadow: 0 0 40px rgba(255, 59, 47, 0.4), 0 8px 0 rgba(0,0,0,0.5);
}
.logo-roar { background: linear-gradient(180deg, #fff 30%, var(--accent-2) 80%); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; transform: skewX(-6deg); }
.logo-2k { display: inline-block; color: var(--accent); margin-left: 0.1em; transform: skewX(-6deg); text-shadow: 0 0 30px rgba(255, 59, 47, 0.8), 0 4px 0 #000; }
.title-tag { font-family: 'Bebas Neue', sans-serif; letter-spacing: 0.5em; font-size: clamp(12px, 1.5vw, 18px); color: var(--muted); margin-top: 8px; margin-bottom: 48px; }
.title-buttons { display: flex; gap: 18px; justify-content: center; }

.btn-primary {
  font-family: 'Bebas Neue', sans-serif; letter-spacing: 0.15em; font-size: 22px;
  padding: 16px 42px; color: #0a0a0a;
  background: linear-gradient(180deg, #ffd76b 0%, var(--gold) 50%, #c98b18 100%);
  border-radius: 4px;
  box-shadow: 0 8px 28px rgba(255, 176, 31, 0.4), inset 0 -3px 0 rgba(0,0,0,0.3);
  transition: transform 0.1s, filter 0.1s; border: 1px solid rgba(255,255,255,0.4);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.05); }
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-secondary {
  font-family: 'Bebas Neue', sans-serif; letter-spacing: 0.15em; font-size: 18px;
  padding: 14px 32px; color: var(--text);
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.18); border-radius: 4px;
  transition: background 0.1s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.12); }
.btn-back {
  font-family: 'Bebas Neue', sans-serif; letter-spacing: 0.15em; font-size: 16px;
  padding: 10px 22px; color: var(--muted);
  background: transparent; border: 1px solid rgba(255,255,255,0.12); border-radius: 4px;
}
.btn-back:hover { color: var(--text); border-color: rgba(255,255,255,0.3); }
.title-foot { position: absolute; bottom: -60px; left: 50%; transform: translateX(-50%); font-size: 11px; letter-spacing: 0.2em; color: var(--muted); }

.panel {
  background: linear-gradient(180deg, rgba(22,26,38,0.95), rgba(12,15,23,0.95));
  border: 1px solid rgba(255,255,255,0.08); border-radius: 12px;
  padding: 28px 36px; width: min(900px, 92vw); max-height: 92vh;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.03) inset;
  display: flex; flex-direction: column; gap: 18px; overflow-y: auto;
}
.panel.small { width: min(440px, 92vw); align-items: center; gap: 20px; text-align: center; }
.panel-title { font-family: 'Anton', sans-serif; letter-spacing: 0.1em; font-size: 32px; color: var(--text); text-align: center; flex-shrink: 0; }
.bottom-row {
  display: flex; justify-content: space-between;
  position: sticky; bottom: -28px;
  margin: 0 -36px -28px; padding: 14px 36px 28px;
  background: linear-gradient(to top, rgba(8,10,16,0.96) 60%, rgba(8,10,16,0));
  flex-shrink: 0; z-index: 2;
}

.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.mode-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.12); border-radius: 10px;
  padding: 28px 24px; text-align: left; color: var(--text);
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.mode-card:hover { transform: translateY(-3px); border-color: var(--gold); background: linear-gradient(180deg, rgba(255,203,71,0.08), rgba(255,255,255,0.02)); }
.mode-icon { font-size: 38px; margin-bottom: 8px; }
.mode-name { font-family: 'Bebas Neue', sans-serif; font-size: 22px; letter-spacing: 0.08em; }
.mode-desc { color: var(--muted); font-size: 13px; margin-top: 4px; line-height: 1.4; }

.character-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.char-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.1); border-radius: 10px;
  padding: 14px; cursor: pointer; color: var(--text); text-align: center;
  transition: transform 0.12s, border-color 0.12s;
}
.char-card .char-portrait {
  width: 100%; height: 110px; border-radius: 8px; margin-bottom: 6px;
  background: radial-gradient(circle at 50% 60%, rgba(255,255,255,0.08), rgba(0,0,0,0.4) 75%);
  display: flex; align-items: center; justify-content: center; font-size: 52px;
}
.char-card .char-name { font-family: 'Bebas Neue', sans-serif; font-size: 20px; letter-spacing: 0.1em; }
.char-card .char-species { font-size: 11px; color: var(--muted); letter-spacing: 0.2em; text-transform: uppercase; }
.char-card.selected { border-color: var(--gold); background: linear-gradient(180deg, rgba(255,203,71,0.15), rgba(255,255,255,0.02)); transform: translateY(-3px); box-shadow: 0 0 0 1px var(--gold), 0 10px 28px rgba(255,203,71,0.18); }
.char-detail { display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: 16px; align-items: center; padding: 14px; background: rgba(255,255,255,0.03); border-radius: 8px; }
.char-detail-name { font-family: 'Anton', sans-serif; font-size: 28px; letter-spacing: 0.05em; }
.char-detail-role { font-size: 12px; color: var(--muted); letter-spacing: 0.2em; text-transform: uppercase; }
.char-detail-stats { display: flex; flex-direction: column; gap: 8px; }
.stat { display: flex; align-items: center; gap: 10px; }
.stat-label { font-family: 'Bebas Neue', sans-serif; font-size: 13px; color: var(--muted); width: 60px; letter-spacing: 0.1em; }
.stat-bar { flex: 1; height: 8px; background: rgba(255,255,255,0.06); border-radius: 4px; overflow: hidden; }
.stat-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); border-radius: 4px; transition: width 0.4s ease; width: 0%; }

.court-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.court-card { border-radius: 10px; border: 1px solid rgba(255,255,255,0.1); overflow: hidden; cursor: pointer; background: var(--bg-2); transition: transform 0.12s, border-color 0.12s; text-align: left; color: var(--text); }
.court-card:hover { transform: translateY(-3px); }
.court-card.selected { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); transform: translateY(-3px); }
.court-thumb { aspect-ratio: 16 / 9; position: relative; overflow: hidden; }
.court-thumb canvas { width: 100%; height: 100%; display: block; }
.court-info { padding: 12px 14px; }
.court-name { font-family: 'Bebas Neue', sans-serif; font-size: 20px; letter-spacing: 0.08em; }
.court-blurb { color: var(--muted); font-size: 11px; margin-top: 2px; line-height: 1.4; }

#screen-loading { background: #06070b; }
.loading-content { text-align: center; }
.loading-spinner { width: 60px; height: 60px; border: 4px solid rgba(255,255,255,0.1); border-top-color: var(--gold); border-radius: 50%; margin: 0 auto 20px; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-family: 'Bebas Neue', sans-serif; letter-spacing: 0.3em; color: var(--muted); }

.hud { position: absolute; inset: 0; z-index: 5; pointer-events: none; display: none; font-family: 'Bebas Neue', sans-serif; }
.hud.active { display: block; }
.hud-top { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); }
.scoreboard {
  display: flex; align-items: stretch;
  background: rgba(8, 10, 16, 0.85);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 8px;
  box-shadow: 0 14px 36px rgba(0,0,0,0.55); overflow: hidden; min-width: 520px;
}
.score-side { padding: 10px 22px; display: flex; flex-direction: column; align-items: center; gap: 4px; background: linear-gradient(180deg, rgba(255,176,31,0.18), transparent); }
.score-side.away { background: linear-gradient(180deg, rgba(255,59,47,0.18), transparent); }
.score-name { font-size: 14px; letter-spacing: 0.18em; color: var(--muted); }
.score-points { font-family: 'Anton', sans-serif; font-size: 34px; line-height: 1; }
.score-fouls { font-size: 10px; letter-spacing: 0.2em; color: var(--muted); margin-top: 4px; }
.score-fouls span { color: var(--text); font-weight: 600; }
.score-mid { padding: 10px 26px; text-align: center; background: rgba(255,255,255,0.02); border-left: 1px solid rgba(255,255,255,0.06); border-right: 1px solid rgba(255,255,255,0.06); display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.score-clock { font-family: 'Anton', sans-serif; font-size: 22px; letter-spacing: 0.1em; }
.score-court { font-size: 11px; letter-spacing: 0.25em; color: var(--muted); }
.shot-clock { font-family: 'Anton', sans-serif; font-size: 28px; color: var(--accent); text-shadow: 0 0 12px rgba(255,59,47,0.5); margin-top: 4px; letter-spacing: 0.05em; }
.shot-clock.warn { animation: pulse-red 0.5s ease-in-out infinite alternate; }
@keyframes pulse-red { from { color: var(--accent); text-shadow: 0 0 8px rgba(255,59,47,0.5); } to { color: #ff7766; text-shadow: 0 0 22px rgba(255,80,40,0.95); } }
.hud-cards { position: absolute; top: 110px; right: 22px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.hud-cards .card-chip { width: 22px; height: 30px; border-radius: 2px; box-shadow: 0 4px 10px rgba(0,0,0,0.5); }
.hud-cards .card-chip.yellow { background: linear-gradient(180deg, #ffd84a, #c9a020); border: 1px solid #b8860b; }
.hud-cards .card-chip.red { background: linear-gradient(180deg, #ff4d3a, #b81d10); border: 1px solid #6a0a04; }
.hud-bottom { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; }

.power-meter { display: flex; align-items: center; gap: 14px; }
.power-label { font-size: 13px; letter-spacing: 0.25em; color: var(--muted); }
.power-stack { display: flex; flex-direction: column; align-items: stretch; width: 360px; gap: 2px; }
.power-marker {
  position: relative; left: 50%; margin-left: -10px; width: 20px;
  font-size: 22px; line-height: 1; color: #4ade80;
  text-shadow: 0 0 12px rgba(74,222,128,1), 0 2px 0 #003a16;
  transition: left 0.15s ease-out; pointer-events: none;
  filter: drop-shadow(0 0 4px rgba(74,222,128,0.7));
}
.power-track {
  position: relative; height: 22px;
  background: rgba(0,0,0,0.8); border: 1px solid rgba(255,255,255,0.18);
  border-radius: 6px; overflow: hidden;
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.6);
}
.power-fill {
  position: absolute; inset: 0; height: 100%; width: 0%;
  background: linear-gradient(90deg, #6cc4ff, var(--accent-2), var(--accent));
  transition: width 0.05s linear;
  box-shadow: 0 0 16px var(--accent-2); z-index: 1;
}
.power-sweet-band {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 12%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, rgba(74,222,128,0), rgba(74,222,128,0.75) 50%, rgba(74,222,128,0));
  border-left: 2px solid rgba(74,222,128,0.95);
  border-right: 2px solid rgba(74,222,128,0.95);
  box-shadow: inset 0 0 14px rgba(74,222,128,0.5), 0 0 14px rgba(74,222,128,0.6);
  z-index: 2; pointer-events: none;
  transition: left 0.15s ease-out;
}
.power-rangelabels {
  display: flex; justify-content: space-between; width: 100%;
  font-size: 10px; letter-spacing: 0.2em; color: var(--muted); padding: 0 2px;
}
.power-rangelabels span { display: block; }
.power-hint {
  font-size: 14px; font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.2em; color: var(--muted); min-width: 80px;
}
.controls-hint { display: flex; gap: 22px; color: var(--muted); font-size: 13px; letter-spacing: 0.15em; background: rgba(0,0,0,0.5); padding: 6px 18px; border-radius: 999px; }
.controls-hint b { color: var(--text); margin-right: 6px; }
.hud-message {
  position: absolute; top: 26%; left: 50%; transform: translateX(-50%);
  font-family: 'Anton', sans-serif; font-size: 80px; letter-spacing: 0.05em;
  color: var(--gold); text-shadow: 0 0 30px rgba(255,203,71,0.7), 0 6px 0 #000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.hud-message.show { opacity: 1; transform: translateX(-50%) scale(1.04); }
.hud-message.miss { color: var(--bad); text-shadow: 0 0 30px rgba(239,68,68,0.7), 0 6px 0 #000; }
.end-sub { color: var(--muted); letter-spacing: 0.2em; font-size: 13px; font-family: 'Bebas Neue', sans-serif; }

/* ============ VS Matchup Splash ============ */
#screen-vs { background: #06070b; cursor: pointer; }
.vs-shell {
  position: relative;
  width: 100%; height: 100%;
  display: flex; align-items: stretch;
  font-family: 'Anton', sans-serif;
  overflow: hidden;
}
.vs-side {
  flex: 1; position: relative;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; padding: 24px;
  overflow: hidden;
}
.vs-home {
  background: radial-gradient(ellipse at 30% 50%, #c98b18 0%, #4a2f0b 50%, #1a0e04 100%);
  clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%);
}
.vs-away {
  background: radial-gradient(ellipse at 70% 50%, #c81a1a 0%, #4a0a0a 50%, #1a0303 100%);
  clip-path: polygon(12% 0, 100% 0, 100% 100%, 0 100%);
  animation: vsHomePulse 2s ease-in-out infinite alternate;
}
@keyframes vsHomePulse {
  from { filter: brightness(1); }
  to { filter: brightness(1.15); }
}
.vs-slash {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(45deg,
      rgba(255,255,255,0.03) 0px,
      rgba(255,255,255,0.03) 8px,
      transparent 8px,
      transparent 32px);
  pointer-events: none;
}
.vs-emoji {
  font-size: clamp(120px, 22vw, 320px);
  filter: drop-shadow(0 8px 30px rgba(0,0,0,0.6));
  animation: vsEmoji 1.2s ease-out;
}
@keyframes vsEmoji {
  0% { transform: translateY(80px) scale(0.5); opacity: 0; }
  60% { transform: translateY(-10px) scale(1.15); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
.vs-team {
  font-size: clamp(14px, 2vw, 24px);
  letter-spacing: 0.4em;
  color: rgba(255,255,255,0.6);
  text-shadow: 0 2px 0 rgba(0,0,0,0.6);
}
.vs-name {
  font-size: clamp(50px, 8vw, 110px);
  color: #fff;
  text-shadow: 0 0 30px rgba(255,255,255,0.4), 0 6px 0 rgba(0,0,0,0.6);
  letter-spacing: 0.03em;
}
.vs-role {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 0.3em;
  color: rgba(255,255,255,0.55);
}
.vs-center {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  z-index: 5;
  pointer-events: none;
}
.vs-big {
  font-size: clamp(90px, 14vw, 180px);
  color: #ffcb47;
  text-shadow:
    0 0 50px rgba(255, 203, 71, 0.9),
    0 0 20px rgba(255, 90, 30, 0.7),
    0 8px 0 rgba(0,0,0,0.6);
  animation: vsBig 1.4s ease-out;
  letter-spacing: -0.05em;
}
@keyframes vsBig {
  0% { transform: scale(0.2) rotate(-15deg); opacity: 0; }
  60% { transform: scale(1.3) rotate(3deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.vs-sub {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  letter-spacing: 0.35em;
  color: rgba(255,203,71,0.85);
}
.vs-cta {
  position: absolute;
  bottom: 40px; left: 50%;
  transform: translateX(-50%);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  letter-spacing: 0.3em;
  color: rgba(255,255,255,0.6);
  animation: vsBlink 1s ease-in-out infinite alternate;
}
@keyframes vsBlink { from { opacity: 0.4; } to { opacity: 1; } }

/* ============ Halftime ============ */
.halftime-line { font-family: 'Anton', sans-serif; font-size: 28px; letter-spacing: 0.1em; }
.halftime-hint { color: var(--muted); font-size: 13px; letter-spacing: 0.2em; font-family: 'Bebas Neue', sans-serif; }

/* ============ Quarter indicator ============ */
.score-quarter {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px; letter-spacing: 0.25em;
  color: var(--gold);
  margin-top: 2px;
}

/* ============ Energy Tank ============ */
.energy-tank {
  position: absolute;
  bottom: 22px; left: 22px;
  display: none;
  flex-direction: column; gap: 4px;
  z-index: 6;
  font-family: 'Bebas Neue', sans-serif;
}
.hud.active .energy-tank { display: flex; }
.energy-label {
  font-size: 12px; letter-spacing: 0.3em; color: var(--muted);
}
.energy-track {
  width: 180px; height: 12px;
  background: rgba(0,0,0,0.75);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.6);
}
.energy-fill {
  height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--good));
  transition: width 0.15s ease-out, background 0.3s;
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.55);
}
.energy-fill.low {
  background: linear-gradient(90deg, #b81d10, var(--accent));
  animation: energyLow 0.4s ease-in-out infinite alternate;
}
@keyframes energyLow {
  from { box-shadow: 0 0 6px rgba(255, 59, 47, 0.5); }
  to   { box-shadow: 0 0 20px rgba(255, 59, 47, 0.95); }
}

/* ============ Pass Letter Overlays ============ */
.pass-overlays {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 4;
}
.pass-letter {
  position: absolute;
  transform: translate(-50%, -100%);
  width: 40px; height: 40px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(240,240,240,0.85));
  color: #1a1a24;
  font-family: 'Anton', sans-serif;
  font-size: 24px; letter-spacing: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 22px rgba(0,0,0,0.55), 0 0 0 2px var(--gold);
  animation: passBob 0.6s ease-in-out infinite alternate;
}
@keyframes passBob { from { transform: translate(-50%, -100%); } to { transform: translate(-50%, calc(-100% - 8px)); } }

/* ============ Coach Message ============ */
.coach-msg {
  position: absolute;
  bottom: 22px; right: 22px;
  max-width: 320px;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(38, 46, 66, 0.9), rgba(18, 22, 34, 0.9));
  border: 1px solid rgba(255,255,255,0.14);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 6;
  font-family: 'Inter', sans-serif;
}
.coach-msg.show { opacity: 1; transform: translateY(0); }
.coach-msg .coach-tag {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin-bottom: 4px;
  display: block;
}

/* ============ Lobby ============ */
.lobby-toolbar {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}
.lobby-field {
  display: flex; flex-direction: column; gap: 4px;
  color: var(--muted); font-size: 11px; letter-spacing: 0.25em; font-family: 'Bebas Neue', sans-serif;
}
.lobby-field input, .lobby-field select {
  padding: 10px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.lobby-field input:focus, .lobby-field select:focus { outline: 1px solid var(--gold); }
.lobby-status { font-size: 12px; color: var(--muted); letter-spacing: 0.25em; font-family: 'Bebas Neue', sans-serif; }
.lobby-rooms {
  display: flex; flex-direction: column; gap: 8px;
  min-height: 240px;
  max-height: 46vh;
  overflow-y: auto;
  padding: 6px 4px;
}
.room-row {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 1fr 0.8fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
}
.room-row:hover { border-color: rgba(255,203,71,0.4); background: rgba(255,203,71,0.05); }
.room-host { font-family: 'Bebas Neue', sans-serif; font-size: 18px; letter-spacing: 0.08em; }
.room-size { font-family: 'Anton', sans-serif; font-size: 22px; color: var(--gold); }
.room-court { color: var(--muted); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; }
.room-count { font-family: 'Bebas Neue', sans-serif; font-size: 16px; color: var(--good); }
.room-count.full { color: var(--accent); }
.room-join {
  padding: 8px 18px; border-radius: 4px;
  font-family: 'Bebas Neue', sans-serif; letter-spacing: 0.15em; font-size: 14px;
  background: linear-gradient(180deg, var(--gold), #c98b18);
  color: #0a0a0a; border: 1px solid rgba(255,255,255,0.4);
  cursor: pointer;
}
.room-join:disabled { opacity: 0.45; cursor: not-allowed; background: rgba(255,255,255,0.1); color: var(--muted); }

/* ============ Waiting Room ============ */
.waiting-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: stretch;
}
.waiting-team {
  padding: 20px;
  border-radius: 10px;
  display: flex; flex-direction: column; gap: 10px;
}
.waiting-team.home { background: linear-gradient(180deg, rgba(255,203,71,0.12), transparent); border: 1px solid rgba(255,203,71,0.2); }
.waiting-team.away { background: linear-gradient(180deg, rgba(255,59,47,0.12), transparent); border: 1px solid rgba(255,59,47,0.2); }
.waiting-team-name {
  font-family: 'Anton', sans-serif;
  font-size: 22px;
  letter-spacing: 0.1em;
  text-align: center;
}
.waiting-slots { display: flex; flex-direction: column; gap: 6px; }
.waiting-slot {
  padding: 10px 14px;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: space-between;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.1em;
}
.waiting-slot.empty { opacity: 0.4; }
.waiting-slot .slot-emoji { font-size: 24px; }
.waiting-slot .slot-name { flex: 1; margin-left: 10px; font-size: 15px; }
.waiting-slot .slot-me { color: var(--gold); }
.waiting-vs {
  align-self: center;
  font-family: 'Anton', sans-serif;
  font-size: 46px;
  color: var(--gold);
  text-shadow: 0 0 22px rgba(255,203,71,0.7);
}
.waiting-hint { color: var(--muted); font-size: 13px; letter-spacing: 0.2em; text-align: center; font-family: 'Bebas Neue', sans-serif; }
