/* =====================================================
   MY NEXT DANCE ERA 2027 · paleta arcade tipo Pac-Man
   ===================================================== */
:root {
  --bg: #000000;
  --cabinet: #07071a;
  --maze: #2121de;
  --maze-glow: rgba(33, 33, 222, 0.75);
  --screen: #000000;

  --yellow: #ffe600;
  --red: #ff2a2a;
  --pink: #ffb8ff;
  --cyan: #00ffff;
  --orange: #ffb852;
  --pellet: #ffb8ae;
  --scared: #2a2aff;

  --text: #f4f4ff;
  --muted: #a9a9d6;
  --danger: #ff6b6b;

  --pixel: "Press Start 2P", monospace;
  --body: "Roboto Condensed", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background:
    radial-gradient(circle at 50% 0%, rgba(33,33,222,0.25), transparent 60%),
    radial-gradient(circle, rgba(255,184,174,0.35) 1.5px, transparent 2px) 0 0 / 28px 28px,
    var(--bg);
  color: var(--text);
  font-family: var(--body);
  padding: 12px;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }

.shell {
  min-height: calc(100vh - 24px);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Gabinete ---------- */
.cabinet {
  width: 100%;
  max-width: 410px;
  background: linear-gradient(180deg, #0d0d2b 0%, var(--cabinet) 100%);
  border: 3px solid var(--maze);
  border-radius: 22px;
  box-shadow:
    0 0 0 3px #000, 0 0 0 6px var(--maze),
    0 0 26px var(--maze-glow),
    0 18px 40px rgba(0,0,0,0.6);
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---------- HUD ---------- */
.hud {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  font-family: var(--pixel);
  padding: 2px 4px 0;
}
.hud__col { display: flex; flex-direction: column; gap: 6px; }
.hud__col--center { align-items: center; }
.hud__col--right { align-items: flex-end; }
.hud__label { font-size: 8px; color: var(--red); letter-spacing: 1px; }
.hud__value { font-size: 10px; color: var(--text); }
.hud__value--hi { color: var(--yellow); }
.hud__lives { display: flex; gap: 4px; }

/* ---------- Pantalla (laberinto) ---------- */
.maze {
  border: 3px solid var(--maze);
  border-radius: 16px;
  padding: 5px;
  box-shadow: inset 0 0 12px var(--maze-glow), 0 0 12px var(--maze-glow);
}
.screen {
  position: relative;
  min-height: 580px;
  background: var(--screen);
  border: 3px solid var(--maze);
  border-radius: 11px;
  padding: 20px 16px 22px;
  overflow: hidden;
}
.screen::after { /* scanlines */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.035) 0 1px, transparent 1px 3px);
}

.page { display: none; position: relative; z-index: 1; animation: pop .25s steps(3); }
.page--active { display: block; }
.page--center { min-height: 530px; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.page--active.page--center { display: flex; }

@keyframes pop { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- Tipografía ---------- */
.tiny-label, .step-label, .hero-title, .hero-year, .screen-title,
.arcade-btn, .game-card__title, .promo-pill, .insert-coin, .field-label,
.ask-card__label, .ask-card__plan, .missions__label, .route-map__ends,
.route-map__you, .level-badge, .credit { font-family: var(--pixel); }

.tiny-label { font-size: 11px; color: var(--pink); margin: 18px 0 10px; letter-spacing: 3px; }

.hero-title {
  font-size: 34px;
  line-height: 1.25;
  margin: 0;
  color: var(--yellow);
  text-shadow: 3px 3px 0 var(--red), 6px 6px 0 var(--maze);
}
.hero-year {
  font-size: 26px;
  margin: 14px 0 6px;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(0,255,255,.7);
  letter-spacing: 6px;
}
.hero-subtitle { font-size: 16px; line-height: 1.45; color: var(--muted); margin: 6px 0 20px; }
.hero-subtitle b { color: var(--text); }

.step-label { font-size: 9px; color: var(--cyan); margin: 0 0 12px; letter-spacing: 1px; }
.step-label--hot { color: var(--red); }

.screen-title { font-size: 15px; line-height: 1.55; margin: 0 0 10px; color: var(--yellow); }

.helper-text { font-size: 16px; line-height: 1.45; color: var(--muted); margin: 0 0 16px; }
.helper-text b { color: var(--text); }

.insert-coin { font-size: 9px; color: var(--pellet); margin: 16px 0 0; }

.blink { animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }

/* ---------- Pastilla promo ---------- */
.promo-pill {
  display: inline-block;
  font-size: 8px;
  line-height: 1.6;
  color: #000;
  background: var(--yellow);
  padding: 7px 10px;
  border-radius: 6px;
  margin: 0;
  box-shadow: 0 0 14px rgba(255,230,0,.45);
}
.promo-pill--block { display: block; text-align: center; margin-bottom: 12px; }

/* ---------- Pac-Man ---------- */
.pac {
  display: inline-block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--yellow);
  animation: chomp .28s linear infinite alternate;
  flex: none;
}
.pac--mini { width: 11px; height: 11px; animation: none; clip-path: polygon(100% 25%, 50% 50%, 100% 75%, 100% 100%, 0 100%, 0 0, 100% 0); }
@keyframes chomp {
  from { clip-path: polygon(100% 18%, 50% 50%, 100% 82%, 100% 100%, 0 100%, 0 0, 100% 0); }
  to   { clip-path: polygon(100% 49%, 50% 50%, 100% 51%, 100% 100%, 0 100%, 0 0, 100% 0); }
}

/* ---------- Fantasmas ---------- */
.ghost { width: 30px; height: 30px; display: inline-block; flex: none; }
.ghost--red { color: var(--red); }
.ghost--pink { color: var(--pink); }
.ghost--cyan { color: var(--cyan); }
.ghost--orange { color: var(--orange); }
.ghost--yellow { color: var(--yellow); }

.ghost-row { display: flex; gap: 14px; justify-content: center; margin: 22px 0 6px; }
.ghost-row .ghost { animation: bob .6s steps(2) infinite alternate; }
.ghost-row .ghost:nth-child(2n) { animation-delay: .3s; }
.ghost-row--happy { align-items: center; margin: 4px 0 18px; }
@keyframes bob { to { transform: translateY(-4px); } }

/* ---------- Carril de puntos (inicio y carga) ---------- */
.chomp-lane, .load-lane {
  position: relative;
  width: 100%;
  max-width: 290px;
  height: 30px;
  margin: 10px auto 14px;
  overflow: hidden;
}
.dots {
  position: absolute;
  inset: 12px 0 auto 0;
  height: 6px;
  background: radial-gradient(circle, var(--pellet) 2.5px, transparent 3px) 0 0 / 22px 6px repeat-x;
}
.pac--run { position: absolute; top: 2px; left: -30px; z-index: 2; animation: chomp .28s linear infinite alternate, run 4.5s linear infinite; }
.pac--run::after { content: ""; }
@keyframes run { to { left: 100%; } }

/* El carril de carga: los puntos desaparecen detrás de Pac-Man */
.load-lane { max-width: 260px; }
.dots--load { animation: eat 1.6s steps(12) forwards; }
.pac--load { position: absolute; top: 2px; left: -4px; z-index: 2; animation: chomp .2s linear infinite alternate, load 1.6s steps(12) forwards; }
@keyframes load { to { left: calc(100% - 26px); } }
@keyframes eat { to { clip-path: inset(0 0 0 100%); } from { clip-path: inset(0 0 0 0); } }

/* ---------- Botones ---------- */
.arcade-btn {
  display: block;
  width: 100%;
  border: 3px solid #000;
  border-radius: 10px;
  padding: 16px 14px;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform .06s;
}
.arcade-btn:active { transform: translateY(3px); }
.arcade-btn--primary {
  background: var(--yellow);
  color: #000;
  box-shadow: 0 0 0 3px var(--yellow), 0 5px 0 3px #b39f00, 0 0 18px rgba(255,230,0,.4);
}
.arcade-btn--primary:active { box-shadow: 0 0 0 3px var(--yellow), 0 2px 0 3px #b39f00; }
.arcade-btn--ghost {
  background: transparent;
  color: var(--muted);
  border: 2px dashed var(--maze);
  font-size: 10px;
  padding: 13px;
}
.arcade-link { margin-top: 4px; }
#pageLanding .arcade-btn { max-width: 260px; }

.button-stack, .form-stack { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.form-stack .arcade-btn--primary { margin-top: 8px; }

/* ---------- Inputs ---------- */
.field-label { font-size: 8px; color: var(--pink); margin: 4px 0 -4px; }
.pixel-input {
  width: 100%;
  background: #05051a;
  color: var(--text);
  border: 2px solid var(--maze);
  border-radius: 8px;
  padding: 13px 12px;
  font-size: 16px;
  outline: none;
}
.pixel-input::placeholder { color: #6a6a9a; }
.pixel-input:focus { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255,230,0,.25); }
.pixel-textarea { min-height: 120px; resize: vertical; line-height: 1.4; }
.error-text { color: var(--danger); font-size: 15px; margin: 0; min-height: 1em; }

/* ---------- Tarjetas de juego ---------- */
.card-list { display: flex; flex-direction: column; gap: 11px; }

.game-card {
  --c: var(--cyan);
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  text-decoration: none;
  color: var(--text);
  background: #05051a;
  border: 2px solid var(--c);
  border-radius: 12px;
  padding: 13px 14px;
  cursor: pointer;
  box-shadow: 0 0 0 0 transparent, inset 0 0 0 0 transparent;
  transition: box-shadow .15s, transform .06s, background .15s;
}
.game-card:hover, .game-card:focus-visible {
  box-shadow: 0 0 14px var(--c);
  background: color-mix(in srgb, var(--c) 10%, #05051a);
  outline: none;
}
.game-card:active { transform: scale(.98); }
.game-card[hidden] { display: none; }

.game-card--pink { --c: var(--pink); }
.game-card--cyan { --c: var(--cyan); }
.game-card--red { --c: var(--red); }
.game-card--orange { --c: var(--orange); }
.game-card--yellow { --c: var(--yellow); }
.game-card--dim { --c: #4a4a8a; }

.game-card__icon { width: 34px; display: flex; justify-content: center; font-size: 24px; flex: none; }
.game-card__body { display: flex; flex-direction: column; gap: 6px; }
.game-card__title { font-size: 10px; line-height: 1.5; color: var(--c); }
.game-card--dim .game-card__title { color: var(--muted); }
.game-card__meta { font-size: 15px; line-height: 1.35; color: var(--muted); }

.level-badge { font-size: 9px; color: #000; background: var(--c); border-radius: 6px; padding: 8px 0; }

.pellet-arrow { display: flex; flex-direction: column; align-items: center; gap: 5px; margin: -2px 0; }
.pellet-arrow span { width: 6px; height: 6px; border-radius: 50%; background: var(--pellet); }
.pellet-arrow .power { width: 13px; height: 13px; animation: blink .8s steps(2, start) infinite; }
.pellet-arrow b { color: var(--yellow); font-size: 12px; line-height: 1; }

/* ---------- Resultado ---------- */
.route-map { margin: 6px 0 16px; }
.route-map__ends { display: flex; justify-content: space-between; gap: 10px; font-size: 7px; line-height: 1.5; color: var(--muted); margin-bottom: 8px; }
.route-map__ends span:last-child { text-align: right; color: var(--yellow); }
.route-map__lane {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 40px;
  padding: 0 40px 0 6px;
  border-top: 3px solid var(--maze);
  border-bottom: 3px solid var(--maze);
}
.route-map__lane span { width: 7px; height: 7px; border-radius: 50%; background: var(--pellet); }
.route-map__lane span.eaten { background: transparent; }
.pac--map { position: absolute; top: 7px; width: 22px; height: 22px; animation: chomp .28s linear infinite alternate, slidein .9s steps(6) both; }
@keyframes slidein { from { left: 0; } }
.route-map__goal { position: absolute; right: 4px; top: 4px; width: 26px; height: 26px; animation: bob .6s steps(2) infinite alternate; }
.route-map__you { font-size: 8px; line-height: 1.6; color: var(--cyan); margin: 10px 0 0; }
.route-map__you b { color: var(--text); }

.ask-card {
  border: 3px solid var(--yellow);
  border-radius: 14px;
  padding: 16px 14px;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(255,230,0,.14), transparent 70%), #05051a;
  box-shadow: 0 0 22px rgba(255,230,0,.25);
  margin-bottom: 16px;
}
.ask-card__label { font-size: 9px; color: var(--pink); margin: 0 0 10px; }
.ask-card__plan { font-size: 18px; line-height: 1.4; color: var(--yellow); margin: 0 0 10px; text-shadow: 2px 2px 0 var(--red); }
.ask-card__desc { font-size: 15px; line-height: 1.4; color: var(--text); margin: 0; }

.missions { margin-bottom: 14px; }
.missions__label { font-size: 8px; color: var(--cyan); margin: 0 0 10px; }
.missions ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.missions li { position: relative; padding-left: 22px; font-size: 16px; line-height: 1.35; }
.missions li::before { content: ""; position: absolute; left: 3px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--pellet); }

.note { font-size: 14px; line-height: 1.45; color: var(--muted); margin: 0 0 16px; padding: 10px 12px; border-left: 3px solid var(--pink); }
.note b { color: var(--text); }

/* ---------- Controles ---------- */
.controls { display: flex; align-items: center; gap: 12px; padding: 0 2px; }
.control-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 3px solid #000;
  background: var(--red);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 0 #8a0f0f;
  flex: none;
}
.control-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #8a0f0f; }
.progress { flex: 1; height: 10px; border: 2px solid var(--maze); border-radius: 6px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--yellow); transition: width .3s steps(6); }
.credit { font-size: 7px; color: var(--muted); }

/* ---------- Idioma ES / EN ---------- */
.lang-toggle { display: flex; flex: none; border: 2px solid var(--maze); border-radius: 8px; overflow: hidden; }
.lang-btn {
  font-family: var(--pixel); font-size: 8px; letter-spacing: 1px;
  background: transparent; color: var(--muted);
  border: 0; padding: 8px 8px; min-height: 32px; cursor: pointer;
}
.lang-btn + .lang-btn { border-left: 2px solid var(--maze); }
.lang-btn.is-on { background: var(--yellow); color: #000; }
.lang-btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }

@media (max-width: 380px) {
  body { padding: 6px; }
  .cabinet { padding: 10px 10px 10px; }
  .screen { padding: 18px 12px 20px; }
  .hero-title { font-size: 28px; }
  .credit { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; animation-iteration-count: 1 !important; }
}

/* ---------- Power pellet ---------- */
.power-dot {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--pellet);
  box-shadow: 0 0 10px var(--pellet);
  animation: blink .8s steps(2, start) infinite;
  flex: none;
}
.power-dot--big { width: 18px; height: 18px; }

.power-line {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  max-width: 300px;
  margin: 4px auto 4px;
  padding: 10px 12px;
  border: 2px dashed var(--maze);
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--text);
}
.power-line b { color: var(--yellow); }

.scared-row { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 4px 0 14px; }
.scared-row[hidden], .power-quote[hidden] { display: none; }
.ghost--scared { color: var(--scared); animation: scared .4s steps(2) infinite; }
@keyframes scared { 50% { color: #f4f4ff; } }

.power-quote {
  font-size: 17px;
  line-height: 1.45;
  font-weight: 700;
  color: var(--yellow);
  text-align: center;
  margin: 0 0 14px;
}

/* ---------- Ajustes de lanzamiento ---------- */
.hero-meta { font-family: var(--pixel); font-size: 8px; color: var(--cyan); margin: 14px 0 14px; }
#pageLanding .hero-subtitle { margin: 4px 0 14px; color: var(--text); }

.pixel-check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.4; color: var(--text); cursor: pointer; }
.pixel-check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--yellow); flex: none; }

.privacy { font-size: 14px; color: var(--muted); }
.privacy summary { cursor: pointer; color: var(--cyan); text-decoration: underline; }
.privacy p { line-height: 1.45; margin: 8px 0 0; }

.arcade-btn[disabled] { opacity: .6; cursor: wait; }
.arcade-btn[hidden] { display: none; }

.program-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.program-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 2px solid var(--maze); border-radius: 12px; padding: 12px; background: #05051a;
}
.program-row__name { font-size: 15px; line-height: 1.3; }
.program-row__chips { display: flex; gap: 6px; flex: none; }
.chip-btn {
  font-family: var(--pixel); font-size: 8px;
  padding: 9px 8px; border-radius: 8px; cursor: pointer;
  background: transparent; color: var(--muted); border: 2px solid #4a4a8a;
}
.chip-btn.is-on[data-when="active"] { background: var(--yellow); color: #000; border-color: var(--yellow); }
.chip-btn.is-on[data-when="former"] { background: var(--cyan); color: #000; border-color: var(--cyan); }

.bonus-tags { font-size: 15px; line-height: 1.4; color: var(--text); margin: -4px 0 16px; padding: 10px 12px; border: 2px dashed var(--cyan); border-radius: 10px; }
.bonus-tags b { color: var(--cyan); }
