/* ¿Messi metió el penal? — diseño Figma: fondo claro, azul #0f3e5b + amarillo #f4c300 */
:root {
  --fondo: #f9fdff;
  --azul: #0f3e5b;
  --amarillo: #f4c300;
  --celeste: #59a3be;
  --celeste-claro: #dcedf7;
  --panel: #c4efff;
  --blanco: #f9fdff;
  --rojo: #d9534f;
  --texto: #000000;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Montserrat", "Segoe UI", system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--fondo);
  color: var(--texto);
  overflow-x: hidden;
}

/* ---- Decoración de fondo (vectores exportados de Figma, canvas 1440px) ---- */
.deco {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.deco img {
  position: absolute;
  height: auto;
}
.deco-arriba-izq {
  width: 19vw;
  min-width: 170px;
  top: -6vw;
  left: -6.5vw;
}
.deco-curva-arriba {
  width: 15vw;
  min-width: 130px;
  top: -3vw;
  left: 42vw;
}
.deco-curva-der {
  width: 11.5vw;
  min-width: 100px;
  top: 26vh;
  right: -3.5vw;
}
.deco-curva-izq {
  width: 18.5vw;
  min-width: 160px;
  bottom: -2.5vw;
  left: -4.2vw;
}
.deco-abajo-der {
  width: 22vw;
  min-width: 190px;
  bottom: clamp(-10vw, -15vw, 2rem);
  right: 7vw;
}

/* ---- Redes ---- */
.redes {
  display: flex;
  gap: 14px;
  align-items: center;
}
.redes img {
  height: 30px;
  width: auto;
  display: block;
}
.redes a {
  opacity: 0.85;
  transition: opacity 0.15s;
}
.redes a:hover {
  opacity: 1;
}
.redes-arriba {
  position: absolute;
  top: 24px;
  right: 28px;
}
.redes-footer {
  justify-content: center;
  margin-top: 6px;
}
.redes-footer img {
  height: 24px;
  width: auto;
}

#app {
  width: 100%;
  max-width: 960px;
  padding: 64px 20px 32px;
  flex: 1;
}

.pantalla {
  display: none;
  text-align: center;
  animation: aparecer 0.3s ease;
}
.pantalla.activa {
  display: block;
}
.oculto {
  display: none !important;
}

@keyframes aparecer {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Inicio ---- */
.titulo {
  font-weight: 900;
  font-size: clamp(1.7rem, 4.2vw, 3.5rem);
  color: var(--azul);
  margin-top: clamp(0.8rem, 1.4vw, 3rem);
  margin-bottom: 14px;
}
.descripcion {
  font-size: clamp(0.9rem, 2.6vw, 1.05rem);
  max-width: 830px;
  margin: 0 auto 4px;
  line-height: 1.45;
}
.descripcion-bold {
  font-weight: 700;
  margin-bottom: 18px;
}
.elegi {
  font-size: clamp(1rem, 2vw, 1.4rem);
  margin-top: clamp(40px, 3rem, 3.5rem);
  margin-bottom: 20px;
}

/* Tarjetas de modo (414x376, radio 31, borde 2.5 según Figma) */
.selector-modo {
  display: flex;
  gap: clamp(18px, 4vw, 56px);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}
.tarjeta-modo {
  width: 330px;
  max-width: 100%;
  min-height: 300px;
  border-radius: 24px;
  border: 2.5px solid;
  padding: 22px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: inherit;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.tarjeta-modo:hover {
  transform: translateY(-5px);
}
.tarjeta-modo:active {
  transform: translateY(0);
}
.tarjeta-modo:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.tarjeta-dificil {
  background: var(--azul);
  border-color: var(--amarillo);
}
.tarjeta-goat {
  background: var(--amarillo);
  border-color: var(--azul);
}
.modo-nombre {
  font-size: clamp(1.35rem, 2.6vw, 1.8rem);
  font-weight: 700;
}
.tarjeta-dificil .modo-nombre,
.tarjeta-dificil .modo-desc {
  color: var(--amarillo);
}
.tarjeta-goat .modo-nombre,
.tarjeta-goat .modo-desc {
  color: var(--azul);
}
.modo-desc {
  font-size: 0.95rem;
  font-weight: 400;
  max-width: 260px;
  line-height: 1.3;
}
.modo-img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 12px;
  margin-top: auto;
}

/* Botón Ver leaderboard (Figma: #59a3be, radio 10) */
.btn-leaderboard {
  background: var(--celeste);
  color: var(--blanco);
  font-family: inherit;
  font-weight: 500;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  border: none;
  border-radius: 10px;
  padding: 10px 22px;
  min-width: min(280px, 100%);
  cursor: pointer;
  transition: filter 0.15s;
}
.btn-leaderboard:hover {
  filter: brightness(1.08);
}

/* ---- Botones genéricos (pantallas de juego) ---- */
.btn {
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 13px 26px;
  cursor: pointer;
  transition:
    transform 0.1s ease,
    box-shadow 0.1s ease;
  box-shadow: 0 4px 0 rgba(15, 62, 91, 0.3);
}
.btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 rgba(15, 62, 91, 0.3);
}
.btn-principal {
  background: var(--amarillo);
  color: var(--azul);
}
.btn-secundario {
  background: var(--azul);
  color: var(--blanco);
}
.btn-gol {
  background: var(--azul);
  color: var(--blanco);
  flex: 1;
}
.btn-erro {
  background: var(--rojo);
  color: var(--blanco);
  flex: 1;
}
.botones {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  max-width: 480px;
  margin-inline: auto;
}

/* Pantalla de juego */
.juego-wrap {
  display: grid;
  grid-template-columns: 1fr min(620px, 100%) 1fr;
  width: 100%;
  justify-content: center;
  gap: clamp(14px, 2vw, 26px);
  margin-top: clamp(10px, 2vw, 30px);
}

.panel-juego {
  background: var(--panel);
  border: 2.5px solid var(--celeste);
  border-radius: 28px;
  padding: clamp(18px, 3vw, 34px);
  width: min(620px, 100%);
}

.contador {
  text-align: center;
  color: var(--azul);
  font-weight: 500;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  margin-bottom: 14px;
}

/* La foto/video vive directo en el panel, con esquinas redondeadas */
.panel-juego .contenedor-foto {
  border-radius: 22px;
  min-height: 300px;
}
.panel-juego .contenedor-foto img,
.panel-juego .contenedor-foto video {
  max-height: 440px;
}

/* Botones LA ERRA (amarillo) / LA METE (azul) con ícono */
.btn-adivinar {
  flex: 1;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 700;
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  padding: 14px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition:
    transform 0.12s ease,
    filter 0.12s ease;
}
.btn-adivinar:hover {
  filter: brightness(1.05);
}
.btn-adivinar:active {
  transform: translateY(2px);
}
.btn-erra {
  background: var(--amarillo);
  color: var(--azul);
}
.btn-mete {
  background: var(--azul);
  color: var(--amarillo);
}
.btn-adivinar .ico {
  font-weight: 900;
}

/* Cajas de marcador (Puntaje / Record) */
.caja-vacia {
  min-width: 60px;
}

.marcadores {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 0 0 auto;
}
.caja-marcador {
  border: 2.5px solid var(--texto);
  border-radius: 20px;
  background: var(--fondo);
  padding: 10px 24px;
  min-width: 132px;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.05;
}
.caja-label {
  font-size: 1.1rem;
  color: var(--texto);
}
.caja-estrellas {
  color: var(--amarillo);
  font-size: 0.7rem;
  letter-spacing: 3px;
}
.caja-num {
  font-family: inherit;
  font-weight: 800;
  font-size: clamp(2.4rem, 4vw, 3.5rem);
  color: var(--azul);
}

/* Revelación (rediseño): ¡BIEN AHÍ! / ¡MAL AHÍ! */
.revelacion {
  text-align: center;
}
.rev-titulo {
  color: var(--azul);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin-bottom: 4px;
}
.rev-sub {
  color: var(--texto);
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  margin-bottom: 16px;
}
.rev-thumb {
  width: clamp(170px, 34%, 235px);
  margin: 0 auto 18px;
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 235 / 153;
  background: var(--azul);
}
.rev-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rev-tarjeta {
  background: var(--fondo);
  border-radius: 22px;
  padding: 16px 22px;
  max-width: 500px;
  margin: 0 auto 20px;
}
.rev-torneo {
  color: var(--azul);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.rev-partido {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 3vw, 22px);
}
.rev-equipo {
  flex: 1;
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--texto);
}
.rev-equipo-local {
  text-align: right;
}
.rev-equipo-visita {
  text-align: left;
}
.rev-marcador {
  font-weight: 900;
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  color: var(--texto);
  white-space: nowrap;
}
.rev-detalle {
  color: var(--azul);
  font-size: 0.85rem;
  margin-top: 8px;
}

.btn-siguiente {
  background: var(--azul);
  color: var(--amarillo);
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 700;
  font-size: clamp(1.05rem, 2.2vw, 1.5rem);
  padding: 13px 36px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition:
    transform 0.12s ease,
    filter 0.12s ease;
}
.btn-siguiente:hover {
  filter: brightness(1.08);
}
.btn-siguiente:active {
  transform: translateY(2px);
}

/* Cuando el panel + marcadores al costado no entran, apilamos en una columna:
   marcadores arriba (en fila) y el panel abajo a lo ancho. */
@media (max-width: 900px) {
  .juego-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .caja-vacia {
    display: none;
  }
  .panel-juego {
    width: 100%;
  }
  .marcadores {
    flex-direction: row;
    order: -1;
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
  }
  .caja-marcador {
    min-width: 118px;
  }
}

/* ============================================================
   Pantalla final — rediseño Figma (TERMINASTE + guardar nombre)
   ============================================================ */
.panel-final {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.final-titulo {
  color: var(--azul);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin-bottom: 6px;
}

.final-subtitulo {
  color: var(--azul);
  font-weight: 400;
  font-size: clamp(0.5rem, 1.2vw, 0.8rem);
  margin-bottom: 20px;
}

.record-msg {
  color: #b8860b;
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 6px;
}

/* Formulario de nombre (input + Guardar en fila) */
.form-final {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 500px;
  margin: 10px auto 20px;
}
.form-final-texto {
  color: var(--texto);
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
}
.form-final-row {
  display: flex;
  gap: 12px;
}
.form-final-row input {
  flex: 1;
  min-width: 0;
  border: none;
  border-radius: 10px;
  background: var(--fondo);
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 18px;
  color: var(--texto);
}
.form-final-row input::placeholder {
  color: #b2b2b2;
}
.btn-guardar {
  background: var(--celeste);
  color: var(--blanco);
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  padding: 12px 24px;
  cursor: pointer;
  transition: filter 0.12s;
}
.btn-guardar:hover {
  filter: brightness(1.06);
}

/* Compartir (blanco) / Jugar de nuevo (azul) */
.btn-compartir,
.btn-jugar-denuevo {
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: clamp(1.05rem, 2.2vw, 1.5rem);
  padding: 13px 28px;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    filter 0.12s ease;
}
.btn-compartir {
  background: var(--fondo);
  color: var(--azul);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.btn-jugar-denuevo {
  background: var(--azul);
  color: var(--amarillo);
}
.btn-compartir:hover,
.btn-jugar-denuevo:hover {
  filter: brightness(1.06);
}
.btn-compartir:active,
.btn-jugar-denuevo:active {
  transform: translateY(2px);
}

/* Menú de compartir: WhatsApp / X / Copiar */
.opciones-compartir {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 14px;
}
.share-op {
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 10px 18px;
  cursor: pointer;
  color: #ffffff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition:
    filter 0.12s ease,
    transform 0.12s ease;
}
.share-op:hover {
  filter: brightness(1.06);
}
.share-op:active {
  transform: translateY(2px);
}
.share-wa {
  background: #25d366;
}
.share-tw {
  background: #111111;
}
.share-copy {
  background: var(--celeste);
}

.link-cambiar-modo {
  background: none;
  border: none;
  color: var(--azul);
  font-family: inherit;
  font-size: 0.9rem;
  text-decoration: underline;
  cursor: pointer;
  margin-top: 14px;
  opacity: 0.85;
}
.link-cambiar-modo:hover {
  opacity: 1;
}

/* Ver leaderboard (debajo del panel) */
.btn-ver-lb {
  background: var(--celeste);
  color: var(--blanco);
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 500;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  padding: 12px 30px;
  cursor: pointer;
  margin: 28px auto 0;
  display: block;
  transition: filter 0.12s;
}
.btn-ver-lb:hover {
  filter: brightness(1.08);
}

/* ============================================================
   Pantalla de leaderboard (página aparte)
   ============================================================ */
.lb-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: clamp(10px, 3vw, 40px);
}
/* Panel oscuro del leaderboard (frame Figma: fondo azul, borde amarillo) */
.leaderboard-panel {
  background: var(--azul);
  border: 2.5px solid var(--amarillo);
  border-radius: 27px;
  padding: clamp(20px, 3vw, 34px) clamp(16px, 3vw, 30px);
  width: min(700px, 100%);
}
.lb-titulo {
  color: var(--amarillo);
  font-weight: 600;
  font-size: clamp(1.7rem, 4vw, 2.25rem);
  text-align: center;
  margin-bottom: 18px;
}

/* Pestañas Normal/GOAT adaptadas al panel oscuro */
.leaderboard-panel .tabs-lb {
  margin-bottom: 16px;
}
.leaderboard-panel .tab-lb {
  background: #1b567b;
  color: var(--amarillo);
}
.leaderboard-panel .tab-lb.activa {
  background: var(--amarillo);
  color: var(--azul);
}

/* Tabla del leaderboard: el navegador acopla los anchos de header y filas */
.lb-tabla {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--amarillo);
  font-size: clamp(0.9rem, 1.8vw, 1.05rem);
  table-layout: auto;
}
.lb-tabla th,
.lb-tabla td {
  padding: 8px 14px;
  text-align: left;
  white-space: nowrap;
  vertical-align: middle;
}

/* Encabezado */
.lb-tabla thead th {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
  padding-bottom: 10px;
}

/* Columnas: puesto y números se encogen al contenido; el nombre ocupa el resto */
.lb-col-puesto {
  width: 1%;
  padding-right: 6px;
}
.lb-col-nombre {
  width: 100%;
  max-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-col-puntos,
.lb-col-tiempo {
  text-align: center;
}

/* Filas de datos */
.lb-tabla tbody .lb-col-puntos {
  font-weight: 800;
}
.lb-tabla tbody .lb-col-tiempo {
  color: var(--panel);
}

/* Cebra + esquinas redondeadas por fila, igual que el frame */
.lb-tabla tbody tr:nth-child(odd) td {
  background: #1b567b;
}
.lb-tabla tbody tr:nth-child(odd) td:first-child {
  border-radius: 6px 0 0 6px;
}
.lb-tabla tbody tr:nth-child(odd) td:last-child {
  border-radius: 0 6px 6px 0;
}

.lb-estrellas {
  color: var(--amarillo);
  font-size: 0.85em;
  letter-spacing: 1px;
  margin-left: 6px;
}
.lb-tabla .lb-vacio {
  text-align: center;
  color: var(--panel);
  padding: 14px 6px;
  white-space: normal;
}

/* Botón Jugar (celeste, debajo del panel) */
.btn-jugar-lb {
  background: var(--celeste);
  color: var(--blanco);
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 500;
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  padding: 13px 44px;
  cursor: pointer;
  margin-top: 22px;
  transition: filter 0.12s;
}
.btn-jugar-lb:hover {
  filter: brightness(1.08);
}

@media (max-width: 760px) {
  .form-final-row {
    flex-direction: column;
  }
}

/* ---- HUD ---- */
.hud {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--azul);
  font-weight: 500;
  margin-bottom: 14px;
  max-width: 480px;
  margin-inline: auto;
}
.hud strong {
  color: var(--azul);
  font-weight: 900;
  font-size: 1.15rem;
}

/* ---- Marco de la foto/video ---- */
.marco-foto {
  background: #ffffff;
  border: 2.5px solid var(--azul);
  border-radius: 18px;
  padding: 12px;
  max-width: 480px;
  margin-inline: auto;
  box-shadow: 0 8px 24px rgba(15, 62, 91, 0.18);
}
.contenedor-foto {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--azul);
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.contenedor-foto img,
.contenedor-foto video {
  width: 100%;
  height: auto;
  max-height: 340px;
  object-fit: cover;
  display: block;
}
.contenedor-foto iframe {
  max-width: 100%;
  border: 0;
}
.credito-foto {
  position: absolute;
  bottom: 0;
  right: 0;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(0, 0, 0, 0.45);
  padding: 2px 8px;
  border-radius: 6px 0 0 0;
}
.pregunta-foto {
  margin-top: 10px;
  font-style: italic;
  color: var(--azul);
  text-align: center;
}

/* ---- Tarjeta de revelación ---- */
.revelacion {
  margin-top: 16px;
}
.rev-resultado {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--azul);
  margin-bottom: 6px;
  animation: golpe 0.4s ease;
}
@keyframes golpe {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  70% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
.rev-acierto {
  color: var(--azul);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 12px;
}
.tarjeta {
  background: #ffffff;
  border: 2.5px solid var(--azul);
  border-radius: 18px;
  padding: 20px;
  max-width: 480px;
  margin-inline: auto;
}
.tarjeta-reveal {
  margin-bottom: 14px;
  text-align: center;
  animation: aparecer 0.35s ease;
}
.tarjeta-torneo {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--azul);
  background: var(--celeste-claro);
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.tarjeta-partido {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.equipo {
  flex: 1;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  color: var(--azul);
}
.marcador {
  font-size: 1.6rem;
  font-weight: 900;
  background: var(--azul);
  color: var(--blanco);
  border-radius: 10px;
  padding: 4px 14px;
  white-space: nowrap;
}
.tarjeta-detalle {
  font-size: 0.85rem;
  color: #56707f;
}

/* ---- Final ---- */
.titulo-final {
  color: var(--azul);
  font-weight: 900;
  font-size: 1.7rem;
  margin: 14px 0 6px;
}
.modo-jugado {
  color: var(--celeste);
  font-weight: 700;
  margin-bottom: 12px;
}
.racha-final {
  background: var(--azul);
  border-radius: 18px;
  display: inline-flex;
  flex-direction: column;
  padding: 18px 40px;
  margin-bottom: 12px;
}
.racha-num {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--amarillo);
  line-height: 1;
}
.racha-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blanco);
}
.record-msg {
  color: #b8860b;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 10px;
}
.acciones-final {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 14px 0 20px;
}

.form-score {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
}
.form-score input {
  width: 100%;
  max-width: 300px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 2px solid var(--azul);
  background: #ffffff;
  font-family: inherit;
  font-size: 1rem;
  text-align: center;
}
.msg-score {
  color: var(--azul);
  font-size: 0.9rem;
  min-height: 1.2em;
}

/* ---- Leaderboard ---- */
.leaderboard {
  background: #ffffff;
  border: 2.5px solid var(--azul);
  border-radius: 16px;
  padding: 16px;
  margin: 26px auto 0;
  max-width: 480px;
  text-align: left;
  animation: aparecer 0.3s ease;
}
.leaderboard h3 {
  text-align: center;
  margin-bottom: 10px;
  color: var(--azul);
}
.leaderboard ol {
  list-style: none;
}
.leaderboard li {
  counter-increment: pos;
  display: flex;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.95rem;
}
.leaderboard ol {
  counter-reset: pos;
}
.leaderboard li::before {
  content: counter(pos) ". ";
  font-weight: 700;
  margin-right: 8px;
  color: var(--azul);
}
.leaderboard li:nth-child(odd) {
  background: var(--celeste-claro);
}
.leaderboard li .puntos {
  font-weight: 800;
  color: var(--azul);
}
/* Bloque derecho de cada fila: puntaje + tiempo de desempate */
.lb-derecha {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}
.lb-tiempo {
  font-size: 0.8rem;
  font-weight: 600;
  color: #56707f;
}
.lb-vacio {
  text-align: center;
  color: #56707f;
  font-size: 0.9rem;
  padding: 8px 0;
}

.tabs-lb {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 10px;
}
.tab-lb {
  border: none;
  border-radius: 999px;
  padding: 6px 16px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  background: var(--celeste-claro);
  color: var(--azul);
}
.tab-lb.activa {
  background: var(--azul);
  color: var(--blanco);
}

footer {
  color: var(--azul);
  font-size: 0.75rem;
  padding: 20px 16px 26px;
  text-align: center;
  line-height: 1.6;
}
footer a {
  color: var(--azul);
}

@media (max-width: 900px) {
  .deco-curva-arriba,
  .deco-curva-der {
    display: none;
  }
  .deco-arriba-izq {
    min-width: 160px;
  }
  .deco-abajo-der {
    right: 2vw;
  }
  .redes-arriba {
    top: 14px;
    right: 14px;
  }
  #app {
    padding-top: 66px;
  }
  .tarjeta-modo {
    min-height: 0;
    padding-bottom: 24px;
  }
  .modo-img {
    margin-top: 6px;
    width: 160px;
    height: 161px;
  }
}
