:root {
  --sky: #c5e1ef;
  --grass: #92d050;
  --grass-dark: #7cbc3e;
  --blue: #2799d6;
  --ink: #1d1d1b;
  --white: #ffffff;
  --slice-a: #d6eef8;
  --slice-b: #b5e07a;
  --purple: #8b6bb5;
}

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

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

body {
    font-family: "Titillium Web", system-ui, sans-serif;
  background: #c5e1ef;
  color: var(--ink);
  overflow: hidden;
  min-height: 100dvh;
}

.scene {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem 18vh;
  isolation: isolate;
}

.page-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  pointer-events: none;
}

.title {
  font-family: "Titillium Web", sans-serif;
  font-weight: 900;
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1;
}

.subtitle {
  font-size: clamp(0.75rem, 2.2vw, 0.95rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 64px;
  opacity: 0.85;
}

.wheel-stage {
  position: relative;
  width: min(86vmin, 520px);
  aspect-ratio: 1;
  flex-shrink: 0;
  overflow: visible;
  margin-bottom: 64px;
}

.wheel-shadow {
  position: absolute;
  left: 50%;
  bottom: 2%;
  z-index: 0;
  width: 70%;
  height: 14%;
  transform: translateX(-50%);
  background: rgba(29, 29, 27, 0.35);
  border-radius: 50%;
  filter: blur(10px);
  pointer-events: none;
}

.wheel-rotator {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  will-change: transform;
}

.wheel-art {
  width: 100%;
  height: 100%;
  display: block;
}

.wheel-labels {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.slice-label {
  font-family: "Titillium Web", sans-serif;
  font-weight: 700;
  font-size: 5.5px;
  fill: #2a1a10;
  stroke: #f7edd8;
  stroke-width: 1.1px;
  paint-order: stroke fill;
  letter-spacing: 0.01em;
  text-anchor: middle;
}

.pointer {
  position: absolute;
  top: -18px;
  left: 50%;
  z-index: 5;
  width: 46px;
  height: 58px;
  transform: translateX(-50%);
  filter: drop-shadow(0 4px 3px rgba(29, 29, 27, 0.28));
  pointer-events: none;
}

.spin-btn {
  font-family: "Titillium Web", sans-serif;
  border: 3px solid #000000;
  outline: 3px dashed #000000;
  background-color: #ffffff;
  color: #000000;
  outline-offset: -7px;
  box-shadow: -2px 4px 0px 0px #000000;
  font-weight: 900;
  border-radius: 50px;
  padding: 12px 18px !important;
  font-size: 18px;
  transform: rotate(-1deg);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.spin-btn:hover:not(:disabled) {
  transform: translateY(2px);
  box-shadow: -3px 6px 0 var(--ink);
}

.spin-btn:active:not(:disabled) {
  transform: translateY(6px);
  box-shadow: 0 0 0 var(--ink);
}

.spin-btn:disabled {
  cursor: default;
  opacity: 0.7;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(197, 225, 239, 0.55);
  visibility: hidden;
  opacity: 0;
  overflow: hidden;
}

.overlay.is-open {
  visibility: visible;
}

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

.confetti-piece {
  position: absolute;
  left: 50%;
  top: 42%;
  display: block;
  will-change: transform, opacity;
}

.overlay-card {
  background: var(--white);
  border: 4px solid var(--ink);
  border-radius: 28px;
  padding: 1.75rem 1.5rem 1.6rem;
  text-align: center;
  max-width: 22rem;
  width: 100%;
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 0 var(--ink);
}

.overlay-image {
  width: 148px;
  height: 148px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--ink);
  background: #f4e6c8;
  display: block;
  margin: 0.55rem auto 0.9rem;
}

.overlay-card::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 4px dashed var(--ink);
  border-radius: 20px;
  pointer-events: none;
}

.overlay-kicker {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.overlay-prize {
  font-family: "Titillium Web", sans-serif;
  font-weight: 900;
  font-size: clamp(1.5rem, 6vw, 2.1rem);
  line-height: 1.15;
  text-transform: uppercase;
}

.overlay-hint {
  margin-top: 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0.7;
}

@media (max-width: 480px) {
  .scene {
    padding-bottom: 22vh;
  }

      .slice-label {
        font-size: 5.2px;
      }
}

@media (prefers-reduced-motion: reduce) {
  .spin-btn:hover:not(:disabled),
  .spin-btn:active:not(:disabled) {
    transform: none;
    box-shadow: 0 6px 0 var(--ink);
  }
}
