:root {
  --ink: #f7f8ff;
}
* {
  box-sizing: border-box;
}
body {
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  background:
    radial-gradient(circle at 13% 12%, #223d7a 0, transparent 31%),
    radial-gradient(circle at 95% 90%, #4b1646 0, transparent 32%), #080d1d;
}
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
}
.meteors {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.meteors i {
  position: absolute;
  top: -15%;
  width: 2px;
  height: 115px;
  border-radius: 99px;
  opacity: 0;
  transform: rotate(42deg);
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0),
    rgba(153, 180, 255, 0.9),
    rgba(255, 255, 255, 0)
  );
  filter: drop-shadow(0 0 5px #7795ff);
  animation: meteor 8s linear infinite;
}
.meteors i:nth-child(1) {
  left: 12%;
  animation-delay: 0s;
}
.meteors i:nth-child(2) {
  left: 37%;
  animation-delay: 1.8s;
  animation-duration: 10s;
}
.meteors i:nth-child(3) {
  left: 64%;
  animation-delay: 4.1s;
  animation-duration: 7s;
}
.meteors i:nth-child(4) {
  left: 83%;
  animation-delay: 5.6s;
  animation-duration: 11s;
}
.meteors i:nth-child(5) {
  left: 52%;
  animation-delay: 7.2s;
  animation-duration: 9s;
}
@keyframes meteor {
  0% {
    opacity: 0;
    transform: translate(-80px, -130px) rotate(42deg);
  }
  8% {
    opacity: 0.8;
  }
  24% {
    opacity: 0;
    transform: translate(240px, 380px) rotate(42deg);
  }
  100% {
    opacity: 0;
    transform: translate(240px, 380px) rotate(42deg);
  }
}
.one {
  width: 240px;
  height: 240px;
  background: #416dff;
  left: -130px;
  bottom: 10%;
}
.two {
  width: 260px;
  height: 260px;
  background: #ed4d80;
  right: -140px;
  top: 20%;
}
header {
  position: relative;
  z-index: 2;
  height: 88px;
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  text-decoration: none;
  color: #fff;
  font: 700 25px "Space Grotesk";
}
.brand b {
  color: #ffd24c;
  margin-right: 8px;
}
.brand span {
  color: #7890ff;
}
.live {
  font: 700 11px "Space Grotesk";
  letter-spacing: 2px;
  color: #bac6ef;
}
.display-types {
  display: flex;
  gap: 7px;
  margin-left: auto;
  margin-right: 25px;
}
.display-types a {
  text-decoration: none;
  color: #bdc8eb;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  padding: 7px 10px;
  font: 700 10px "DM Sans";
}
.display-types a:hover {
  background: #263a72;
  color: #fff;
  border-color: #6f86ff;
}
.live i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2cdf7f;
  margin-right: 8px;
  box-shadow: 0 0 0 5px rgba(44, 223, 127, 0.15);
}
main {
  height: calc(100vh - 88px);
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  position: relative;
}
.stage {
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 20px 30px;
}
.kicker {
  font: 700 11px "Space Grotesk";
  letter-spacing: 2px;
  color: #f6ce52;
  margin: 0 0 6px;
}
.stage h1 {
  font: 700 clamp(25px, 3vw, 42px)/1.05 "Space Grotesk";
  margin: 0 0 17px;
  text-align: center;
}
.stage em {
  font-style: normal;
  color: #8298ff;
}
.wheel-wrap {
  width: min(61vh, 55vw, 650px, calc(100vh - 270px));
  aspect-ratio: 1;
  position: relative;
  filter: drop-shadow(0 24px 27px rgba(0, 0, 0, 0.55));
}
.wheel-wrap:after {
  content: "";
  position: absolute;
  inset: 2%;
  border: 5px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  pointer-events: none;
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: default;
}
.pointer {
  position: absolute;
  z-index: 3;
  right: -6%;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 24px solid transparent;
  border-bottom: 24px solid transparent;
  border-right: 53px solid #ffd03c;
  filter: drop-shadow(0 3px 2px #5b4500);
}
#spinButton {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 8px solid #fff;
  width: 123px;
  height: 123px;
  border-radius: 50%;
  background: linear-gradient(145deg, #6686ff, #405bdc);
  color: white;
  box-shadow:
    0 8px 0 #263b9e,
    0 15px 28px #020716;
  cursor: default;
  font-family: "Space Grotesk";
}
.viewer-only {
  pointer-events: none;
}
.viewer-badge {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  width: 112px;
  height: 112px;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 7px solid rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  color: #fff;
  background: radial-gradient(circle at 35% 30%, #6986ff, #405bdc);
  box-shadow:
    0 8px 0 #263b9e,
    0 14px 25px #020716;
}
.viewer-badge b {
  font: 700 16px "Space Grotesk";
  letter-spacing: 1px;
}
.viewer-badge span {
  color: #dbe2ff;
  font: 700 9px "DM Sans";
  letter-spacing: 1.7px;
}
#spinButton strong {
  display: block;
  font-size: 17px;
}
#spinButton small {
  font: 700 10px "DM Sans";
  letter-spacing: 2px;
}
.hint {
  font-size: 13px;
  color: #aeb9d6;
  margin: 18px 0 0;
}
aside {
  min-height: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 17, 37, 0.54);
  backdrop-filter: blur(15px);
  padding: 46px 28px;
  display: flex;
  flex-direction: column;
}
.aside-label {
  font: 700 11px "Space Grotesk";
  letter-spacing: 2px;
  color: #91a2d7;
  margin: 0 0 22px;
}
.items {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 5px;
  scrollbar-color: #566cae transparent;
}
.item {
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.06);
  border-left: 3px solid var(--color);
  border-radius: 0 8px 8px 0;
  font-size: 14px;
}
.count {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  color: #9aa7c6;
  font-size: 12px;
}
@media (max-height: 780px) and (min-width: 761px) {
  header {
    height: 68px;
  }
  main {
    height: calc(100vh - 68px);
  }
  .stage {
    padding-bottom: 16px;
  }
  .stage h1 {
    font-size: clamp(23px, 2.4vw, 34px);
    margin-bottom: 10px;
  }
  .wheel-wrap {
    width: min(55vh, 48vw, 520px, calc(100vh - 220px));
  }
  .hint {
    margin-top: 10px;
  }
  aside {
    padding: 28px 22px;
  }
  .aside-label {
    margin-bottom: 13px;
  }
  .item {
    padding: 9px 10px;
  }
}
.count b {
  font: 700 32px "Space Grotesk";
  color: #fff;
}
.modal {
  display: none;
  position: fixed;
  z-index: 10;
  inset: 0;
  place-items: center;
  background: rgba(3, 6, 16, 0.67);
  backdrop-filter: blur(6px);
}
.modal.show {
  display: grid;
}
.modal-card {
  text-align: center;
  padding: 38px 55px;
  border-radius: 24px;
  background: linear-gradient(145deg, #2e428a, #151c41);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 30px 80px #000;
}
.trophy {
  font-size: 54px;
}
.modal-card p {
  font: 700 11px "Space Grotesk";
  letter-spacing: 2px;
  color: #c5d0ff;
}
.modal-card h2 {
  font: 700 38px "Space Grotesk";
  margin: 12px 0 26px;
}
.winner-prize {
  margin: -10px 0 22px;
  padding: 10px 14px;
  border-radius: 9px;
  color: #ffdc68;
  background: rgba(255, 204, 61, 0.14);
  font-weight: 700;
  font-size: 13px;
}
.modal-card button {
  border: 0;
  border-radius: 9px;
  background: #6680ff;
  color: #fff;
  padding: 12px 24px;
  font: 700 12px "DM Sans";
  letter-spacing: 1px;
  cursor: pointer;
}
#closeWinner {
  display: none;
}
#confetti {
  position: fixed;
  inset: 0;
  z-index: 11;
  pointer-events: none;
  width: 100%;
  height: 100%;
}
@media (max-width: 760px) {
  body {
    overflow: auto;
  }
  header {
    height: 64px;
  }
  .brand {
    font-size: 20px;
  }
  .display-types {
    margin-right: 12px;
    gap: 4px;
  }
  .display-types a {
    padding: 6px 7px;
    font-size: 9px;
  }
  main {
    height: auto;
    min-height: calc(100vh - 64px);
    grid-template-columns: 1fr;
  }
  .stage {
    min-height: 620px;
    padding-bottom: 25px;
  }
  .wheel-wrap {
    width: min(82vw, 520px);
  }
  aside {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 27px 22px;
  }
  .items {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .count {
    position: static;
    margin-top: 25px;
    display: block;
  }
  .count b {
    margin-right: 7px;
    font-size: 23px;
  }
}
@media (max-width: 420px) {
  .live {
    display: none;
  }
  .stage {
    min-height: 510px;
  }
  .wheel-wrap {
    width: 90vw;
  }
  #spinButton {
    width: 94px;
    height: 94px;
    border-width: 6px;
  }
  .stage h1 {
    font-size: 25px;
  }
  .items {
    grid-template-columns: 1fr;
  }
  .pointer {
    border-top-width: 17px;
    border-bottom-width: 17px;
    border-right-width: 38px;
  }
}
