:root {
  --bg-1: #221916;
  --bg-2: #4f2f2b;
  --card: #fdf7ef;
  --gold: #d4a64a;
  --text-main: #2f211f;
  --text-light: #f9efe0;
  --danger: #b03838;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Manrope", sans-serif;
  color: var(--text-light);
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 226, 162, 0.3), transparent 40%),
    radial-gradient(circle at 80% 10%, rgba(255, 184, 108, 0.28), transparent 35%),
    linear-gradient(130deg, var(--bg-1), var(--bg-2));
}

.layout {
  width: min(980px, 92vw);
  margin: 0 auto;
  padding: 24px 0 max(36px, env(safe-area-inset-bottom, 36px));
  display: grid;
  gap: 16px;
  justify-items: center;
}

.hero {
  text-align: center;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  color: #f9d28f;
}

.brand-banner {
  width: min(720px, 92vw);
  margin: 10px auto 8px;
  display: block;
  border-radius: 12px;
  border: 1px solid rgba(252, 219, 151, 0.55);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tagline {
  margin: 0;
  opacity: 0.9;
}

.wheel-card {
  position: relative;
  width: min(86vw, 580px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 30px;
  background: linear-gradient(160deg, rgba(255, 233, 180, 0.95), rgba(255, 247, 228, 0.95));
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.35),
    inset 0 0 0 2px rgba(212, 166, 74, 0.65);
  overflow: hidden;
}

#wheel {
  width: 94%;
  height: 94%;
  transform: rotate(0deg);
}

.pointer {
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: clamp(10px, 2.8vw, 16px) solid transparent;
  border-right: clamp(10px, 2.8vw, 16px) solid transparent;
  border-top: clamp(22px, 5.8vw, 34px) solid #952f2f;
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.35));
  z-index: 4;
}

.logo-center {
  position: absolute;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff8db, #dfbb71 65%, #b58a35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #3a2417;
  z-index: 3;
  box-shadow: 0 0 0 6px rgba(255, 248, 218, 0.88), 0 12px 25px rgba(0, 0, 0, 0.25);
}

.logo-r {
  font-family: "Cinzel", serif;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.logo-name {
  font-family: "Cinzel", serif;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.actions {
  width: min(86vw, 580px);
  text-align: center;
}

.customer-form {
  margin-bottom: 12px;
  display: grid;
  gap: 10px;
  text-align: left;
}

.customer-form label {
  display: grid;
  gap: 5px;
  font-size: 0.82rem;
  color: #edd7ae;
  letter-spacing: 0.03em;
  font-weight: 700;
}

.customer-form input {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(212, 166, 74, 0.5);
  background: rgba(255, 241, 220, 0.1);
  color: #fff;
  font-size: 0.98rem;
  padding: 10px 12px;
  font-family: "Manrope", sans-serif;
}

.customer-form input:focus {
  outline: none;
  border-color: #f8d692;
  box-shadow: 0 0 0 2px rgba(248, 214, 146, 0.16);
}

.spin-button {
  background: linear-gradient(140deg, #f7d48e, #cd8f29);
  border: 0;
  border-radius: 999px;
  padding: 0 32px;
  min-height: 52px;
  font-size: 1rem;
  color: #2f1c12;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
  transition: transform 80ms ease, box-shadow 80ms ease;
}

.spin-button:active {
  transform: scale(0.96);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
}

.spin-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.status {
  margin-top: 12px;
  min-height: 24px;
  font-size: 0.95rem;
  font-weight: 600;
}

.status.error {
  color: #ffd7d7;
}

.confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 40;
}

.confetti-piece {
  position: absolute;
  top: -12vh;
  width: 11px;
  height: 18px;
  opacity: 0;
  border-radius: 2px;
  animation: confetti-fall linear forwards;
}

.reward-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(27, 16, 14, 0.45);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
  z-index: 50;
}

.reward-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.reward-card {
  width: min(520px, 92vw);
  border-radius: 22px;
  background: linear-gradient(160deg, #fff4d9, #e8c57e);
  color: #3b211a;
  text-align: center;
  padding: 28px 24px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.38);
  transform: translateY(18px) scale(0.95);
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reward-modal.open .reward-card {
  transform: translateY(0) scale(1);
}

.reward-modal.no-luck .reward-card {
  background: linear-gradient(160deg, #e8e4df, #c9c0b8);
  color: #2f2b28;
}

.reward-modal.no-luck .reward-badge {
  color: #6b5c52;
}

.reward-modal.no-luck .reward-prize {
  color: #5a4f47;
}

.reward-badge {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.76rem;
  color: #874d0f;
}

.reward-card h2 {
  margin: 10px 0 8px;
  font-family: "Cinzel", serif;
  font-size: clamp(1.5rem, 5vw, 2rem);
}

.reward-prize {
  margin: 0 0 20px;
  font-family: "Cinzel", serif;
  font-size: clamp(1.6rem, 6vw, 2.2rem);
  font-weight: 700;
  color: #602f1e;
}

@keyframes confetti-fall {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--drift), 115vh, 0) rotate(var(--spin));
    opacity: 0;
  }
}

@media (max-width: 620px) {
  .layout {
    gap: 12px;
    padding-top: 16px;
  }

  .eyebrow {
    font-size: 0.7rem;
  }

  .tagline {
    font-size: 0.9rem;
  }

  .logo-center {
    width: 96px;
    height: 96px;
  }

  .logo-r {
    font-size: 1.15rem;
  }

  .logo-name {
    font-size: 0.66rem;
  }

  .spin-button {
    width: 90vw;
    max-width: 320px;
    font-size: 1.05rem;
  }

  .customer-form input {
    min-height: 44px;
  }

  .reward-card {
    padding: 22px 16px;
  }

  .reward-badge {
    font-size: 0.7rem;
  }
}

@media (max-width: 380px) {
  .logo-center {
    width: 78px;
    height: 78px;
  }

  .logo-r {
    font-size: 1rem;
  }

  .logo-name {
    font-size: 0.58rem;
  }

  .reward-card h2 {
    font-size: 1.4rem;
  }

  .reward-prize {
    font-size: 1.5rem;
  }
}
