:root {
  --background: #26103f;
  --foreground: #111111;
}

* {
  box-sizing: border-box;
}

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

body {
  background: #26103f;
  color: var(--foreground);
  font-family: Arial, Helvetica, sans-serif;
}

button {
  font: inherit;
}

.quiz-buzzer {
  position: relative;
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.6rem, 4vh, 2.8rem);
  overflow: hidden;
  padding: clamp(2rem, 6vh, 4.5rem) 1.25rem;
  background:
    radial-gradient(
      circle at 50% 53%,
      rgba(205, 137, 255, 0.58) 0 7%,
      rgba(123, 45, 204, 0.34) 19%,
      transparent 43%
    ),
    repeating-conic-gradient(
      from -5deg at 50% 53%,
      #26103f 0deg 8deg,
      #7026c8 8deg 16deg
    );
}

.edge-stars {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.star {
  position: absolute;
  width: clamp(28px, 4.2vw, 52px);
  aspect-ratio: 1;
  background: #ffffff;
  clip-path: polygon(50% 0, 61% 35%, 98% 38%, 68% 58%, 79% 94%, 50% 72%, 21% 94%, 32% 58%, 2% 38%, 39% 35%);
  filter: drop-shadow(3px 4px 0 rgba(45, 18, 54, 0.72));
}

.star-one {
  left: 4%;
  top: 8%;
  transform: rotate(-12deg);
}

.star-two {
  right: 5%;
  top: 13%;
  background: #d8ff37;
  transform: rotate(16deg) scale(0.78);
}

.star-three {
  left: 3%;
  top: 48%;
  background: #35d6ff;
  transform: rotate(22deg) scale(0.68);
}

.star-four {
  right: 3%;
  top: 54%;
  transform: rotate(-8deg) scale(0.72);
}

.star-five {
  left: 7%;
  bottom: 8%;
  background: #ff35ae;
  transform: rotate(10deg) scale(0.86);
}

.star-six {
  right: 7%;
  bottom: 7%;
  background: #ffffff;
  transform: rotate(-18deg) scale(0.62);
}

.title-stack {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  padding-bottom: clamp(1.1rem, 2.4vw, 1.7rem);
}

.logo-banner {
  position: relative;
  display: grid;
  width: min(86vw, 500px);
  min-height: 0;
  aspect-ratio: 1.85 / 1;
  place-items: center;
  padding: clamp(0.75rem, 2vw, 1.3rem) clamp(1rem, 3vw, 2rem) clamp(1rem, 2.5vw, 1.65rem);
  border: 3px solid #211329;
  background: rgba(247, 255, 252, 0.72);
  box-shadow: 8px 9px 0 rgba(45, 18, 54, 0.72);
  backdrop-filter: blur(2px);
  transform: rotate(-1.5deg);
  overflow: hidden;
}

.event-name {
  position: absolute;
  bottom: 0;
  z-index: 2;
  max-width: 92%;
  padding: 0.42rem clamp(1.1rem, 3vw, 2.35rem) 0.48rem;
  background: #ec1d9c;
  box-shadow: 5px 6px 0 rgba(58, 0, 66, 0.72);
  color: #d8ff37;
  font-family: Arial Black, Arial, Helvetica, sans-serif;
  font-size: clamp(0.9rem, 2.4vw, 1.45rem);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(1.2deg);
}

.mwn-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  width: 78%;
  height: auto;
  animation: logo-flash 620ms ease-out both;
}

@keyframes logo-flash {
  0% {
    opacity: 0.22;
    filter: brightness(2.2) saturate(0.6);
    transform: translate(-50%, -47.6%) scale(0.96);
  }

  24% {
    opacity: 1;
    filter: brightness(1.35) saturate(1.15);
    transform: translate(-50%, -47.6%) scale(1.015);
  }

  100% {
    opacity: 1;
    filter: brightness(1) saturate(1);
    transform: translate(-50%, -47.6%) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mwn-logo {
    animation: none;
    transform: translate(-50%, -47.6%);
  }
}

.buzzer-panel {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(80vw, 760px);
  min-height: clamp(420px, 54vw, 570px);
  place-items: center;
  overflow: hidden;
  padding: clamp(2.8rem, 6vw, 4rem) 1.25rem clamp(1.2rem, 3vw, 2rem);
  border: 3px solid #211329;
  background: rgba(247, 255, 252, 0.72);
  box-shadow: 8px 9px 0 rgba(45, 18, 54, 0.72);
  backdrop-filter: blur(2px);
}

.buzzer-panel::before {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.02) 0 2px,
    rgba(92, 47, 113, 0.06) 2px 4px
  );
  content: "";
  pointer-events: none;
}

.ready-label {
  position: absolute;
  left: clamp(0.7rem, 2vw, 1rem);
  top: clamp(0.65rem, 2vw, 0.9rem);
  z-index: 2;
  color: #211329;
  font-family: Arial Black, Arial, Helvetica, sans-serif;
  font-size: clamp(0.72rem, 1.6vw, 0.9rem);
  font-weight: 900;
}

.buzzer-wrap {
  position: relative;
  z-index: 1;
  width: min(54vw, 410px, 45vh);
  aspect-ratio: 1 / 1;
}

.buzz-caption {
  position: relative;
  z-index: 1;
  margin-top: -0.6rem;
  color: #ff1fa7;
  font-family: Arial Black, Arial, Helvetica, sans-serif;
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 900;
  line-height: 1;
  text-shadow: 2px 2px 0 #6e145c;
}

.buzzer {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  appearance: none;
  border: 0;
  border-radius: 50%;
  background: transparent;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.buzzer-base {
  position: absolute;
  inset: 7%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 105, 216, 0.72) 0 8%, transparent 25%),
    linear-gradient(145deg, #ef18ac 0%, #c40082 48%, #7a0059 100%);
  box-shadow:
    inset 9px 8px 13px rgba(255, 119, 218, 0.55),
    inset -11px -13px 18px rgba(61, 0, 45, 0.5),
    0 13px 0 #600045,
    0 22px 28px rgba(31, 21, 47, 0.32);
  transition:
    filter 100ms ease,
    box-shadow 100ms ease;
}

.buzzer:focus-visible {
  outline: 5px solid #b7fb22;
  outline-offset: 4px;
}

.buzzer-dome {
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle at 48% 31%, #e80aa5 0 33%, #c60086 65%, #81005a 100%);
  box-shadow:
    inset 8px 8px 13px rgba(255, 83, 197, 0.45),
    inset -9px -12px 16px rgba(68, 0, 47, 0.48),
    0 8px 0 #72004f,
    0 12px 13px rgba(41, 0, 30, 0.34);
  transform: translateY(-2%);
  transition:
    transform 90ms ease,
    box-shadow 90ms ease,
    filter 90ms ease;
}

.buzzer-highlight {
  position: absolute;
  left: 23%;
  top: 11%;
  width: 42%;
  height: 10%;
  border-radius: 50%;
  background: rgba(255, 123, 222, 0.7);
  filter: blur(1px);
  transform: rotate(9deg);
  pointer-events: none;
}

.buzzer-dome::after {
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 8%;
  height: 24%;
  border-radius: 50%;
  border-bottom: 5px solid rgba(255, 65, 191, 0.7);
  content: "";
}

.buzzer:hover .buzzer-base,
.buzzer:hover .buzzer-dome {
  filter: brightness(1.05) saturate(1.06);
}

.buzzer:active .buzzer-dome,
.buzzer.is-pressed .buzzer-dome {
  box-shadow:
    inset 7px 7px 12px rgba(255, 83, 197, 0.38),
    inset -8px -10px 14px rgba(68, 0, 47, 0.52),
    0 3px 0 #72004f,
    0 7px 10px rgba(41, 0, 30, 0.28);
  transform: translateY(4%) scale(0.975);
}

@media (min-width: 701px) and (min-height: 651px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  .quiz-buzzer {
    width: 100%;
    height: 100svh;
    min-height: 0;
    max-height: 100svh;
    gap: clamp(0.8rem, 2.2vh, 1.5rem);
    padding: clamp(0.75rem, 2.4vh, 1.5rem) 1.25rem;
  }

  .title-stack {
    flex: 0 1 auto;
    padding-bottom: clamp(0.9rem, 2.1vh, 1.35rem);
  }

  .logo-banner {
    width: min(48vw, 460px, 55.5vh);
    height: auto;
    min-height: 0;
  }

  .buzzer-panel {
    height: min(60vh, 560px);
    min-height: 0;
    padding-top: clamp(2.4rem, 5vh, 3.4rem);
    padding-bottom: clamp(0.9rem, 2.5vh, 1.5rem);
  }

  .buzzer-wrap {
    width: min(42vh, 400px, 44vw);
  }
}

@media (max-width: 700px) {
  .quiz-buzzer {
    gap: clamp(1.2rem, 2.5vh, 1.7rem);
    padding: 1.25rem 0.7rem 1.7rem;
  }

  .logo-banner {
    width: min(86vw, 520px);
    min-height: 0;
  }

  .buzzer-panel {
    width: min(92vw, 570px);
    min-height: clamp(390px, 76vw, 500px);
    padding-top: 2.7rem;
  }

  .buzzer-wrap {
    width: min(63vw, 360px, 41vh);
  }
}

@media (max-height: 650px) and (orientation: landscape) {
  .quiz-buzzer {
    flex-direction: row;
    gap: clamp(2rem, 7vw, 6rem);
  }

  .title-stack {
    width: min(42vw, 450px);
  }

  .logo-banner {
    width: 100%;
  }

  .logo-banner {
    min-height: 130px;
  }

  .buzzer-panel {
    width: min(48vw, 560px);
    min-height: min(82vh, 500px);
  }

  .buzzer-wrap {
    width: min(29vw, 300px, 47vh);
  }
}
