/* Space Scrap Collector — canvas 1280×720 en el stage 1920×1080 */

.scrap-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;
}

.scrap-stage {
  position: relative;
  width: 1280px;
  height: 720px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 43, 214, 0.4);
  box-shadow: 0 0 40px rgba(255, 43, 214, 0.16);
  background: #05060f;
}

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

.play-hud {
  position: absolute;
  top: 16px;
  left: 20px;
  right: 20px;
  display: grid;
  grid-template-columns: auto repeat(5, minmax(0, 1fr)); /* 129y: el puntaje en su columna auto */
  align-items: center;
  gap: 12px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  font-size: var(--type-body);
  color: var(--text-muted);
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.35);
}

.play-hud strong {
  font-family: var(--font-display);
  color: var(--cyan);
  font-size: var(--type-meta);
}

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

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

.game-shell[data-layout="mobile"] .play-hud {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pickup-toast {
  position: absolute;
  top: 58px;
  left: 50%;
  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);
  box-shadow: 0 0 22px rgba(255, 209, 102, 0.28);
}

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

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

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

.heat-bar.is-hot i {
  background: linear-gradient(90deg, #ffd166, #ff2bd6);
  box-shadow: 0 0 12px rgba(255, 43, 214, 0.7);
}

.overlay-panel {
  position: absolute;
  inset: 0;
  display: none;
  place-content: center;
  text-align: center;
  padding: 48px;
  background: linear-gradient(180deg, rgba(5, 6, 15, 0.28), rgba(5, 6, 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(255, 43, 214, 0.55);
}

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

.final-score strong {
  font-family: var(--font-display);
  color: var(--cyan);
  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"] .scrap-wrap {
  height: auto;
  padding: 12px;
}

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