:root {
  --bg: #0b0b12;
}

html,body {
  height: 100%;
  margin: 0;
}

body {
  display: grid;
  place-items: center;
  background: #0b0b12;
  overflow: hidden;
}

.wrap {
  display: grid;
  gap: 6vmin;
  grid-template-columns: repeat(2, 1fr);
  width: min(90vw, 420px);
}

@media (max-width: 600px) {
  .wrap {
    grid-template-columns: 1fr;
    gap: 8vmin;
    width: 70vw;
  }
}

.btn {
  aspect-ratio: 1/1;
  width: 100%;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: rgba(0,0,0,0.35);
  box-shadow:
    inset 0 10px 20px rgba(255,255,255,.15),
    inset 0 -14px 22px rgba(0,0,0,.55),
    0 14px 30px rgba(0,0,0,.65);
  transition: transform .06s ease, filter .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn:active {
  transform: translateY(2px) scale(.98);
  filter: brightness(.97);
}

/* Red (buzzer) */
.btn.red {
  background: radial-gradient(circle at 36% 30%, #d11, #900 58%, #600 100%);
}
.btn.red.glow {
  background: radial-gradient(circle at 30% 22%, #ff8a8a, #e11d48 55%, #7f1d1d 100%);
  box-shadow:
    inset 0 12px 26px rgba(255,255,255,.28),
    inset 0 -16px 24px rgba(0,0,0,.55),
    0 0 90px rgba(239,68,68,.55),
    0 16px 40px rgba(0,0,0,.75);
}

/* Green (correct) */
.btn.green {
  background: radial-gradient(circle at 36% 30%, #16a34a, #0a7a34 58%, #065f2b 100%);
}
.btn.green.glow {
  background: radial-gradient(circle at 30% 22%, #7ee29f, #22c55e 55%, #0f6a2f 100%);
  box-shadow:
    inset 0 12px 26px rgba(255,255,255,.28),
    inset 0 -16px 24px rgba(0,0,0,.55),
    0 0 90px rgba(16,185,129,.55),
    0 16px 40px rgba(0,0,0,.75);
}

/* Disable text selection and tap highlights */
* {
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
button:focus {
  outline: none;
}

.btn-icon {
  width: 34%;
  height: 34%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  mix-blend-mode: multiply;
  opacity: 0.7;
  pointer-events: none;
  transition: opacity .2s ease;
}
.btn.glow .btn-icon { opacity: 0.5; }


/* Volume slider - fixed above the footer, controls the master gain */
.volume-bar {
  position: fixed;
  left: 50%;
  bottom: 52px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  color: #a7a7c2;
  opacity: 0.55;
  transition: opacity 0.2s ease;
  z-index: 5;
}
.volume-bar:hover { opacity: 1; }

.volume-icon { width: 16px; height: 16px; flex-shrink: 0; }

#volumeSlider {
  -webkit-appearance: none;
  appearance: none;
  width: min(220px, 50vw);
  height: 4px;
  border-radius: 999px;
  background: #24243b;
  outline: none;
  cursor: pointer;
}
#volumeSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #8a7cff;
  border: none;
  box-shadow: 0 0 8px rgba(138, 124, 255, 0.5);
}
#volumeSlider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #8a7cff;
  border: none;
  box-shadow: 0 0 8px rgba(138, 124, 255, 0.5);
}
#volumeSlider:focus-visible {
  outline: 2px solid #8a7cff;
  outline-offset: 4px;
}
