/* =============================================================================
   Órbita · pantalla de juego vertical 9:16
   El cabinet mide 540 × 960 y se escala con --scale (lo calcula main.js).
   ========================================================================== */

.game-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(ellipse 46% 55% at 50% 8%, rgba(61, 232, 255, 0.07), transparent 65%),
    radial-gradient(ellipse 40% 45% at 8% 80%, rgba(255, 61, 154, 0.05), transparent 65%),
    radial-gradient(ellipse 40% 45% at 92% 80%, rgba(157, 123, 255, 0.06), transparent 65%),
    linear-gradient(180deg, #05060f 0%, #060a17 60%, #05060f 100%);
}

.game-page[data-state='playing'] {
  cursor: none;
}

@media (pointer: coarse) {
  .game-page[data-state='playing'] {
    cursor: auto;
  }
}

/* ------------------------------------------------------------------ cabecera */
.game-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 56px;
  padding: 8px 20px;
  border-bottom: 1px solid var(--c-line);
  background: rgba(5, 6, 15, 0.72);
  backdrop-filter: blur(10px);
}

.game-header__left,
.game-header__right {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.game-header__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--c-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color var(--ease) 160ms;
}

.game-header__back:hover {
  color: var(--c-cyan);
}

.game-header__divider {
  width: 1px;
  height: 22px;
  background: var(--c-line);
}

.game-header__title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.game-header__title strong {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--c-text);
  text-transform: uppercase;
}

.game-header__title span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--c-dim);
  text-transform: uppercase;
  white-space: nowrap;
}

.game-header__live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--c-dim);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.game-header__live::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c-lime);
  box-shadow: 0 0 8px var(--c-lime);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

.game-header__privacy {
  color: var(--c-dim);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.game-header__privacy:hover {
  color: var(--c-cyan);
}

.game-lang {
  display: inline-flex;
  gap: 3px;
}

.game-lang__button {
  min-width: 27px;
  padding: 3px 5px;
  border: 1px solid var(--c-line);
  border-radius: 4px;
  background: transparent;
  color: var(--c-dim);
  font-family: var(--font-ui);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.game-lang__button.is-active {
  border-color: rgba(61, 232, 255, 0.55);
  background: rgba(61, 232, 255, 0.1);
  color: var(--c-cyan);
}

.game-lang__button:focus-visible {
  outline: 2px solid var(--c-cyan);
  outline-offset: 2px;
}

@keyframes pulse-dot {
  50% {
    opacity: 0.35;
  }
}

/* -------------------------------------------------------------------- layout */
.game-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
  width: 100%;
  padding: 20px 16px 24px;
}

.ad-rail {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 160px;
  flex: none;
  padding-top: 4px;
}

.ad-rail__caption {
  color: var(--c-dim);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  order: 2;
}

.cabinet-slot {
  position: relative;
  flex: none;
  width: calc(540px * var(--scale, 1));
  height: calc(960px * var(--scale, 1));
}

.cabinet {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: 540px;
  height: 960px;
  overflow: hidden;
  border: 1px solid rgba(120, 190, 255, 0.38);
  border-radius: 20px;
  background: #05060f;
  box-shadow:
    0 0 0 1px rgba(5, 6, 15, 0.9),
    0 0 90px rgba(61, 232, 255, 0.09),
    0 40px 120px rgba(0, 0, 0, 0.65),
    inset 0 0 60px rgba(61, 232, 255, 0.03);
  transform: scale(var(--scale, 1));
  transform-origin: top left;
  isolation: isolate;
}

.cabinet::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 20;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

/* ---------------------------------------------------------------------- HUD */
.cabinet__hud {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  flex: none;
  height: 92px;
  padding: 11px 18px 9px;
  border-bottom: 1px solid var(--c-line);
  background:
    linear-gradient(180deg, rgba(17, 29, 61, 0.92), rgba(7, 11, 26, 0.98)),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(120, 190, 255, 0.04) 39px 40px);
  transition: opacity 360ms var(--ease);
}

.cabinet__hud::after {
  content: '';
  position: absolute;
  right: 18px;
  bottom: -1px;
  left: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(61, 232, 255, 0.55), transparent);
  opacity: 0.6;
}

.game-page[data-state='attract'] .cabinet__hud {
  opacity: 0.48;
}

.hud__block {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.hud__block--right {
  align-items: flex-end;
  text-align: right;
}

.hud__label {
  color: var(--c-dim);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1;
  text-transform: uppercase;
}

.hud__value {
  overflow: hidden;
  color: var(--c-text);
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-overflow: ellipsis;
  text-shadow: 0 0 18px rgba(61, 232, 255, 0.22);
  white-space: nowrap;
}

.hud__value--score {
  color: var(--c-text);
}

.hud__sub {
  overflow: hidden;
  color: var(--c-muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.hud__sub--combo[data-active='true'] {
  color: var(--c-amber);
  text-shadow: 0 0 10px rgba(255, 200, 87, 0.5);
}

.hud__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 5px 18px;
  border: 1px solid var(--c-line);
  border-radius: 6px;
  background: rgba(5, 6, 15, 0.35);
  min-width: 150px;
}

.hud__center .hud__label {
  color: var(--c-cyan);
  letter-spacing: 0.2em;
}

.hud__center .hud__value {
  color: var(--c-cyan);
  font-size: 19px;
  letter-spacing: 0.12em;
  text-shadow: 0 0 14px rgba(61, 232, 255, 0.45);
}

.hud__lives {
  display: flex;
  gap: 5px;
  padding-top: 1px;
}

.life {
  width: 11px;
  height: 11px;
  border: 1px solid rgba(61, 232, 255, 0.85);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d8fbff, var(--c-cyan) 55%, #0b5f72);
  box-shadow: 0 0 9px rgba(61, 232, 255, 0.7);
  transition:
    opacity 220ms var(--ease),
    transform 220ms var(--ease);
}

.life--lost {
  border-color: rgba(99, 120, 154, 0.35);
  background: transparent;
  box-shadow: none;
  opacity: 0.5;
}

.life--new {
  animation: life-pop 500ms var(--ease);
}

@keyframes life-pop {
  50% {
    transform: scale(1.55);
  }
}

/* -------------------------------------------------------------------- stage */
.cabinet__stage {
  position: relative;
  flex: none;
  width: 540px;
  height: 760px;
  overflow: hidden;
  background: #05060f;
}

#game-canvas {
  display: block;
  width: 540px;
  height: 760px;
  touch-action: none;
  outline: none;
}

.stage__fx {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.stage__scanlines {
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.055) 0,
    rgba(255, 255, 255, 0.055) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.35;
  mix-blend-mode: soft-light;
}

.stage__vignette {
  background:
    radial-gradient(ellipse at 50% 44%, transparent 48%, rgba(0, 0, 0, 0.5) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.24), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.35));
}

.stage__frame {
  inset: 7px;
  border: 1px solid rgba(120, 190, 255, 0.13);
  border-radius: 5px;
  box-shadow: inset 0 0 28px rgba(61, 232, 255, 0.03);
}

.stage__frame::before,
.stage__frame::after {
  content: '';
  position: absolute;
  width: 26px;
  height: 26px;
  border-color: rgba(61, 232, 255, 0.55);
  border-style: solid;
}

.stage__frame::before {
  top: -1px;
  left: -1px;
  border-width: 1px 0 0 1px;
}

.stage__frame::after {
  right: -1px;
  bottom: -1px;
  border-width: 0 1px 1px 0;
}

/* --------------------------------------------------------------- leaderboard */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  transition:
    opacity 320ms var(--ease),
    transform 320ms var(--ease);
}

.overlay[hidden] {
  display: none;
}

.overlay.is-leaving {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.overlay--attract {
  display: flex;
  flex-direction: column;
  padding: 18px 20px 14px;
  background:
    radial-gradient(ellipse at 50% 28%, rgba(5, 6, 15, 0.18), rgba(5, 6, 15, 0.7) 80%),
    linear-gradient(180deg, rgba(5, 6, 15, 0.15), rgba(5, 6, 15, 0.58));
}

.attract__head {
  position: relative;
  flex: none;
  padding: 2px 10px 12px;
  text-align: center;
}

.attract__head::before {
  content: '';
  position: absolute;
  top: 44%;
  left: 50%;
  width: 420px;
  height: 130px;
  border: 1px solid rgba(61, 232, 255, 0.12);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-7deg);
  pointer-events: none;
}

.attract__eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--c-cyan);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.attract__eyebrow::before,
.attract__eyebrow::after {
  content: '';
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

.attract__title {
  position: relative;
  margin: 4px 0 2px;
  font-family: var(--font-display);
  font-size: 66px;
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 0%, #d6fbff 34%, #3de8ff 68%, #9d7bff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 26px rgba(61, 232, 255, 0.3));
}

.attract__tagline {
  position: relative;
  color: var(--c-muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.attract__meta {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 9px;
}

.attract__meta span {
  padding: 3px 7px;
  border: 1px solid var(--c-line);
  border-radius: 3px;
  background: rgba(5, 6, 15, 0.45);
  color: var(--c-dim);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lb {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(120, 190, 255, 0.3);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(8, 14, 32, 0.9), rgba(5, 8, 20, 0.84));
  box-shadow:
    inset 0 0 50px rgba(61, 232, 255, 0.05),
    0 14px 50px rgba(0, 0, 0, 0.45);
}

.lb::before {
  content: '';
  position: absolute;
  top: 0;
  right: 24%;
  left: 24%;
  z-index: 3;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-cyan), transparent);
  opacity: 0.8;
}

.lb__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: none;
  padding: 9px 13px 8px;
  border-bottom: 1px solid var(--c-line);
  background: linear-gradient(180deg, rgba(17, 29, 61, 0.85), rgba(8, 14, 32, 0.6));
}

.lb__head-title {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--c-text);
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.lb__live {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c-lime);
  box-shadow: 0 0 7px var(--c-lime);
}

.lb__head-meta {
  color: var(--c-dim);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lb__viewport {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  mask-image: linear-gradient(180deg, transparent 0, black 18px, black calc(100% - 18px), transparent 100%);
}

.lb__viewport--manual {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(61, 232, 255, 0.35) transparent;
}

.lb__track {
  will-change: transform;
}

.lb__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lb__row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 62px 92px;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 13px;
  border-bottom: 1px solid rgba(120, 170, 255, 0.055);
  font-size: 13px;
}

.lb__row--p1,
.lb__row--p2,
.lb__row--p3 {
  background: linear-gradient(90deg, rgba(255, 200, 87, 0.08), transparent 65%);
}

.lb__row--p1 {
  background: linear-gradient(90deg, rgba(61, 232, 255, 0.13), transparent 70%);
}

.lb__rank {
  color: var(--c-dim);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.lb__row--p1 .lb__rank {
  color: var(--c-amber);
  text-shadow: 0 0 10px rgba(255, 200, 87, 0.5);
}

.lb__row--p2 .lb__rank,
.lb__row--p3 .lb__rank {
  color: var(--c-cyan);
}

.lb__name {
  overflow: hidden;
  color: var(--c-text);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.lb__row--p1 .lb__name {
  color: #ffffff;
}

.lb__level {
  color: var(--c-dim);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: right;
  text-transform: uppercase;
  white-space: nowrap;
}

.lb__level strong {
  color: var(--c-muted);
  font-weight: 700;
}

.lb__score {
  color: var(--c-text);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  text-align: right;
}

.lb__row--p1 .lb__score {
  color: var(--c-amber);
}

.lb__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: none;
  padding: 7px 12px;
  border-top: 1px solid var(--c-line);
  background: rgba(5, 6, 15, 0.55);
  color: var(--c-dim);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lb__foot span:last-child {
  color: var(--c-cyan);
  opacity: 0.7;
}

.lb__empty[hidden] {
  display: none;
}

.lb__empty {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 100%;
  padding: 30px;
  background: rgba(5, 6, 15, 0.45);
  text-align: center;
  color: var(--c-muted);
}

.lb__empty strong {
  color: var(--c-cyan);
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lb__empty span {
  font-size: 11px;
  letter-spacing: 0.08em;
}

/* ------------------------------------------------------------ overlays modales */
.overlay--center {
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 6, 15, 0.64);
  backdrop-filter: blur(3px);
}

.sector-card {
  position: relative;
  width: 100%;
  padding: 24px 20px 26px;
  overflow: hidden;
  border: 1px solid rgba(61, 232, 255, 0.35);
  border-radius: 12px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(61, 232, 255, 0.12), transparent 65%),
    rgba(7, 11, 26, 0.96);
  box-shadow:
    0 0 70px rgba(61, 232, 255, 0.1),
    inset 0 0 70px rgba(61, 232, 255, 0.04);
  text-align: center;
  animation: card-in 450ms var(--ease);
}

.sector-card::before,
.sector-card::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 460px;
  height: 150px;
  border: 1px solid rgba(61, 232, 255, 0.12);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.sector-card::before {
  top: 48%;
}

.sector-card::after {
  top: 48%;
  width: 300px;
  height: 96px;
  border-color: rgba(255, 61, 154, 0.14);
  transform: translate(-50%, -50%) rotate(-12deg);
}

.sector-card__eyebrow {
  position: relative;
  color: var(--c-cyan);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.sector-card__num {
  position: relative;
  display: block;
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: 82px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.02em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(61, 232, 255, 0.8);
  filter: drop-shadow(0 0 18px rgba(61, 232, 255, 0.25));
}

.sector-card__name {
  position: relative;
  margin-top: 4px;
  font-size: 16px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sector-card__meta {
  position: relative;
  margin-top: 8px;
  color: var(--c-dim);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
}

.modal {
  position: relative;
  width: min(430px, 100%);
  max-height: 100%;
  overflow: auto;
  padding: 24px 24px 22px;
  border: 1px solid rgba(120, 190, 255, 0.34);
  border-radius: 12px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(61, 232, 255, 0.09), transparent 52%),
    rgba(7, 11, 26, 0.97);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: card-in 280ms var(--ease);
}

.modal--wide {
  width: min(470px, 100%);
}

.modal__eyebrow {
  color: var(--c-cyan);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.modal__title {
  margin-top: 5px;
  font-size: 25px;
  line-height: 1.08;
  text-transform: uppercase;
}

.modal__title--danger {
  color: var(--c-red);
  text-shadow: 0 0 22px rgba(255, 93, 108, 0.35);
}

.modal__text {
  margin-top: 8px;
  color: var(--c-muted);
  font-size: 13px;
  line-height: 1.5;
}

.modal__score {
  margin: 16px 0 4px;
  padding: 12px 8px;
  border: 1px solid var(--c-line);
  border-radius: 8px;
  background: rgba(5, 6, 15, 0.5);
  text-align: center;
}

.modal__score span {
  display: block;
  color: var(--c-dim);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.modal__score strong {
  display: block;
  margin-top: 2px;
  color: var(--c-cyan);
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-shadow: 0 0 24px rgba(61, 232, 255, 0.3);
}

.modal__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 12px 0 16px;
  overflow: hidden;
  border: 1px solid var(--c-line);
  border-radius: 6px;
  background: var(--c-line);
}

.modal__stat {
  padding: 8px 6px;
  background: rgba(8, 14, 32, 0.9);
  text-align: center;
}

.modal__stat span {
  display: block;
  color: var(--c-dim);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.modal__stat strong {
  display: block;
  margin-top: 2px;
  color: var(--c-text);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
}

.score-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.score-form label {
  color: var(--c-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.score-form__row {
  display: flex;
  gap: 8px;
}

.score-form input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--c-line-strong);
  border-radius: 6px;
  background: rgba(5, 6, 15, 0.7);
  color: var(--c-text);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.score-form input::placeholder {
  color: var(--c-dim);
}

.score-form input:focus {
  border-color: var(--c-cyan);
  box-shadow: 0 0 0 1px rgba(61, 232, 255, 0.25);
  outline: none;
}

.score-form input:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.score-form__hint {
  color: var(--c-dim);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.form-status {
  min-height: 16px;
  margin-top: 6px;
  color: var(--c-muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1.35;
}

.form-status[data-kind='error'] {
  color: var(--c-red);
}

.form-status[data-kind='success'] {
  color: var(--c-lime);
}

.form-status strong {
  color: var(--c-amber);
}

.modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.modal__actions .btn {
  flex: 1;
  min-width: 120px;
}

.modal__actions .btn--full {
  flex-basis: 100%;
}

/* ------------------------------------------------------------ ayuda / powerups */
.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.help-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--c-line);
  border-radius: 6px;
  background: rgba(5, 6, 15, 0.35);
}

.help-item__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border: 1px solid currentColor;
  border-radius: 5px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
}

.help-item strong {
  display: block;
  color: var(--c-text);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.help-item span {
  display: block;
  margin-top: 1px;
  color: var(--c-dim);
  font-size: 9px;
  line-height: 1.3;
}

.help-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

kbd {
  display: inline-block;
  padding: 3px 6px;
  border: 1px solid var(--c-line-strong);
  border-bottom-width: 2px;
  border-radius: 3px;
  background: rgba(17, 29, 61, 0.8);
  color: var(--c-muted);
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* --------------------------------------------------------------------- footer */
.cabinet__foot {
  position: relative;
  z-index: 6;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  flex: none;
  height: 108px;
  padding: 12px 18px 10px;
  border-top: 1px solid var(--c-line);
  background:
    linear-gradient(180deg, rgba(7, 11, 26, 0.98), rgba(12, 21, 48, 0.98)),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(120, 190, 255, 0.03) 39px 40px);
}

.foot__row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.foot__row .btn--primary {
  flex: 1;
}

.foot__hint {
  overflow: hidden;
  color: var(--c-dim);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.foot__hint strong {
  color: var(--c-muted);
  font-weight: 700;
}

/* --------------------------------------------------------------------- toast */
.toast {
  position: absolute;
  top: 22px;
  left: 50%;
  z-index: 9;
  padding: 6px 14px;
  border: 1px solid rgba(255, 200, 87, 0.45);
  border-radius: 4px;
  background: rgba(7, 11, 26, 0.94);
  color: var(--c-amber);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -6px);
  transition:
    opacity 200ms var(--ease),
    transform 200ms var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ------------------------------------------------------------------- boot */
.boot {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #05060f;
}

.boot__ring {
  position: relative;
  width: 62px;
  height: 62px;
  border: 1px solid rgba(61, 232, 255, 0.18);
  border-top-color: var(--c-cyan);
  border-radius: 50%;
  animation: spin 1.15s linear infinite;
  box-shadow: 0 0 26px rgba(61, 232, 255, 0.12);
}

.boot__ring::after {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 61, 154, 0.55);
  border-radius: 50%;
}

.boot__text {
  color: var(--c-dim);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------- iconos */
#btn-sound .icon-off {
  display: none;
}

#btn-sound.is-off .icon-on {
  display: none;
}

#btn-sound.is-off .icon-off {
  display: block;
}

.btn--icon svg {
  width: 18px;
  height: 18px;
}

/* ------------------------------------------------------- consentimiento ads */
.ad-unit.is-consent-blocked {
  background: rgba(8, 14, 30, 0.55);
}

.ad-unit.is-consent-blocked img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ------------------------------------------------------------- publicidad móvil */
.mobile-ad {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
}

/* ------------------------------------------------------------------ fullscreen */
:root:fullscreen .game-header,
:root:fullscreen .ad-rail,
:root:fullscreen .mobile-ad,
:root:fullscreen .site-footer,
:root:fullscreen .consent {
  display: none !important;
}

:root:fullscreen .game-main {
  align-items: center;
  justify-content: center;
  padding: 0;
  min-height: 100vh;
}

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1119px) {
  .ad-rail {
    display: none;
  }
}

@media (max-width: 640px) {
  .game-header {
    min-height: 48px;
    padding: 6px 12px;
  }

  .game-header__title span,
  .game-header__live,
  .game-header__divider {
    display: none;
  }

  .game-main {
    padding: 8px 0 12px;
  }

  .mobile-ad {
    display: flex;
  }

  .game-page[data-state='attract'] .cabinet__foot {
    padding-bottom: 8px;
  }
}

@media (pointer: coarse) {
  .foot__hint {
    font-size: 8px;
  }
}

@supports (padding: max(0px)) {
  .game-header {
    padding-top: max(8px, env(safe-area-inset-top));
  }

  .mobile-ad {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }

  @media (max-width: 640px) {
    .game-header {
      padding-top: max(6px, env(safe-area-inset-top));
    }
  }
}
