/* Avioncito de Celutimba. MOBILE-FIRST. Misma paleta que el resto. */

@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url('../fonts/oswald.woff2') format('woff2');
}
@font-face {
  font-family: 'Anton';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/anton.woff2') format('woff2');
}

:root {
  --fondo:       #081226;
  --panel:       #0d1b38;
  --borde:       #1c3564;
  --azul:        #2f9df0;
  --azul-brillo: #6cc4ff;
  --naranja:     #f7941d;
  --naranja-brillo: #ffb54d;
  --verde:       #34d17a;
  --rojo:        #ff5470;
  --texto:       #eaf3ff;
  --texto-suave: #9fb4d8;
  --marca:  'Anton', system-ui, sans-serif;
  --titulo: 'Oswald', 'Arial Narrow', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  background: var(--fondo);
  color: var(--texto);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* La barra (volver, saldo, sonido, menu) y su modal viven en css/barra.css,
   compartidos con los otros juegos y la portada. */

/* --- Juego ----------------------------------------------------------------- */

.juego {
  flex: 1; display: flex; flex-direction: column; gap: 14px;
  padding: 12px; width: 100%; max-width: 560px; margin: 0 auto;
}

/* Racha de multiplicadores: UNA fila, la mas reciente a la izquierda, con
   scroll de costado si no entran. No se apila en dos renglones. */
.racha {
  display: flex; gap: 6px; overflow-x: auto; min-height: 28px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  padding-bottom: 2px;
}
.racha::-webkit-scrollbar { display: none; }
.racha__item {
  flex: 0 0 auto;
  font-family: var(--titulo); font-weight: 600; font-size: .82rem;
  padding: 4px 11px; border-radius: 999px;
}
.racha__item.bajo { color: var(--texto-suave); background: rgba(255,255,255,.06); }
.racha__item.alto { color: #cfe9ff; background: rgba(47,157,240,.18); }
.racha__item.oro  { color: #2a1a00; background: linear-gradient(180deg, var(--naranja-brillo), var(--naranja)); }

/* El cielo (la pantalla del vuelo) */
.cielo {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--borde);
  aspect-ratio: 16 / 10;
  background: #0a1730;
}
#lienzo { width: 100%; height: 100%; display: block; }

.cielo__centro {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; pointer-events: none; text-align: center;
}
.multi {
  font-family: var(--marca);
  font-size: clamp(2.8rem, 13vw, 4.6rem);
  line-height: 1;
  color: #fff;
  text-shadow: 0 0 26px rgba(108, 196, 255, .55), 0 4px 10px rgba(0,0,0,.6);
  transition: color .2s;
  /* Digitos de ancho fijo: al subir, el numero no baila de ancho y no titila. */
  font-variant-numeric: tabular-nums;
}
.cielo--vuelo .multi { color: var(--naranja-brillo); text-shadow: 0 0 30px rgba(247,148,29,.7); }
.cielo--exploto .multi { color: var(--rojo); text-shadow: 0 0 30px rgba(255,84,112,.75); }

.estado { font-family: var(--titulo); font-weight: 500; letter-spacing: 1px; text-transform: uppercase; color: var(--texto-suave); font-size: .95rem; }
.cuenta {
  font-family: var(--titulo); font-weight: 600; font-size: 1.5rem; color: var(--azul-brillo);
}

/* Cartel de cobro */
.cobro {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 22px; border-radius: 14px;
  background: rgba(12, 138, 69, .92);
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  animation: subir .3s ease;
}
@keyframes subir { from { transform: translate(-50%, 8px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.cobro__x { font-family: var(--titulo); font-weight: 600; font-size: 1rem; color: #d6ffe6; }
.cobro__monto { font-family: var(--marca); font-size: 1.6rem; color: #fff; }

/* --- Panel de apuesta ------------------------------------------------------ */

.panel {
  display: flex; flex-direction: column; gap: 12px;
  padding: 14px; border-radius: 16px;
  background: var(--panel); border: 1px solid var(--borde);
}

.campo { display: flex; flex-direction: column; gap: 7px; }
.campo__label { font-family: var(--titulo); font-weight: 500; font-size: .9rem; letter-spacing: .5px; color: var(--texto-suave); text-transform: uppercase; }
.campo__opc { text-transform: none; letter-spacing: 0; opacity: .7; }

.campo__caja { display: flex; align-items: stretch; gap: 8px; }
.campo__input {
  flex: 1; min-width: 0;
  font-family: var(--titulo); font-weight: 600; font-size: 1.3rem; text-align: center;
  color: var(--texto);
  background: rgba(0,0,0,.25); border: 1px solid var(--borde); border-radius: 10px;
  padding: 10px;
}
.campo__input:focus { outline: none; border-color: var(--azul); }
.campo__input:disabled { opacity: .5; }
.campo__sufijo {
  display: flex; align-items: center; padding: 0 14px;
  font-family: var(--titulo); font-weight: 600; font-size: 1.2rem; color: var(--naranja-brillo);
  background: rgba(0,0,0,.25); border: 1px solid var(--borde); border-radius: 10px;
}

.paso {
  width: 48px;
  font-family: var(--titulo); font-size: 1.6rem; color: var(--texto);
  background: rgba(255,255,255,.06); border: 1px solid var(--borde); border-radius: 10px;
  cursor: pointer;
}
.paso:hover { border-color: var(--azul); }

.rapidos { display: flex; gap: 6px; }
.rapido {
  flex: 1; font-family: var(--titulo); font-weight: 500; font-size: .95rem; color: var(--texto-suave);
  background: rgba(255,255,255,.05); border: 1px solid var(--borde); border-radius: 9px; padding: 8px; cursor: pointer;
}
.rapido:hover { color: #fff; border-color: var(--azul); }

/* El boton grande cambia con la fase */
.accion {
  font-family: var(--titulo); font-weight: 600; font-size: 1.3rem; letter-spacing: 1px;
  color: #04182e;
  background: linear-gradient(180deg, var(--azul-brillo), var(--azul) 55%, #1272c2);
  border: 1px solid #a5dbff; border-radius: 13px; padding: 15px; cursor: pointer;
  transition: transform .1s ease, box-shadow .12s ease;
  box-shadow: 0 4px 18px rgba(47, 157, 240, .4);
}
/* El monto del boton con digitos de ancho fijo: "Retirar" no se mueve al cambiar. */
.accion strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.accion:hover:not(:disabled) { box-shadow: 0 6px 26px rgba(47, 157, 240, .6); }
.accion:active:not(:disabled) { transform: scale(.98); }
.accion:disabled { opacity: .55; cursor: default; box-shadow: none; }

.accion--retirar {
  color: #2a1a00;
  background: linear-gradient(180deg, var(--naranja-brillo), var(--naranja) 55%, #d97407);
  border-color: #ffd08a;
  box-shadow: 0 4px 20px rgba(247, 148, 29, .55);
  animation: latir 1s ease-in-out infinite;
}
@keyframes latir { 0%,100% { transform: scale(1); } 50% { transform: scale(1.02); } }
.accion--listo {
  color: #d6ffe6;
  background: rgba(12, 138, 69, .3);
  border-color: rgba(52, 209, 122, .5);
}

.nota { text-align: center; color: #ffb0be; font-weight: 600; }

/* --- Apuestas de la ronda -------------------------------------------------- */

.ronda { display: flex; flex-direction: column; gap: 8px; }
.ronda__titulo {
  font-family: var(--titulo); font-weight: 500; font-size: .9rem; letter-spacing: 1px;
  text-transform: uppercase; color: var(--texto-suave); text-align: center;
}
.ronda__lista { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.apuesta {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 8px 12px; border-radius: 9px;
  background: rgba(255,255,255,.04); border: 1px solid var(--borde);
}
.apuesta--cobro { border-color: rgba(52, 209, 122, .5); background: rgba(12, 138, 69, .12); }
.apuesta__nombre { font-weight: 600; }
.apuesta__dato { font-family: var(--titulo); font-weight: 600; color: var(--texto-suave); }
.apuesta--cobro .apuesta__dato { color: var(--verde); }

/* --- Velo de acceso -------------------------------------------------------- */

.velo {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(4, 9, 20, .8); backdrop-filter: blur(4px);
}
.velo__caja {
  background: var(--panel); border: 1px solid var(--borde); border-radius: 16px;
  padding: 26px 24px; max-width: 340px; text-align: center;
  display: flex; flex-direction: column; gap: 12px;
}
.velo__caja h2 { font-family: var(--titulo); font-weight: 600; }
.velo__caja p { color: var(--texto-suave); }
.velo__boton { text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  .accion--retirar, .cobro { animation: none; }
}
