/* Game page shell */
.game-hero {
  position: relative;
  z-index: 1;
  padding: 2.25rem 0 1rem;
}

.game-hero__title {
  margin: 0 0 0.45rem;
  font-family: var(--display);
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  letter-spacing: 0.03em;
}

.game-hero__lead {
  margin: 0;
  color: var(--muted);
  max-width: 36rem;
}

.game-shell {
  position: relative;
  z-index: 1;
  padding: 0.5rem 0 2rem;
}

.game-stage {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  aspect-ratio: 9 / 16;
  max-height: min(72dvh, 640px);
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(61, 255, 240, 0.28);
  box-shadow:
    0 0 0 1px rgba(122, 92, 255, 0.15),
    0 24px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(61, 255, 240, 0.12);
  background: #0a1524;
  touch-action: none;
}

.game-stage canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.skyhop-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.skyhop-hud__score {
  position: absolute;
  top: 0.85rem;
  left: 0;
  right: 0;
  text-align: center;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.8rem, 7vw, 2.4rem);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.skyhop-hud__best,
.skyhop-hud__tip {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  margin: 0;
  font-size: 0.82rem;
  color: rgba(232, 241, 255, 0.85);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.skyhop-hud__best { top: 3.3rem; }
.skyhop-hud__tip { bottom: 1.25rem; }

.skyhop-over {
  pointer-events: auto;
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 1.25rem;
  background: rgba(4, 8, 16, 0.72);
  backdrop-filter: blur(6px);
  text-align: center;
}

.skyhop-over[hidden] { display: none !important; }

.skyhop-over__title {
  margin: 0;
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--neon);
}

.skyhop-over__score {
  margin: 0;
  font-size: 1.05rem;
}

.skyhop-over .btn { min-width: 10rem; }

.game-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin: 1.15rem auto 0;
  max-width: 420px;
}

.game-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 1rem auto 0;
  max-width: 420px;
}

.game-stat {
  padding: 0.75rem 0.5rem;
  text-align: center;
}
.game-stat strong {
  display: block;
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--neon);
}
.game-stat span {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.score-form {
  margin: 1.5rem auto 0;
  max-width: 420px;
  padding: 1.15rem 1.1rem;
}

.score-form[hidden] { display: none !important; }

.score-form h3 {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.05em;
}

.score-form p {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.score-form__row {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.score-form input {
  width: 100%;
  min-height: 2.75rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0.7rem 0.9rem;
  font: 600 1rem/1.2 var(--font);
}

.score-form__msg {
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
  color: var(--ok);
}
.score-form__msg.is-error { color: #ff7b9c; }

.game-back {
  text-align: center;
  margin: 2rem 0 0;
}

@media (max-width: 420px) {
  .game-stage {
    max-width: 100%;
    border-radius: 16px;
    max-height: min(68dvh, 560px);
  }
}
