/* =========================================================================
   THEME DEFINITIONS: Light (Default), Dark, Neon, Halloween, Christmas, Funk
   ========================================================================= */

/* Default / Clean Light Theme */
:root,
body.theme-light,
[data-theme="light"] {
  --bg-deep: #f0f3f8;
  --bg-card: #ffffff;
  --bg-card-alt: #f8fafc;
  --accent-yellow: #d97706;
  --accent-cyan: #2563eb;
  --accent-pink: #7c3aed;
  --accent-green: #059669;
  --accent-chrome: #1e293b;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-glow: rgba(37, 99, 235, 0.2);
  --shadow-heavy: 0 12px 32px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --radius-lg: 20px;
  --radius-md: 14px;
}

body.theme-light {
  background:
    radial-gradient(circle at 50% 0%, #ffffff 0%, #edf2f7 65%, #e2e8f0 100%);
  color: var(--text-main);
}

body.theme-light::before {
  display: none !important;
}

/* Clean Dark Theme */
body.theme-dark,
[data-theme="dark"] {
  --bg-deep: #090d16;
  --bg-card: #131b2e;
  --bg-card-alt: #1c263f;
  --accent-yellow: #f59e0b;
  --accent-cyan: #38bdf8;
  --accent-pink: #818cf8;
  --accent-green: #34d399;
  --accent-chrome: #f8fafc;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-glow: rgba(56, 189, 248, 0.22);
  --shadow-heavy: 0 14px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.08);
}

body.theme-dark {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(56, 189, 248, 0.08) 0%, transparent 60%),
    linear-gradient(180deg, #0f172a 0%, #090d16 100%);
  color: var(--text-main);
}

body.theme-dark::before {
  display: none !important;
}

/* Neon Cyber Theme (High-Voltage Matrix Lime & Laser Cyan on Pitch Black) */
body.theme-neon,
[data-theme="neon"] {
  --bg-deep: #030712;
  --bg-card: rgba(6, 15, 25, 0.94);
  --bg-card-alt: rgba(10, 24, 40, 0.95);
  --accent-yellow: #39ff14; /* Matrix Cyber Lime */
  --accent-cyan: #00f5ff; /* Pure Laser Cyan */
  --accent-pink: #00ff88; /* Electric Mint */
  --accent-green: #39ff14; /* Cyber Lime */
  --accent-chrome: #e0f2fe;
  --text-main: #f0fdf4;
  --text-muted: #7dd3fc;
  --border-glow: rgba(0, 245, 255, 0.45);
  --shadow-heavy: 0 14px 44px rgba(0, 0, 0, 0.85), 0 0 28px rgba(0, 245, 255, 0.3);
}

body.theme-neon {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(0, 245, 255, 0.25) 0%, transparent 60%),
    radial-gradient(ellipse at 85% 30%, rgba(57, 255, 20, 0.18) 0%, transparent 50%),
    linear-gradient(180deg, #040914 0%, #061120 60%, #02050b 100%);
  color: var(--text-main);
}

body.theme-neon::before {
  background-image:
    linear-gradient(to right, rgba(0, 245, 255, 0.28) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(57, 255, 20, 0.24) 1px, transparent 1px);
}

/* Halloween Theme */
body.theme-halloween,
[data-theme="halloween"] {
  --bg-deep: #090312;
  --bg-card: rgba(22, 11, 36, 0.94);
  --bg-card-alt: rgba(36, 17, 58, 0.95);
  --accent-yellow: #ff9500;
  --accent-cyan: #ff7518; /* Jack-o'-lantern Orange */
  --accent-pink: #a855f7; /* Witch Purple */
  --accent-green: #39ff14; /* Radioactive Slime Green */
  --accent-chrome: #ffecd1;
  --text-main: #fffaf0;
  --text-muted: #d8b4e2;
  --border-glow: rgba(255, 117, 24, 0.35);
  --shadow-heavy: 0 14px 40px rgba(0, 0, 0, 0.8), 0 0 28px rgba(255, 117, 24, 0.2);
}

body.theme-halloween {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 117, 24, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 30%, rgba(57, 255, 20, 0.12) 0%, transparent 50%),
    linear-gradient(180deg, #10061f 0%, #1b0933 60%, #080210 100%);
  color: var(--text-main);
}

body.theme-halloween::before {
  background-image:
    linear-gradient(to right, rgba(255, 117, 24, 0.16) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(168, 85, 247, 0.18) 1px, transparent 1px);
}

/* Christmas Theme */
body.theme-christmas,
[data-theme="christmas"] {
  --bg-deep: #05140d;
  --bg-card: rgba(14, 38, 27, 0.94);
  --bg-card-alt: rgba(22, 56, 40, 0.95);
  --accent-yellow: #fbbf24; /* Star Gold */
  --accent-cyan: #22c55e; /* Holiday Pine Green */
  --accent-pink: #ef4444; /* Berry Red */
  --accent-green: #4ade80; /* Mint */
  --accent-chrome: #ffffff;
  --text-main: #ffffff;
  --text-muted: #bbf7d0;
  --border-glow: rgba(239, 68, 68, 0.3);
  --shadow-heavy: 0 14px 40px rgba(0, 0, 0, 0.75), 0 0 26px rgba(239, 68, 68, 0.18);
}

body.theme-christmas {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(239, 68, 68, 0.2) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 25%, rgba(251, 191, 36, 0.15) 0%, transparent 50%),
    linear-gradient(180deg, #092016 0%, #103324 60%, #04100a 100%);
  color: var(--text-main);
}

body.theme-christmas::before {
  background-image:
    linear-gradient(to right, rgba(34, 197, 94, 0.18) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(239, 68, 68, 0.2) 1px, transparent 1px);
}

/* Classic Electro-Funk Theme (Warm 70s/80s Retro Disco Gold & Velvet Plum) */
body.theme-funk,
[data-theme="funk"] {
  --bg-deep: #12051f;
  --bg-card: rgba(28, 11, 46, 0.92);
  --bg-card-alt: rgba(45, 18, 72, 0.94);
  --accent-yellow: #ffb703; /* Disco Gold */
  --accent-cyan: #fb8500; /* Sunset Orange */
  --accent-pink: #d90429; /* Crimson Funk */
  --accent-green: #00f5d4; /* Turquoise Pop */
  --accent-chrome: #ffecd1;
  --text-main: #ffffff;
  --text-muted: #dfccf4;
  --border-glow: rgba(255, 183, 3, 0.35);
  --shadow-heavy: 0 14px 40px rgba(0, 0, 0, 0.75), 0 0 24px rgba(251, 133, 0, 0.25);
}

body.theme-funk {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(251, 133, 0, 0.25) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 20%, rgba(255, 183, 3, 0.2) 0%, transparent 50%),
    linear-gradient(180deg, #180628 0%, #290a44 60%, #0d0216 100%);
  color: var(--text-main);
}

body.theme-funk::before {
  background-image:
    linear-gradient(to right, rgba(251, 133, 0, 0.25) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 183, 3, 0.25) 1px, transparent 1px);
}

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

body {
  font-family: 'Trebuchet MS', 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  transition: background 0.3s ease, color 0.3s ease;
}

/* 80s Chromeo Perspective Neon Synth Grid Floor */
body::before {
  content: '';
  position: fixed;
  left: -50%;
  right: -50%;
  bottom: -35%;
  height: 75vh;
  background-image:
    linear-gradient(to right, rgba(0, 245, 255, 0.22) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 0, 127, 0.26) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: perspective(420px) rotateX(68deg);
  pointer-events: none;
  z-index: 0;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.95) 10%, transparent 90%);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.95) 10%, transparent 90%);
  animation: gridScroll 12s linear infinite;
}

@keyframes gridScroll {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 0 56px;
  }
}

#app {
  position: relative;
  z-index: 2;
}

code {
  background: rgba(0, 245, 255, 0.14);
  border: 1px solid rgba(0, 245, 255, 0.3);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: Consolas, monospace;
}

/* Liquid Chrome Text Utility */
.chrome-text {
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #d8e8f8 26%,
    #6b7c96 49%,
    #ffffff 53%,
    #00f5ff 78%,
    #ff007f 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 16px rgba(255, 0, 127, 0.45));
}

/* Top Navbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: rgba(8, 4, 20, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 2px solid rgba(255, 0, 127, 0.55);
  box-shadow: 0 4px 28px rgba(255, 0, 127, 0.25);
  position: sticky;
  top: 0;
  z-index: 40;
  flex-wrap: wrap;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.brand-logo {
  font-size: 1.85rem;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 3px;
  text-transform: uppercase;
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #b8d8f8 45%,
    #3a4a68 50%,
    #00f5ff 80%,
    #ff007f 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(0, 245, 255, 0.45));
}

.brand-tag {
  font-size: 0.75rem;
  font-weight: 900;
  background: linear-gradient(90deg, var(--accent-pink), #8c00ff);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 12px rgba(255, 0, 127, 0.5);
}

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

/* AI Talkbox Equalizer Indicator */
.talkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 245, 255, 0.12);
  border: 1px solid rgba(0, 245, 255, 0.45);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.talkbox-pill.speaking {
  background: rgba(255, 0, 127, 0.22);
  border-color: var(--accent-pink);
  color: #fff;
  box-shadow: 0 0 18px rgba(255, 0, 127, 0.65);
}

.eq-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.eq-bars span {
  display: block;
  width: 3px;
  height: 4px;
  background: currentColor;
  border-radius: 2px;
  transition: height 0.15s ease;
}

.talkbox-pill.speaking .eq-bars span:nth-child(1) {
  animation: eqBounce 0.38s infinite ease-in-out alternate;
}
.talkbox-pill.speaking .eq-bars span:nth-child(2) {
  animation: eqBounce 0.26s infinite ease-in-out alternate 0.1s;
}
.talkbox-pill.speaking .eq-bars span:nth-child(3) {
  animation: eqBounce 0.32s infinite ease-in-out alternate 0.2s;
}
.talkbox-pill.speaking .eq-bars span:nth-child(4) {
  animation: eqBounce 0.29s infinite ease-in-out alternate 0.05s;
}

@keyframes eqBounce {
  0% {
    height: 3px;
  }
  100% {
    height: 14px;
  }
}

/* Buttons */
.btn {
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), #00a2ff 55%, var(--accent-pink));
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 6px 22px rgba(0, 245, 255, 0.4), 0 0 14px rgba(255, 0, 127, 0.35);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 245, 255, 0.6), 0 0 20px rgba(255, 0, 127, 0.55);
}

.btn-pink {
  background: linear-gradient(135deg, var(--accent-pink), #7a00ff);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 6px 22px rgba(255, 0, 127, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-main);
  border: 1px solid rgba(0, 245, 255, 0.35);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(0, 245, 255, 0.18);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 14px rgba(0, 245, 255, 0.35);
}

.btn-sm {
  padding: 8px 13px;
  font-size: 0.8rem;
  border-radius: 10px;
}

.btn-lg {
  padding: 16px 30px;
  font-size: 1.18rem;
  border-radius: 16px;
}

.btn-block {
  width: 100%;
}

/* Mode Selector Landing */
.landing-wrap {
  max-width: 1140px;
  margin: 12px auto 24px;
  padding: 0 16px;
  text-align: center;
}

.funk-crest {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 0, 127, 0.16);
  border: 1px solid var(--accent-pink);
  color: var(--accent-cyan);
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
  box-shadow: 0 0 16px rgba(255, 0, 127, 0.25);
}

.hero-title {
  font-size: clamp(2.2rem, 3.8vw, 3.4rem);
  font-weight: 900;
  font-style: italic;
  letter-spacing: 4px;
  line-height: 1.04;
  margin-bottom: 6px;
  text-transform: uppercase;
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #d9ecff 30%,
    #4c5c78 48%,
    #ffffff 52%,
    #00f5ff 76%,
    #ff007f 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 18px rgba(255, 0, 127, 0.45));
}

.hero-sub {
  font-size: 0.98rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 16px;
  line-height: 1.35;
}

.landing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  align-items: stretch;
}

@media (min-width: 860px) {
  .landing-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.mode-card {
  background: var(--bg-card);
  border: 2px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  box-shadow: var(--shadow-heavy);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(10px);
  min-height: 250px;
}

.mode-card-featured {
  border-color: var(--accent-pink) !important;
  box-shadow: 0 8px 30px rgba(255, 0, 127, 0.25), 0 0 16px rgba(0, 245, 255, 0.18);
}

.mode-card h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-top: 2px;
}

.mode-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.35;
  margin-bottom: auto;
}

.mode-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-pink);
  box-shadow: 0 16px 40px rgba(255, 0, 127, 0.35), 0 0 24px rgba(0, 245, 255, 0.25);
}

.mode-icon {
  font-size: 2.6rem;
  filter: drop-shadow(0 0 12px rgba(0, 245, 255, 0.45));
}

/* Host TV Layout */
.host-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 32px 60px;
}

.lobby-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 980px) {
  .lobby-grid {
    grid-template-columns: 1fr;
  }
}

.panel-card {
  background: var(--bg-card);
  border: 2px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-heavy);
  backdrop-filter: blur(12px);
}

.room-code-banner {
  background: linear-gradient(135deg, rgba(35, 12, 68, 0.95), rgba(12, 6, 30, 0.95));
  border: 2px solid var(--accent-pink);
  box-shadow: 0 0 32px rgba(255, 0, 127, 0.35), inset 0 0 24px rgba(0, 245, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  margin-bottom: 24px;
  position: relative;
}

/* QR Code Layout */
.room-code-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.room-code-info {
  flex: 1;
  min-width: 260px;
  text-align: center;
}

.qr-code-box {
  background: #ffffff;
  padding: 12px;
  border-radius: var(--radius-md);
  box-shadow: 0 0 25px rgba(0, 245, 255, 0.4), 0 8px 16px rgba(0, 0, 0, 0.6);
  border: 3px solid var(--accent-cyan);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.qr-code-box:hover {
  transform: scale(1.03);
}

.qr-code-box svg.verbage-qr-code {
  width: 170px;
  height: 170px;
  display: block;
}

.qr-code-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #0d0914;
  margin-top: 6px;
  text-align: center;
}

.qr-code-box-small {
  background: #ffffff;
  padding: 8px;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 16px rgba(255, 230, 0, 0.35);
  border: 2px solid var(--accent-yellow);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin: 12px 0 6px;
}

.qr-code-box-small svg.verbage-qr-code {
  width: 120px;
  height: 120px;
  display: block;
}

.qr-code-box-small .qr-code-label {
  color: #0d0914;
  font-size: 0.68rem;
  margin-top: 4px;
}

.room-code-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--accent-cyan);
  font-weight: 900;
}

.room-code-giant {
  font-size: clamp(3.4rem, 6vw, 5.2rem);
  font-weight: 900;
  font-style: italic;
  letter-spacing: 14px;
  margin: 6px 0;
  background: linear-gradient(180deg, #fff 0%, var(--accent-yellow) 55%, var(--accent-pink) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgba(255, 230, 0, 0.55));
}

.join-url-pill {
  display: inline-block;
  background: rgba(0, 245, 255, 0.14);
  border: 1px solid var(--accent-cyan);
  color: #fff;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1.05rem;
  margin-top: 6px;
  box-shadow: 0 0 14px rgba(0, 245, 255, 0.25);
}

/* Players Grid */
.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.player-chip {
  background: var(--bg-card-alt);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  position: relative;
  animation: popIn 0.25s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.player-chip.ready {
  border-color: var(--accent-cyan);
  background: rgba(0, 245, 255, 0.14);
  box-shadow: 0 0 16px rgba(0, 245, 255, 0.25);
}

.player-chip .avatar {
  font-size: 1.9rem;
}

.vip-crown {
  position: absolute;
  top: -10px;
  right: 10px;
  background: linear-gradient(90deg, var(--accent-yellow), var(--accent-pink));
  color: #090418;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 99px;
}

/* Pack Selector & Redesigned Grid */
.packs-summary-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 14px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.packs-summary-strip strong {
  color: var(--text-main);
}

.packs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.pack-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-card);
  border: 2px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  min-height: 120px;
}

.pack-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-cyan);
}

.pack-card.selected {
  border-color: var(--accent-cyan);
  background: rgba(0, 245, 255, 0.08);
  box-shadow: 0 4px 18px rgba(0, 245, 255, 0.2);
}

.pack-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.pack-card-icon-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.pack-card-icon-title .pack-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.pack-card-icon-title .pack-name {
  font-weight: 800;
  font-size: 0.96rem;
  line-height: 1.3;
  color: var(--text-main);
}

.pack-status-badge {
  font-size: 0.72rem;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border: 1px solid var(--border-glow);
  white-space: nowrap;
  transition: all 0.15s ease;
}

.pack-status-badge.active {
  background: var(--accent-cyan);
  color: #fff;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 245, 255, 0.35);
}

.pack-card .pack-desc {
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--text-muted);
  margin: 0 0 10px 0;
  flex-grow: 1;
}

.pack-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.75rem;
  margin-top: auto;
}

.pack-count-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glow);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.75rem;
  color: var(--text-main);
}

/* DLC Locked Packs & Promo Box */
.pack-card.pack-card-locked {
  opacity: 0.82;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(15, 10, 30, 0.4);
}

.pack-card.pack-card-locked:hover {
  opacity: 1;
  border-color: var(--accent-yellow);
  box-shadow: 0 4px 16px rgba(255, 183, 3, 0.18);
}

.pack-status-badge.pack-status-locked {
  background: rgba(255, 183, 3, 0.12);
  color: var(--accent-yellow);
  border-color: rgba(255, 183, 3, 0.4);
}

.badge-locked {
  background: rgba(255, 183, 3, 0.16);
  color: var(--accent-yellow);
  border: 1px solid rgba(255, 183, 3, 0.4);
}

.dlc-promo-box {
  margin-top: 20px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px dashed var(--border-glow);
  border-radius: var(--radius-md);
}

.dlc-promo-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.dlc-promo-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.dlc-promo-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.dlc-promo-input {
  flex: 1;
  background: var(--bg-card);
  border: 1.5px solid var(--border-glow);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-main);
  font-family: monospace;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  outline: none;
  transition: all 0.2s ease;
}

.dlc-promo-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 245, 255, 0.25);
}

.dlc-input-pulse {
  border-color: var(--accent-yellow) !important;
  box-shadow: 0 0 14px rgba(255, 183, 3, 0.6) !important;
  animation: pulseHighlight 0.4s ease 3;
}

@keyframes pulseHighlight {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.dlc-promo-feedback {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 700;
}

.dlc-feedback-success {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.dlc-feedback-warn {
  background: rgba(255, 183, 3, 0.15);
  color: #fde047;
  border: 1px solid rgba(255, 183, 3, 0.35);
}

.dlc-feedback-error {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

/* Light mode overrides for DLC */
body.theme-light .pack-card.pack-card-locked {
  background: #f8fafc;
  border-color: #cbd5e1;
  opacity: 0.88;
}

body.theme-light .pack-card.pack-card-locked:hover {
  background: #ffffff;
  border-color: #d97706;
}

body.theme-light .pack-status-badge.pack-status-locked {
  background: #fffbeb;
  color: #b45309;
  border-color: #fcd34d;
}

body.theme-light .badge-locked {
  background: #fffbeb;
  color: #b45309;
  border-color: #fcd34d;
}

body.theme-light .dlc-promo-box {
  background: #f8fafc;
  border-color: #cbd5e1;
}

body.theme-light .dlc-promo-input {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

.packs-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.pack-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-card-alt);
  border: 2px solid transparent;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.pack-item.selected {
  border-color: var(--accent-cyan);
  background: rgba(0, 245, 255, 0.12);
  box-shadow: inset 0 0 14px rgba(0, 245, 255, 0.18);
}

.pack-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pack-icon {
  font-size: 1.8rem;
}

.pack-title {
  font-weight: 800;
  font-size: 1.02rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pack-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.14);
}

.badge-nsfw {
  background: rgba(255, 0, 127, 0.25);
  color: #ff85c0;
  border: 1px solid rgba(255, 0, 127, 0.55);
}

.badge-clean {
  background: rgba(0, 255, 157, 0.2);
  color: var(--accent-green);
}

/* Timer Bar */
.timer-wrap {
  margin-bottom: 24px;
}

.timer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.timer-seconds {
  font-size: 1.5rem;
  color: var(--accent-yellow);
  text-shadow: 0 0 12px rgba(255, 230, 0, 0.5);
}

.timer-bar-bg {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.timer-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-pink), var(--accent-yellow));
  box-shadow: 0 0 16px var(--accent-pink);
  transition: width 0.25s linear;
}

/* Dictionary Prompt Card on TV */
.word-stage {
  background: linear-gradient(145deg, rgba(30, 14, 62, 0.94), rgba(12, 6, 28, 0.96));
  border: 2px solid var(--accent-cyan);
  border-radius: 24px;
  padding: 36px 32px;
  text-align: center;
  box-shadow: 0 0 36px rgba(0, 245, 255, 0.25), inset 0 0 28px rgba(255, 0, 127, 0.15);
  margin-bottom: 28px;
  position: relative;
}

.word-pack-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 0, 127, 0.18);
  border: 1px solid rgba(255, 0, 127, 0.5);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--accent-yellow);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.word-display {
  font-size: clamp(2.5rem, 5.2vw, 4.5rem);
  font-weight: 900;
  font-style: italic;
  color: #fff;
  letter-spacing: 2px;
  margin: 8px 0 12px;
  text-shadow: 0 0 24px rgba(0, 245, 255, 0.55), 0 4px 12px rgba(0, 0, 0, 0.8);
}

.word-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
}

/* Voting Choices Grid on TV */
.choices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 18px;
}

.choice-card {
  background: var(--bg-card);
  border: 2px solid rgba(0, 245, 255, 0.28);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--shadow-heavy);
  animation: popIn 0.3s ease;
}

.choice-letter {
  min-width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-pink));
  color: #fff;
  font-weight: 900;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(255, 0, 127, 0.45);
}

.choice-text {
  font-size: 1.2rem;
  line-height: 1.45;
  font-weight: 600;
}

/* Dramatic Reveal Card */
.reveal-spotlight {
  background: var(--bg-card);
  border: 3px solid var(--accent-yellow);
  border-radius: 24px;
  padding: 36px;
  max-width: 880px;
  margin: 0 auto 28px;
  text-align: center;
  box-shadow: var(--shadow-heavy);
  animation: popIn 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.reveal-spotlight.is-truth {
  border-color: var(--accent-green);
  background: linear-gradient(145deg, rgba(0, 255, 157, 0.16), var(--bg-card));
  box-shadow: 0 0 40px rgba(0, 255, 157, 0.3);
}

.reveal-spotlight.is-bluff {
  border-color: var(--accent-pink);
  background: linear-gradient(145deg, rgba(255, 0, 127, 0.2), var(--bg-card));
  box-shadow: 0 0 40px rgba(255, 0, 127, 0.35);
}

.reveal-definition {
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  font-weight: 800;
  line-height: 1.4;
  margin: 16px 0 24px;
}

.reveal-stamp {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 14px;
  font-size: 1.35rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 18px;
  animation: stampSlam 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.stamp-truth {
  background: var(--accent-green);
  color: #041d11;
  box-shadow: 0 0 24px rgba(0, 255, 157, 0.6);
}

.stamp-bluff {
  background: linear-gradient(90deg, var(--accent-pink), #9900ff);
  color: #fff;
  box-shadow: 0 0 24px rgba(255, 0, 127, 0.6);
}

.voters-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.voter-pill {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(0, 245, 255, 0.3);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.example-box {
  margin-top: 18px;
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.35);
  border-left: 4px solid var(--accent-cyan);
  border-radius: 8px;
  font-style: italic;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Scoreboard */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 780px;
  margin: 0 auto;
}

.leader-row {
  background: var(--bg-card);
  border: 2px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.leader-row:first-child {
  border-color: var(--accent-yellow);
  background: linear-gradient(90deg, rgba(255, 230, 0, 0.18), var(--bg-card));
  box-shadow: 0 0 24px rgba(255, 230, 0, 0.25);
}

.leader-left {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.25rem;
  font-weight: 800;
}

.leader-rank {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.leader-score {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--accent-yellow);
  display: flex;
  align-items: center;
  gap: 10px;
}

.delta-badge {
  background: var(--accent-green);
  color: #062314;
  font-size: 0.85rem;
  padding: 3px 10px;
  border-radius: 999px;
}

/* Mobile Player Controller */
.mobile-shell {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 18px 48px;
}

.mobile-card {
  background: var(--bg-card);
  border: 2px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow-heavy);
  backdrop-filter: blur(12px);
}

.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-group label {
  display: block;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--accent-cyan);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Custom Checkbox Row */
.custom-checkbox-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-glow);
  border-radius: var(--radius-md);
  cursor: pointer;
  user-select: none;
  transition: all 0.18s ease;
}

.custom-checkbox-row:hover {
  border-color: var(--accent-cyan);
  background: rgba(255, 255, 255, 0.04);
}

.custom-checkbox-row.is-active {
  border-color: var(--accent-pink);
  background: rgba(255, 0, 127, 0.08);
  box-shadow: 0 0 16px rgba(255, 0, 127, 0.18);
}

.sr-only-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.custom-check-box {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}

.custom-checkbox-row:hover .custom-check-box {
  border-color: var(--accent-cyan);
}

.sr-only-checkbox:checked + .custom-check-box,
.custom-checkbox-row.is-active .custom-check-box {
  background: var(--accent-pink);
  border-color: var(--accent-pink);
  box-shadow: 0 0 10px rgba(255, 0, 127, 0.5);
}

.check-icon {
  width: 14px;
  height: 14px;
  stroke: #ffffff;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.16s ease;
}

.sr-only-checkbox:checked + .custom-check-box .check-icon,
.custom-checkbox-row.is-active .custom-check-box .check-icon {
  opacity: 1;
  transform: scale(1);
}

.checkbox-label-content {
  flex: 1;
  min-width: 0;
}

.checkbox-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.checkbox-title-text {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
}

.checkbox-subtext {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.35;
}

body.theme-light .custom-check-box {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

body.theme-light .sr-only-checkbox:checked + .custom-check-box,
body.theme-light .custom-checkbox-row.is-active .custom-check-box {
  background: var(--accent-pink);
  border-color: var(--accent-pink);
}

/* Content Filter Two-Box Selector */
.content-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 10px;
}

.content-filter-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 2px solid var(--border-glow);
  border-radius: var(--radius-md);
  cursor: pointer;
  user-select: none;
  transition: all 0.18s ease;
}

.content-filter-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.filter-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.filter-card-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.filter-card-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: 0.3px;
  flex: 1;
}

.filter-radio-indicator {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.filter-radio-indicator::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
  transition: all 0.2s ease;
}

.filter-card-tag {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Active State: Clean */
.content-filter-card.active.active-clean {
  border-color: #00f5ff;
  background: rgba(0, 245, 255, 0.08);
  box-shadow: 0 0 16px rgba(0, 245, 255, 0.22);
}

.content-filter-card.active.active-clean .filter-radio-indicator {
  border-color: #00f5ff;
}

.content-filter-card.active.active-clean .filter-radio-indicator::after {
  background: #00f5ff;
}

.content-filter-card.active.active-clean .filter-card-tag {
  color: #00f5ff;
}

/* Active State: NSFW */
.content-filter-card.active.active-nsfw {
  border-color: var(--accent-pink);
  background: rgba(255, 0, 127, 0.09);
  box-shadow: 0 0 16px rgba(255, 0, 127, 0.22);
}

.content-filter-card.active.active-nsfw .filter-radio-indicator {
  border-color: var(--accent-pink);
}

.content-filter-card.active.active-nsfw .filter-radio-indicator::after {
  background: var(--accent-pink);
}

.content-filter-card.active.active-nsfw .filter-card-tag {
  color: #ff3399;
}

/* Filter Card Dynamic Description Callout */
.filter-card-description {
  font-size: 0.86rem;
  line-height: 1.45;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.filter-card-description.clean-desc {
  background: rgba(0, 245, 255, 0.08);
  border: 1px solid rgba(0, 245, 255, 0.25);
  color: #cffafe;
}

.filter-card-description.nsfw-desc {
  background: rgba(255, 0, 127, 0.08);
  border: 1px solid rgba(255, 0, 127, 0.25);
  color: #ffe4e6;
}

/* Responsive Stacking on narrow mobile screens */
@media (max-width: 480px) {
  .content-filter-grid {
    grid-template-columns: 1fr;
  }
}

/* Light Theme Overrides for Content Filter */
body.theme-light .content-filter-card {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

body.theme-light .content-filter-card:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

body.theme-light .filter-card-title {
  color: #0f172a;
}

body.theme-light .filter-card-tag {
  color: #64748b;
}

body.theme-light .filter-radio-indicator {
  border-color: #94a3b8;
}

body.theme-light .content-filter-card.active.active-clean {
  border-color: #0284c7;
  background: #f0f9ff;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

body.theme-light .content-filter-card.active.active-clean .filter-radio-indicator {
  border-color: #0284c7;
}

body.theme-light .content-filter-card.active.active-clean .filter-radio-indicator::after {
  background: #0284c7;
}

body.theme-light .content-filter-card.active.active-clean .filter-card-tag {
  color: #0284c7;
}

body.theme-light .content-filter-card.active.active-nsfw {
  border-color: #e11d48;
  background: #fff1f2;
  box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.2);
}

body.theme-light .content-filter-card.active.active-nsfw .filter-radio-indicator {
  border-color: #e11d48;
}

body.theme-light .content-filter-card.active.active-nsfw .filter-radio-indicator::after {
  background: #e11d48;
}

body.theme-light .content-filter-card.active.active-nsfw .filter-card-tag {
  color: #be123c;
}

body.theme-light .filter-card-description.clean-desc {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0369a1;
}

body.theme-light .filter-card-description.nsfw-desc {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #9f1239;
}

input[type='text'],
input[type='number'],
textarea {
  width: 100%;
  background: #0c0720;
  border: 2px solid rgba(0, 245, 255, 0.3);
  border-radius: 12px;
  padding: 14px 16px;
  color: #fff;
  font-size: 1.08rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type='text']:focus,
textarea:focus {
  border-color: var(--accent-pink);
  box-shadow: 0 0 16px rgba(255, 0, 127, 0.35);
}

.code-input {
  text-transform: uppercase;
  font-size: 1.8rem !important;
  font-weight: 900;
  letter-spacing: 8px;
  text-align: center;
}

.avatar-picker {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  margin-top: 8px;
}

@media (max-width: 420px) {
  .avatar-picker {
    grid-template-columns: repeat(4, 1fr);
  }
}

.avatar-btn {
  background: var(--bg-card-alt);
  border: 2px solid transparent;
  border-radius: 10px;
  font-size: 1.6rem;
  padding: 8px 0;
  cursor: pointer;
}

.avatar-btn.selected {
  border-color: var(--accent-cyan);
  background: rgba(0, 245, 255, 0.22);
  box-shadow: 0 0 12px rgba(0, 245, 255, 0.4);
}

.mobile-choice-btn {
  width: 100%;
  text-align: left;
  background: var(--bg-card-alt);
  border: 2px solid rgba(0, 245, 255, 0.25);
  border-radius: 14px;
  padding: 16px;
  color: var(--text-main);
  font-size: 1.02rem;
  line-height: 1.4;
  margin-bottom: 12px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.mobile-choice-btn:hover:not(:disabled) {
  border-color: var(--accent-pink);
  transform: translateY(-2px);
}

.mobile-choice-btn.own-bluff {
  opacity: 0.55;
  border-style: dashed;
}

.alert-error {
  background: rgba(255, 0, 127, 0.22);
  border: 2px solid var(--accent-pink);
  color: #ffb3d9;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
  margin-bottom: 14px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 3, 14, 0.86);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.hidden {
  display: none !important;
}

.modal-card {
  background: #130b2e;
  border: 2px solid var(--accent-pink);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  box-shadow: var(--shadow-heavy);
}

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

.modal-subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 18px;
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 560px) {
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}

.inline-inputs {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card-alt);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
}

.divider {
  border: none;
  border-top: 1px solid var(--border-glow);
  margin: 16px 0;
}

.urban-lookup-box {
  background: rgba(0, 245, 255, 0.07);
  border: 1px dashed rgba(0, 245, 255, 0.45);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 16px;
}

.urban-lookup-box label {
  display: block;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-cyan);
  margin-bottom: 8px;
}

.urban-results {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.urban-hit {
  background: var(--bg-card-alt);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.draft-list {
  max-height: 150px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.draft-item {
  background: rgba(255, 255, 255, 0.06);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes stampSlam {
  0% {
    opacity: 0;
    transform: scale(2.2) rotate(-6deg);
  }
  70% {
    transform: scale(0.95) rotate(2deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* Milestone 1: Lobby Summary Bar & Options Modal */
.lobby-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 14px 20px;
}

.lobby-summary-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.95rem;
}

.lobby-summary-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.lobby-summary-item strong {
  color: var(--text-main);
}

.options-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-glow);
  padding-bottom: 12px;
}

.options-tab-pane {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: popIn 0.2s ease-out;
}

/* VIP Couch Remote & Pause Banner */
.paused-stage-banner {
  background: rgba(255, 230, 0, 0.16);
  border: 2px solid var(--accent-yellow);
  color: var(--accent-yellow);
  font-weight: 900;
  text-align: center;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.88rem;
  box-shadow: 0 0 18px rgba(255, 230, 0, 0.25);
}

.timer-wrap.timer-paused .timer-bar-fill {
  background: var(--accent-yellow);
  opacity: 0.75;
}

.vip-remote-panel {
  margin-top: 22px;
  padding: 14px;
  background: rgba(255, 230, 0, 0.06);
  border: 1px solid rgba(255, 230, 0, 0.35);
  border-radius: var(--radius-md);
}

.vip-remote-label {
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-yellow);
  margin-bottom: 10px;
  text-align: center;
}

.vip-remote-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.vip-gameover-actions {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-glow);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* End-of-Game Superlative Awards Ceremony */
.awards-ceremony-section {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--border-glow);
  text-align: left;
}

.awards-ceremony-header {
  text-align: center;
  font-size: 0.95rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-cyan);
  margin-bottom: 16px;
}

.awards-ceremony-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.award-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(0, 245, 255, 0.32);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: popIn 0.3s ease-out;
}

.award-card-featured {
  border-color: var(--accent-yellow);
  background: linear-gradient(135deg, rgba(255, 230, 0, 0.12), rgba(255, 0, 127, 0.12));
  box-shadow: 0 0 20px rgba(255, 230, 0, 0.18);
}

.award-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.award-icon {
  font-size: 2rem;
  line-height: 1;
}

.award-title {
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent-cyan);
}

.award-card-featured .award-title {
  color: var(--accent-yellow);
}

.award-winner {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.award-stat-pill {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 10px;
  border-radius: 999px;
}

.award-bluff-quote {
  margin-top: 4px;
  font-size: 0.9rem;
  font-style: italic;
  color: #f6f3ff;
  background: rgba(0, 0, 0, 0.28);
  border-left: 3px solid var(--accent-yellow);
  padding: 8px 10px;
  border-radius: 6px;
}

.award-word-tag {
  font-style: normal;
  font-weight: 900;
  color: var(--accent-yellow);
  margin-right: 4px;
}

.player-awards-box {
  background: rgba(255, 230, 0, 0.08);
  border: 1px solid rgba(255, 230, 0, 0.35);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.player-awards-title {
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--accent-yellow);
}

.player-award-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  background: rgba(0, 0, 0, 0.3);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.9rem;
}

/* Live Active Game Join Pill in Topbar */
.topbar-join-pill {
  font-size: 0.84rem;
  background: rgba(0, 245, 255, 0.12);
  border: 1px solid var(--accent-cyan);
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
  letter-spacing: 0.5px;
  box-shadow: 0 0 10px rgba(0, 245, 255, 0.2);
}

/* Gamepad / Controller Accessibility Focus & HUD (Steam / Xbox / Console) */
:focus-visible,
.gamepad-focus {
  outline: 3px solid var(--accent-yellow) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 20px rgba(255, 230, 0, 0.75), inset 0 0 10px rgba(255, 230, 0, 0.3) !important;
  transform: scale(1.02);
}

.gamepad-hud {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 8px 18px;
  background: rgba(14, 8, 38, 0.88);
  border: 1px solid rgba(0, 245, 255, 0.3);
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 245, 255, 0.2);
  margin: 18px auto 6px;
  max-width: fit-content;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--text-muted);
  animation: popIn 0.3s ease-out;
}

.gamepad-hud-title {
  color: #fff;
}

.gamepad-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.78rem;
  color: #120d2b;
  margin-right: 4px;
}

.gamepad-key-a {
  background: var(--accent-green);
}

.gamepad-key-b {
  background: var(--accent-pink);
  color: #fff;
}

.gamepad-key-x {
  background: var(--accent-cyan);
}

.gamepad-key-y {
  background: var(--accent-yellow);
}

.gamepad-key-special {
  background: #fff;
  color: #120d2b;
  border-radius: 6px;
}

/* =========================================================================
   Phone-Only / Tabletop Party Mode (No TV Needed) & Rotating Talkbox MC
   ========================================================================= */
.p2p-lobby-banner {
  background: linear-gradient(135deg, rgba(255, 230, 0, 0.12), rgba(0, 245, 255, 0.1));
  border: 2px solid var(--accent-yellow);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: 0 0 20px rgba(255, 230, 0, 0.2);
}

.mc-announcement-card {
  margin-top: 16px;
  background: rgba(255, 230, 0, 0.12);
  border: 1.5px solid var(--accent-yellow);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: 0 0 16px rgba(255, 230, 0, 0.25);
  animation: popIn 0.3s ease-out;
}

.mc-teleprompter-card {
  background: #140d33;
  border: 2px solid var(--accent-yellow);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: 0 0 18px rgba(255, 230, 0, 0.32);
  animation: popIn 0.25s ease-out;
}

.mc-cue-tag {
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-yellow);
  margin-bottom: 6px;
}

.mc-cue-text {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.4;
}

.mc-listening-card {
  background: rgba(0, 245, 255, 0.1);
  border: 1px solid var(--accent-cyan);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.mc-badge {
  display: inline-block;
  background: rgba(255, 230, 0, 0.18);
  border: 1px solid var(--accent-yellow);
  color: var(--accent-yellow);
  font-weight: 900;
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 999px;
  margin: 6px 0 10px;
}

.mc-options-readout {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mc-option-line {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.mc-option-letter {
  background: var(--accent-yellow);
  color: #120d2b;
  font-weight: 900;
  min-width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.mc-option-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f7f5ff;
  line-height: 1.35;
}

.phone-reveal-card {
  background: var(--bg-card-alt);
  border: 2px solid var(--accent-pink);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: left;
  box-shadow: 0 0 18px rgba(255, 0, 127, 0.25);
  animation: popIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.phone-reveal-card.phone-reveal-truth {
  border-color: var(--accent-green);
  box-shadow: 0 0 22px rgba(0, 255, 157, 0.35);
  background: linear-gradient(135deg, rgba(0, 255, 157, 0.12), rgba(0, 245, 255, 0.08));
}

.phone-reveal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

/* =========================================================================
   THEME SELECTOR & DETAILED THEME STYLING
   ========================================================================= */

/* Theme Selector Grid */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.theme-card {
  background: var(--bg-card);
  border: 2px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  position: relative;
  text-align: left;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.theme-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-cyan);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.theme-card.active {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px var(--border-glow);
  background: var(--bg-card-alt);
}

.theme-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.theme-card-title {
  font-size: 1.12rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
  min-width: 0;
}

.theme-card-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.45;
  flex-grow: 1;
}

.theme-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-glow);
  flex-wrap: wrap;
}

.theme-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.theme-card-actions .btn {
  padding: 6px 11px;
  font-size: 0.78rem;
  white-space: nowrap;
}

.theme-preview-swatches {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.theme-swatch {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: inline-block;
  flex-shrink: 0;
}

.theme-active-badge {
  font-size: 0.74rem;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-cyan);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* Light Theme Overrides (Clean & Crisp) */
body.theme-light .topbar {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 2px solid #e2e8f0;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.05);
}

body.theme-light .brand-logo {
  background: linear-gradient(135deg, #0f172a 0%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: none;
}

body.theme-light .brand-tag {
  background: #2563eb;
  color: #fff;
  border: none;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

body.theme-light .chrome-text,
body.theme-light .hero-title {
  background: linear-gradient(135deg, #0f172a 0%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: none;
}

body.theme-light .funk-crest {
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
  box-shadow: none;
}

body.theme-light .modal-card {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
}

body.theme-light .modal-card select,
body.theme-light .modal-card input {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

body.theme-light .btn-secondary {
  background: #f1f5f9;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.theme-light .btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

body.theme-light .word-stage {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

body.theme-light .word-display {
  color: #0f172a;
  text-shadow: none;
}

body.theme-light .choice-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

body.theme-light .choice-text {
  color: #1e293b;
}

body.theme-light .choice-letter {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

body.theme-light .room-code-banner {
  background: #ffffff;
  border: 2px solid #2563eb;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.1);
}

body.theme-light .room-code {
  color: #2563eb;
  text-shadow: none;
}

body.theme-light .room-code-label {
  color: #1e40af;
}

body.theme-light .join-url-pill {
  background: #eff6ff;
  border: 1.5px solid #2563eb;
  color: #1e40af;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

body.theme-light .topbar-join-pill {
  background: #eff6ff;
  border: 1px solid #2563eb;
  color: #1e40af;
}

body.theme-light .room-code-giant {
  background: linear-gradient(180deg, #1e3a8a 0%, #2563eb 55%, #4f46e5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(37, 99, 235, 0.25));
}

body.theme-light .qr-code-box,
body.theme-light .qr-code-box-small {
  background: #ffffff;
  border: 2px solid #2563eb;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.15);
}

body.theme-light .qr-code-label {
  color: #0f172a;
}

body.theme-light .lobby-summary-bar {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

body.theme-light .lobby-summary-item {
  color: #475569;
}

body.theme-light .lobby-summary-item strong {
  color: #0f172a;
}

body.theme-light .player-chip {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  color: #0f172a;
}

body.theme-light .player-chip.ready {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1e40af;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

body.theme-light .mobile-choice-btn {
  background: #ffffff;
  border: 2px solid #cbd5e1;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

body.theme-light .p2p-lobby-banner {
  background: #f8fafc;
  border: 2px solid #2563eb;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.1);
}

body.theme-light .gamepad-hud-title {
  color: #0f172a;
}

body.theme-light .packs-summary-strip {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #475569;
}

body.theme-light .packs-summary-strip strong {
  color: #0f172a;
}

body.theme-light .pack-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

body.theme-light .pack-card:hover {
  border-color: #2563eb;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.12);
}

body.theme-light .pack-card.selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.18);
}

body.theme-light .pack-card-icon-title .pack-name {
  color: #0f172a;
}

body.theme-light .pack-card .pack-desc {
  color: #475569;
}

body.theme-light .pack-status-badge {
  background: #f1f5f9;
  color: #64748b;
  border-color: #cbd5e1;
}

body.theme-light .pack-status-badge.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

body.theme-light .pack-count-pill {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
}

body.theme-light .panel-card,
body.theme-light .mode-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

body.theme-light .award-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #0f172a;
}

body.theme-light .award-winner {
  color: #0f172a;
}

body.theme-light .award-bluff-quote {
  background: #f1f5f9;
  color: #334155;
}

body.theme-light .scoreboard-row {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #0f172a;
}

body.theme-light .scoreboard-rank,
body.theme-light .scoreboard-name {
  color: #0f172a;
}

body.theme-light .scoreboard-score {
  color: #2563eb;
}

body.theme-light .form-input,
body.theme-light .code-input {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
}

body.theme-light .gamepad-hud {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #cbd5e1;
  color: #334155;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Halloween Theme Overrides (Spooky & Festive) */
body.theme-halloween .topbar {
  background: rgba(18, 9, 33, 0.94);
  border-bottom: 2px solid var(--accent-cyan);
  box-shadow: 0 4px 28px rgba(255, 117, 24, 0.3);
}

body.theme-halloween .brand-logo {
  background: linear-gradient(180deg, #ffffff 0%, #ffaa00 45%, #ff7518 75%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(255, 117, 24, 0.5));
}

body.theme-halloween .brand-tag {
  background: linear-gradient(90deg, #ff7518, #a855f7);
  box-shadow: 0 0 12px rgba(255, 117, 24, 0.5);
}

body.theme-halloween .funk-crest {
  background: rgba(255, 117, 24, 0.16);
  color: #ff9500;
  border-color: #ff7518;
  box-shadow: 0 0 14px rgba(255, 117, 24, 0.35);
}

body.theme-halloween .room-code-banner {
  border-color: #ff7518;
  box-shadow: 0 0 32px rgba(255, 117, 24, 0.35);
}

body.theme-halloween .room-code {
  color: #ff9500;
  text-shadow: 0 0 20px rgba(255, 117, 24, 0.6);
}

/* Christmas Theme Overrides (Festive Winter Wonderland) */
body.theme-christmas .topbar {
  background: rgba(11, 34, 24, 0.94);
  border-bottom: 2px solid #ef4444;
  box-shadow: 0 4px 28px rgba(239, 68, 68, 0.28);
}

body.theme-christmas .brand-logo {
  background: linear-gradient(180deg, #ffffff 0%, #fbbf24 40%, #ef4444 80%, #22c55e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.45));
}

body.theme-christmas .brand-tag {
  background: linear-gradient(90deg, #ef4444, #22c55e);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.45);
}

body.theme-christmas .funk-crest {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
  border-color: #22c55e;
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.35);
}

body.theme-christmas .room-code-banner {
  border-color: #ef4444;
  box-shadow: 0 0 32px rgba(239, 68, 68, 0.35);
}

body.theme-christmas .room-code {
  color: #fbbf24;
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.6);
}

/* Dark Theme Overrides (Sleek Modern Slate) */
body.theme-dark .topbar {
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

body.theme-dark .brand-logo {
  background: linear-gradient(180deg, #ffffff 0%, #94a3b8 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.35));
}

body.theme-dark .brand-tag {
  background: linear-gradient(90deg, #0284c7, #6366f1);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

body.theme-dark .funk-crest {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
}

/* Neon Cyber Overrides (Matrix Lime & High-Voltage Cyan Arcade) */
body.theme-neon .topbar {
  background: rgba(3, 7, 18, 0.95);
  border-bottom: 2px solid #00f5ff;
  box-shadow: 0 4px 28px rgba(0, 245, 255, 0.35);
}

body.theme-neon .brand-logo {
  background: linear-gradient(180deg, #ffffff 0%, #00f5ff 55%, #39ff14 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(0, 245, 255, 0.6));
}

body.theme-neon .brand-tag {
  background: linear-gradient(90deg, #00f5ff, #39ff14);
  color: #02040a;
  border: 1px solid rgba(0, 245, 255, 0.8);
  box-shadow: 0 0 14px rgba(0, 245, 255, 0.5);
}

body.theme-neon .funk-crest {
  background: rgba(0, 245, 255, 0.12);
  color: #00f5ff;
  border-color: #00f5ff;
  box-shadow: 0 0 16px rgba(0, 245, 255, 0.3);
}

body.theme-neon .room-code-banner {
  border-color: #00f5ff;
  box-shadow: 0 0 32px rgba(0, 245, 255, 0.4);
}

body.theme-neon .room-code {
  color: #39ff14;
  text-shadow: 0 0 20px rgba(57, 255, 20, 0.7);
}

/* Electro-Funk Overrides (Warm 70s/80s Disco Gold & Velvet Plum) */
body.theme-funk .topbar {
  background: rgba(24, 6, 40, 0.94);
  border-bottom: 2px solid #ffb703;
  box-shadow: 0 4px 28px rgba(251, 133, 0, 0.28);
}

body.theme-funk .brand-logo {
  background: linear-gradient(180deg, #ffffff 0%, #ffb703 45%, #fb8500 80%, #d90429 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(255, 183, 3, 0.5));
}

body.theme-funk .brand-tag {
  background: linear-gradient(90deg, #fb8500, #ffb703);
  color: #1c0b2b;
  border: 1px solid rgba(255, 183, 3, 0.8);
  box-shadow: 0 0 14px rgba(255, 183, 3, 0.5);
}

body.theme-funk .funk-crest {
  background: rgba(255, 183, 3, 0.14);
  color: #ffb703;
  border-color: #ffb703;
  box-shadow: 0 0 16px rgba(255, 183, 3, 0.3);
}

body.theme-funk .room-code-banner {
  border-color: #ffb703;
  box-shadow: 0 0 32px rgba(255, 183, 3, 0.35);
}

body.theme-funk .room-code {
  color: #ffb703;
  text-shadow: 0 0 20px rgba(255, 183, 3, 0.6);
}

/* =========================================================================
   AUTH MODAL & SUPABASE AUTH STYLES
   ========================================================================= */
.auth-modal-card {
  max-width: 480px;
  background: var(--bg-card);
  border: 2px solid var(--border-glow, rgba(56, 189, 248, 0.3));
}

.auth-oauth-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.96rem;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.auth-social-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.auth-btn-social {
  padding: 10px 8px;
  font-size: 0.86rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.auth-btn-social:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.auth-btn-google {
  background: #ffffff !important;
  color: #1f1f1f !important;
  border: 1px solid #dadce0 !important;
}

.auth-btn-google:hover {
  background: #f8fafc !important;
  filter: none !important;
}

.auth-btn-discord {
  background: #5865F2;
}

.auth-btn-twitch {
  background: #9146FF;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(150, 150, 150, 0.25);
}

.auth-divider span {
  padding: 0 10px;
}

.auth-alert {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 16px;
  text-align: center;
}

.auth-alert-error {
  background: rgba(239, 68, 68, 0.14);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.auth-alert-success {
  background: rgba(16, 185, 129, 0.14);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

/* Auth Modern Form Styles */
.auth-mode-tabs {
  background: rgba(255, 255, 255, 0.06);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: inline-flex;
}

.auth-mode-tabs .btn {
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 16px;
  border: none;
  transition: all 0.2s ease;
}

.auth-form-group {
  text-align: left;
  margin-bottom: 14px;
}

.auth-input-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-left: 4px;
}

.auth-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  background: rgba(15, 23, 42, 0.65);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding-left: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.auth-field-wrap:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(15, 23, 42, 0.8);
}

.auth-field-wrap:focus-within {
  border-color: var(--accent-cyan, #06b6d4);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.22), inset 0 2px 4px rgba(0, 0, 0, 0.25);
}

.auth-field-icon {
  margin-left: 14px;
  margin-right: 12px;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: var(--text-muted, #94a3b8);
  transition: color 0.2s ease;
}

.auth-field-wrap:focus-within .auth-field-icon {
  color: var(--accent-cyan, #06b6d4);
}

.auth-styled-input {
  flex: 1;
  min-width: 0;
  text-align: left !important;
  background: transparent;
  border: none;
  outline: none;
  padding: 13px 16px 13px 8px;
  font-size: 1rem;
  font-weight: 500;
  color: #ffffff;
  font-family: inherit;
}

.auth-field-wrap .auth-styled-input:first-child {
  padding-left: 18px;
}

.auth-styled-input::placeholder {
  color: rgba(148, 163, 184, 0.6);
  font-weight: 400;
}

.auth-otp-input {
  background: rgba(15, 23, 42, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
}

.auth-otp-input:focus {
  border-color: var(--accent-green, #10b981) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25) !important;
}

.topbar-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glow, rgba(255, 255, 255, 0.15));
  border-radius: 999px;
  font-size: 0.86rem;
  color: var(--text-main);
}

.user-avatar-dot {
  font-size: 1.1rem;
}

.user-name-text {
  font-weight: 700;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-xs {
  padding: 2px 8px;
  font-size: 0.74rem;
  border-radius: 6px;
}




