:root {
  --gold:      #FFD166;
  --gold-dark: #E8A020;
  --gold-deep: #9B5E10;
  --teal:      #06D6A0;
  --blue:      #118AB2;
  --red:       #EF476F;
  --bg1:       #04080F;
}

* { box-sizing: border-box; user-select: none; margin: 0; padding: 0; }

body {
  background: var(--bg1);
  min-height: 100vh;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  font-family: 'Outfit', sans-serif;
  overflow-x: hidden; padding: 16px; gap: 0;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 10%, rgba(255,255,255,.6) 0%, transparent 0%),
    radial-gradient(1px 1px at 72% 6%,  rgba(255,255,255,.4) 0%, transparent 0%),
    radial-gradient(1.5px 1.5px at 38% 28%, rgba(255,255,255,.35) 0%, transparent 0%),
    radial-gradient(1px 1px at 84% 54%, rgba(255,255,255,.5) 0%, transparent 0%),
    radial-gradient(1px 1px at 5%  79%, rgba(255,255,255,.4) 0%, transparent 0%),
    radial-gradient(1.5px 1.5px at 58% 68%, rgba(255,255,255,.3) 0%, transparent 0%),
    radial-gradient(1px 1px at 90% 22%, rgba(255,255,255,.35) 0%, transparent 0%),
    radial-gradient(1px 1px at 28% 92%, rgba(255,255,255,.4) 0%, transparent 0%),
    radial-gradient(1px 1px at 77% 86%, rgba(255,255,255,.25) 0%, transparent 0%),
    radial-gradient(1px 1px at 50% 50%, rgba(255,255,255,.2) 0%, transparent 0%),
    radial-gradient(1px 1px at 22% 44%, rgba(255,255,255,.3) 0%, transparent 0%),
    radial-gradient(1px 1px at 65% 38%, rgba(255,255,255,.25) 0%, transparent 0%);
  pointer-events: none; z-index: 0;
}
body::after {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 700px 400px at 15% 85%, rgba(6,214,160,.06) 0%, transparent 70%),
    radial-gradient(ellipse 500px 500px at 85% 15%, rgba(255,209,102,.07) 0%, transparent 70%),
    radial-gradient(ellipse 600px 300px at 50% 50%, rgba(17,138,178,.04) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}

/* floating confetti */
.confetti-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.confetti-bg span {
  position: absolute; border-radius: 2px; opacity: 0;
  animation: floatUp linear infinite;
}
@keyframes floatUp {
  0%   { transform: translateY(110vh) rotate(0deg); opacity: .65; }
  100% { transform: translateY(-10vh) rotate(540deg); opacity: 0; }
}

/* ===== BANNER ===== */
.top-banner { position: relative; z-index: 2; text-align: center; margin-bottom: 16px; }
.banner-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, rgba(255,209,102,.12), rgba(6,214,160,.08));
  border: 1px solid rgba(255,209,102,.3); border-radius: 100px;
  padding: 7px 20px; font-size: .68rem; font-weight: 700;
  letter-spacing: 4px; text-transform: uppercase; color: var(--gold);
  backdrop-filter: blur(8px); box-shadow: 0 4px 20px rgba(255,209,102,.1);
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--teal); box-shadow: 0 0 8px var(--teal);
  animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:.3;} }

/* ===== CARD ===== */
.game-container {
  position: relative; z-index: 1;
  max-width: 640px; width: 100%;
  background: linear-gradient(160deg, rgba(12,24,44,.97), rgba(4,8,15,.99));
  border: 1px solid rgba(255,209,102,.18); border-radius: 32px;
  padding: 32px 28px 26px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.04),
    0 40px 80px rgba(0,0,0,.85),
    0 0 80px rgba(255,209,102,.06),
    inset 0 1px 0 rgba(255,255,255,.07);
}

/* ===== HEADER ===== */
.header { text-align: center; margin-bottom: 20px; }
.header-icons { font-size: 1.4rem; margin-bottom: 4px; animation: heartBeat 1.8s ease-in-out infinite; }
@keyframes heartBeat {
  0%,100%{ transform: scale(1); }
  15%    { transform: scale(1.18); }
  30%    { transform: scale(1); }
  45%    { transform: scale(1.1); }
}
h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.4rem, 8vw, 3.8rem);
  letter-spacing: 4px; line-height: 1;
  background: linear-gradient(135deg, #fff 0%, var(--gold) 45%, var(--gold-dark) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 14px rgba(255,209,102,.3));
}
.subtitle {
  margin-top: 6px; font-size: .82rem; font-weight: 600;
  color: rgba(255,255,255,.5); letter-spacing: 2px; text-transform: uppercase;
}
.subtitle strong { color: var(--teal); text-shadow: 0 0 8px rgba(6,214,160,.4); }

/* ===== WHEEL ===== */
.wheel-stage {
  position: relative;
  display: flex; justify-content: center; align-items: center;
  margin: 4px 0 22px; perspective: 900px;
}
.wheel-shadow {
  position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%);
  width: 78%; height: 28px; background: rgba(0,0,0,.6);
  border-radius: 50%; filter: blur(18px); z-index: 0;
}
.wheel-3d {
  position: relative; transform: rotateX(22deg);
  transform-style: preserve-3d; will-change: transform; transition: filter .3s;
}
.wheel-3d.spinning {
  filter: drop-shadow(0 0 28px rgba(255,209,102,.8)) drop-shadow(0 0 60px rgba(255,180,60,.45));
}
.wheel-rim {
  position: absolute; inset: -10px; border-radius: 50%;
  background: conic-gradient(
    #8B5E1A 0deg,#FFD700 30deg,#B8860B 60deg,#FFD700 90deg,
    #8B5E1A 120deg,#FFD700 150deg,#B8860B 180deg,#FFD700 210deg,
    #8B5E1A 240deg,#FFD700 270deg,#B8860B 300deg,#FFD700 330deg,#8B5E1A 360deg
  );
  box-shadow: 0 12px 24px rgba(0,0,0,.7), 0 4px 8px rgba(0,0,0,.5), inset 0 2px 4px rgba(255,255,255,.3);
  z-index: -1;
}
canvas {
  display: block; border-radius: 50%; width: 340px; height: 340px;
  position: relative; z-index: 2; cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,.5), inset 0 0 30px rgba(0,0,0,.4);
}
.pointer-wrap {
  position: absolute; top: -8px; left: 50%;
  transform: translateX(-50%) translateZ(20px);
  z-index: 20; filter: drop-shadow(0 4px 8px rgba(0,0,0,.6));
}
.pointer-body {
  width: 0; height: 0;
  border-left: 18px solid transparent; border-right: 18px solid transparent;
  border-top: 52px solid var(--gold); position: relative;
}
.pointer-body::before {
  content: ''; position: absolute; top: -52px; left: -8px;
  width: 0; height: 0;
  border-left: 8px solid transparent; border-right: 8px solid transparent;
  border-top: 22px solid rgba(255,255,255,.4);
}
.pointer-gem {
  width: 24px; height: 24px;
  background: radial-gradient(circle at 35% 35%, #fff, var(--red) 40%, #7a0020);
  border-radius: 50%; position: absolute; top: -62px; left: -12px;
  box-shadow: 0 0 8px var(--red), 0 0 16px rgba(239,71,111,.5);
  animation: gemPulse 2s ease-in-out infinite;
}
@keyframes gemPulse {
  0%,100% { box-shadow: 0 0 8px var(--red), 0 0 16px rgba(239,71,111,.5); }
  50%     { box-shadow: 0 0 14px var(--red), 0 0 30px rgba(239,71,111,.8); }
}

/* ===== RESULT ===== */
.result-panel {
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,209,102,.18);
  border-radius: 20px; padding: 16px 20px 14px;
  text-align: center; margin-bottom: 16px; position: relative; overflow: hidden;
}
.result-panel::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,209,102,.05), transparent 60%);
  pointer-events: none;
}
.prize-eyebrow {
  font-size: .65rem; font-weight: 700; letter-spacing: 4px; text-transform: uppercase;
  color: rgba(255,209,102,.55); margin-bottom: 8px;
}
.prize-value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.4rem, 5vw, 2rem); letter-spacing: 2px;
  color: rgba(255,255,255,.38); line-height: 1.1; transition: all .4s ease;
}
.prize-value.revealed {
  color: var(--gold); text-shadow: 0 0 20px rgba(255,209,102,.5);
  animation: revealPop .5s cubic-bezier(.34,1.56,.64,1);
}
@keyframes revealPop { 0%{transform:scale(.7);opacity:0;} 100%{transform:scale(1);opacity:1;} }
.status {
  font-size: .72rem; font-weight: 500; color: rgba(255,255,255,.35);
  margin-top: 8px; min-height: 1.2em; transition: color .3s;
}
.status.active { color: var(--teal); }
.status.done   { color: var(--gold); }

/* ===== BUTTON ===== */
.spin-wrap { display: flex; justify-content: center; margin-bottom: 16px; }
.spin-btn {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; letter-spacing: 3px;
  padding: 16px 52px; border: none; border-radius: 100px;
  cursor: pointer; color: #0a0600;
  background: linear-gradient(135deg, #FFE066 0%, #FFB820 50%, #FF8C00 100%);
  box-shadow: 0 6px 0 #7A4000, 0 12px 32px rgba(255,140,0,.45), inset 0 1px 0 rgba(255,255,255,.55);
  transition: transform .08s, box-shadow .08s;
  display: flex; align-items: center; gap: 10px;
}
.spin-btn:not(:disabled):hover {
  background: linear-gradient(135deg, #FFF0A0 0%, #FFCC30 50%, #FFA020 100%);
  box-shadow: 0 6px 0 #7A4000, 0 16px 44px rgba(255,180,0,.65), inset 0 1px 0 rgba(255,255,255,.6);
}
.spin-btn:not(:disabled):active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #7A4000, 0 6px 20px rgba(255,140,0,.4), inset 0 1px 0 rgba(255,255,255,.4);
}
.spin-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ===== APPRECIATION NOTE ===== */
.appreciation-note {
  background: linear-gradient(135deg, rgba(6,214,160,.07), rgba(17,138,178,.06));
  border: 1px solid rgba(6,214,160,.2); border-radius: 16px;
  padding: 14px 18px; text-align: center; margin-bottom: 16px;
}
.appreciation-note p {
  font-size: .8rem; font-weight: 500; color: rgba(255,255,255,.55); line-height: 1.65;
}
.appreciation-note p strong { color: var(--teal); }

/* ===== FOOTER ===== */
.footer-note {
  text-align: center; font-size: .62rem;
  color: rgba(255,255,255,.18); letter-spacing: 2px; text-transform: uppercase;
}

/* ===== PARTICLES ===== */
.particles-container { position: fixed; inset: 0; pointer-events: none; z-index: 100; overflow: hidden; }
.particle {
  position: absolute; border-radius: 50%;
  animation: particleFly 1.2s ease-out forwards; pointer-events: none;
}
@keyframes particleFly {
  0%  { transform: translate(0,0) scale(1); opacity: 1; }
  100%{ transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}
@keyframes rippleOut { 0%{transform:scale(.8);opacity:.6;} 100%{transform:scale(2.6);opacity:0;} }
.wheel-ripple {
  position: absolute; inset: -10px; border-radius: 50%;
  border: 3px solid rgba(255,209,102,.6);
  animation: rippleOut .9s ease-out forwards; pointer-events: none; z-index: 5;
}

@media (max-width: 500px) {
  .game-container { padding: 24px 16px 20px; }
  canvas { width: 280px; height: 280px; }
  .spin-btn { padding: 14px 28px; font-size: 1.2rem; }
}
