/* ===== Easy tweaks: change colours here ===== */
:root {
  --pink: #ff2e93;
  --purple: #7b2ff7;
  --gold: #ffd23f;
  --cyan: #00d4ff;
  --dark: #1a0b2e;
  --cream: #fff8ee;
  --font-display: 'Bungee', 'Impact', sans-serif;
  --font-script: 'Pacifico', cursive;
  --font-body: 'Poppins', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--cream);
  background: var(--dark);
  min-height: 100vh;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }

#confetti {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* ================= INTRO ================= */
#intro {
  position: fixed; inset: 0;
  z-index: 100;
  display: flex; flex-direction: column;
  background: repeating-linear-gradient(45deg, #ff2e93 0 20px, #ffd23f 20px 40px, #00d4ff 40px 60px, #7b2ff7 60px 80px);
  background-size: 200% 200%;
  animation: bgslide 4s linear infinite;
  transition: opacity .8s ease, transform .8s ease;
}
#intro.leaving { opacity: 0; transform: scale(1.3); pointer-events: none; }
@keyframes bgslide { to { background-position: 113px 113px; } }

.marquee {
  background: #000; color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.1rem;
  white-space: nowrap; overflow: hidden;
  padding: .5rem 0;
  border-block: 3px solid var(--gold);
}
.marquee span { display: inline-block; padding-left: 100%; animation: marquee 14s linear infinite; }
.marquee.bottom span { animation-direction: reverse; }
@keyframes marquee { to { transform: translateX(-100%); } }

.intro-inner {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 1rem; overflow-y: auto;
}

.popup {
  width: min(94vw, 560px);
  background: #fff; color: #222;
  border: 5px solid #000;
  border-radius: 12px;
  box-shadow: 10px 10px 0 #000;
  text-align: center;
  padding-bottom: 1.2rem;
  animation: wobble 2.5s ease-in-out infinite;
}
@keyframes wobble { 0%,100% { transform: rotate(-1deg); } 50% { transform: rotate(1deg) scale(1.02); } }

.popup-bar {
  display: flex; justify-content: space-between;
  background: linear-gradient(90deg, #0a246a, #3a6ea5);
  color: #fff; font-size: .8rem; font-weight: 600;
  padding: .4rem .7rem;
  border-radius: 6px 6px 0 0;
}
.fake-x { background: #c33; padding: 0 .4rem; border-radius: 3px; }

.blink-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 6vw, 2.3rem);
  margin: 1rem .5rem .3rem;
  background: linear-gradient(90deg, red, orange, gold, lime, cyan, blue, magenta, red);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: rainbow 2s linear infinite, pulse .8s ease-in-out infinite alternate;
}
@keyframes rainbow { to { background-position: 300% 0; } }
@keyframes pulse { to { transform: scale(1.08); } }

.lead { font-size: 1.05rem; margin-bottom: .8rem; }

/* Slot machine */
.slot { display: flex; justify-content: center; gap: .6rem; margin: .5rem 0; }
.reel {
  width: 74px; height: 90px; overflow: hidden;
  background: #fff; border: 4px solid #000; border-radius: 10px;
  box-shadow: inset 0 0 12px rgba(0,0,0,.35);
}
.strip { display: flex; flex-direction: column; transition: transform 2.2s cubic-bezier(.15,.7,.2,1); }
.strip div {
  height: 90px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 3rem; color: var(--pink);
}
.slot-caption { font-size: .8rem; color: #666; min-height: 1.2em; margin-bottom: .6rem; }

.winner { font-size: 1.15rem; margin: .4rem .5rem; animation: flash 1s steps(2) infinite; }
@keyframes flash { 50% { color: var(--pink); } }

.timer {
  display: inline-block; margin: .6rem 0 1rem;
  background: #111; color: #ff3b3b;
  font-family: 'Courier New', monospace; font-weight: 700;
  padding: .3rem .8rem; border-radius: 6px;
}

.claim {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #fff;
  background: linear-gradient(180deg, #37d637, #12920f);
  border: 4px solid #000; border-radius: 14px;
  padding: .8rem 1.3rem;
  cursor: pointer;
  box-shadow: 0 6px 0 #000;
  animation: shake 1.2s ease-in-out infinite;
  transition: transform .1s, box-shadow .1s;
}
.claim:hover { filter: brightness(1.1); }
.claim:active { transform: translateY(5px); box-shadow: 0 1px 0 #000; }
.claim.small { font-size: .9rem; padding: .6rem 1rem; animation: none; }
@keyframes shake {
  0%, 60%, 100% { transform: translateX(0) rotate(0); }
  10% { transform: translateX(-4px) rotate(-2deg); }
  20% { transform: translateX(4px) rotate(2deg); }
  30% { transform: translateX(-4px) rotate(-2deg); }
  40% { transform: translateX(4px) rotate(2deg); }
}

.tiny { font-size: .65rem; opacity: .7; margin: .9rem 1rem 0; }

/* ================= MAIN CARD ================= */
#card {
  position: relative;
  background:
    radial-gradient(circle at 20% 0%, #4b1d8f 0, transparent 50%),
    radial-gradient(circle at 90% 30%, #a3155f 0, transparent 45%),
    var(--dark);
  padding-bottom: 4rem;
}
#card[hidden] { display: none; }

.floaters { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.floaters span {
  position: absolute; bottom: -60px;
  animation: floatup linear infinite;
  opacity: .5;
}
@keyframes floatup {
  to { transform: translateY(-115vh) rotate(360deg); }
}

#card > *:not(.floaters) { position: relative; z-index: 1; }

.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 2rem 1.2rem;
}
.kicker { font-weight: 700; letter-spacing: .15em; text-transform: uppercase; font-size: .8rem; color: var(--gold); }
.big-40 {
  font-family: var(--font-display);
  font-size: clamp(7rem, 32vw, 14rem);
  line-height: 1;
  background: linear-gradient(180deg, var(--gold), var(--pink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 25px rgba(255, 46, 147, .6));
  animation: glow 2.5s ease-in-out infinite alternate;
}
@keyframes glow { to { transform: scale(1.06) rotate(-2deg); } }
.hero-title { font-family: var(--font-script); font-size: clamp(2rem, 8vw, 3.6rem); font-weight: 400; margin: .4rem 0 1rem; }
.hero-title .name { color: var(--gold); }
.hero-sub { max-width: 32ch; line-height: 1.6; opacity: .9; }
.scroll-hint { margin-top: 2rem; color: var(--cyan); text-decoration: none; font-weight: 600; animation: bounce 1.5s infinite; }
@keyframes bounce { 50% { transform: translateY(8px); } }

/* Prize cards */
.prize, .redeem {
  position: relative;
  width: min(92vw, 640px);
  margin: 2.5rem auto;
  padding: 2.4rem 1.6rem 1.6rem;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255,255,255,.25);
  border-radius: 22px;
  box-shadow: 0 10px 40px rgba(0,0,0,.4);
}
.prize.gold {
  border-color: var(--gold);
  box-shadow: 0 0 35px rgba(255, 210, 63, .35), 0 10px 40px rgba(0,0,0,.4);
}
.ribbon {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(90deg, var(--pink), var(--purple));
  font-family: var(--font-display);
  padding: .4rem 1.2rem; border-radius: 999px;
  white-space: nowrap; font-size: .95rem;
}
.gold .ribbon { background: linear-gradient(90deg, #ffb300, var(--gold)); color: #3a2a00; }

.prize h2, .redeem h2 { font-family: var(--font-display); font-weight: 400; text-align: center; font-size: 1.6rem; line-height: 1.25; margin-bottom: 1.2rem; }
.prize h2 small { display: block; font-family: var(--font-script); font-size: 1.2rem; color: var(--gold); margin-top: .3rem; }

.items { list-style: none; }
.items li {
  display: flex; align-items: center; gap: .8rem;
  padding: .65rem .4rem;
  border-bottom: 1px dashed rgba(255,255,255,.2);
}
.items li:last-child { border-bottom: 0; }
.items li span { font-size: 1.5rem; flex: none; width: 2rem; text-align: center; }

.when { text-align: center; margin-top: 1rem; color: var(--cyan); }

.redeem ol { padding-left: 1.4rem; line-height: 2; }
.redeem .tiny { margin: 1rem 0 0; }

footer { text-align: center; padding: 2rem 1rem; }
.sign { font-family: var(--font-script); font-size: 1.6rem; line-height: 1.6; margin-bottom: 1.5rem; }
.sign span { color: var(--gold); }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01s !important; }
  .marquee span { padding-left: 0; }
}
