/* ============================================================
   BIBLIA GAME v2.0 - Estilos Completos con Todas las Mejoras
   Concurso Bíblico Interactivo - Aventureros
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700;900&family=Nunito:wght@400;600;700;800;900&display=swap');

/* ── Variables Globales ── */
:root {
  --gold:        #f0c040;
  --gold-dark:   #c89a1a;
  --gold-light:  #fff8d6;
  --navy:        #0d1b3e;
  --navy-mid:    #1a2f6e;
  --navy-light:  #2a4a9e;
  --bg-dark:     #060d20;
  --white:       #ffffff;
  --success:     #2ecc71;
  --danger:      #e74c3c;
  --warning:     #f39c12;
  --text-light:  #cdd8f0;
  --shadow:      0 8px 32px rgba(0,0,0,0.5);
  --shadow-gold: 0 0 30px rgba(240,192,64,0.4);
  --radius:      18px;
  --radius-sm:   12px;
  --radius-xs:   8px;
  --transition:  0.3s cubic-bezier(.4,0,.2,1);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

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

/* ── Canvas de partículas ── */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

/* ── Overlay de fondo ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 40%, rgba(26,47,110,0.5) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 20%, rgba(42,74,158,0.35) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 90%, rgba(13,27,62,0.7) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ── Pantallas ── */
.screen {
  display: none;
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 20px;
}
.screen.active { display: flex; flex-direction: column; align-items: center; }

/* Transición entre pantallas */
.screen.fade-in { animation: fadeScreen 0.4s ease both; }
@keyframes fadeScreen {
  from { opacity: 0; transform: scale(0.98); }
  to   { opacity: 1; transform: scale(1); }
}

/* ============================================================
   PANTALLA 1 — INICIO
   ============================================================ */
#screen-inicio {
  justify-content: flex-start;
  padding-top: 0;
  gap: 0;
}

/* Hero Banner */
.hero-banner {
  width: 100%;
  max-height: 260px;
  overflow: hidden;
  position: relative;
  margin-bottom: -20px;
}

.hero-banner img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.hero-banner::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(transparent, var(--bg-dark));
}

/* Logo fallback (sin imagen) */
.logo-container {
  text-align: center;
  padding: 30px 20px 10px;
  animation: fadeInDown 0.8s ease;
}

.logo-icon {
  font-size: 64px;
  display: block;
  filter: drop-shadow(0 0 24px rgba(240,192,64,0.9));
  animation: pulse-glow 2.5s ease-in-out infinite;
  margin-bottom: 8px;
}

@keyframes pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 20px rgba(240,192,64,0.8)); transform: scale(1); }
  50%       { filter: drop-shadow(0 0 44px rgba(240,192,64,1));   transform: scale(1.06); }
}

.logo-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(26px, 5vw, 50px);
  font-weight: 900;
  background: linear-gradient(135deg, #f0c040 0%, #fff5cc 50%, #c89a1a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 3px;
  line-height: 1.1;
}

.logo-subtitle {
  font-size: clamp(11px, 2vw, 15px);
  color: var(--text-light);
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-top: 5px;
}

/* Panel de configuración */
.config-panel {
  background: rgba(20,36,90,0.55);
  border: 1px solid rgba(240,192,64,0.25);
  border-radius: var(--radius);
  padding: 28px 32px 32px;
  width: 100%;
  max-width: 600px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.06);
  animation: fadeInUp 0.7s ease 0.15s both;
  margin-bottom: 30px;
}

.config-panel h2 {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: 16px;
  text-align: center;
  margin-bottom: 22px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.9;
}

/* Selector de concurso */
.concurso-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
}

.concurso-btn {
  background: rgba(8,14,40,0.7);
  border: 2px solid rgba(240,192,64,0.2);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
  color: var(--text-light);
  position: relative;
  overflow: hidden;
}

.concurso-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(240,192,64,0.08), transparent 70%);
  opacity: 0;
  transition: var(--transition);
}

.concurso-btn:hover { border-color: rgba(240,192,64,0.6); transform: translateY(-2px); }
.concurso-btn:hover::before { opacity: 1; }

.concurso-btn.selected {
  border-color: var(--gold);
  background: rgba(240,192,64,0.12);
  color: var(--white);
  box-shadow: 0 0 24px rgba(240,192,64,0.25), inset 0 1px 0 rgba(240,192,64,0.2);
}

.concurso-btn .cb-icon { font-size: 30px; display: block; margin-bottom: 7px; }
.concurso-btn .cb-name { font-weight: 900; font-size: 14px; display: block; color: var(--white); }
.concurso-btn .cb-desc { font-size: 11px; opacity: 0.65; margin-top: 3px; line-height: 1.4; }

/* Campos del formulario */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
  opacity: 0.9;
}

.form-control {
  width: 100%;
  background: rgba(6,13,32,0.8);
  border: 1px solid rgba(240,192,64,0.25);
  border-radius: var(--radius-xs);
  padding: 12px 16px;
  color: var(--white);
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(240,192,64,0.18);
}

/* Equipos */
.equipos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.equipo-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(6,13,32,0.65);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-xs);
  padding: 9px 12px;
  transition: var(--transition);
}

.equipo-input-group:hover { border-color: rgba(240,192,64,0.35); }

.equipo-color-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}

.equipo-input-group input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--white);
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 700;
  width: 100%;
}

.equipo-input-group input::placeholder { color: rgba(255,255,255,0.28); }

/* Número de equipos */
.num-equipos-row { display: flex; gap: 8px; margin-top: 8px; }

.num-equipo-btn {
  flex: 1;
  padding: 10px;
  background: rgba(6,13,32,0.7);
  border: 1px solid rgba(240,192,64,0.18);
  border-radius: var(--radius-xs);
  color: var(--text-light);
  font-family: 'Nunito', sans-serif;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.num-equipo-btn:hover, .num-equipo-btn.selected {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(240,192,64,0.1);
  box-shadow: 0 0 12px rgba(240,192,64,0.2);
}

/* Opciones */
.opciones-fila {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.opcion-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-light);
  user-select: none;
}

.opcion-check input[type="checkbox"] {
  accent-color: var(--gold);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Slider de tiempo */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.12);
  outline: none;
  cursor: pointer;
  margin-top: 10px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(240,192,64,0.5);
}

/* Control de volumen */
.volumen-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.volumen-row span { font-size: 18px; }
.volumen-row input[type="range"] { flex: 1; }

/* Botón principal */
.btn-start {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, #f5d060, var(--gold), #c89a1a);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--navy);
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 3px;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 10px;
  box-shadow: 0 4px 24px rgba(240,192,64,0.45), inset 0 1px 0 rgba(255,255,255,0.3);
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

.btn-start::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: rgba(255,255,255,0.25);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.btn-start:hover::before { left: 120%; }
.btn-start:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 35px rgba(240,192,64,0.65);
}

.btn-start:active { transform: translateY(-1px); }

/* ============================================================
   PANTALLA 2 — TABLERO
   ============================================================ */
#screen-tablero {
  justify-content: flex-start;
  padding: 14px;
  gap: 12px;
}

/* Header del tablero */
.tablero-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(20,36,90,0.6);
  border: 1px solid rgba(240,192,64,0.18);
  border-radius: var(--radius);
  padding: 10px 18px;
  backdrop-filter: blur(10px);
  flex-wrap: wrap;
  gap: 8px;
}

.tablero-titulo {
  font-family: 'Cinzel', serif;
  font-size: clamp(13px, 2.2vw, 20px);
  color: var(--gold);
  letter-spacing: 2px;
}

.turno-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-light);
  background: rgba(6,13,32,0.5);
  padding: 6px 14px;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.08);
}

.turno-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  animation: blink 0.9s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.3; transform: scale(0.8); }
}

/* Marcador de equipos */
.marcador-container {
  width: 100%;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.marcador-equipo {
  flex: 1;
  min-width: 110px;
  max-width: 200px;
  background: rgba(6,13,32,0.7);
  border: 2px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.marcador-equipo::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: currentColor;
  opacity: 0.4;
  transition: var(--transition);
}

.marcador-equipo.turno-activo {
  border-color: var(--gold) !important;
  box-shadow: 0 0 20px rgba(240,192,64,0.2);
  transform: translateY(-2px);
}

.marcador-equipo.turno-activo::before { opacity: 1; height: 4px; }

.marcador-equipo.turno-activo::after {
  content: '▶';
  position: absolute;
  top: 4px; right: 7px;
  font-size: 9px;
  color: var(--gold);
  animation: blink 0.8s ease-in-out infinite;
}

.marcador-nombre {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 4px;
}

.marcador-puntos {
  font-family: 'Cinzel', serif;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  transition: var(--transition);
}

/* Racha de equipo */
.marcador-racha {
  font-size: 11px;
  margin-top: 3px;
  opacity: 0;
  transition: var(--transition);
}
.marcador-racha.visible { opacity: 1; }

/* Animación de puntos flotantes */
.puntos-float {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Cinzel', serif;
  font-size: 22px;
  font-weight: 900;
  pointer-events: none;
  animation: floatUp 1.4s ease forwards;
  z-index: 20;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

@keyframes floatUp {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  30%  { opacity: 1; transform: translate(-50%, -80%) scale(1.2); }
  100% { opacity: 0; transform: translate(-50%, -160%) scale(0.8); }
}

/* Barra de progreso */
.progreso-bar-container {
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  height: 5px;
  overflow: hidden;
  margin-top: 6px;
}

.progreso-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--success));
  border-radius: 4px;
  transition: width 0.7s cubic-bezier(.4,0,.2,1);
}

/* Tablero Jeopardy */
.tablero-grid-wrapper {
  width: 100%;
  overflow-x: auto;
  flex: 1;
  padding-bottom: 4px;
}

.tablero-grid {
  display: grid;
  gap: 8px;
  min-width: 480px;
  width: 100%;
}

/* Encabezados de categoría */
.cat-header {
  background: linear-gradient(160deg, rgba(26,47,110,0.95), rgba(13,27,62,0.98));
  border: 1px solid rgba(240,192,64,0.3);
  border-top-width: 3px;
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
  font-family: 'Cinzel', serif;
  font-size: clamp(10px, 1.4vw, 13px);
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--gold);
  text-transform: uppercase;
  line-height: 1.3;
  position: relative;
  overflow: hidden;
}

.cat-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 100%);
}

.cat-header .cat-emoji {
  font-size: clamp(16px, 2vw, 22px);
  display: block;
  margin-bottom: 4px;
}

/* Celdas del tablero */
.tablero-celda {
  background: linear-gradient(160deg, rgba(22,42,100,0.92), rgba(10,20,55,0.96));
  border: 2px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  padding: 12px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(.4,0,.2,1);
  font-family: 'Cinzel', serif;
  font-size: clamp(18px, 2.8vw, 30px);
  font-weight: 700;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  position: relative;
  overflow: hidden;
  animation: celdaEntrada 0.4s ease both;
}

@keyframes celdaEntrada {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

.tablero-celda::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(240,192,64,0.12), transparent 70%);
  opacity: 0;
  transition: var(--transition);
}

.tablero-celda:hover:not(.usada) {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 10px 28px rgba(0,0,0,0.4);
  z-index: 2;
}

.tablero-celda:hover:not(.usada)::before { opacity: 1; }

.tablero-celda.usada {
  background: rgba(6,13,32,0.5);
  border-color: rgba(255,255,255,0.04);
  cursor: default;
  color: transparent !important;
}

.tablero-celda.usada::after {
  content: '✓';
  font-size: 18px;
  color: rgba(46,204,113,0.25);
}

.pts-label {
  font-size: 0.5em;
  opacity: 0.65;
  display: block;
  margin-top: 1px;
  letter-spacing: 1px;
}

/* Casilla especial (doble valor) */
.tablero-celda.especial {
  background: linear-gradient(160deg, rgba(192,57,43,0.3), rgba(120,30,20,0.5));
  border-color: rgba(231,76,60,0.4);
  animation: especialPulse 2s ease-in-out infinite, celdaEntrada 0.4s ease both;
}

@keyframes especialPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(231,76,60,0); }
  50%       { box-shadow: 0 0 0 6px rgba(231,76,60,0.2); }
}

.celda-especial-badge {
  position: absolute;
  top: 4px; right: 4px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  font-family: 'Nunito', sans-serif;
  font-size: 8px;
  font-weight: 900;
  padding: 2px 5px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Banner "¡Última Pregunta!" */
.ultima-pregunta-banner {
  width: 100%;
  background: linear-gradient(135deg, rgba(231,76,60,0.3), rgba(192,57,43,0.4));
  border: 1px solid rgba(231,76,60,0.5);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  text-align: center;
  font-family: 'Cinzel', serif;
  font-size: 16px;
  font-weight: 700;
  color: #ff8080;
  letter-spacing: 2px;
  animation: pulseBanner 1s ease-in-out infinite;
  display: none;
}

.ultima-pregunta-banner.visible { display: block; }

@keyframes pulseBanner {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

/* Botones flotantes del tablero */
.btn-auto {
  background: rgba(20,36,90,0.85);
  border: 1px solid rgba(240,192,64,0.3);
  border-radius: 50px;
  padding: 8px 14px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.btn-auto:hover { background: rgba(42,74,158,0.9); border-color: var(--gold); }
.btn-auto.active { background: rgba(240,192,64,0.2); border-color: var(--gold); }

/* ============================================================
   PANTALLA 3 — PREGUNTA
   ============================================================ */
#screen-pregunta {
  justify-content: center;
  align-items: center;
  padding: 20px;
  gap: 16px;
}

.pregunta-container {
  width: 100%;
  max-width: 820px;
  animation: dramaticReveal 0.5s cubic-bezier(.175,.885,.32,1.275);
}

@keyframes dramaticReveal {
  0%   { opacity: 0; transform: scale(0.7) rotateX(15deg); }
  60%  { transform: scale(1.03) rotateX(-2deg); }
  100% { opacity: 1; transform: scale(1) rotateX(0deg); }
}

/* Meta badge */
.pregunta-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.pregunta-categoria-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(20,36,90,0.8);
  border: 1px solid rgba(240,192,64,0.35);
  border-radius: 50px;
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 1px;
}

.pregunta-puntos-badge {
  font-family: 'Cinzel', serif;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  color: var(--gold);
  text-shadow: var(--shadow-gold);
  animation: puntosGlow 2s ease-in-out infinite;
}

.pregunta-puntos-badge.especial-pts {
  color: #ff8080;
  text-shadow: 0 0 20px rgba(231,76,60,0.8);
}

@keyframes puntosGlow {
  0%, 100% { text-shadow: 0 0 20px rgba(240,192,64,0.6); }
  50%       { text-shadow: 0 0 40px rgba(240,192,64,1); }
}

/* Temporizador circular */
.timer-wrapper { display: flex; justify-content: center; margin-bottom: 16px; }

.timer-circle { position: relative; width: 88px; height: 88px; }

.timer-svg { transform: rotate(-90deg); width: 88px; height: 88px; }

.timer-track { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 6; }

.timer-progress {
  fill: none;
  stroke: var(--gold);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 226;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke 0.4s ease;
  filter: drop-shadow(0 0 6px currentColor);
}

.timer-progress.warning { stroke: var(--warning); }
.timer-progress.danger  { stroke: var(--danger); animation: timerUrgente 0.5s ease-in-out infinite; }

@keyframes timerUrgente {
  0%, 100% { filter: drop-shadow(0 0 6px #e74c3c); }
  50%       { filter: drop-shadow(0 0 16px #e74c3c); }
}

.timer-number {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: 26px;
  font-weight: 700;
}

.timer-number.danger { color: var(--danger); animation: timerPulse 0.5s ease-in-out infinite; }

@keyframes timerPulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.15); }
}

/* Botón de pausa del timer */
.timer-pause-btn {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20,36,90,0.8);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50px;
  padding: 3px 10px;
  font-size: 11px;
  color: var(--text-light);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.timer-pause-btn:hover { border-color: var(--gold); color: var(--gold); }

/* Card de pregunta */
.pregunta-card {
  background: rgba(20,36,90,0.45);
  border: 1px solid rgba(240,192,64,0.22);
  border-radius: var(--radius);
  padding: 28px 32px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.pregunta-numero {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(240,192,64,0.55);
  margin-bottom: 10px;
}

.pregunta-texto {
  font-size: clamp(17px, 2.8vw, 26px);
  font-weight: 800;
  line-height: 1.5;
  color: var(--white);
  margin-bottom: 22px;
}

/* Opciones */
.opciones-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.opciones-ocultas .opciones-grid { display: none; }

.opcion-btn {
  background: rgba(6,13,32,0.8);
  border: 2px solid rgba(255,255,255,0.09);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
  color: var(--white);
  font-family: 'Nunito', sans-serif;
  font-size: clamp(12px, 1.7vw, 15px);
  font-weight: 700;
  line-height: 1.35;
  position: relative;
  overflow: hidden;
}

.opcion-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at left center, rgba(240,192,64,0.06), transparent 70%);
  opacity: 0;
  transition: var(--transition);
}

.opcion-btn:hover { border-color: var(--gold); transform: translateX(4px); }
.opcion-btn:hover::before { opacity: 1; }

.opcion-btn.correcta {
  border-color: var(--success);
  background: rgba(46,204,113,0.18);
  color: #b8f5d0;
  animation: correctaFlash 0.5s ease;
}

@keyframes correctaFlash {
  0%, 100% { background: rgba(46,204,113,0.18); }
  50%       { background: rgba(46,204,113,0.35); }
}

.opcion-btn.incorrecta {
  border-color: var(--danger);
  background: rgba(231,76,60,0.18);
  color: #f5b0a8;
}

.opcion-letra {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(240,192,64,0.15);
  border: 1.5px solid rgba(240,192,64,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
  transition: var(--transition);
}

.opcion-btn.correcta  .opcion-letra { background: var(--success); border-color: var(--success); color: white; }
.opcion-btn.incorrecta .opcion-letra { background: var(--danger);  border-color: var(--danger);  color: white; }

/* Panel de equipo que responde */
.equipo-responde-panel {
  background: rgba(20,36,90,0.5);
  border: 1px solid rgba(240,192,64,0.18);
  border-radius: var(--radius);
  padding: 14px 20px;
  width: 100%;
  max-width: 820px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.equipo-responde-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-light);
  white-space: nowrap;
}

.equipos-responde-btns { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }

.equipo-responde-btn {
  padding: 7px 16px;
  border-radius: 50px;
  border: 2px solid;
  background: transparent;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 800;
  transition: var(--transition);
  opacity: 0.55;
}

.equipo-responde-btn.selected,
.equipo-responde-btn:hover { opacity: 1; transform: scale(1.05); }

.equipo-responde-btn.selected { color: white !important; }

/* Controles de la pregunta */
.pregunta-controles {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Botones de acción */
.btn-accion {
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.5px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

.btn-accion:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.35); }
.btn-accion:active { transform: translateY(-1px); }

.btn-correcto   { background: linear-gradient(135deg, #27ae60, var(--success)); color: white; box-shadow: 0 4px 15px rgba(46,204,113,0.3); }
.btn-incorrecto { background: linear-gradient(135deg, #c0392b, var(--danger));  color: white; box-shadow: 0 4px 15px rgba(231,76,60,0.3); }
.btn-ver-respuesta { background: rgba(240,192,64,0.15); border: 2px solid var(--gold); color: var(--gold); }
.btn-skip { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.15); color: var(--text-light); }
.btn-pausa { background: rgba(243,156,18,0.15); border: 2px solid var(--warning); color: var(--warning); }

/* ============================================================
   PANTALLA 4 — RESPUESTA
   ============================================================ */
#screen-respuesta {
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.respuesta-container {
  width: 100%;
  max-width: 700px;
  text-align: center;
  animation: scaleIn 0.5s cubic-bezier(.175,.885,.32,1.275);
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}

.respuesta-resultado {
  font-size: clamp(52px, 9vw, 90px);
  margin-bottom: 14px;
  animation: bounceIn 0.7s cubic-bezier(.175,.885,.32,1.275);
}

@keyframes bounceIn {
  0%   { transform: scale(0) rotate(-10deg); }
  60%  { transform: scale(1.25) rotate(3deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.respuesta-titulo {
  font-family: 'Cinzel', serif;
  font-size: clamp(22px, 4.5vw, 40px);
  font-weight: 900;
  margin-bottom: 6px;
}

.respuesta-titulo.correcto  { color: var(--success); text-shadow: 0 0 30px rgba(46,204,113,0.6); }
.respuesta-titulo.incorrecto { color: var(--danger);  text-shadow: 0 0 30px rgba(231,76,60,0.6); }
.respuesta-titulo.timeup    { color: var(--gold);    text-shadow: 0 0 30px rgba(240,192,64,0.6); }

.respuesta-card {
  background: rgba(20,36,90,0.5);
  border: 1px solid rgba(240,192,64,0.25);
  border-radius: var(--radius);
  padding: 26px;
  margin: 18px 0;
  backdrop-filter: blur(14px);
}

.respuesta-pregunta-texto {
  font-size: clamp(13px, 1.9vw, 16px);
  color: var(--text-light);
  margin-bottom: 14px;
  font-style: italic;
  line-height: 1.5;
}

.respuesta-correcta-label {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--success);
  margin-bottom: 8px;
  opacity: 0.85;
}

.respuesta-correcta-texto {
  font-size: clamp(17px, 2.8vw, 24px);
  font-weight: 900;
  color: var(--white);
  background: rgba(46,204,113,0.14);
  border: 1.5px solid rgba(46,204,113,0.4);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  animation: slideInUp 0.4s ease 0.2s both;
}

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

.puntos-ganados {
  font-family: 'Cinzel', serif;
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 900;
  margin: 14px 0;
  animation: puntosEntrada 0.6s cubic-bezier(.175,.885,.32,1.275) 0.3s both;
}

@keyframes puntosEntrada {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

.puntos-ganados.positivo { color: var(--success); text-shadow: 0 0 30px rgba(46,204,113,0.5); }
.puntos-ganados.negativo { color: var(--danger);  text-shadow: 0 0 30px rgba(231,76,60,0.5); }
.puntos-ganados.neutro   { color: var(--gold);    text-shadow: 0 0 30px rgba(240,192,64,0.5); }

/* ============================================================
   PANTALLA 5 — ESTADÍSTICAS
   ============================================================ */
#screen-estadisticas {
  justify-content: flex-start;
  align-items: center;
  padding: 24px;
  gap: 18px;
  overflow-y: auto;
}

.stats-header {
  text-align: center;
  animation: fadeInDown 0.5s ease;
}

.stats-titulo {
  font-family: 'Cinzel', serif;
  font-size: clamp(20px, 3.5vw, 32px);
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 2px;
}

.stats-grid {
  width: 100%;
  max-width: 900px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.stats-equipo-card {
  background: rgba(20,36,90,0.5);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.5s ease both;
}

.stats-equipo-nombre {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 14px;
}

.stats-row:last-child { border-bottom: none; }

.stats-label { color: var(--text-light); }
.stats-value { font-weight: 800; }

/* Mini gráfico de barras */
.stats-bar-container {
  margin-top: 14px;
}

.stats-bar-label {
  font-size: 11px;
  color: var(--text-light);
  letter-spacing: 1px;
  margin-bottom: 5px;
  text-transform: uppercase;
}

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

.stats-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s cubic-bezier(.4,0,.2,1);
  animation: barGrow 1s ease both;
}

@keyframes barGrow {
  from { width: 0 !important; }
}

/* ============================================================
   PANTALLA 6 — PODIO FINAL
   ============================================================ */
#screen-podio {
  justify-content: center;
  align-items: center;
  padding: 24px;
  gap: 22px;
  background: radial-gradient(ellipse at center, rgba(26,47,110,0.5) 0%, transparent 70%);
}

.podio-header { text-align: center; }

.podio-titulo {
  font-family: 'Cinzel', serif;
  font-size: clamp(24px, 5vw, 50px);
  font-weight: 900;
  background: linear-gradient(135deg, #f0c040, #fff5cc, #c89a1a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: pulse-glow 2s ease-in-out infinite;
}

.podio-trofeo {
  font-size: clamp(48px, 8vw, 80px);
  display: block;
  animation: bounceIn 0.8s cubic-bezier(.175,.885,.32,1.275);
}

.podio-container {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 560px;
}

.podio-lugar {
  flex: 1;
  max-width: 170px;
  text-align: center;
  animation: slideInUp 0.7s ease both;
}

.podio-lugar:nth-child(1) { animation-delay: 0.3s; }
.podio-lugar:nth-child(2) { animation-delay: 0.1s; }
.podio-lugar:nth-child(3) { animation-delay: 0.5s; }

.podio-plataforma {
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 14px 8px;
  position: relative;
  overflow: hidden;
}

.podio-plataforma::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 100%);
}

.podio-plataforma.oro    { background: linear-gradient(180deg, #f0c040, #c89a1a); height: 155px; }
.podio-plataforma.plata  { background: linear-gradient(180deg, #bdc3c7, #8e9ea0); height: 115px; }
.podio-plataforma.bronce { background: linear-gradient(180deg, #cd7f32, #9a5a20); height: 85px;  }

.podio-posicion {
  font-family: 'Cinzel', serif;
  font-size: 26px;
  font-weight: 900;
  color: rgba(0,0,0,0.35);
}

.podio-info { margin-bottom: 8px; }
.podio-equipo-emoji { font-size: 28px; display: block; }
.podio-equipo-nombre { font-size: 13px; font-weight: 900; display: block; margin: 4px 0; }
.podio-equipo-puntos { font-family: 'Cinzel', serif; font-size: 20px; font-weight: 700; color: var(--gold); }

/* Ranking completo */
.ranking-lista {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(20,36,90,0.45);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  animation: fadeInLeft 0.5s ease both;
  transition: var(--transition);
}

.ranking-item:hover { transform: translateX(4px); border-color: rgba(240,192,64,0.3); }

.ranking-pos { font-family: 'Cinzel', serif; font-size: 18px; font-weight: 700; color: var(--gold); width: 32px; text-align: center; }
.ranking-nombre { flex: 1; font-weight: 800; }
.ranking-pts { font-family: 'Cinzel', serif; font-size: 18px; font-weight: 700; }

/* Botones del podio */
.podio-acciones {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-podio {
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  border: 2px solid;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.5px;
  transition: var(--transition);
  text-transform: uppercase;
}

.btn-podio:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.35); }

.btn-nueva-partida    { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); border-color: var(--gold); color: var(--navy); }
.btn-ver-estadisticas { background: rgba(46,204,113,0.15); border-color: var(--success); color: var(--success); }
.btn-reiniciar        { background: transparent; border-color: rgba(255,255,255,0.25); color: var(--text-light); }

/* ============================================================
   MODAL DE CONFIRMACIÓN
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(6px);
}

.modal-overlay.active { display: flex; }

.modal-box {
  background: linear-gradient(160deg, rgba(10,22,58,0.99), rgba(20,36,90,0.99));
  border: 1px solid rgba(240,192,64,0.35);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  animation: scaleIn 0.3s cubic-bezier(.175,.885,.32,1.275);
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}

.modal-icon { font-size: 48px; margin-bottom: 12px; }
.modal-title { font-family: 'Cinzel', serif; font-size: 22px; color: var(--gold); margin-bottom: 8px; }
.modal-text { color: var(--text-light); font-size: 15px; margin-bottom: 24px; line-height: 1.6; }
.modal-btns { display: flex; gap: 12px; justify-content: center; }

/* Modal especial (Doble Valor) */
.modal-especial .modal-box {
  border-color: rgba(231,76,60,0.5);
  background: linear-gradient(160deg, rgba(30,8,8,0.99), rgba(60,15,15,0.99));
}

.modal-especial .modal-title { color: #ff8080; }

/* ============================================================
   CONFETTI
   ============================================================ */
.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -10px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  0%   { transform: translateY(-10px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0.2; }
}

/* ============================================================
   ANIMACIONES GLOBALES
   ============================================================ */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-28px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-18px); }
  to   { opacity: 1; transform: translateX(0); }
}

.animate-shake {
  animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  .opciones-grid         { grid-template-columns: 1fr; }
  .concurso-selector     { grid-template-columns: 1fr; }
  .equipos-grid          { grid-template-columns: 1fr; }
  .config-panel          { padding: 18px 16px; }
  .pregunta-card         { padding: 18px 16px; }
  .tablero-celda         { min-height: 56px; font-size: 16px; padding: 8px 4px; }
  .cat-header            { padding: 8px 4px; font-size: 9px; }
  .podio-plataforma.oro  { height: 120px; }
  .podio-plataforma.plata{ height: 90px; }
  .podio-plataforma.bronce{ height: 68px; }
  .stats-grid            { grid-template-columns: 1fr; }
  .tablero-header        { flex-direction: column; gap: 10px; text-align: center; }
}

@media (min-width: 1400px) {
  .tablero-celda { min-height: 96px; }
  .pregunta-texto { font-size: 28px; }
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.04); }
::-webkit-scrollbar-thumb { background: rgba(240,192,64,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(240,192,64,0.6); }

/* ============================================================
   TAG DE INSTRUCCIÓN
   ============================================================ */
.instruccion-tag {
  display: inline-block;
  background: rgba(240,192,64,0.1);
  border: 1px solid rgba(240,192,64,0.25);
  border-radius: 50px;
  padding: 4px 14px;
  font-size: 11px;
  color: rgba(240,192,64,0.75);
  letter-spacing: 1px;
}
/* ============================================================
   MODO INDIVIDUAL — SELECTOR DE MODO
   ============================================================ */
.modo-juego-selector {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.modo-juego-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 10px;
  border-radius: 12px;
  border: 2px solid rgba(240,192,64,0.2);
  background: rgba(255,255,255,0.04);
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s ease;
}

.modo-juego-btn:hover {
  border-color: rgba(240,192,64,0.5);
  background: rgba(240,192,64,0.08);
}

.modo-juego-btn.active {
  border-color: var(--gold);
  background: rgba(240,192,64,0.15);
  color: var(--gold);
}

.mj-icon { font-size: 26px; }
.mj-name { font-size: 14px; font-weight: 700; letter-spacing: 1px; }
.mj-desc { font-size: 11px; opacity: 0.6; }

/* ============================================================
   MODO INDIVIDUAL — LISTA DE JUGADORES
   ============================================================ */
.jugadores-lista {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 4px;
}

.jugador-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.jugador-emoji-badge {
  font-size: 22px;
  width: 32px;
  text-align: center;
  flex-shrink: 0;
}

.jugador-input-row .form-control {
  flex: 1;
}

.btn-eliminar-jugador {
  background: rgba(231,76,60,0.15);
  border: 1px solid rgba(231,76,60,0.3);
  color: #e74c3c;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-eliminar-jugador:hover:not(:disabled) {
  background: rgba(231,76,60,0.3);
}

.btn-eliminar-jugador:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn-agregar-jugador {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 16px;
  background: rgba(46,204,113,0.12);
  border: 1px dashed rgba(46,204,113,0.4);
  color: #2ecc71;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  width: 100%;
  justify-content: center;
}

.btn-agregar-jugador:hover {
  background: rgba(46,204,113,0.22);
  border-color: rgba(46,204,113,0.7);
}

/* ============================================================
   TABLERO — BOTÓN BUZZER
   ============================================================ */
.btn-buzzer-tab {
  background: rgba(231,76,60,0.2) !important;
  border-color: rgba(231,76,60,0.5) !important;
  color: #ff6b6b !important;
}

.btn-buzzer-tab:hover {
  background: rgba(231,76,60,0.35) !important;
}

/* ============================================================
   PANTALLA BUZZER
   ============================================================ */
#screen-buzzer {
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  padding: 0;
}
#screen-buzzer.active {
  display: flex !important;
}

.buzzer-header {
  background: rgba(0,0,0,0.4);
  border-bottom: 1px solid rgba(240,192,64,0.2);
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.buzzer-pregunta-info {
  display: flex;
  gap: 10px;
  align-items: center;
}

.buzzer-pregunta-texto {
  font-size: clamp(14px, 2.5vw, 22px);
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.4;
  max-height: 80px;
  overflow-y: auto;
}

/* Grid de buzzer */
.buzzer-grid {
  flex: 1;
  display: grid;
  gap: 12px;
  padding: 16px;
  overflow: hidden;
  align-content: center;
}

.buzzer-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 20px;
  border: 3px solid var(--bcolor, rgba(240,192,64,0.4));
  background: rgba(255,255,255,0.04);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 16px 8px;
  min-height: 100px;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.buzzer-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bcolor, rgba(240,192,64,0.4));
  opacity: 0.08;
  transition: opacity 0.15s;
}

.buzzer-btn:hover::before, .buzzer-btn:active::before {
  opacity: 0.2;
}

.buzzer-btn:active {
  transform: scale(0.94);
}

.bz-emoji  { font-size: clamp(24px, 4vw, 44px); }
.bz-nombre { font-size: clamp(13px, 2vw, 20px); font-weight: 800; letter-spacing: 0.5px; word-break: break-word; text-align: center; }
.bz-puntos { font-size: clamp(11px, 1.5vw, 15px); opacity: 0.6; }

/* Estado ganador */
.buzzer-btn.buzzer-ganador {
  border-color: #2ecc71 !important;
  background: rgba(46,204,113,0.18) !important;
  transform: scale(1.04);
  box-shadow: 0 0 30px rgba(46,204,113,0.5);
  animation: buzzer-pulse 0.6s ease;
}

.buzzer-btn.buzzer-ganador::before {
  opacity: 0.15;
  background: #2ecc71;
}

/* Estado perdedor */
.buzzer-btn.buzzer-perdedor {
  opacity: 0.35;
  filter: grayscale(0.6);
  transform: scale(0.96);
}

/* Animación bloqueado */
.buzzer-btn.buzzer-bloqueado-anim {
  animation: buzzer-no 0.4s ease;
}

@keyframes buzzer-pulse {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.1); }
  60%  { transform: scale(1.02); }
  100% { transform: scale(1.04); }
}

@keyframes buzzer-no {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-8px); }
  40%       { transform: translateX(8px); }
  60%       { transform: translateX(-5px); }
  80%       { transform: translateX(5px); }
}

/* Banner ganador buzzer */
.buzzer-ganador-banner {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fadeIn 0.25s ease;
}

.buzzer-ganador-inner {
  background: linear-gradient(135deg, rgba(20,30,60,0.98), rgba(10,15,40,0.98));
  border: 2px solid var(--gold);
  border-radius: 24px;
  padding: 36px 48px;
  text-align: center;
  box-shadow: 0 0 60px rgba(240,192,64,0.3);
  max-width: 420px;
  width: 90%;
}

.buzzer-ganador-emoji {
  font-size: 72px;
  display: block;
  margin-bottom: 12px;
  animation: bounceIn 0.5s ease;
}

.buzzer-ganador-nombre {
  font-size: clamp(24px, 5vw, 40px);
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.buzzer-ganador-sub {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 24px;
}

.buzzer-ganador-acciones {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

@keyframes bounceIn {
  0%   { transform: scale(0.3); opacity: 0; }
  60%  { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}

/* Footer buzzer */
.buzzer-footer {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-wrap: wrap;
}

/* ============================================================
   RESPONSIVE BUZZER
   ============================================================ */
@media (max-width: 480px) {
  .buzzer-grid { gap: 8px; padding: 10px; }
  .buzzer-btn  { min-height: 80px; border-radius: 14px; }
  .buzzer-ganador-inner { padding: 24px 20px; }
}

@media (min-width: 1024px) {
  .buzzer-btn { min-height: 140px; border-radius: 24px; }
}

/* ============================================================
   BOTÓN BUZZER EN PANTALLA DE PREGUNTA
   ============================================================ */
.btn-buzzer-pregunta {
  background: linear-gradient(135deg, rgba(231,76,60,0.25), rgba(192,57,43,0.2)) !important;
  border: 2px solid rgba(231,76,60,0.6) !important;
  color: #ff6b6b !important;
  font-size: 16px !important;
  padding: 12px 24px !important;
  animation: buzzer-glow 2s ease-in-out infinite alternate;
}

.btn-buzzer-pregunta:hover {
  background: linear-gradient(135deg, rgba(231,76,60,0.45), rgba(192,57,43,0.35)) !important;
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(231,76,60,0.4) !important;
}

@keyframes buzzer-glow {
  from { box-shadow: 0 0 5px rgba(231,76,60,0.2); }
  to   { box-shadow: 0 0 18px rgba(231,76,60,0.5); }
}

/* ============================================================
   LIVE MODE — MODO DE JUEGO SELECTOR (3 botones)
   ============================================================ */
.modo-live-btn {
  position: relative;
  overflow: visible !important;
}

.mj-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 2px 6px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(231,76,60,0.5);
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.08); }
}

/* ============================================================
   LIVE MODE — INFO CARD EN CONFIGURACIÓN
   ============================================================ */
.live-mode-info-card {
  display: flex;
  gap: 16px;
  background: linear-gradient(135deg, rgba(52,152,219,0.12), rgba(41,128,185,0.08));
  border: 1px solid rgba(52,152,219,0.3);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 4px;
}

.live-info-icon {
  font-size: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  padding-top: 2px;
}

.live-info-content h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 6px;
}

.live-info-content p {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 10px;
}

.live-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.live-features span {
  background: rgba(52,152,219,0.15);
  border: 1px solid rgba(52,152,219,0.25);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  color: #74b9ff;
  font-weight: 600;
}

.form-hint {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  margin-top: 5px;
  padding-left: 2px;
}

/* ============================================================
   LIVE MODE — BOTÓN EN TABLERO HEADER
   ============================================================ */
.btn-live-tab {
  background: linear-gradient(135deg, rgba(52,152,219,0.3), rgba(41,128,185,0.2)) !important;
  border: 1px solid rgba(52,152,219,0.5) !important;
  color: #74b9ff !important;
  position: relative;
}

.btn-live-tab::after {
  content: '';
  position: absolute;
  top: 4px; right: 4px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #2ecc71;
  box-shadow: 0 0 6px #2ecc71;
  animation: live-dot-pulse 1.5s ease-in-out infinite;
}

@keyframes live-dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.8); }
}

.btn-live-open {
  background: linear-gradient(135deg, rgba(52,152,219,0.25), rgba(41,128,185,0.15)) !important;
  border: 1px solid rgba(52,152,219,0.4) !important;
  color: #74b9ff !important;
}

/* ============================================================
   LIVE MODE — PANEL FLOTANTE EN TABLERO
   ============================================================ */
.live-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}

.live-panel-box {
  background: linear-gradient(160deg, #0d1b3e, #0a1428);
  border: 1px solid rgba(240,192,64,0.25);
  border-radius: 24px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  animation: slideUp 0.3s ease;
}

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

.live-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
}

.live-panel-close {
  background: rgba(255,255,255,0.08);
  border: none;
  color: rgba(255,255,255,0.6);
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.live-panel-close:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* Sala info: código + QR */
.live-panel-sala-info {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.live-sala-codigo-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.live-sala-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}

.live-sala-codigo {
  font-size: clamp(28px, 6vw, 40px);
  font-weight: 900;
  letter-spacing: 6px;
  color: var(--gold);
  font-family: 'Courier New', monospace;
  text-shadow: 0 0 20px rgba(240,192,64,0.4);
}

.live-qr-container {
  width: 120px;
  height: 120px;
  background: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.live-qr-container img,
.live-qr-container canvas,
.live-qr-container svg {
  width: 110px !important;
  height: 110px !important;
}

.qr-loading {
  font-size: 11px;
  color: #666;
  text-align: center;
  padding: 8px;
}

/* Share URL */
.live-sala-share {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.live-share-label {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 6px;
}

.live-share-url {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: #74b9ff;
  word-break: break-all;
  margin-bottom: 8px;
  font-family: monospace;
}

.live-share-btns {
  display: flex;
  gap: 8px;
}

.btn-live-share {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-live-share:hover { background: rgba(255,255,255,0.12); }

/* Estado de sala */
.live-sala-status {
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.live-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}

.live-estado-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}
.live-estado-badge.esperando { background: rgba(241,196,15,0.15); color: #f1c40f; border: 1px solid rgba(241,196,15,0.3); }
.live-estado-badge.jugando   { background: rgba(46,204,113,0.15); color: #2ecc71; border: 1px solid rgba(46,204,113,0.3); }
.live-estado-badge.terminado { background: rgba(231,76,60,0.15);  color: #e74c3c; border: 1px solid rgba(231,76,60,0.3); }

/* Lista jugadores en panel live */
.live-jugadores-lista {
  max-height: 200px;
  overflow-y: auto;
  padding: 8px 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.live-jugador-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  font-size: 13px;
}

.live-jugador-emoji { font-size: 18px; }
.live-jugador-nombre { flex: 1; font-weight: 600; }
.live-jugador-pts { color: var(--gold); font-weight: 700; font-size: 13px; }
.live-jugador-online { font-size: 10px; }
.live-jugador-online.on  { color: #2ecc71; }
.live-jugador-online.off { color: #e74c3c; }

/* Pie del panel */
.live-panel-footer {
  padding: 14px 20px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.btn-live-action {
  padding: 9px 18px;
  border-radius: 10px;
  border: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-live-danger {
  background: rgba(231,76,60,0.2);
  border: 1px solid rgba(231,76,60,0.4) !important;
  color: #e74c3c;
}
.btn-live-danger:hover { background: rgba(231,76,60,0.35); }

/* ============================================================
   LIVE MODE — PANEL EN PANTALLA BUZZER
   ============================================================ */
.buzzer-live-panel {
  flex: 1;
  background: rgba(52,152,219,0.06);
  border: 1px solid rgba(52,152,219,0.2);
  border-radius: 16px;
  margin: 8px 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.blp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  font-weight: 600;
}

.blp-count {
  background: rgba(52,152,219,0.25);
  color: #74b9ff;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}

.blp-jugadores {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 6px;
}

.blp-jugador-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 8px;
  text-align: center;
  transition: all 0.3s;
  font-size: 12px;
}

.blp-jugador-card.buzzer-ganador-live {
  background: linear-gradient(135deg, rgba(240,192,64,0.25), rgba(240,192,64,0.1));
  border-color: var(--gold);
  animation: buzzer-glow 1s ease-in-out infinite alternate;
}

.blp-jugador-card .bj-emoji { font-size: 22px; display: block; margin-bottom: 3px; }
.blp-jugador-card .bj-nombre { color: #fff; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blp-jugador-card .bj-pts { color: var(--gold); font-weight: 700; font-size: 11px; }
.blp-jugador-card .bj-offline { opacity: 0.4; }

.blp-hint {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  text-align: center;
  padding: 4px 0;
}

/* Tiempo de reacción en buzzer */
.buzzer-ganador-tiempo {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 12px;
  margin-top: -10px;
}

/* ============================================================
   LIVE MODE — NOTIFICACIÓN TOAST
   ============================================================ */
.live-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: rgba(10,15,40,0.95);
  border: 1px solid rgba(240,192,64,0.3);
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 14px;
  color: #fff;
  z-index: 9999;
  transition: transform 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.live-toast.visible { transform: translateX(-50%) translateY(0); }

/* ============================================================
   LIVE MODE — INDICADOR DE CONEXION WS
   ============================================================ */
.ws-status-indicator {
  position: fixed;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  z-index: 1500;
  display: none;
}
.ws-status-indicator.visible { display: flex; }
.ws-dot { width: 8px; height: 8px; border-radius: 50%; }
.ws-dot.connected    { background: #2ecc71; box-shadow: 0 0 5px #2ecc71; }
.ws-dot.disconnected { background: #e74c3c; }
.ws-dot.connecting   { background: #f1c40f; animation: badge-pulse 1s infinite; }

