:root {
  --bg: #0f172a;
  --card: #111827;
  --text: #e5e7eb;
  --accent: #38bdf8;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
}
.game-live body {}
.container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 1rem;
}
h1, h2, h3 { margin: 0 0 1rem 0; }

/* Center main page title (e.g., "The 1% Live") */
.container > h1 { text-align: center; }

.controls, .players, .game, .scoreboard, .player-info, .question-area, .result-area {
  background: var(--card);
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

button {
  background: var(--accent);
  color: #0b1323;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}
button:disabled { opacity: 0.5; cursor: default; }

.room-info.hidden, .question-area.hidden, .player-info.hidden, .result-area.hidden { display: none; }
.controls.hidden { display: none; }
.game-controls.hidden { display: none; }
/* Generic hidden utility for any element */
.hidden { display: none !important; }

/* Hide kick buttons while game is live */
.game-live .kick-btn { display: none !important; }

/* Countdown bar: green to red as time runs out */
.countdown-bar {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: rgba(147, 197, 253, 0.12);
  border: 1px solid rgba(147, 197, 253, 0.45);
  overflow: hidden;
  box-shadow:
    inset 0 0 14px rgba(147, 197, 253, 0.18),
    0 0 12px rgba(56, 189, 248, 0.28),
    0 0 22px rgba(56, 189, 248, 0.18);
}
.countdown-bar::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(from var(--neon-rot, 0deg), rgba(0, 255, 255, 0.35), rgba(255, 0, 128, 0.35), rgba(0, 255, 255, 0.35));
  filter: blur(6px);
  animation: neonSpin 20s linear infinite;
  pointer-events: none;
}
.countdown-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
  transition: width 180ms linear, background 180ms linear, filter 180ms linear;
  animation: neonBarPulse 2.2s ease-in-out infinite;
  border-radius: inherit;
}
.countdown-fill::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,0.15), rgba(255,255,255,0)),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.08) 0 8px, rgba(0,0,0,0) 8px 16px);
  background-size: 160% 100%, 16px 16px;
  mix-blend-mode: screen;
  animation: shimmer 2.4s linear infinite;
  pointer-events: none;
}
.countdown-neon { margin-bottom: 8px; }
.countdown-neon { margin-bottom: 8px; }
.timer-controls { display: flex; gap: 8px; margin-top: 8px; }

/* Player join screen — centered layout and neon card styling */
.player-page .container {
  max-width: 700px;
  margin: 3rem auto;
  padding: 1.5rem;
  text-align: center;
}
.player-page h1 {
  margin-bottom: 0.75rem;
  color: #a5f3fc;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.6), 0 0 18px rgba(56, 189, 248, 0.35);
}
.player-page #joinStatus {
  margin-bottom: 1rem;
  color: #93c5fd;
}
.player-page .join-form,
.player-page .player-info {
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(20,35,60,0.85), rgba(10,20,40,0.9));
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35), inset 0 0 24px rgba(147, 197, 253, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.player-page .join-form label {
  font-weight: 600;
  color: #a5f3fc;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}
.player-page .join-form input {
  width: 100%;
  max-width: 360px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(147, 197, 253, 0.35);
  background: rgba(2, 8, 23, 0.95);
  color: #e5e7eb;
  box-shadow: inset 0 0 12px rgba(56, 189, 248, 0.12);
}
.player-page .join-form input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.75);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.45), inset 0 0 14px rgba(147, 197, 253, 0.2);
}
.player-page .join-form .join-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

/* Shared footer across Host and Player pages */
.site-footer {
  margin-top: 16px;
  padding: 12px 16px;
  text-align: center;
  font-size: 14px;
  color: #93c5fd;
  border-top: 1px solid rgba(147, 197, 253, 0.25);
}
.site-footer a {
  color: #a5f3fc;
  text-decoration: underline;
}
.player-page .join-form .join-actions button {
  min-width: 160px;
  background: linear-gradient(180deg, rgba(30,58,88,0.9), rgba(8,23,45,0.9));
  color: #dbeafe;
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}
.player-page .join-form .join-actions button:hover:enabled {
  background: linear-gradient(180deg, rgba(41,84,126,0.95), rgba(10,28,55,0.95));
  box-shadow: 0 0 20px rgba(147, 197, 253, 0.5);
}
.player-page .player-info p { margin: 0; }

/* Cut-scene overlay styling */
.cut-scene {
  position: relative;
  margin-top: 24px;
  padding: 24px;
  border-radius: 16px;
  background: radial-gradient(ellipse at center, rgba(20,20,30,0.9) 0%, rgba(10,10,15,0.95) 60%, rgba(5,5,8,1) 100%);
  box-shadow: 0 0 20px rgba(0,255,200,0.25), inset 0 0 40px rgba(0,255,200,0.15);
  color: #eaffff;
  text-align: center;
  border: 1px solid rgba(0,255,200,0.25);
  animation: cutIn 500ms ease-out;
}
.cut-scene.hidden { display: none; }
.cut-title {
  font-size: 28px;
  margin-bottom: 12px;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(0,255,200,0.6), 0 0 16px rgba(0,255,200,0.4);
}
.cut-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.cut-card {
  padding: 16px;
  border-radius: 12px;
  background: rgba(0,0,0,0.25);
  box-shadow: inset 0 0 20px rgba(0,255,150,0.15);
  border: 1px solid rgba(255,255,255,0.1);
}
.cut-card h4 { margin: 0 0 8px 0; }
.cut-list { list-style: none; padding-left: 0; margin: 0; }
.cut-list li { margin: 6px 0; }
.cut-good { color: #7fffd4; }
.cut-bad { color: #ff9aa2; }

@keyframes cutIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

/* Next Question teaser overlay */
.next-teaser {
  position: relative;
  margin-top: 24px;
  padding: 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(40,0,80,0.9), rgba(0,30,80,0.9));
  box-shadow: 0 0 24px rgba(180,0,255,0.35), inset 0 0 40px rgba(0,140,255,0.25);
  color: #f5e9ff;
  text-align: center;
  border: 1px solid rgba(180,0,255,0.3);
  animation: teaserPulse 1200ms ease-in-out infinite alternate;
}
.next-teaser.hidden { display: none; }
.teaser-title {
  font-size: 28px;
  margin-bottom: 10px;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(180,0,255,0.6), 0 0 20px rgba(0,140,255,0.4);
}
.teaser-sub {
  font-size: 18px;
  opacity: 0.9;
}
@keyframes teaserPulse {
  from { transform: scale(1); box-shadow: 0 0 16px rgba(180,0,255,0.25), inset 0 0 28px rgba(0,140,255,0.2); }
  to { transform: scale(1.02); box-shadow: 0 0 24px rgba(180,0,255,0.45), inset 0 0 40px rgba(0,140,255,0.3); }
}

ul, ol { padding-left: 1.25rem; }
li { margin: 0.25rem 0; }

#qr canvas { display: block; margin-top: 0.5rem; }

.choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.choices li { list-style: none; margin: 0; }
.choices li.neon-frame { border-radius: 12px; padding: 6px; --neon-speed: 18s; }
.choices button { width: 100%; margin: 0; }

.status { opacity: 0.8; }

/* Game show stage styling */
.stage {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 2rem;
  background: radial-gradient(1200px 600px at 20% 20%, #1f2937 0%, #0b1222 60%, #081021 100%);
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.25), inset 0 0 60px rgba(147, 197, 253, 0.12);
  /* Remove legacy border to avoid double/tilted look with neon-frame */
  border: none;
  perspective: 1000px;
}
/* Remove the angled gloss overlay to keep borders visually square */
.stage::before { content: none; }
.neon-text {
  color: #a5f3fc;
  text-shadow:
    0 0 8px rgba(56, 189, 248, 0.9),
    0 0 16px rgba(56, 189, 248, 0.6),
    0 0 32px rgba(56, 189, 248, 0.35);
}
.neon-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 0.5rem;
}
.neon-question {
  font-size: clamp(1.25rem, 3.2vw, 2rem);
  line-height: 1.4;
  margin: 0.5rem 0 1rem 0;
}
.choices.neon {
  list-style: none;
  padding-left: 0;
}
.choices.neon li { margin: 0; }
.choices.neon button {
  width: 100%;
  text-align: left;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(30,58,88,0.9), rgba(8,23,45,0.9));
  color: #dbeafe;
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}
.choices.neon button:hover:enabled {
  background: linear-gradient(180deg, rgba(41,84,126,0.95), rgba(10,28,55,0.95));
  box-shadow: 0 0 20px rgba(147,197,253,0.45);
}
.countdown-neon {
  color: #93c5fd;
  text-shadow:
    0 0 10px rgba(147,197,253,0.7),
    0 0 18px rgba(0,255,255,0.35),
    0 0 28px rgba(255,0,128,0.25);
  animation: neonTextPulse 2.6s ease-in-out infinite;
}

/* Rounded neon pill for lobby countdown text */
.countdown-pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(147, 197, 253, 0.45);
  background: linear-gradient(135deg, rgba(12, 20, 40, 0.65), rgba(18, 28, 55, 0.65));
  box-shadow:
    0 0 12px rgba(56, 189, 248, 0.35),
    inset 0 0 14px rgba(147, 197, 253, 0.18);
}

/* Subtle animated border glow */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 40px rgba(56, 189, 248, 0.25), inset 0 0 60px rgba(147, 197, 253, 0.12); }
  50% { box-shadow: 0 0 60px rgba(56, 189, 248, 0.35), inset 0 0 80px rgba(147, 197, 253, 0.18); }
}
.stage { animation: glowPulse 4s ease-in-out infinite; }
.camera-controls {
  margin: 12px 0;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.12);
  color: #eaffff;
}
.camera-controls label { margin-right: 8px; }
.camera-controls select, .camera-controls button {
  margin-left: 6px;
}
.camera-status { font-size: 12px; opacity: 0.85; margin-left: 8px; }

/* Question stage spans left column; camera+scores stack on right */
.question-area {
  display: block;
}
.question-area .content-col { position: relative; overflow: hidden; }
.host-cam {
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0,40,40,0.85), rgba(0,80,80,0.85));
  box-shadow: 0 0 20px rgba(0,255,200,0.25), inset 0 0 40px rgba(0,255,200,0.15);
  border: 1px solid rgba(0,255,200,0.25);
  color: #eaffff;
}
.host-cam.hidden { display: none; }
.cam-title { font-size: 18px; margin-bottom: 8px; text-shadow: 0 0 8px rgba(0,255,200,0.5); }
.host-cam video {
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: #000;
}

/* Host camera preview in controls */
.cam-preview {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(0,40,40,0.75), rgba(0,80,80,0.75));
  box-shadow: 0 0 16px rgba(0,255,200,0.20), inset 0 0 24px rgba(0,255,200,0.12);
  border: 1px solid rgba(0,255,200,0.25);
  color: #eaffff;
  max-width: 320px;
}
.cam-preview.hidden { display: none; }
.cam-preview video { width: 100%; border-radius: 8px; background: #000; }

/* Players list: side-by-side chips */
#playersList {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding-left: 0;
}
#playersList li {
  margin: 0; /* override default li margin */
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(147, 197, 253, 0.12);
  border: 1px solid rgba(147, 197, 253, 0.35);
  color: #dbeafe;
  box-shadow: 0 0 8px rgba(147, 197, 253, 0.25);
}

/* Game layout: question on left, scoreboard on right */
.game-layout {
  display: grid;
  grid-template-columns: 2fr 320px;
  gap: 16px;
  align-items: start;
}
.right-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.game-layout .scoreboard {
  position: sticky;
  top: 12px;
  height: fit-content;
}
.game-layout .scoreboard h2 { margin-top: 0; }
.game-layout .scoreboard ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.game-layout .scoreboard li { margin: 6px 0; }

/* Animated neon border frame for key containers */
.neon-frame { position: relative; border-radius: 16px; overflow: hidden; }
.neon-frame::before {
  content: "";
  position: absolute;
  inset: 0; /* draw on the edge */
  padding: 2px; /* border thickness */
  border-radius: inherit;
  background: conic-gradient(from var(--neon-rot, 0deg),
              rgba(0, 255, 255, 0.9),
              rgba(255, 0, 128, 0.9),
              rgba(0, 255, 255, 0.9));
  animation: neonSpin var(--neon-speed, 24s) linear infinite;
  /* Carve out the middle so only the border shows */
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.35)) drop-shadow(0 0 12px rgba(255, 0, 128, 0.25));
}

@keyframes neonSpin { to { --neon-rot: 360deg; } }

/* Responsive: stack scoreboard below on narrow screens */
@media (max-width: 900px) {
  .game-layout { grid-template-columns: 1fr; }
}

/* Game-show marquee bulbs around the stage */
.bulbs {
  position: absolute;
  inset: -12px;
  pointer-events: none;
}
.bulbs .edge {
  position: absolute;
  opacity: 0.9;
  filter: drop-shadow(0 0 6px rgba(255, 212, 0, 0.5));
  animation: bulbFlash 1.2s steps(2, end) infinite;
}
.bulbs .edge.top, .bulbs .edge.bottom {
  left: 0; right: 0; height: 18px;
  background-image: radial-gradient(circle, #ffd400 6px, #ff8a00 7px, transparent 9px);
  background-size: 30px 18px;
  background-repeat: repeat;
}
.bulbs .edge.top { top: -6px; animation-delay: 0s; }
.bulbs .edge.bottom { bottom: -6px; animation-delay: 0.3s; }
.bulbs .edge.left, .bulbs .edge.right {
  top: 0; bottom: 0; width: 18px;
  background-image: radial-gradient(circle, #ffd400 6px, #ff8a00 7px, transparent 9px);
  background-size: 18px 30px;
  background-repeat: repeat;
}
.bulbs .edge.left { left: -6px; animation-delay: 0.15s; }
.bulbs .edge.right { right: -6px; animation-delay: 0.45s; }

@keyframes bulbFlash {
  0% { opacity: 0.7; filter: drop-shadow(0 0 6px rgba(255, 212, 0, 0.45)) brightness(1) saturate(1); }
  50% { opacity: 1; filter: drop-shadow(0 0 10px rgba(255, 212, 0, 0.8)) brightness(1.35) saturate(1.2); }
  100% { opacity: 0.8; filter: drop-shadow(0 0 8px rgba(255, 212, 0, 0.6)) brightness(1.1) saturate(1.05); }
}

/* Disable marquee bulbs flashing lights across host and player */
.bulbs { display: none !important; }

/* Board flip transitions */
.board {
  position: relative;
  transform-style: preserve-3d;
  transform: rotateY(90deg);
  transition: transform 600ms ease, filter 400ms ease;
}
.board.show { transform: rotateY(0deg); }
.board.flip-out { transform: rotateY(-90deg); }

/* A little pop on headings/questions when shown */
.board .neon-title, .board .neon-question, .board #roundTitle {
  transition: transform 400ms ease, opacity 400ms ease;
}
.board.show .neon-title, .board.show .neon-question, .board.show #roundTitle {
  transform: translateZ(10px);
  opacity: 1;
}

/* Animated background accents for extra flair */
.stage::after {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(800px 400px at 80% 120%, rgba(0, 180, 255, 0.1), transparent 60%),
              radial-gradient(600px 300px at 10% 10%, rgba(255, 0, 180, 0.08), transparent 60%);
  animation: stageFlares 6s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes stageFlares {
  from { transform: translateY(0) scale(1); opacity: 0.8; }
  to { transform: translateY(-8px) scale(1.03); opacity: 1; }
}

/* Lobby scene styling */
.lobby-scene {
  margin-top: 16px;
  padding: 24px;
  border-radius: 16px;
  background: radial-gradient(1000px 500px at 30% 20%, #1a2030 0%, #0c1326 60%, #091225 100%);
  box-shadow: 0 0 36px rgba(56, 189, 248, 0.28), inset 0 0 60px rgba(147, 197, 253, 0.15);
  border: 2px solid rgba(56, 189, 248, 0.35);
}
.lobby-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.lobby-cam {
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0,40,40,0.85), rgba(0,80,80,0.85));
  box-shadow: 0 0 20px rgba(0,255,200,0.25), inset 0 0 40px rgba(0,255,200,0.15);
  border: 1px solid rgba(0,255,200,0.25);
  color: #eaffff;
}
.lobby-cam.hidden { display: none; }
.lobby-cam video {
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: #000;
}
.lobby-info {
  padding: 16px;
  border-radius: 12px;
  background: rgba(0,0,0,0.25);
  box-shadow: inset 0 0 20px rgba(0,255,150,0.15);
  border: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.room-code-hero {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800;
  color: #a5f3fc;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.8), 0 0 18px rgba(56, 189, 248, 0.45);
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.join-url { font-size: 16px; opacity: 0.95; margin-bottom: 10px; }
.qr-hero img, .qr-hero canvas { display: block; width: 220px; height: 220px; }
.lobby-info button#startGameLobbyBtn { margin-top: 12px; width: auto; align-self: center; }
/* Centered lobby variant: single column, centered items */
.lobby-scene.centered .lobby-grid {
  grid-template-columns: 1fr;
  justify-items: center;
}
.lobby-scene.centered .room-code-hero,
.lobby-scene.centered .join-url { text-align: center; }
.lobby-scene.centered .qr-hero img,
.lobby-scene.centered .qr-hero canvas { margin: 0 auto; }
/* (Spotlights removed) */

/* Setup grid for settings, preview, and Create Room layout */
.setup-grid {
  display: grid;
  gap: 12px;
  align-items: start;
}
.setup-grid.one-col {
  grid-template-columns: 1fr;
}
.setup-grid.two-col {
  grid-template-columns: 1fr 360px;
}
.setup-right button#createRoomBtn {
  width: 100%;
  margin-top: 8px;
}

/* Welcome cut-scene overlay */
.welcome-cutscene {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: radial-gradient(1200px 600px at 50% 20%, rgba(0, 255, 255, 0.08), rgba(255, 0, 128, 0.08)),
              linear-gradient(180deg, rgba(10, 10, 20, 0.9), rgba(5, 5, 12, 0.96));
  backdrop-filter: blur(4px);
}

.welcome-inner {
  text-align: center;
  animation: fadeInUp 600ms ease-out both;
}

.welcome-title {
  font-size: 3rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.welcome-sub {
  font-size: 1.4rem;
  opacity: 0.92;
  animation: subtlePulse 2200ms ease-in-out infinite;
}

.welcome-flares {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.welcome-flares .flare {
  position: absolute;
  bottom: 0;
  width: 48vw;
  height: 30vh;
  filter: blur(22px);
  opacity: 0.45;
}

.welcome-flares .flare.cyan {
  left: -8vw;
  background: radial-gradient(60% 60% at 0% 100%, rgba(0, 255, 255, 0.7), transparent 70%);
}

.welcome-flares .flare.pink {
  right: -8vw;
  background: radial-gradient(60% 60% at 100% 100%, rgba(255, 0, 128, 0.7), transparent 70%);
}

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

@keyframes subtlePulse {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 1; }
}
@keyframes neonBarPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(56, 189, 248, 0.35); }
  50% { box-shadow: 0 0 18px rgba(56, 189, 248, 0.5); }
}

@keyframes shimmer {
  from { background-position: 0% 0, 0 0; }
  to   { background-position: -160% 0, 32px 0; }
}

@keyframes neonTextPulse {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(56,189,248,0.35)); }
  50% { filter: drop-shadow(0 0 12px rgba(255,0,128,0.35)); }
}

/* --- UI Shadows & Button Effects Enhancements --- */
/* Elevate core containers with a cohesive glow */
.controls, .players, .game, .scoreboard, .player-info, .question-area, .result-area {
  box-shadow:
    0 10px 24px rgba(56, 189, 248, 0.18),
    0 2px 8px rgba(147, 197, 253, 0.12),
    inset 0 0 14px rgba(2, 8, 23, 0.5);
}

/* Shared interactive motion and glow for buttons */
button {
  box-shadow:
    0 6px 14px rgba(56, 189, 248, 0.25),
    inset 0 0 8px rgba(255, 255, 255, 0.06);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}
button:hover:enabled {
  transform: translateY(-1px);
  filter: brightness(1.05) saturate(1.02);
  box-shadow:
    0 10px 20px rgba(56, 189, 248, 0.28),
    0 0 18px rgba(147, 197, 253, 0.35),
    inset 0 0 10px rgba(255, 255, 255, 0.08);
}
button:active:enabled {
  transform: translateY(0);
  filter: brightness(0.98) saturate(0.98);
  box-shadow:
    0 6px 14px rgba(56, 189, 248, 0.25),
    inset 0 0 8px rgba(255, 255, 255, 0.08);
}
button:focus-visible {
  outline: 2px solid rgba(147, 197, 253, 0.65);
  outline-offset: 2px;
}

/* Choice buttons on question screens: subtle motion + glow */
.choices button {
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}
.choices.neon button:hover:enabled { transform: translateY(-1px); }
.choices.neon button:active:enabled { transform: translateY(0); }

/* Neon frame: add soft outer and inner glow */
.neon-frame {
  box-shadow:
    0 0 22px rgba(56, 189, 248, 0.22),
    inset 0 0 18px rgba(147, 197, 253, 0.12);
}

/* Question board: pop with layered drop-shadow when shown */
.board.show {
  filter:
    drop-shadow(0 10px 24px rgba(0, 255, 200, 0.18))
    drop-shadow(0 2px 8px rgba(147, 197, 253, 0.25));
}

/* QR visual: give it a hero presence */
.qr-hero img, .qr-hero canvas {
  border-radius: 12px;
  box-shadow:
    0 12px 24px rgba(56, 189, 248, 0.25),
    0 0 20px rgba(0, 255, 200, 0.18);
}

/* Player join actions: match motion across buttons */
.player-page .join-form .join-actions button:hover:enabled { transform: translateY(-1px); }
.player-page .join-form .join-actions button:active:enabled { transform: translateY(0); }