@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600;700&display=swap");
:root {
  color-scheme: dark;
  font-family: "Space Grotesk", system-ui, sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #f6f5ff;
  background: radial-gradient(
    ellipse at 50% 46%,
    #171638 0,
    #0a0b1c 48%,
    #050610 100%
  );
}
.wrap {
  width: min(100vw, 1040px);
  padding: 22px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto 13px;
  max-width: 900px;
}
.brand {
  letter-spacing: 0.18em;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
}
.brand b {
  color: #f735e9;
}
.brand i {
  color: #4cf8ff;
  font-style: normal;
}
.music-toggle {
  border: 1px solid #49416b;
  border-radius: 4px;
  background: #141329;
  color: #d4d0ee;
  padding: 7px 10px;
  font-size: 10px;
  letter-spacing: 0.1em;
  box-shadow: none;
}
.music-toggle[aria-pressed="true"] {
  color: #83ffe5;
  border-color: #3a967f;
}
.scorebox {
  text-align: right;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: #9795b5;
}
.scorebox strong {
  display: block;
  font-size: 23px;
  letter-spacing: 0.04em;
  color: #fff;
}
.stage {
  position: relative;
  border: 1px solid #3c2b64;
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 0 50px #c72bff18,
    inset 0 0 40px #17132d;
  background: #0b0c1d;
}
.stage:fullscreen {
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: #080918;
}
.stage:fullscreen canvas {
  width: min(100vw, 177.78vh);
  height: min(100vh, 56.25vw);
  aspect-ratio: 16/9;
}
canvas {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  touch-action: manipulation;
}
.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  background: #08081875;
  transition: opacity 0.2s;
}
.overlay {
  z-index: 1;
}
.overlay.hidden {
  opacity: 0;
  pointer-events: none;
}
.fullscreen-toggle {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  padding: 8px 10px;
  border: 1px solid #49416b;
  border-radius: 4px;
  background: #111126d9;
  color: #e7e3ff;
  font-size: 10px;
  letter-spacing: 0.1em;
  box-shadow: 0 0 12px #08081888;
}
.card {
  padding: 24px;
}
h1 {
  margin: 0 0 7px;
  font-size: clamp(35px, 7vw, 68px);
  line-height: 1;
  letter-spacing: -0.06em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 24px #e633ff88;
}
h1 span {
  color: #fb41df;
}
h1 em {
  color: #4cf8ff;
  font-style: normal;
  text-shadow: 0 0 20px #4cf8ff88;
}
.sub {
  margin: 15px 0 22px;
  color: #c0bed6;
  font-size: 14px;
}
.howto {
  margin: 0 auto 20px;
  max-width: 440px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  color: #c3bfd9;
  font-size: 12px;
}
.howto span {
  padding: 7px 10px;
  border: 1px solid #393552;
  border-radius: 4px;
  background: #100f25cc;
}
.howto b {
  margin-right: 6px;
  color: #ff55dd;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-shadow: 0 0 9px #ff35df88;
}
button {
  border: 0;
  border-radius: 5px;
  background: linear-gradient(100deg, #ff36c8, #9a55ff);
  color: white;
  padding: 13px 27px;
  font: 700 12px inherit;
  font-family: inherit;
  letter-spacing: 0.15em;
  cursor: pointer;
  box-shadow: 0 0 24px #ed35e755;
}
button:hover {
  filter: brightness(1.13);
  transform: translateY(-1px);
}
footer {
  display: flex;
  justify-content: space-between;
  max-width: 900px;
  margin: 12px auto 0;
  color: #777692;
  font-size: 11px;
  letter-spacing: 0.08em;
}
kbd {
  color: #c7c4e0;
  border: 1px solid #44415e;
  border-radius: 3px;
  padding: 2px 6px;
}
@media (max-width: 600px) {
  .wrap {
    padding: 10px;
  }
  .stage {
    border-radius: 8px;
  }
  footer {
    font-size: 9px;
  }
}

@media (max-width: 600px) {
  h1 {
    font-size: clamp(23px, 6vw, 35px);
  }
  .card {
    padding: 10px;
  }
  .sub {
    margin: 8px 0;
  }
  .howto {
    margin-bottom: 8px;
    font-size: 10px;
  }
  .howto span {
    padding: 3px 5px;
  }
  header {
    gap: 6px;
  }
  .brand {
    font-size: 10px;
  }
}
