*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: #05070a;
  overflow: hidden;
}

.scene {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: radial-gradient(ellipse 70% 60% at 50% 18%, #18222e 0%, #0b0f15 55%, #05070a 100%);
  font-family: 'Barlow Condensed', sans-serif;
  color: #dfeaf0;
  user-select: none;
  -webkit-user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  --accent: #34e2e8;
}

.stage-light {
  position: absolute;
  pointer-events: none;
  mix-blend-mode: screen;
}
.stage-light-top {
  inset: 0;
  background: radial-gradient(ellipse 46% 40% at 50% 36%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%);
}
.stage-light-bottom {
  left: 0; right: 0; bottom: 0; height: 42%;
  background: radial-gradient(ellipse 44% 100% at 50% 100%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 72%);
}

/* ── Header ──────────────────────────────────────────────── */
.header {
  text-align: center;
  z-index: 50;
}
.header-eyebrow {
  font-size: 12px;
  letter-spacing: 5px;
  color: var(--accent);
  opacity: .85;
  font-weight: 600;
}
.header-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #eef4f8;
  line-height: 1.1;
}

/* ── Device shell ────────────────────────────────────────── */
.device {
  position: relative;
  z-index: 20;
  width: min(94vw, 580px, calc(94vh - 60px));
  padding: 18px;
  border-radius: 26px;
  background: linear-gradient(165deg, #2a2e34 0%, #191c21 50%, #0f1115 100%);
  box-shadow: 0 40px 80px rgba(0,0,0,.7), 0 2px 0 rgba(255,255,255,.06) inset, 0 0 0 1px rgba(0,0,0,.6);
  border: 1px solid rgba(255,255,255,.05);
}

/* ── Console (screen + transport) ───────────────────────────*/
.console {
  display: flex;
  align-items: stretch;
  gap: 14px;
  margin-bottom: 16px;
}

.screen {
  flex: 1;
  min-width: 0;
  border-radius: 12px;
  background: linear-gradient(160deg, #04201d, #02100e);
  box-shadow: inset 0 0 22px rgba(0,0,0,.85), 0 1px 0 rgba(255,255,255,.05);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: 'JetBrains Mono', monospace;
  border: 1px solid rgba(0,0,0,.5);
}
.screen-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: color-mix(in srgb, var(--accent) 70%, #fff);
  opacity: .55;
}
.screen-round-value {
  font-size: 36px;
  line-height: .9;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 16px color-mix(in srgb, var(--accent) 55%, transparent);
}
.screen-info {
  text-align: right;
  font-size: 11px;
  letter-spacing: 1px;
  color: color-mix(in srgb, var(--accent) 60%, #fff);
  opacity: .8;
  line-height: 1.6;
  white-space: nowrap;
}
.screen-status {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(223,234,240,.6);
}
.screen-status.is-listening { color: #5be37a; }
.screen-status.is-gameover { color: #ff6b6b; }

.transport {
  flex: none;
  display: flex;
  align-items: stretch;
  width: 110px;
}
.play-btn {
  flex: 1;
  appearance: none;
  border: none;
  cursor: pointer;
  border-radius: 10px;
  padding: 9px 12px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 1.5px;
  color: #d6e6ee;
  background: linear-gradient(160deg, #2b3036, #181c21);
  box-shadow: 0 4px 10px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.12);
  transition: all .15s ease;
}
.play-btn.is-playing {
  color: #08110f;
  background: var(--accent);
}

/* ── Pad grid ────────────────────────────────────────────── */
.pad-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.pad {
  position: relative;
  border-radius: 16px;
  background: linear-gradient(162deg, #272b31 0%, #161a1f 60%, #0f1216 100%);
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 10px 18px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.09), inset 0 -14px 26px rgba(0,0,0,.5);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  padding: 11px 12px 9px;
}

@keyframes pad-flash {
  0% {
    transform: translateY(3px);
    box-shadow: 0 0 0 4px var(--accent), 0 0 30px 4px var(--accent), 0 10px 18px rgba(0,0,0,.55);
  }
  100% {
    transform: translateY(0);
    box-shadow: 0 10px 18px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.09), inset 0 -14px 26px rgba(0,0,0,.5);
  }
}
.pad.is-hit {
  animation: pad-flash .42s cubic-bezier(.2,.8,.3,1) forwards;
}

.pad-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.pad-key {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 20px;
  color: rgba(235,245,250,.9);
}
.pad-led {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 38%, #0a0c0f);
  box-shadow: 0 0 0 1px rgba(0,0,0,.5);
  transition: background .5s ease, box-shadow .5s ease;
}

.pad-circle-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  width: 100%;
}
.pad-circle {
  width: 82%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 42% 36%, rgba(150,162,172,.28), rgba(0,0,0,0) 56%),
    radial-gradient(circle at 50% 52%, #2e333a 0%, #1d2127 55%, #11141a 100%);
  box-shadow: inset 0 5px 14px rgba(0,0,0,.6), inset 0 -2px 6px rgba(255,255,255,.05), 0 1px 0 rgba(255,255,255,.05);
  position: relative;
  overflow: hidden;
  transition: transform .05s ease;
}
.pad-noise {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-image: radial-gradient(rgba(255,255,255,.07) .5px, transparent 1.1px);
  background-size: 4px 4px;
  opacity: .7;
}
.pad-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 85%, transparent), color-mix(in srgb, var(--accent) 18%, transparent) 55%, transparent 72%);
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity .42s ease;
}

.pad-label {
  text-align: center;
  font-weight: 600;
  letter-spacing: 1.5px;
  font-size: 13px;
  color: rgba(206,224,234,.68);
  text-transform: uppercase;
}

/* ── Hint ────────────────────────────────────────────────── */
.hint {
  z-index: 50;
  font-size: 13px;
  letter-spacing: 1.5px;
  color: #9fb;
  opacity: .6;
  font-weight: 500;
  text-align: center;
}
