/* Lunar Pulse Jumper — canvas 1280×720 en el stage 1920×1080 */

.jumper-wrap {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 20px 40px 40px;
  height: calc(100% - var(--vu-hud-h, 100px));
  box-sizing: border-box;
}

.jumper-stage {
  position: relative;
  width: 1280px;
  height: 720px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 209, 102, 0.28);
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.14);
  background: #07080f;
}

#game {
  display: block;
  width: 1280px;
  height: 720px;
  touch-action: none;
}

.play-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  /* Grilla fija de 5 columnas × 2 filas: cada dato tiene su celda y no salta de fila
     cuando cambia el texto (antes saltaban de fila y en Infinito parpadeaba). */
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  gap: 8px 12px;
  padding: 12px 20px 16px;
  pointer-events: none;
  font-family: var(--font-display);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  color: var(--text);
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.35);
  background: linear-gradient(180deg, rgba(7, 8, 20, 0.92), rgba(7, 8, 20, 0.55) 70%, rgba(7, 8, 20, 0));
}

#hud-thrust.is-ready,
#hud-pulse.is-ready {
  color: #00f0ff;
  text-shadow: 0 0 14px rgba(0, 240, 255, 0.75);
}

#hud-thrust.is-cool,
#hud-pulse.is-cool {
  color: #b06a9a;
  text-shadow: none;
}

#hud-multi {
  color: #ffd6f5;
}

#hud-multi.is-hot {
  color: #ffd166;
  text-shadow: 0 0 14px rgba(255, 209, 102, 0.7);
}

#hud-grav.is-high {
  color: #ff2bd6;
  text-shadow: 0 0 12px rgba(255, 43, 214, 0.7);
}

#hud-grav.is-micro {
  color: #7affc4;
  text-shadow: 0 0 12px rgba(122, 255, 196, 0.7);
}

.play-hud > * {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.battery-bar {
  display: inline-block;
  width: 110px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 240, 255, 0.45);
  background: rgba(5, 6, 15, 0.7);
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.battery-bar i {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #00f0ff, #7b5cff);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.65);
}

.battery-bar.is-nitro i {
  background: linear-gradient(90deg, #ff2bd6, #ffd166);
}

.battery-bar.is-low i {
  background: linear-gradient(90deg, #ff2bd6, #ffd166);
}

.pickup-toast {
  position: absolute;
  top: 78px;
  left: 50%;
  z-index: 5;
  transform: translateX(-50%);
  pointer-events: none;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid #ffd166;
  background: rgba(12, 14, 28, 0.82);
  color: #ffd166;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.12em;
  text-shadow: 0 0 12px rgba(255, 209, 102, 0.65);
}

.touch-actions {
  display: none;
}

.final-meters {
  margin-top: -12px !important;
  color: var(--text-muted) !important;
}

.play-hud[hidden] {
  display: none;
}

.overlay-panel {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: none;
  place-content: center;
  text-align: center;
  padding: 48px;
  background: linear-gradient(180deg, rgba(7, 8, 15, 0.25), rgba(7, 8, 15, 0.84));
  pointer-events: none;
}

.overlay-panel.is-open {
  display: grid;
  pointer-events: auto;
  animation: panel-in 0.28s ease;
}

.overlay-panel h1,
.overlay-panel h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: var(--type-title);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 0 22px rgba(0, 240, 255, 0.5);
}

.overlay-panel p {
  margin: 0 auto 22px;
  max-width: 54ch;
  color: var(--text-muted);
  font-size: var(--type-body);
}

.final-score {
  color: var(--text) !important;
}

.final-score strong {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 48px;
}

.save-note {
  min-height: 1.4em;
  color: var(--cyan) !important;
}

.overlay-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

kbd {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(0, 240, 255, 0.08);
  color: var(--cyan);
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.game-shell[data-layout="mobile"] .jumper-wrap {
  height: auto;
  padding: 12px;
}

.game-shell[data-layout="mobile"] .jumper-stage,
.game-shell[data-layout="mobile"] #game {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

.game-shell:is([data-layout="mobile"], [data-input="touch"]) .touch-actions {
  display: flex;
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 6;
  gap: 10px;
  pointer-events: none;
}

.game-shell:is([data-layout="mobile"], [data-input="touch"]) .touch-actions button {
  pointer-events: auto;
  min-width: 92px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 240, 255, 0.45);
  background: rgba(8, 10, 24, 0.82);
  color: #00f0ff;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-shell:is([data-layout="mobile"], [data-input="touch"]) #btn-nitro {
  border-color: rgba(255, 43, 214, 0.55);
  color: #ff2bd6;
}

html.is-preview .touch-actions {
  display: none !important;
}

/* 39: botón de salto táctil a la izquierda; tocar el canvas dispara. */
.game-shell:is([data-layout="mobile"], [data-input="touch"]) .touch-actions-left {
  right: auto;
  left: 16px;
}

.game-shell:is([data-layout="mobile"], [data-input="touch"]) #btn-jump {
  min-width: 124px;
  padding: 16px 18px;
  font-size: 18px;
}

/* 40: botón FRENO táctil. */
.game-shell:is([data-layout="mobile"], [data-input="touch"]) #btn-brake {
  border-color: rgba(255, 209, 102, 0.55);
  color: #ffd166;
}

/* 117: botones en las bandas de 80 del modo juego */
.game-shell:is([data-layout="mobile"], [data-input="touch"])[data-play="on"] #touch-jump {
  left: 4px;
  right: auto;
  top: 8px;
  bottom: 8px;
  width: 72px;
  display: grid;
}

.game-shell:is([data-layout="mobile"], [data-input="touch"])[data-play="on"] #btn-jump {
  min-width: 0;
  width: 72px;
  min-height: 40px;
  padding: 6px 4px;
  font-size: 16px;
}

.game-shell:is([data-layout="mobile"], [data-input="touch"])[data-play="on"] #touch-actions {
  right: 4px;
  left: auto;
  top: 8px;
  bottom: 8px;
  width: 72px;
  display: grid;
  grid-auto-rows: 1fr;
  gap: 8px;
}

.game-shell:is([data-layout="mobile"], [data-input="touch"])[data-play="on"] #touch-jump button,
.game-shell:is([data-layout="mobile"], [data-input="touch"])[data-play="on"] #touch-actions button {
  width: 72px;
  min-width: 0;
  min-height: 40px;
  padding: 6px 4px;
  border-radius: 12px;
  background: #0a0d1f;
  font-size: 14px;
  letter-spacing: 0.02em;
  white-space: normal;
  pointer-events: auto;
}

.game-shell:is([data-layout="mobile"], [data-input="touch"])[data-play="on"] #touch-jump #btn-jump {
  font-size: 16px;
}
