/* =========================================================================
   NEON RUSH — hoja de estilos principal
   Paleta: fondo profundo + acentos cian / magenta / amarillo neón.
   Responsive: móvil primero, adaptable a escritorio.
   ========================================================================= */

:root {
  --bg-0: #05010f;
  --bg-1: #0b0424;
  --bg-panel: rgba(12, 6, 34, 0.86);
  --line: rgba(120, 90, 255, 0.35);

  --cyan: #00f0ff;
  --magenta: #ff2bd6;
  --yellow: #ffd60a;
  --green: #00ffa3;
  --red: #ff3b5c;
  --violet: #9d4dff;
  --text: #eaf7ff;
  --text-dim: #93a4c7;

  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* El atributo hidden debe ganar siempre a cualquier display de clase */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font);
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#app {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

canvas#game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  background: var(--bg-0);
}

/* Utilidad accesible */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* =============================== HUD =============================== */
.hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  padding: calc(10px + var(--safe-t)) calc(12px + var(--safe-r))
           calc(12px + var(--safe-b)) calc(12px + var(--safe-l));
  z-index: 5;
}
.hud[hidden] { display: none; }

.hud__row {
  position: absolute;
  left: calc(12px + var(--safe-l));
  right: calc(12px + var(--safe-r));
  display: flex;
  align-items: center;
  gap: 10px;
}
.hud__row--top { top: calc(10px + var(--safe-t)); justify-content: space-between; }
.hud__row--combo { top: calc(58px + var(--safe-t)); justify-content: center; }
.hud__row--bottom {
  bottom: calc(14px + var(--safe-b));
  justify-content: space-between;
  align-items: flex-end;
}

/* Control táctil visible en móviles y tabletas, incluso si el navegador informa
   un puntero principal fino (por ejemplo, modo escritorio o accesorios conectados). */
.hud__controls-left {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  pointer-events: auto;
}

.hud__status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 2px;
}
.shield-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 3px 7px;
  border: 1px solid rgba(137, 158, 190, 0.26);
  border-radius: 8px;
  background: rgba(8, 4, 26, 0.68);
  color: rgba(153, 171, 198, 0.42);
  opacity: 0.72;
  transition: color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}
.shield-indicator svg { width: 17px; height: 19px; flex: 0 0 auto; }
.shield-indicator span {
  font-size: 8px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.09em;
}
.shield-indicator.is-active {
  color: #00f0ff;
  border-color: rgba(0, 240, 255, 0.88);
  opacity: 1;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.35), inset 0 0 10px rgba(0, 240, 255, 0.12);
  animation: shield-pulse 1.8s ease-in-out infinite;
}
@keyframes shield-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(0, 240, 255, 0.25), inset 0 0 8px rgba(0, 240, 255, 0.1); }
  50% { box-shadow: 0 0 19px rgba(0, 240, 255, 0.5), inset 0 0 12px rgba(0, 240, 255, 0.2); }
}

.blaster-indicator {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 70px;
  padding: 4px 7px 5px;
  border: 1px solid rgba(153, 125, 180, 0.28);
  border-radius: 8px;
  background: rgba(8, 4, 26, 0.72);
  color: rgba(180, 157, 198, 0.48);
  opacity: 0.76;
  transition: color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}
.blaster-indicator__top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.blaster-indicator__top svg { width: 16px; height: 16px; flex: 0 0 auto; }
.blaster-indicator__top span {
  font-size: 8px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.1em;
}
.blaster-indicator__track {
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(255,255,255,0.14);
}
#blaster-timer-fill {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: #ff2bd6;
  box-shadow: 0 0 8px #ff2bd6;
}
.blaster-indicator.is-active {
  color: #ff70e7;
  border-color: rgba(255, 43, 214, 0.86);
  opacity: 1;
  box-shadow: 0 0 15px rgba(255, 43, 214, 0.28), inset 0 0 9px rgba(255, 43, 214, 0.1);
}
@media (max-width: 560px) {
  .blaster-indicator { width: 62px; padding: 3px 5px 4px; }
  .blaster-indicator__top svg { width: 14px; height: 14px; }
  .blaster-indicator__top span { font-size: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .blaster-indicator { transition: none; }
}
@media (max-width: 560px) {
  .hud__controls-left { gap: 7px; }
  .hud__status { gap: 7px; }
  .shield-indicator { min-height: 23px; padding: 2px 5px; }
  .shield-indicator svg { width: 15px; height: 17px; }
  .shield-indicator span { font-size: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .shield-indicator.is-active { animation: none; }
}

.move-stick {
  display: none;
  position: relative;
  flex: 0 0 auto;
  width: 104px;
  height: 104px;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
html.has-touch .move-stick { display: block !important; }
.move-stick__label {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(183, 210, 255, 0.82);
  font-size: 8px;
  line-height: 10px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.55);
  white-space: nowrap;
}
.move-stick__ring {
  position: absolute;
  left: 50%;
  top: 14px;
  width: 88px;
  height: 88px;
  transform: translateX(-50%);
  border: 1px solid rgba(0, 240, 255, 0.64);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.11) 0%, rgba(8, 4, 26, 0.68) 72%, rgba(8, 4, 26, 0.82) 100%);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.19), inset 0 0 18px rgba(0, 240, 255, 0.16);
}
.move-stick__axis {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  background: rgba(132, 166, 255, 0.28);
  pointer-events: none;
}
.move-stick__axis--x { width: 66%; height: 1px; transform: translate(-50%, -50%); }
.move-stick__axis--y { width: 1px; height: 66%; transform: translate(-50%, -50%); }
.move-stick__knob {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  transform: translate(calc(-50% + var(--stick-x, 0px)), calc(-50% + var(--stick-y, 0px)));
  border: 1.5px solid rgba(0, 240, 255, 0.98);
  border-radius: 50%;
  color: var(--cyan);
  font-size: 17px;
  background: radial-gradient(circle at 35% 30%, rgba(35, 70, 110, 0.98), rgba(5, 1, 15, 0.96));
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.55), inset 0 0 10px rgba(0, 240, 255, 0.24);
  will-change: transform;
  pointer-events: none;
}
.move-stick.is-active .move-stick__ring {
  border-color: rgba(0, 240, 255, 0.98);
  box-shadow: 0 0 26px rgba(0, 240, 255, 0.34), inset 0 0 20px rgba(0, 240, 255, 0.2);
}
.move-stick.is-active .move-stick__knob {
  background: radial-gradient(circle at 35% 30%, #135b78, #05010f 92%);
}
@media (max-height: 520px) {
  html.has-touch .move-stick { width: 82px; height: 82px; }
  html.has-touch .move-stick__ring { top: 11px; width: 68px; height: 68px; }
  html.has-touch .move-stick__knob { width: 30px; height: 30px; }
  html.has-touch .dash-btn { width: 62px; height: 62px; font-size: 10px; }
}


.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  background: rgba(8, 4, 26, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.12);
}
.chip__label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.chip__value {
  font-weight: 800;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.55);
}
.chip--coins .chip__value { color: var(--yellow); text-shadow: 0 0 10px rgba(255, 214, 10, 0.55); }
.chip__icon { color: var(--yellow); text-shadow: 0 0 8px var(--yellow); font-size: 14px; }
.chip--static { font-size: 13px; font-weight: 700; }

.icon-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(8, 4, 26, 0.72);
  color: var(--cyan);
  cursor: pointer;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.18);
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.icon-btn:hover { box-shadow: 0 0 20px rgba(0, 240, 255, 0.4); transform: scale(1.05); }
.icon-btn:active { transform: scale(0.94); }

/* Combo */
.combo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 16px 8px;
  background: rgba(8, 4, 26, 0.7);
  border: 1px solid rgba(255, 43, 214, 0.5);
  border-radius: 12px;
  box-shadow: 0 0 18px rgba(255, 43, 214, 0.35);
}
.combo[hidden] { display: none; }
.combo__mult {
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.05em;
  color: var(--magenta);
  text-shadow: 0 0 12px var(--magenta);
}
.combo.is-pop .combo__mult { animation: combo-pop 0.28s ease; }
.combo__track {
  width: 92px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.combo__fill {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, var(--magenta), var(--yellow));
  box-shadow: 0 0 8px var(--magenta);
}
@keyframes combo-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.45); }
  100% { transform: scale(1); }
}

/* Vidas */
.lives { display: flex; gap: 7px; font-size: 21px; line-height: 1; }
.lives .heart {
  color: var(--red);
  text-shadow: 0 0 10px var(--red);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.lives .heart--lost { color: rgba(255, 255, 255, 0.16); text-shadow: none; }
.lives .heart--hit { animation: heart-hit 0.45s ease; }
@keyframes heart-hit {
  0% { transform: scale(1); }
  40% { transform: scale(1.7); }
  100% { transform: scale(1); }
}

/* Botón de impulso (táctil) */
.dash-btn {
  pointer-events: auto;
  position: relative;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  border: 2px solid rgba(0, 240, 255, 0.65);
  background: radial-gradient(circle at 50% 38%, rgba(0, 240, 255, 0.2), rgba(8, 4, 26, 0.85));
  color: var(--cyan);
  font-family: var(--font);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.1em;
  cursor: pointer;
  box-shadow: 0 0 22px rgba(0, 240, 255, 0.35), inset 0 0 16px rgba(0, 240, 255, 0.15);
  overflow: hidden;
  transition: transform 0.1s ease;
}
.dash-btn:active { transform: scale(0.93); }
.dash-btn.is-ready { animation: dash-ready 1.6s ease-in-out infinite; }
.dash-btn.is-firing { animation: dash-fire 0.3s ease; }
.dash-btn__label { position: relative; z-index: 1; }
.dash-btn__cd {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: calc(var(--cd, 0) * 100%);
  background: rgba(5, 1, 15, 0.78);
  pointer-events: none;
}
@keyframes dash-ready {
  0%, 100% { box-shadow: 0 0 14px rgba(0, 240, 255, 0.3); }
  50% { box-shadow: 0 0 28px rgba(0, 240, 255, 0.7); }
}
@keyframes dash-fire {
  0% { transform: scale(1); }
  35% { transform: scale(1.18); filter: brightness(1.8); }
  100% { transform: scale(1); }
}

/* =============================== Pantallas =============================== */
#screens { position: absolute; inset: 0; z-index: 10; pointer-events: none; }

.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* el centrado lo dan los márgenes auto (seguros al desbordar) */
  gap: clamp(12px, 2.6vh, 26px);
  padding: calc(18px + var(--safe-t)) calc(18px + var(--safe-r))
           calc(18px + var(--safe-b)) calc(18px + var(--safe-l));
  overflow-y: auto;
  touch-action: pan-y;
  pointer-events: auto;
  background: radial-gradient(120% 100% at 50% 0%, rgba(11, 4, 36, 0.55), rgba(5, 1, 15, 0.88) 70%);
  animation: screen-in 0.3s ease both;
}
.screen--active { display: flex; }
/* Centrado vertical seguro: si el contenido desborda, los auto colapsan a 0
   y el usuario puede hacer scroll hasta el principio. */
.screen--active > :first-child { margin-top: auto; }
.screen--active > :last-child { margin-bottom: auto; }
.screen--dim { background: rgba(3, 1, 10, 0.78); backdrop-filter: blur(7px); }
.screen[hidden] { display: none !important; }
@keyframes screen-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.screen__header {
  width: min(560px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.screen__title {
  margin: 0;
  font-size: clamp(24px, 5vw, 34px);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: 0 0 18px rgba(0, 240, 255, 0.6);
}
.screen__title--danger { color: var(--red); text-shadow: 0 0 18px rgba(255, 59, 92, 0.65); }
.screen__sub { margin: -4px 0 4px; color: var(--text-dim); font-size: 14px; text-align: center; }
.screen__footer { width: min(560px, 100%); display: flex; justify-content: center; }

/* ---- Menú ---- */
.menu__header { text-align: center; animation: title-in 0.6s ease both; }
.menu__kicker {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--magenta);
  text-shadow: 0 0 10px rgba(255, 43, 214, 0.7);
}
.title {
  margin: 0;
  font-size: clamp(44px, 12vw, 96px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0.04em;
}
.title__neon {
  color: var(--cyan);
  text-shadow: 0 0 8px #fff, 0 0 24px var(--cyan), 0 0 64px rgba(0, 240, 255, 0.55);
  animation: neon-flicker 4.5s linear infinite;
}
.title__rush {
  color: var(--magenta);
  text-shadow: 0 0 8px #fff, 0 0 24px var(--magenta), 0 0 64px rgba(255, 43, 214, 0.55);
}
.menu__tagline { margin: 12px 0 0; color: var(--text-dim); letter-spacing: 0.14em; font-size: clamp(12px, 2.6vw, 15px); }
@keyframes title-in {
  from { opacity: 0; transform: scale(0.92); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes neon-flicker {
  0%, 18%, 22%, 62%, 100% { opacity: 1; }
  20% { opacity: 0.6; }
  64% { opacity: 0.85; }
}

.menu__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 130px));
  gap: 10px;
  justify-content: center;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 8px 9px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 0 22px rgba(0, 240, 255, 0.05);
}
.stat__label { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-dim); }
.stat__value { font-weight: 800; font-size: clamp(15px, 3.6vw, 19px); font-variant-numeric: tabular-nums; }
.stat--coin .stat__value { color: var(--yellow); text-shadow: 0 0 10px rgba(255, 214, 10, 0.5); }

.progress {
  display: block;
  width: 100%;
  height: 7px;
  margin-top: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
}
.progress--sm { height: 5px; width: 82%; }
.progress__fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  box-shadow: 0 0 8px var(--cyan);
  transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.menu__actions { display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(480px, 100%); }
.menu__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
}
.menu__footer { min-height: 20px; }
.hint { font-size: 13px; color: var(--green); text-shadow: 0 0 10px rgba(0, 255, 163, 0.5); }

/* ---- Botones ---- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(14, 7, 40, 0.85);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.btn:hover { border-color: rgba(0, 240, 255, 0.7); box-shadow: 0 0 18px rgba(0, 240, 255, 0.28); transform: translateY(-1px); }
.btn:active { transform: scale(0.97); }
.btn:focus-visible,
.icon-btn:focus-visible,
.tab:focus-visible,
.shop-card:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.btn--primary {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.18), rgba(255, 43, 214, 0.18));
  border-color: rgba(0, 240, 255, 0.75);
  color: #fff;
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.8);
  box-shadow: 0 0 22px rgba(0, 240, 255, 0.3), inset 0 0 24px rgba(0, 240, 255, 0.1);
}
.btn--primary:hover { box-shadow: 0 0 34px rgba(0, 240, 255, 0.55), inset 0 0 24px rgba(0, 240, 255, 0.16); }
.btn--big {
  min-height: 62px;
  font-size: clamp(18px, 4.6vw, 22px);
  letter-spacing: 0.18em;
  animation: pulse-big 2s ease-in-out infinite;
}
@keyframes pulse-big {
  0%, 100% { box-shadow: 0 0 18px rgba(0, 240, 255, 0.35); }
  50% { box-shadow: 0 0 40px rgba(0, 240, 255, 0.75); }
}
.btn--ghost { background: rgba(10, 5, 30, 0.72); color: var(--text-dim); }
.btn--ghost:hover { color: var(--text); }
.btn--reward {
  border-color: rgba(255, 214, 10, 0.8);
  color: var(--yellow);
  box-shadow: 0 0 16px rgba(255, 214, 10, 0.25);
}
.btn[disabled] { opacity: 0.45; pointer-events: none; }

/* ---- Paneles (pausa / derrota) ---- */
.panel {
  width: min(440px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: clamp(20px, 4vh, 34px) clamp(18px, 4vw, 30px);
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 0 60px rgba(0, 240, 255, 0.14), inset 0 0 40px rgba(57, 0, 110, 0.25);
  text-align: center;
  animation: panel-in 0.35s cubic-bezier(0.2, 0.9, 0.25, 1.2) both;
}
@keyframes panel-in {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
.panel__sub { margin: 0; color: var(--text-dim); font-size: 14px; }
.panel__actions { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.panel__row { display: flex; gap: 10px; }
.panel__row .btn { flex: 1; }

.record-badge {
  margin: 0;
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0.16em;
  color: var(--yellow);
  border: 1px solid rgba(255, 214, 10, 0.7);
  background: rgba(255, 214, 10, 0.08);
  text-shadow: 0 0 14px var(--yellow);
  animation: record-glow 1.1s ease-in-out infinite alternate;
}
.record-badge[hidden] { display: none; }
@keyframes record-glow {
  from { box-shadow: 0 0 10px rgba(255, 214, 10, 0.35); }
  to { box-shadow: 0 0 30px rgba(255, 214, 10, 0.85); }
}

.go-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  width: 100%;
}
.go-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 8px;
  background: rgba(5, 1, 15, 0.6);
  border: 1px solid rgba(120, 90, 255, 0.22);
  border-radius: 12px;
}
.go-stat--main { grid-column: 1 / -1; }
.go-stat__label { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-dim); }
.go-stat__value { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.go-stat--main .go-stat__value { font-size: clamp(34px, 9vw, 46px); color: var(--cyan); text-shadow: 0 0 18px rgba(0, 240, 255, 0.65); }
.go-stat--coin .go-stat__value { color: var(--yellow); }

.go-level { width: 100%; display: flex; flex-direction: column; gap: 3px; }
.go-level__text { font-weight: 800; font-size: 15px; color: var(--violet); text-shadow: 0 0 10px rgba(157, 77, 255, 0.7); }
.go-level__xp { font-size: 12px; color: var(--text-dim); }

/* ---- Pestañas / Tienda ---- */
.tabs { display: flex; gap: 8px; }
.tab {
  min-height: 42px;
  padding: 8px 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s ease;
}
.tab--active {
  color: var(--bg-0);
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.55);
}

.shop-grid {
  width: min(620px, 100%);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  max-height: min(56vh, 520px);
  overflow-y: auto;
  padding: 4px;
  touch-action: pan-y;
}
.shop-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 14px 10px 12px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.shop-card:hover { transform: translateY(-3px); border-color: rgba(0, 240, 255, 0.6); box-shadow: 0 8px 26px rgba(0, 240, 255, 0.2); }
.shop-card--equipped { border-color: var(--green); box-shadow: 0 0 18px rgba(0, 255, 163, 0.35); }
.shop-card--locked .shop-card__name { color: var(--text-dim); }
.shop-card__preview {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.07), transparent 70%);
}
.shop-card__name { font-weight: 800; font-size: 15px; letter-spacing: 0.06em; }
.shop-card__tag { font-size: 11px; color: var(--text-dim); text-align: center; min-height: 14px; }
.shop-card__price { font-size: 13px; font-weight: 800; color: var(--yellow); }
.shop-card--equipped .shop-card__price { color: var(--green); }
.shop-card--noafford { opacity: 0.65; }
.shop-card.is-shake { animation: shake 0.4s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  50% { transform: translateX(7px); }
  75% { transform: translateX(-4px); }
}

/* ---- Retos diarios ---- */
.daily-list {
  width: min(560px, 100%);
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.daily-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 14px;
  align-items: center;
  padding: 14px 16px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s ease;
}
.daily-card--done { border-color: rgba(0, 255, 163, 0.65); box-shadow: 0 0 16px rgba(0, 255, 163, 0.18); }
.daily-card--claimable { animation: daily-pulse 1.4s ease-in-out infinite; }
@keyframes daily-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 214, 10, 0.25); }
  50% { box-shadow: 0 0 26px rgba(255, 214, 10, 0.6); }
}
.daily-card__title { font-weight: 700; font-size: 15px; }
.daily-card__meta { font-size: 12px; color: var(--text-dim); }
.daily-card__progress { grid-column: 1 / -1; }
.daily-card__reward { font-size: 13px; font-weight: 800; color: var(--yellow); text-align: right; }
.daily-card .btn { grid-column: 1 / -1; min-height: 42px; }
.daily-card .btn--claimed { border-color: rgba(0, 255, 163, 0.5); color: var(--green); pointer-events: none; }

/* ---- Cómo jugar ---- */
.how { width: min(560px, 100%); display: flex; flex-direction: column; gap: 16px; }
.how__list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; line-height: 1.45; color: var(--text); }
.how__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.how__col {
  padding: 13px 15px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.how__col h3 { margin: 0 0 8px; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan); }
.how__col ul { margin: 0; padding-left: 16px; font-size: 13.5px; line-height: 1.7; color: var(--text-dim); }
kbd {
  display: inline-block;
  min-width: 22px;
  padding: 1px 6px;
  margin: 0 1px;
  border: 1px solid rgba(0, 240, 255, 0.5);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: rgba(0, 240, 255, 0.1);
  color: var(--cyan);
  font-family: var(--font);
  font-size: 12px;
  text-align: center;
}

/* ---- Toast ---- */
.toast {
  position: absolute;
  left: 50%;
  top: calc(76px + var(--safe-t));
  transform: translateX(-50%);
  z-index: 30;
  padding: 11px 22px;
  background: rgba(8, 4, 26, 0.94);
  border: 1px solid var(--cyan);
  border-radius: 999px;
  font-weight: 800;
  font-size: 14.5px;
  letter-spacing: 0.06em;
  color: var(--text);
  box-shadow: 0 0 26px rgba(0, 240, 255, 0.45);
  pointer-events: none;
  animation: toast-in 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
}
.toast[hidden] { display: none; }
.toast--gold { border-color: var(--yellow); box-shadow: 0 0 26px rgba(255, 214, 10, 0.5); color: var(--yellow); }
.toast--danger { border-color: var(--red); box-shadow: 0 0 26px rgba(255, 59, 92, 0.5); color: var(--red); }
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, -14px) scale(0.9); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

/* Destello de daño */
#app.is-damaged::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  background: radial-gradient(circle, transparent 42%, rgba(255, 40, 80, 0.45) 100%);
  animation: damage-flash 0.45s ease-out both;
}
@keyframes damage-flash {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* =============================== Responsive =============================== */
@media (max-width: 640px) {
  .menu__stats { grid-template-columns: repeat(2, minmax(110px, 150px)); }
  .chip__label { display: none; }
  .how__cols { grid-template-columns: 1fr; }
  .dash-btn { width: 74px; height: 74px; }
  .go-stat__value { font-size: 17px; }
}

/* Escritorio con puntero fino: el impulso va con teclado, se oculta el botón táctil */
@media (pointer: fine) {
  .dash-btn { display: none; }
}

/* Pantallas bajas (móvil horizontal) */
@media (max-height: 520px) {
  .title { font-size: clamp(34px, 9vh, 56px); }
  .menu__tagline { margin-top: 6px; }
  .menu__stats { gap: 7px; }
  .stat { padding: 7px 6px; }
  .btn--big { min-height: 52px; }
  .screen { gap: 10px; }
  .shop-grid { max-height: 48vh; }
}

/* Accesibilidad: movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}
