/* =========================================================
   Vamos a Jugar — estética de gran concurso de TV (diseño propio)
   ========================================================= */
@font-face { font-family: "Montserrat"; src: url("/fonts/montserrat.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; src: url("/fonts/montserrat-ext.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Bebas Neue"; src: url("/fonts/bebas-neue.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --noche: #04061a;
  --noche-2: #0a0f2e;
  --escenario: #1b0f4a;
  --violeta: #3b1d8f;
  --panel: rgba(10, 15, 46, 0.78);
  --panel-solido: #0c1238;
  --linea: rgba(255, 215, 106, 0.22);
  --linea-suave: rgba(148, 163, 255, 0.14);
  --texto: #f4f6ff;
  --texto-2: #a9b0d6;
  --texto-3: #6f77a8;
  --oro: #ffd76a;
  --oro-1: #fff1b8;
  --oro-2: #f5b82e;
  --oro-3: #a8710f;
  --cian: #5ee1ff;
  --verde: #2fe38a;
  --verde-2: #0f8a4f;
  --rojo: #ff4d6d;
  --rojo-2: #9b1532;
  --naranja: #ffa62b;
  --naranja-2: #b85d00;
  --display: "Bebas Neue", "Impact", "Arial Narrow", sans-serif;
  --texto-fuente: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --radio: 18px;
  --sombra: 0 24px 60px rgba(0, 0, 0, .55);
  --brillo-oro: 0 0 24px rgba(255, 199, 64, .45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  font-family: var(--texto-fuente);
  color: var(--texto);
  background-color: var(--noche);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { color: var(--oro); }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: var(--oro-2); color: #1a1200; }

/* ---------- Escenario (fondo) ---------- */
.escenario { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 50% -5%, rgba(124, 77, 255, .55), transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 112%, rgba(94, 225, 255, .28), transparent 70%),
    radial-gradient(ellipse 120% 90% at 50% 40%, var(--escenario) 0%, var(--noche-2) 55%, var(--noche) 100%);
}
.escenario::before, .escenario::after {
  content: ""; position: absolute; top: -20%; width: 46vmax; height: 140vh; transform-origin: 50% 0;
  background: linear-gradient(180deg, rgba(190, 210, 255, .20), rgba(190, 210, 255, 0) 80%);
  clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%); filter: blur(6px); mix-blend-mode: screen;
}
.escenario::before { left: 8%; animation: haz-izq 11s ease-in-out infinite alternate; }
.escenario::after { right: 8%; animation: haz-der 13s ease-in-out infinite alternate; }
@keyframes haz-izq { from { transform: rotate(-24deg); } to { transform: rotate(8deg); } }
@keyframes haz-der { from { transform: rotate(24deg); } to { transform: rotate(-8deg); } }
.escenario .piso { position: absolute; left: -10%; right: -10%; bottom: -8vh; height: 38vh;
  background:
    repeating-linear-gradient(90deg, rgba(94, 225, 255, .10) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(94, 225, 255, .10) 0 1px, transparent 1px 36px);
  transform: perspective(380px) rotateX(62deg); transform-origin: 50% 100%;
  mask-image: linear-gradient(to top, #000 20%, transparent 95%); -webkit-mask-image: linear-gradient(to top, #000 20%, transparent 95%);
}
.escenario .estrellas { position: absolute; inset: 0; opacity: .55;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff, transparent 60%), radial-gradient(1px 1px at 78% 12%, #fff, transparent 60%),
    radial-gradient(1.5px 1.5px at 34% 32%, #cfe8ff, transparent 60%), radial-gradient(1px 1px at 62% 26%, #fff, transparent 60%),
    radial-gradient(1px 1px at 88% 40%, #fff, transparent 60%), radial-gradient(1.5px 1.5px at 22% 48%, #ffe9a8, transparent 60%),
    radial-gradient(1px 1px at 48% 8%, #fff, transparent 60%), radial-gradient(1px 1px at 6% 62%, #fff, transparent 60%),
    radial-gradient(1px 1px at 94% 70%, #cfe8ff, transparent 60%);
  animation: titilar 6s ease-in-out infinite alternate;
}
@keyframes titilar { to { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ---------- Estructura ---------- */
.contenedor { width: 100%; max-width: 1080px; margin: 0 auto; padding: 20px 16px 48px; }
.contenedor.angosto { max-width: 560px; }
.contenedor.ancho { max-width: 1280px; }
.pila > * + * { margin-top: 16px; }
.fila { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.fila.entre { justify-content: space-between; }
.fila.centro { justify-content: center; }
.rejilla { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.centro { text-align: center; }
.suave { color: var(--texto-2); }
.tenue { color: var(--texto-3); }
.pequeno { font-size: 13px; }
.grande { font-size: clamp(18px, 2.4vw, 22px); }
.oro { color: var(--oro); }
.verde { color: var(--verde); }
.rojo { color: var(--rojo); }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }

/* ---------- Tipografía ---------- */
.display { font-family: var(--display); letter-spacing: .04em; font-weight: 400; line-height: .95; }
.titulo {
  font-family: var(--display); font-weight: 400; letter-spacing: .05em; text-transform: uppercase; line-height: 1;
  font-size: clamp(36px, 6vw, 64px); margin: 0 0 12px; text-align: center;
  background: linear-gradient(180deg, var(--oro-1) 0%, var(--oro) 45%, var(--oro-2) 70%, var(--oro-3) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.6)) drop-shadow(0 0 18px rgba(255, 190, 60, .35));
}
.titulo.tono-ok { background-image: linear-gradient(180deg, #e6fff2 0%, #7dffbd 40%, var(--verde) 70%, var(--verde-2) 100%); filter: drop-shadow(0 2px 0 rgba(0,0,0,.6)) drop-shadow(0 0 18px rgba(47, 227, 138, .45)); }
.titulo.tono-mal { background-image: linear-gradient(180deg, #ffe3e9 0%, #ff8aa0 40%, var(--rojo) 70%, var(--rojo-2) 100%); filter: drop-shadow(0 2px 0 rgba(0,0,0,.6)) drop-shadow(0 0 18px rgba(255, 77, 109, .45)); }
.subtitulo { font-family: var(--display); letter-spacing: .08em; font-size: clamp(20px, 2.6vw, 28px); color: var(--cian); margin: 0 0 12px; text-transform: uppercase; }
h2 { font-family: var(--display); font-weight: 400; letter-spacing: .06em; font-size: 30px; line-height: 1.05; color: var(--oro); margin: 0 0 14px; text-transform: uppercase; }
h3 { font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: var(--texto-2); margin: 0 0 10px; }
.numero { font-family: var(--display); letter-spacing: .03em; font-variant-numeric: tabular-nums; }

/* ---------- Paneles ---------- */
.marco {
  position: relative; background: linear-gradient(180deg, rgba(20, 26, 74, .86), rgba(8, 11, 38, .9));
  border: 1px solid var(--linea); border-radius: 24px; padding: 28px; box-shadow: var(--sombra), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.marco::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 215, 106, .35), transparent 30%, transparent 70%, rgba(94, 225, 255, .25)) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; border: 1px solid transparent; }
.marco.compacto { padding: 18px; border-radius: 18px; }
.marco + .marco { margin-top: 18px; }

/* ---------- Barra superior ---------- */
.barra { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 20px; background: linear-gradient(180deg, rgba(4, 6, 26, .92), rgba(4, 6, 26, .7)); border-bottom: 1px solid var(--linea);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.barra .marca { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--texto); }
.barra .marca svg { width: 42px; height: 42px; }
.barra .marca span { font-family: var(--display); font-size: 24px; letter-spacing: .08em; color: var(--oro); }
.barra .marca img { height: 34px; width: auto; opacity: .95; }
.barra nav { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.barra nav a { display: inline-flex; align-items: center; gap: 6px; color: var(--texto-2); text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 12px; border-radius: 999px; transition: background .2s, color .2s; }
.barra nav a svg { width: 18px; height: 18px; }
.barra nav a:hover { color: var(--texto); background: rgba(255,255,255,.06); }
.barra nav a.activo { color: #1a1200; background: linear-gradient(180deg, var(--oro-1), var(--oro-2)); }
.barra .perfil { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid var(--linea-suave); color: var(--texto); text-decoration: none; font-weight: 600; font-size: 14px; }
.barra .perfil .avatar { width: 30px; height: 30px; }
.menu-movil { display: none; background: none; border: 1px solid var(--linea); border-radius: 10px; padding: 6px 10px; cursor: pointer; }

/* ---------- Botones ---------- */
.boton {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none;
  font-weight: 800; letter-spacing: .04em; text-transform: uppercase; font-size: 15px; color: #251700;
  background: linear-gradient(180deg, var(--oro-1) 0%, var(--oro) 40%, var(--oro-2) 75%, #d18f12 100%);
  box-shadow: 0 6px 0 var(--oro-3), 0 10px 26px rgba(255, 180, 40, .35), inset 0 1px 0 rgba(255,255,255,.7);
  transition: transform .12s, box-shadow .12s, filter .2s;
}
.boton::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); transition: left .6s; }
.boton:hover:not(:disabled)::after { left: 130%; }
.boton:hover:not(:disabled) { filter: brightness(1.06); }
.boton:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 var(--oro-3), 0 6px 16px rgba(255, 180, 40, .3), inset 0 1px 0 rgba(255,255,255,.7); }
.boton:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.6); }
.boton svg { width: 20px; height: 20px; }
.boton.bloque { width: 100%; }
.boton.grande { font-size: 20px; padding: 18px 34px; }
.boton.enorme { font-family: var(--display); font-weight: 400; font-size: 34px; letter-spacing: .08em; padding: 16px 48px 12px; }
.boton.chico { padding: 8px 14px; font-size: 12px; box-shadow: 0 3px 0 var(--oro-3); }
.boton.fantasma { color: var(--texto); background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--linea), 0 4px 14px rgba(0,0,0,.3); }
.boton.fantasma:active:not(:disabled) { box-shadow: inset 0 0 0 1px var(--linea); }
.boton.peligro { color: #fff; background: linear-gradient(180deg, #ff7a90, var(--rojo) 50%, #c0213f); box-shadow: 0 5px 0 var(--rojo-2), 0 10px 24px rgba(255, 77, 109, .3); }
.boton.exito { color: #002313; background: linear-gradient(180deg, #a7ffd0, var(--verde) 50%, #18b468); box-shadow: 0 5px 0 var(--verde-2), 0 10px 24px rgba(47, 227, 138, .3); }
.enlace { background: none; border: 0; color: var(--texto-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px; font-size: 14px; }
.enlace:hover { color: var(--texto); }
.icono-boton { width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; cursor: pointer; border: 1px solid var(--linea); background: rgba(255,255,255,.05); color: var(--texto); }
.icono-boton svg { width: 20px; height: 20px; }

/* ---------- Formularios ---------- */
.campo { display: block; margin-bottom: 16px; }
.campo > span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--texto-2); margin-bottom: 8px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 14px 16px; border-radius: 14px; background: rgba(4, 6, 26, .65);
  border: 1px solid rgba(148, 163, 255, .25); outline: none; transition: border-color .2s, box-shadow .2s;
}
input::placeholder, textarea::placeholder { color: var(--texto-3); }
input:focus, select:focus, textarea:focus { border-color: var(--oro); box-shadow: 0 0 0 3px rgba(255, 215, 106, .2); }
select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--oro) 50%), linear-gradient(135deg, var(--oro) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; }
select.auto { width: auto; }
textarea { min-height: 80px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--texto-2); margin-bottom: 16px; cursor: pointer; }
.check input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--oro-2); flex: none; }
.separador { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--texto-3); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.separador::before, .separador::after { content: ""; flex: 1; height: 1px; background: var(--linea-suave); }
.error-form { color: #ff9cb0; font-size: 14px; min-height: 20px; margin-bottom: 10px; font-weight: 600; }

.codigo-sala { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; max-width: 420px; margin-left: auto; margin-right: auto; }
.codigo-sala input { width: 100%; min-width: 0; padding: 12px 0 8px; color: var(--oro); outline: none; text-align: center; font-family: var(--display); font-size: 40px; letter-spacing: 0; border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(4,6,26,.7)); border: 1px solid var(--linea); caret-color: var(--oro); }
.codigo-sala input:focus { border-color: var(--oro); box-shadow: var(--brillo-oro); }

/* ---------- Pestañas / segmentado ---------- */
.pestanas { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(4,6,26,.6); border: 1px solid var(--linea-suave); margin-bottom: 20px; flex-wrap: wrap; }
.pestanas button { background: none; border: 0; padding: 9px 18px; border-radius: 999px; cursor: pointer; color: var(--texto-2); font-weight: 700; font-size: 14px; }
.pestanas button.activo { color: #1a1200; background: linear-gradient(180deg, var(--oro-1), var(--oro-2)); box-shadow: 0 2px 10px rgba(255, 190, 60, .35); }

/* ---------- Logo ---------- */
.logo { display: block; margin: 0 auto; width: min(440px, 78vw); height: auto; filter: drop-shadow(0 10px 30px rgba(0,0,0,.6)); }
.logo .rayos { transform-origin: 200px 200px; animation: girar 40s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }

/* ---------- Avatares ---------- */
.avatar { display: inline-block; width: 44px; height: 44px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(255, 215, 106, .55), 0 4px 10px rgba(0,0,0,.4); background: #0c1238; }
.avatar svg { width: 100%; height: 100%; display: block; border-radius: 50%; }
.avatar.xl { width: 96px; height: 96px; box-shadow: 0 0 0 3px var(--oro), var(--brillo-oro); }
.avatar.l { width: 64px; height: 64px; }
.avatar.s { width: 32px; height: 32px; }
.selector-avatar { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 10px; margin-bottom: 16px; }
.selector-avatar button { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; transition: transform .15s; }
.selector-avatar button .avatar { width: 100%; height: auto; aspect-ratio: 1; box-shadow: 0 0 0 2px rgba(255,255,255,.12); opacity: .7; }
.selector-avatar button:hover { transform: scale(1.08); }
.selector-avatar button[aria-pressed="true"] .avatar { box-shadow: 0 0 0 3px var(--oro), var(--brillo-oro); opacity: 1; }

/* ---------- Héroe de inicio ---------- */
.heroe { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; padding-top: 12px; }
.heroe .pila { max-width: 480px; width: 100%; justify-self: center; }
.heroe .lema { font-size: clamp(16px, 2vw, 19px); color: var(--texto-2); text-align: center; max-width: 520px; margin: 8px auto 0; }
.tarjeta-menu { position: relative; display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--texto); padding: 22px; border-radius: 20px;
  background: linear-gradient(160deg, rgba(59, 29, 143, .55), rgba(10, 15, 46, .85)); border: 1px solid var(--linea-suave); overflow: hidden;
  transition: transform .2s, border-color .2s, box-shadow .2s; }
.tarjeta-menu:hover { transform: translateY(-4px); border-color: var(--oro); box-shadow: 0 16px 40px rgba(0,0,0,.45), var(--brillo-oro); }
.tarjeta-menu .ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: #1a1200;
  background: linear-gradient(180deg, var(--oro-1), var(--oro-2)); box-shadow: 0 6px 18px rgba(255, 190, 60, .35); }
.tarjeta-menu .ico svg { width: 28px; height: 28px; }
.tarjeta-menu strong { font-family: var(--display); font-weight: 400; font-size: 28px; letter-spacing: .05em; line-height: 1; color: var(--oro); margin-top: 6px; }
.tarjeta-menu span { color: var(--texto-2); font-size: 14px; }
.tarjeta-menu.destacada { background: linear-gradient(160deg, rgba(255, 190, 60, .22), rgba(59, 29, 143, .55) 50%, rgba(10, 15, 46, .9)); border-color: rgba(255, 215, 106, .45); }

/* ---------- Juego: cabecera, reloj, pregunta ---------- */
.zona-juego { display: grid; grid-template-columns: 1fr 270px; gap: 24px; align-items: start; }
.zona-juego.sin-escalera { grid-template-columns: 1fr; }
.cabecera-juego { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin-bottom: 22px; }
.cabecera-juego .lado { display: flex; flex-direction: column; gap: 2px; }
.cabecera-juego .lado.derecha { align-items: flex-end; text-align: right; }
.etiqueta { font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--texto-3); }
.cifra { font-family: var(--display); font-size: clamp(30px, 4vw, 44px); line-height: 1; letter-spacing: .03em; font-variant-numeric: tabular-nums; }
.cifra.oro { color: var(--oro); text-shadow: 0 0 18px rgba(255, 190, 60, .45); }

.reloj { position: relative; width: 112px; height: 112px; flex: none; }
.reloj svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.reloj .pista { fill: rgba(4, 6, 26, .85); stroke: rgba(255,255,255,.08); stroke-width: 8; }
.reloj .avance { fill: none; stroke: var(--oro); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset .25s linear, stroke .3s; filter: drop-shadow(0 0 6px rgba(255, 199, 64, .8)); }
.reloj .valor { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 48px; line-height: 1; padding-top: 4px; }
.reloj.urgente .avance { stroke: var(--rojo); filter: drop-shadow(0 0 8px rgba(255, 77, 109, .9)); }
.reloj.urgente .valor { color: var(--rojo); animation: latido 1s ease-in-out infinite; }
.reloj.pausa .avance { stroke: var(--cian); }
@keyframes latido { 50% { transform: scale(1.12); } }

.pantalla-pregunta { position: relative; margin: 0 auto 26px; padding: 3px; clip-path: polygon(4% 0, 96% 0, 100% 50%, 96% 100%, 4% 100%, 0 50%);
  background: linear-gradient(90deg, var(--oro-3), var(--oro-1) 20%, var(--oro) 50%, var(--oro-1) 80%, var(--oro-3)); filter: drop-shadow(0 12px 30px rgba(0,0,0,.6)); }
.pantalla-pregunta > div { clip-path: inherit; min-height: 140px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 26px 9%;
  background: radial-gradient(ellipse at 50% 0%, #2b2a8f 0%, #10145a 50%, #070a2c 100%); }
.pantalla-pregunta h2 { margin: 0; color: var(--texto); font-family: var(--texto-fuente); text-transform: none; letter-spacing: 0; font-weight: 700; font-size: clamp(19px, 2.6vw, 30px); line-height: 1.3; }
.pantalla-pregunta.entra { animation: entrar-pregunta .6s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes entrar-pregunta { from { opacity: 0; transform: scaleX(.4); } }

/* Opciones con borde metálico */
.opciones { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 22px; }
.opcion { position: relative; padding: 2px; border: 0; background: linear-gradient(90deg, #7d8bd6, #e8ecff 50%, #7d8bd6); cursor: pointer; color: var(--texto); text-align: left;
  clip-path: polygon(5% 0, 95% 0, 100% 50%, 95% 100%, 5% 100%, 0 50%); transition: transform .15s, filter .2s; min-height: 66px; }
.opcion > .cara { clip-path: inherit; display: flex; align-items: center; gap: 12px; height: 100%; min-height: 62px; padding: 12px 7%;
  background: radial-gradient(ellipse at 50% 0%, #22267a 0%, #0d1150 55%, #060827 100%); transition: background .25s; }
.opcion > .cara { position: relative; }
.opcion .letra, .opcion .txt, .opcion .votos { position: relative; }
.opcion .letra { font-family: var(--display); font-size: 28px; line-height: 1; color: var(--oro); flex: none; display: flex; align-items: center; gap: 6px; }
.opcion .letra::before { content: ""; width: 10px; height: 10px; background: var(--oro); transform: rotate(45deg); box-shadow: 0 0 10px var(--oro); }
.opcion .txt { font-weight: 600; font-size: clamp(15px, 1.8vw, 19px); line-height: 1.25; }
.opcion .votos { margin-left: auto; font-family: var(--display); font-size: 26px; color: var(--texto); padding-left: 12px; }
.opcion .barra-votos { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, rgba(94,225,255,.0), rgba(94,225,255,.28)); transition: width 1.2s cubic-bezier(.2,.8,.2,1); pointer-events: none; }
.opcion:hover:not(:disabled):not(.bloqueada) { filter: brightness(1.15); transform: translateY(-2px); }
.opcion:hover:not(:disabled):not(.bloqueada) > .cara { background: radial-gradient(ellipse at 50% 0%, #3a3fb8 0%, #1b2090 55%, #0a0e4a 100%); }
.opcion:disabled, .opcion.bloqueada { cursor: default; }
.opcion.oculta { visibility: hidden; }
.opcion.seleccionada { background: linear-gradient(90deg, #a35a00, #ffe2a6 50%, #a35a00); }
.opcion.seleccionada > .cara { background: radial-gradient(ellipse at 50% 0%, #ffc04d 0%, var(--naranja) 45%, var(--naranja-2) 100%); }
.opcion.seleccionada .letra, .opcion.seleccionada .txt { color: #2a1400; }
.opcion.seleccionada .letra::before { background: #2a1400; box-shadow: none; }
.opcion.correcta { background: linear-gradient(90deg, #0a6b3b, #d6ffe9 50%, #0a6b3b); animation: destello .45s ease-in-out 6 alternate; }
.opcion.correcta > .cara { background: radial-gradient(ellipse at 50% 0%, #7dffbd 0%, var(--verde) 45%, var(--verde-2) 100%); }
.opcion.correcta .letra, .opcion.correcta .txt, .opcion.correcta .votos { color: #00230f; }
.opcion.correcta .letra::before { background: #00230f; box-shadow: none; }
.opcion.incorrecta { background: linear-gradient(90deg, #6d0a1f, #ffd0da 50%, #6d0a1f); }
.opcion.incorrecta > .cara { background: radial-gradient(ellipse at 50% 0%, #ff8aa0 0%, var(--rojo) 45%, var(--rojo-2) 100%); }
.opcion.incorrecta .letra, .opcion.incorrecta .txt { color: #2b0009; }
.opcion.incorrecta .letra::before { background: #2b0009; box-shadow: none; }
.opcion.apagada { filter: brightness(.45) saturate(.4); }
@keyframes destello { to { filter: brightness(1.35); } }
.opciones.entra .opcion { animation: entrar-opcion .45s cubic-bezier(.2,.9,.3,1.2) both; }
.opciones.entra .opcion:nth-child(2) { animation-delay: .12s; } .opciones.entra .opcion:nth-child(3) { animation-delay: .24s; } .opciones.entra .opcion:nth-child(4) { animation-delay: .36s; }
@keyframes entrar-opcion { from { opacity: 0; transform: translateY(16px) scale(.96); } }

/* Comodines */
.comodines { display: flex; gap: 12px; justify-content: center; }
.comodin { width: 64px; height: 44px; border-radius: 50%; border: 2px solid var(--oro); cursor: pointer; display: grid; place-items: center;
  background: radial-gradient(ellipse at 50% 20%, #2b3196, #0b0f45); color: var(--oro); font-weight: 800; font-size: 14px; box-shadow: 0 0 14px rgba(255, 199, 64, .35); transition: transform .15s, box-shadow .2s; }
.comodin svg { width: 22px; height: 22px; }
.comodin:hover:not(:disabled) { transform: scale(1.08); box-shadow: 0 0 22px rgba(255, 199, 64, .7); }
.comodin:disabled { cursor: not-allowed; opacity: .35; filter: grayscale(1); position: relative; }
.comodin:disabled::after { content: ""; position: absolute; width: 74%; height: 2px; background: var(--rojo); transform: rotate(-30deg); box-shadow: 0 0 6px var(--rojo); }

/* Escalera de premios */
.escalera { list-style: none; margin: 0; padding: 14px; border-radius: 20px; background: linear-gradient(180deg, rgba(20, 26, 74, .9), rgba(6, 8, 30, .95)); border: 1px solid var(--linea); box-shadow: var(--sombra); }
.escalera li { display: flex; align-items: center; gap: 10px; padding: 6px 14px; border-radius: 999px; font-weight: 700; color: var(--oro); transition: background .3s, color .3s, transform .3s; }
.escalera li .n { width: 22px; text-align: right; font-size: 13px; color: var(--texto-3); }
.escalera li .monto { margin-left: auto; font-family: var(--display); font-size: 22px; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.escalera li.segura { color: #fff; }
.escalera li.segura .monto::after { content: " ★"; color: var(--oro); font-size: 14px; }
.escalera li.pasada { color: var(--texto-3); }
.escalera li.pasada .n::before { content: "✓ "; color: var(--verde); }
.escalera li.actual { color: #1d1100; background: linear-gradient(90deg, var(--oro-2), var(--oro-1) 50%, var(--oro-2)); box-shadow: 0 0 22px rgba(255, 190, 60, .55); transform: scale(1.04); }
.escalera li.actual .n { color: #3d2700; }

/* ---------- Sala en vivo: celular ---------- */
.cabecera-jugador { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 999px; background: rgba(4,6,26,.7); border: 1px solid var(--linea-suave); margin-bottom: 16px; }
.cabecera-jugador .nombre { font-weight: 800; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cabecera-jugador .pts { font-family: var(--display); font-size: 26px; color: var(--oro); line-height: 1; }
.botones-vivo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.boton-vivo { position: relative; min-height: 128px; border-radius: 22px; border: 0; cursor: pointer; color: #fff; padding: 14px 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  box-shadow: 0 6px 0 rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.35); transition: transform .1s, opacity .25s, filter .25s; }
.boton-vivo .l { font-family: var(--display); font-size: 52px; line-height: .9; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.boton-vivo .t { font-size: 14px; font-weight: 700; line-height: 1.25; text-align: center; }
.boton-vivo[data-i="0"] { background: linear-gradient(180deg, #ff6b8a, #d91e4a); }
.boton-vivo[data-i="1"] { background: linear-gradient(180deg, #5aa8ff, #1f5fd9); }
.boton-vivo[data-i="2"] { background: linear-gradient(180deg, #ffcf4d, #e08a00); color: #2a1600; }
.boton-vivo[data-i="3"] { background: linear-gradient(180deg, #4ef0a0, #0e9e5c); color: #00230f; }
.boton-vivo:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,.35); }
.boton-vivo:disabled { opacity: .25; filter: grayscale(.7); }
.boton-vivo.elegido { opacity: 1; filter: none; outline: 4px solid #fff; outline-offset: 3px; animation: pulso-elegido 1.2s ease-in-out infinite; }
.boton-vivo.oculta { visibility: hidden; }
@keyframes pulso-elegido { 50% { outline-color: var(--oro); } }
.pregunta-movil { padding: 18px; border-radius: 18px; background: radial-gradient(ellipse at 50% 0%, #2b2a8f, #0a0e3d); border: 1px solid var(--linea); margin-bottom: 14px; text-align: center; font-weight: 700; font-size: 18px; line-height: 1.35; }
.estado-grande { text-align: center; padding: 32px 20px; }
.estado-grande .icono-estado { width: 120px; height: 120px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; animation: aparecer .5s cubic-bezier(.2,.9,.3,1.4) both; }
.estado-grande .icono-estado svg { width: 64px; height: 64px; }
.icono-estado.ok { background: radial-gradient(circle, #7dffbd, var(--verde) 60%, var(--verde-2)); color: #00230f; box-shadow: 0 0 40px rgba(47, 227, 138, .6); }
.icono-estado.mal { background: radial-gradient(circle, #ff8aa0, var(--rojo) 60%, var(--rojo-2)); color: #2b0009; box-shadow: 0 0 40px rgba(255, 77, 109, .6); }
.icono-estado.espera { background: radial-gradient(circle, #ffe9a8, var(--oro) 60%, var(--oro-3)); color: #2a1600; box-shadow: var(--brillo-oro); }
@keyframes aparecer { from { opacity: 0; transform: scale(.3); } }
.puntos-ganados { font-family: var(--display); font-size: 64px; line-height: 1; color: var(--oro); text-shadow: 0 0 24px rgba(255, 190, 60, .6); }
.posicion-chip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid var(--linea); font-weight: 700; margin-top: 14px; }
.posicion-chip b { font-family: var(--display); font-size: 26px; font-weight: 400; color: var(--oro); line-height: 1; }

/* ---------- Sala en vivo: presentador ---------- */
.lobby { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; }
.qr-marco { padding: 14px; border-radius: 24px; background: linear-gradient(135deg, var(--oro-1), var(--oro-2), var(--oro-3)); box-shadow: var(--brillo-oro), var(--sombra); }
.qr-marco > div { background: #fff; border-radius: 14px; padding: 12px; width: min(300px, 70vw); aspect-ratio: 1; }
.qr-marco img { width: 100%; height: 100%; display: block; }
.codigo-gigante { font-family: var(--display); font-size: clamp(64px, 11vw, 140px); line-height: .9; letter-spacing: .08em;
  background: linear-gradient(180deg, var(--oro-1), var(--oro) 50%, var(--oro-2)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 22px rgba(255, 190, 60, .45)); }
.jugadores-lobby { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; min-height: 60px; }
.burbuja { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 5px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid var(--linea-suave); font-weight: 700; cursor: pointer; color: var(--texto); animation: aparecer .4s cubic-bezier(.2,.9,.3,1.4) both; }
.burbuja .avatar { width: 34px; height: 34px; }
.burbuja.desconectado { opacity: .35; }
.burbuja:hover { border-color: var(--rojo); }
.contador-jugadores { display: inline-flex; align-items: baseline; gap: 10px; }
.contador-jugadores b { font-family: var(--display); font-size: 56px; font-weight: 400; color: var(--cian); line-height: 1; text-shadow: 0 0 18px rgba(94, 225, 255, .5); }
.respuestas-anillo { text-align: center; }
.cuenta-regresiva { font-family: var(--display); font-size: min(46vw, 320px); line-height: 1; text-align: center; color: var(--oro); text-shadow: 0 0 60px rgba(255, 190, 60, .8); animation: golpe 1s ease-out infinite; }
@keyframes golpe { 0% { transform: scale(1.6); opacity: 0; } 25% { transform: scale(1); opacity: 1; } 100% { transform: scale(.85); opacity: .2; } }

/* Ranking */
.ranking { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ranking li { display: flex; align-items: center; gap: 14px; padding: 10px 18px 10px 10px; border-radius: 999px; background: linear-gradient(90deg, rgba(59, 29, 143, .6), rgba(10, 15, 46, .8)); border: 1px solid var(--linea-suave); animation: entrar-fila .5s cubic-bezier(.2,.9,.3,1.1) both; }
.ranking li:nth-child(2) { animation-delay: .08s; } .ranking li:nth-child(3) { animation-delay: .16s; } .ranking li:nth-child(4) { animation-delay: .24s; } .ranking li:nth-child(5) { animation-delay: .32s; }
.ranking .pos { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 24px; background: rgba(255,255,255,.08); flex: none; }
.ranking li:nth-child(1) .pos { background: linear-gradient(180deg, var(--oro-1), var(--oro-2)); color: #2a1600; }
.ranking li:nth-child(2) .pos { background: linear-gradient(180deg, #ffffff, #aab3cf); color: #1b2033; }
.ranking li:nth-child(3) .pos { background: linear-gradient(180deg, #ffc69a, #c3692b); color: #2b1100; }
.ranking .nombre { flex: 1; min-width: 0; font-weight: 700; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking .pts { font-family: var(--display); font-size: 28px; color: var(--oro); letter-spacing: .03em; font-variant-numeric: tabular-nums; }
.ranking li.yo { border-color: var(--oro); box-shadow: var(--brillo-oro); }
@keyframes entrar-fila { from { opacity: 0; transform: translateX(-24px); } }

/* Podio */
.podio { display: flex; align-items: flex-end; justify-content: center; gap: 14px; margin: 18px 0 26px; }
.podio .escalon { width: 30%; max-width: 230px; text-align: center; animation: subir .8s cubic-bezier(.2,.9,.3,1.2) both; }
.podio .p1 { animation-delay: 1.2s; } .podio .p2 { animation-delay: .6s; } .podio .p3 { animation-delay: 0s; }
.podio .quien { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 10px; }
.podio .quien b { font-size: 18px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podio .quien .numero { font-size: 28px; color: var(--oro); }
.podio .bloque { border-radius: 16px 16px 0 0; display: flex; justify-content: center; padding-top: 12px; font-family: var(--display); font-size: 64px; color: rgba(0,0,0,.45); box-shadow: inset 0 2px 0 rgba(255,255,255,.6), 0 20px 40px rgba(0,0,0,.5); }
.podio .p1 .bloque { height: 210px; background: linear-gradient(180deg, var(--oro-1), var(--oro-2) 40%, var(--oro-3)); }
.podio .p2 .bloque { height: 150px; background: linear-gradient(180deg, #ffffff, #b9c1db 40%, #6b7391); }
.podio .p3 .bloque { height: 110px; background: linear-gradient(180deg, #ffd8b8, #d17a3a 40%, #7a3a12); }
.podio .p1 .avatar { width: 96px; height: 96px; box-shadow: 0 0 0 4px var(--oro), var(--brillo-oro); }
@keyframes subir { from { opacity: 0; transform: translateY(60px); } }

/* ---------- Tablas ---------- */
.tabla-scroll { overflow-x: auto; border-radius: 16px; border: 1px solid var(--linea-suave); background: rgba(4,6,26,.45); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--linea-suave); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
th { color: var(--texto-3); font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; background: rgba(255,255,255,.03); }
tbody tr { transition: background .15s; }
tbody tr:hover { background: rgba(255,255,255,.03); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.yo td { background: rgba(255, 215, 106, .1); }
.celda-jugador { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.medalla { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-family: var(--display); font-size: 18px; background: rgba(255,255,255,.07); }
.medalla.m1 { background: linear-gradient(180deg, var(--oro-1), var(--oro-2)); color: #2a1600; }
.medalla.m2 { background: linear-gradient(180deg, #fff, #aab3cf); color: #1b2033; }
.medalla.m3 { background: linear-gradient(180deg, #ffc69a, #c3692b); color: #2b1100; }

/* Indicadores */
.indicadores { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 20px; }
.indicador { padding: 16px 18px; border-radius: 18px; background: linear-gradient(160deg, rgba(59, 29, 143, .45), rgba(10, 15, 46, .8)); border: 1px solid var(--linea-suave); }
.indicador .valor { font-family: var(--display); font-size: 40px; line-height: 1; color: var(--oro); letter-spacing: .03em; }
.indicador .etiqueta { margin-top: 6px; display: block; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.08); border: 1px solid transparent; }
.chip.ok { background: rgba(47, 227, 138, .14); color: #8af5bf; border-color: rgba(47, 227, 138, .3); }
.chip.off { background: rgba(255, 77, 109, .14); color: #ff9cb0; border-color: rgba(255, 77, 109, .3); }
.chip.aviso { background: rgba(255, 166, 43, .14); color: #ffc677; border-color: rgba(255, 166, 43, .3); }
button.chip { cursor: pointer; }

.barra-progreso { height: 10px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.barra-progreso > div { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cian), #8b7dff); transition: width 1s cubic-bezier(.2,.8,.2,1); }

/* ---------- Modales, avisos ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(2, 3, 14, .78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fundido .2s both; }
.modal > .marco { max-width: 480px; width: 100%; text-align: center; animation: aparecer .35s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes fundido { from { opacity: 0; } }
.aviso { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70; padding: 14px 20px; border-radius: 14px; font-weight: 600;
  background: linear-gradient(180deg, #1b2266, #0c1140); border: 1px solid var(--linea); box-shadow: var(--sombra); max-width: calc(100% - 32px); animation: aparecer .3s both; }
.aviso.error { border-color: rgba(255, 77, 109, .6); }
.estado-conexion { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 50; padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--naranja); color: #2a1400; box-shadow: var(--sombra); }
.qr-esquina { position: fixed; right: 18px; bottom: 18px; z-index: 30; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 8px 6px; border: 0; border-radius: 16px; cursor: pointer;
  background: linear-gradient(135deg, var(--oro-1), var(--oro-2)); color: #2a1600; font-weight: 800; font-size: 13px; box-shadow: var(--sombra); }
.qr-esquina img { width: 104px; height: 104px; display: block; background: #fff; border-radius: 10px; padding: 4px; }
.sonido-toggle { position: fixed; left: 18px; bottom: 18px; z-index: 30; }

canvas.confeti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 80; }

details > summary { cursor: pointer; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .heroe { grid-template-columns: 1fr; }
  .zona-juego { grid-template-columns: 1fr; }
  .escalera { display: none; }
  .escalera-movil { display: flex !important; }
  .lobby { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 24px; }
  .jugadores-lobby { justify-content: center; }
}
.escalera-movil { display: none; justify-content: center; gap: 8px; margin-bottom: 14px; }
@media (max-width: 720px) {
  .contenedor { padding: 14px 14px 40px; }
  .marco { padding: 20px; border-radius: 20px; }
  .barra { padding: 8px 12px; }
  .barra .marca span { display: none; }
  .barra .marca img { display: none; }
  .barra nav a span:not(.avatar) { display: none; }
  .barra .perfil { padding: 3px; }
  .barra nav a { padding: 8px 10px; }
  .cabecera-juego { grid-template-columns: 1fr auto; }
  .cabecera-juego .comodines-zona { grid-column: 1 / -1; }
  .reloj { width: 88px; height: 88px; }
  .reloj .valor { font-size: 38px; }
  .opciones { grid-template-columns: 1fr; gap: 12px; }
  .opcion { min-height: 58px; }
  .opcion > .cara { min-height: 54px; padding: 10px 8%; }
  .pantalla-pregunta > div { min-height: 110px; padding: 20px 8%; }
  .boton.enorme { font-size: 28px; }
  .podio .bloque { font-size: 44px; }
  .podio .p1 .bloque { height: 150px; } .podio .p2 .bloque { height: 110px; } .podio .p3 .bloque { height: 80px; }
  .podio .p1 .avatar { width: 64px; height: 64px; }
  th, td { padding: 10px; }
}
