.game-page {
  min-height: calc(100vh - 86px);
  padding: clamp(1rem, 3vw, 2rem);
  background: radial-gradient(circle at 50% 10%, #293117 0, #11140e 35%, #08090c 75%);
  color: #fff;
}
.game-shell {
  width: min(920px, 100%);
  margin: auto;
}

.game-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem 2rem;
  align-items: end;
  margin-bottom: 1.25rem;
}

.game-top h1 {
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  margin: .15rem 0;
}

.game-top p {
  margin: 0;
  color: #c9cbd2;
}

.game-stats {
  display: flex;
  gap: .75rem;
}

.game-stats div {
  min-width: 88px;
  padding: .7rem .9rem;
  border: 1px solid #363a43;
  border-radius: 16px;
  background: #171920;
  text-align: center;
}

.game-stats span {
  display: block;
  color: #aeb2bc;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.game-stats strong {
  display: block;
  font-size: 1.45rem;
}

.sound-toggle {
  grid-column: 2;
  justify-self: end;
  min-height: 42px;
  padding: .55rem .9rem;
  border: 1px solid #4a505b;
  border-radius: 999px;
  background: #171920;
  color: #fff;
  font: 800 .9rem/1 inherit;
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s, transform .2s;
}

.sound-toggle span {
  display: inline-grid;
  width: 1.25rem;
  height: 1.25rem;
  margin-right: .25rem;
  place-items: center;
  border-radius: 50%;
  background: #d6ff38;
  color: #08090c;
}

.sound-toggle:hover,
.sound-toggle:focus-visible {
  border-color: #d6ff38;
  transform: translateY(-1px);
}

.sound-toggle[aria-pressed="false"] {
  color: #b8bbc3;
}

.sound-toggle[aria-pressed="false"] span {
  background: #555b66;
  color: #fff;
}

.beat-stage {
  position: relative;
  height: min(58vh, 560px);
  min-height: 390px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  border: 1px solid #333844;
  border-radius: 28px 28px 12px 12px;
  background: linear-gradient(180deg, #0d0f14, #171b20);
  box-shadow: 0 30px 80px #0008;
}

.lane {
  position: relative;
  border-right: 1px solid #2c3038;
}

.lane:last-of-type {
  border-right: 0;
}

.lane > span {
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  color: #090a0c;
  font-weight: 900;
  z-index: 3;
}

.hit-zone {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 76px;
  background: #d6ff38;
  border-top: 3px solid #f1ffae;
  box-shadow: 0 -8px 28px #d6ff3840;
}

.beat {
  position: absolute;
  top: -64px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: #d6ff38;
  box-shadow: 0 0 24px #d6ff38aa;
  transform: translateX(-50%);
  z-index: 2;
  cursor: pointer;
  touch-action: manipulation;
}

.beat.hit {
  background: #fff;
  transform: translateX(-50%) scale(1.5);
  opacity: 0;
  transition: .18s;
}

.game-message {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  text-align: center;
  background: #08090cdd;
  backdrop-filter: blur(5px);
}

.game-message.hidden {
  display: none;
}

.game-message strong {
  font-size: clamp(1.8rem, 5vw, 3.4rem);
}

.game-message span {
  color: #c9cbd2;
}

.lane-controls {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
  margin-top: .6rem;
}

.lane-controls button {
  min-height: 54px;
  border: 1px solid #363b44;
  border-radius: 10px;
  background: #171920;
  color: #fff;
  font: 800 1.1rem inherit;
  cursor: pointer;
  touch-action: manipulation;
}

.lane-controls button:active,
.lane-controls button.active {
  background: #d6ff38;
  color: #08090c;
}

.game-best {
  text-align: center;
  color: #aeb2bc;
}

.game-best strong {
  color: #fff;
}

@media (max-width: 680px) {
  .game-page {
    padding: .75rem;
  }

  .game-top {
    grid-template-columns: 1fr;
    gap: .8rem;
  }

  .game-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .game-stats div {
    min-width: 0;
  }

  .sound-toggle {
    grid-column: 1;
    justify-self: start;
  }

  .beat-stage {
    height: 54vh;
    min-height: 360px;
  }

  .beat {
    width: 46px;
    height: 46px;
  }
}
