/**
 * Shared full-viewport mini-game shell (DDR, Dash Runner, future games).
 * Import before game-specific style.css. Games override CSS variables in :root.
 */

html,
body {
  height: 100%;
}

body.game-shell {
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.game-shell .top-bar {
  flex-shrink: 0;
}

.game-shell .pad-unlock-banner {
  flex-shrink: 0;
}

.game-shell .pad-unlock-banner[hidden] {
  display: none !important;
}

.game-shell .game-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.game-shell .hud {
  flex-shrink: 0;
}

.game-shell .stage-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  width: 100%;
}

.game-shell .stage {
  position: relative;
  height: 100%;
  width: auto;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: var(--stage-ratio, 520 / 480);
  overflow: hidden;
}

.game-shell .stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.game-shell .hint {
  flex-shrink: 0;
  margin: 0;
  padding: 0.35rem 1rem 0.5rem;
  font-size: 0.75rem;
  text-align: center;
}

.game-shell .hint strong {
  font-weight: 600;
}

/* Countdown overlay — [hidden] must beat display:flex on .countdown-banner */
.game-shell .countdown-banner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  z-index: 8;
  pointer-events: none;
}

.game-shell .countdown-banner[hidden] {
  display: none !important;
}

.game-shell .countdown-banner.blocking {
  background: rgba(8, 12, 22, 0.82);
}

.game-shell .countdown-banner.speed-bump {
  background: rgba(8, 12, 22, 0.35);
}

.game-shell .countdown-sub {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.game-shell .countdown-num {
  font-size: clamp(3rem, 12vw, 5rem);
  font-weight: 900;
  line-height: 1;
  color: #fff;
  animation: shell-count-pop 0.35s ease-out;
}

@keyframes shell-count-pop {
  from {
    transform: scale(1.4);
    opacity: 0.5;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Menu / pause overlay */
.game-shell .overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}

.game-shell .overlay.hidden {
  display: none !important;
}

.game-shell .overlay.overlay-results {
  align-items: flex-end;
  padding-bottom: 1.5rem;
}
