/* Shared game stage chrome */
.game-shell {
  position: relative;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 10% 0%, rgba(61, 255, 194, 0.14), transparent 50%),
    radial-gradient(90% 70% at 100% 100%, rgba(255, 107, 74, 0.16), transparent 45%),
    linear-gradient(160deg, var(--ink-2), var(--ink));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.game-hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 18, 31, 0.55);
  backdrop-filter: blur(8px);
}

.game-hud .stat {
  display: flex;
  flex-direction: column;
  min-width: 4.5rem;
}

.game-hud .stat span {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mist);
}

.game-hud .stat strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.game-stage {
  position: relative;
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(rgba(232, 244, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 244, 255, 0.04) 1px, transparent 1px),
    #081628;
  background-size: 36px 36px, 36px 36px, auto;
}

.game-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

.game-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(7, 18, 31, 0.72);
  backdrop-filter: blur(6px);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.game-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.game-overlay h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: -0.03em;
}

.game-overlay p {
  margin: 0 auto 1.2rem;
  max-width: 28rem;
  color: var(--mist);
}

.game-overlay .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.game-hint {
  padding: 0.7rem 1.1rem 1rem;
  color: var(--mist);
  font-size: 0.92rem;
  border-top: 1px solid var(--line);
}

.game-hint kbd {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.8rem;
}

@media (max-width: 640px) {
  .game-stage {
    aspect-ratio: 4 / 5;
  }
}
