/* ¿SÍ TE LA SABES? · VIVA Aerobus — estilos
   Prioridad: que se lea de lejos y que el operador nunca dude.
   Texto blanco o neón sobre verde casi negro, Poppins gruesa, tamaños grandes
   y casi sin animaciones. */

@font-face { font-family: "Poppins"; src: url("assets/poppins-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: block; }
@font-face { font-family: "Poppins"; src: url("assets/poppins-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: block; }
@font-face { font-family: "Poppins"; src: url("assets/poppins-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: block; }
@font-face { font-family: "Poppins"; src: url("assets/poppins-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: block; }

:root {
  --verde-fondo:  #1A5333;   /* fondo del arte */
  --panel:        #0A2B1B;   /* paneles: verde casi negro, máximo contraste */
  --panel-borde:  rgba(255, 255, 255, .16);
  --verde-linea:  #6DC19E;
  --hielo:        #E6F8F9;
  --blanco:       #FFFFFF;
  --neon:         #7CF06A;
  --oscuro:       #0A2B1B;
  --rojo:         #FF6B5E;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; background: #0f2418; overflow: hidden; cursor: none; }
body { display: flex; align-items: center; justify-content: center; }

/* Lienzo fijo 1920×1080, escalado a la pantalla */
#escenario {
  position: relative; width: 1920px; height: 1080px; flex: none;
  background: var(--verde-fondo) url("assets/fondo.png") no-repeat 0 0 / 1920px 1080px;
  transform-origin: center center; overflow: hidden;
  font-family: "Poppins", Arial, sans-serif; color: var(--blanco);
  font-variant-numeric: tabular-nums;
}

/* Qué se ve en cada modo */
#pantalla { display: none; }
.inicio #pantalla { display: flex; }
.inicio #tablero, .inicio #jugadores { display: none; }

/* ---------------------------------------------------------- contador */
#contador {
  position: absolute; left: 774px; top: 35px; width: 490px; height: 293px;
  background: var(--panel); border: 6px solid var(--verde-linea); border-radius: 22px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
#contador .digitos { font-size: 210px; font-weight: 800; line-height: .9; letter-spacing: -4px; }
#contador .digitos.tres { font-size: 170px; }
#contador .leyenda { font-size: 26px; font-weight: 700; letter-spacing: 8px; color: var(--verde-linea); margin-top: 6px; }

/* ---------------------------------------------------------- inicio: confirmar el evento */
#pantalla {
  position: absolute; left: 100px; top: 358px; width: 1722px; height: 612px;
  flex-direction: column; gap: 22px;
}
.p-arriba { display: flex; align-items: center; gap: 22px; height: 60px; }
.p-titulo { font-size: 50px; font-weight: 800; line-height: 1.1; }

/* Tarjeta grande con el valor que se está eligiendo */
.p-valor {
  flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: var(--panel); border: 5px solid var(--neon); border-radius: 30px;
}
.p-valor .grande { font-size: 150px; font-weight: 800; line-height: 1; letter-spacing: -1px; white-space: nowrap; }
.p-valor .detalle { font-size: 36px; font-weight: 700; color: var(--hielo); }
.p-valor .puntos { display: flex; gap: 14px; }
.p-valor .puntos i { width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.22); }
.p-valor .puntos i.si { background: var(--neon); }
.p-valor .aviso { font-size: 32px; font-weight: 800; color: var(--rojo); }
.p-control { flex: none; font-size: 26px; font-weight: 700; text-align: center; }
.p-control.si { color: var(--neon); }
.p-control.no { color: var(--hielo); opacity: .8; }
.p-valor .tiempo { display: flex; align-items: center; gap: 18px; font-size: 34px; font-weight: 700; color: var(--hielo); margin-top: 8px; }
.p-valor .tiempo b { font-size: 48px; font-weight: 800; color: var(--neon); }
.p-valor .tiempo span:first-child { font-size: 26px; background: var(--blanco); color: var(--oscuro); border-radius: 12px; padding: 4px 12px; }
.p-valor .cuenta { font-size: 34px; font-weight: 700; color: var(--neon); margin-top: 10px; }

/* ---------------------------------------------------------- tablero del juego */
#tablero { position: absolute; left: 100px; top: 358px; width: 1722px; height: 500px; }
#lista, #etiqueta, #tarjeta { display: none; }
#tablero.lista #lista { display: flex; }
#tablero.pregunta #etiqueta, #tablero.pregunta #tarjeta { display: flex; }

/* Modo lista: pocos renglones grandes (espera y resultados) */
#lista { flex-direction: column; gap: 18px; height: 100%; }
#lista.entra { animation: aparece .5s ease-out 1; }
.linea {
  flex: 1 1 0; min-height: 0; display: flex; align-items: center; justify-content: center;
  background: var(--panel); border: 3px solid var(--panel-borde); border-radius: 22px;
  font-size: 58px; font-weight: 800; line-height: 1.1; white-space: nowrap; overflow: hidden;
  padding: 0 40px;
}
.linea.titulo { color: var(--neon); font-size: 66px; }
.linea.chico  { font-size: 38px; font-weight: 700; color: var(--hielo); }
.linea.valor  { font-size: 84px; flex-grow: 1.5; border-color: var(--neon); box-shadow: inset 0 0 0 3px var(--neon); }
.linea.izq    { justify-content: flex-start; }
.linea.marcadores { flex-grow: 2.4; justify-content: space-around; }
.final-jugador { display: flex; flex-direction: column; align-items: center; gap: 6px; line-height: 1; }
.final-jugador span { font-size: 40px; font-weight: 800; color: var(--hielo); }
.final-jugador b { font-size: 110px; font-weight: 800; color: var(--blanco); }

/* Modo pregunta */
#etiqueta {
  height: 62px; align-items: center; justify-content: center; gap: 20px; margin-bottom: 14px;
  font-size: 32px; font-weight: 700; color: var(--hielo); letter-spacing: 1px;
}
#etiqueta .num { background: var(--neon); color: var(--oscuro); font-weight: 800; padding: 6px 22px; border-radius: 999px; }
#etiqueta .ronda { margin-left: auto; color: var(--hielo); }

#tarjeta {
  position: relative; height: 424px; flex-direction: column; align-items: center; justify-content: center; gap: 34px;
  background: var(--panel); border: 3px solid var(--panel-borde); border-radius: 28px;
  padding: 26px 60px 40px; overflow: hidden;
}
#tarjeta.entra { animation: aparece .3s ease-out 1; }
#tarjeta.turno { border-color: var(--neon); box-shadow: inset 0 0 0 3px var(--neon); }
#tarjeta.bien  { border-color: var(--neon); box-shadow: inset 0 0 0 6px var(--neon); }
#tarjeta.mal   { border-color: rgba(255,255,255,.35); }

/* La pista va en mayúsculas y minúsculas: se lee más rápido que todo en mayúsculas */
#pista { width: 100%; text-align: center; font-weight: 800; line-height: 1.18; font-size: 66px; }
#pista .hueco {
  display: inline-block; min-width: 3.2em; height: 1em; vertical-align: -0.08em;
  border-bottom: .12em solid var(--neon); margin: 0 .15em;
}
#pista .hueco.lleno { min-width: 0; border: 0; height: auto; margin: 0; color: var(--neon); vertical-align: baseline; }
#tarjeta.mal #pista .hueco.lleno { color: var(--hielo); }

#fichas { display: flex; gap: 12px; justify-content: center; }
.ficha {
  width: 92px; height: 112px; border-radius: 12px; background: var(--hielo);
  display: flex; align-items: center; justify-content: center;
  font-size: 76px; font-weight: 800; color: var(--oscuro); line-height: 1;
}
.ficha.espacio { width: 36px; background: transparent; }
#fichas.chicas .ficha { width: 74px; height: 96px; font-size: 62px; }
#fichas.mini   .ficha { width: 58px; height: 80px; font-size: 50px; }
#tarjeta.bien .ficha { background: var(--neon); }
#tarjeta.mal  .ficha { background: #9DB3A8; }


/* ---------------------------------------------------------- barras de puntos a los lados */
.barra-pts {
  position: absolute; top: 368px; width: 72px; height: 620px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
#b1 { left: 14px; }
#b2 { right: 14px; }
.inicio .barra-pts { display: none; }
.barra-pts span { font-size: 34px; font-weight: 800; color: var(--neon); line-height: 1; }
.barra-pts b { font-size: 26px; font-weight: 800; line-height: 1; }
.barra-pts .tubo {
  flex: 1 1 auto; width: 100%; background: var(--panel); border: 3px solid var(--panel-borde); border-radius: 36px;
  position: relative; overflow: hidden;
}
.barra-pts .tubo i {
  position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: var(--neon); border-radius: 30px;
  transition: height .6s ease-out;
}

/* ---------------------------------------------------------- jugadores */
#jugadores { position: absolute; left: 100px; top: 878px; width: 1722px; height: 116px; display: flex; gap: 40px; }
.jugador {
  position: relative; flex: 1 1 0; min-width: 0; height: 116px;
  background: var(--panel); border: 4px solid var(--panel-borde); border-radius: 24px;
  display: flex; align-items: center; gap: 22px; padding: 0 30px 0 22px;
  white-space: nowrap;
}
.jugador.j2 { flex-direction: row-reverse; padding: 0 22px 0 30px; }
.jugador .lado {
  flex: none; width: 66px; height: 66px; border-radius: 14px; background: var(--blanco); color: var(--oscuro);
  display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 800;
}

.jugador .nombre { flex: none; font-size: 40px; font-weight: 800; }
.jugador .estado { flex: 1 1 auto; min-width: 0; font-size: 32px; font-weight: 800; color: var(--neon); overflow: hidden; text-overflow: ellipsis; }
.jugador.j2 .estado { text-align: right; }
.jugador .marcador { flex: none; font-size: 84px; font-weight: 800; line-height: 1; min-width: 1.6em; text-align: right; }
.jugador.j2 .marcador { text-align: left; }

.jugador.turno, .jugador.ganador { background: var(--neon); color: var(--oscuro); border-color: var(--neon); }
.jugador.turno .estado, .jugador.ganador .estado { color: var(--oscuro); }
.jugador.turno .lado, .jugador.ganador .lado { background: var(--oscuro); color: var(--neon); }
.jugador.bien { border-color: var(--neon); }
.jugador.apagado { opacity: .45; }
.jugador .suma {
  position: absolute; top: -66px; font-size: 56px; font-weight: 800; color: var(--neon);
  animation: suma 1.2s ease-out forwards; pointer-events: none;
}
.jugador.j1 .suma { right: 40px; }
.jugador.j2 .suma { left: 40px; }

/* ---------------------------------------------- qué hace cada botón ahora */
#ayuda {
  position: absolute; left: 100px; top: 1006px; width: 1722px; height: 60px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
#ayuda.uno { justify-content: center; }
#ayuda .chip {
  display: flex; align-items: center; gap: 14px; height: 100%;
  padding: 0 26px 0 8px; border-radius: 999px;
  background: rgba(10,43,27,.92); border: 3px solid rgba(255,255,255,.6);
  font-size: 28px; font-weight: 800; color: var(--blanco); white-space: nowrap;
}
#ayuda .chip b {
  flex: none; min-width: 46px; height: 46px; padding: 0 8px; border-radius: 999px; background: var(--blanco); color: var(--oscuro);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
#ayuda .chip small { font-size: 18px; font-weight: 700; color: var(--hielo); opacity: .75; }
#ayuda .chip.ok, #ayuda .chip.arriba { border-color: var(--neon); }
#ayuda .chip.ok b, #ayuda .chip.arriba b { background: var(--neon); }
#ayuda .chip.ok b { font-size: 24px; }
/* En el inicio y al calificar, los botones van más grandes */
.inicio #ayuda, .decidir #ayuda { top: 990px; height: 76px; }
.inicio #ayuda .chip, .decidir #ayuda .chip { font-size: 34px; }
.inicio #ayuda .chip b, .decidir #ayuda .chip b { min-width: 58px; height: 58px; font-size: 26px; }

/* ---------------------------------------------------------- animaciones (pocas) */
@keyframes aparece { from { opacity: 0; } to { opacity: 1; } }
@keyframes suma { 0% { transform: translateY(20px); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-40px); opacity: 0; } }

/* ---------------------------------------------------------- menú del técnico (tecla M) */
#menu {
  position: absolute; inset: 0; background: rgba(8, 24, 15, .92);
  display: none; align-items: center; justify-content: center;
  color: #fff; cursor: default;
}
#menu.abierto { display: flex; }
#menu .panel { width: 1100px; background: var(--panel); border: 3px solid var(--verde-linea); border-radius: 28px; padding: 48px 56px 40px; }
#menu h2 { font-weight: 800; font-size: 44px; margin-bottom: 6px; }
#menu .sub { font-size: 22px; color: #BFE2CF; margin-bottom: 28px; }
#menu .op {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 30px; font-weight: 600; padding: 16px 24px; border-radius: 16px; margin-bottom: 8px;
  border: 2px solid transparent; cursor: pointer;
}
#menu .op .val { font-weight: 800; color: var(--neon); }
#menu .op.sel { background: rgba(129, 191, 160, .18); border-color: var(--verde-linea); }
#menu .info { margin-top: 22px; font-size: 19px; color: #BFE2CF; line-height: 1.5; white-space: pre-line; }
#menu .ayuda { margin-top: 18px; font-size: 18px; color: #8FC3A8; }
