:root {
  /* Warm brown-gold palette */
  --bg-0: #0d0802;
  --bg-1: #160d04;
  --bg-2: #241606;
  --bg-glow: #3a2409;
  --gold: #ffcc33;
  --gold-hi: #ffe07a;
  --gold-deep: #e0a82e;
  --bronze: #8a5e1c;
  --bronze-dk: #5e3c12;
  --cream: #fff3cf;
  --green: #5fe08a;
  --green-dk: #2ec46f;
  --text: #f3e4c0;
  --muted: #b79a64;
  --count: #ffcc33;
  --pixel: "Press Start 2P", monospace;
  --mono: "VT323", monospace;
}

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

body {
  margin: 0;
  color: var(--text);
  font-family: var(--mono);
  font-size: 21px;
  background: radial-gradient(120% 90% at 50% 0%, var(--bg-glow) 0%, var(--bg-2) 30%, var(--bg-1) 60%, var(--bg-0) 100%);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.5s ease;
}
body[data-phase="drawing"] { --bg-glow: #5a1c0c; --count: #ff8a3c; }
body[data-phase="winner"]  { --bg-glow: #6a4a0d; --count: #ffe07a; }

body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(0deg, rgba(0,0,0,0.10) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply; opacity: 0.5; z-index: 9;
}

img { image-rendering: pixelated; }

.section-title {
  font-family: var(--pixel); font-size: 18px; color: var(--gold);
  text-align: center; letter-spacing: 1px;
  text-shadow: 3px 3px 0 #000, 0 0 14px rgba(255, 204, 51, 0.45);
  margin: 0 0 22px; display: flex; align-items: center; justify-content: center; gap: 12px;
}

/* ---------- Pixel buttons ---------- */
.btn {
  display: inline-block; font-family: var(--pixel); color: #2a1806;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold-deep));
  text-decoration: none; border: 3px solid #2a1806;
  box-shadow: 0 4px 0 #2a1806, 0 0 18px rgba(255, 204, 51, 0.4); text-transform: uppercase;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #2a1806; }
.btn--sm { font-size: 11px; padding: 10px 14px; }
.btn--lg { font-size: 15px; padding: 16px 22px; letter-spacing: 1px; }
.btn--buy { color: #06351f; background: linear-gradient(180deg, #8bf3b5, var(--green-dk)); box-shadow: 0 4px 0 #06351f, 0 0 18px rgba(95, 224, 138, 0.45); }
.btn--share { color: #06351f; background: linear-gradient(180deg, #8bf3b5, var(--green-dk)); box-shadow: 0 3px 0 #06351f; margin-top: 6px; }

/* ================= HERO (full-screen landing) ================= */
.hero {
  position: relative; overflow: hidden; min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 70px 0 64px; border-bottom: 4px solid var(--bronze-dk);
}
.hero__rays {
  position: absolute; top: 50%; left: 78%; width: 1500px; height: 1500px; transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, rgba(255, 206, 80, 0.16) 0deg 5deg, transparent 5deg 11deg);
  -webkit-mask: radial-gradient(circle, #000 0%, #000 30%, transparent 62%); mask: radial-gradient(circle, #000 0%, #000 30%, transparent 62%);
  animation: spin 90s linear infinite; z-index: 0;
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.hero__sparkles { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.spark { position: absolute; left: var(--x); top: var(--y); width: 6px; height: 6px; background: var(--cream); box-shadow: 0 0 8px 2px rgba(255, 224, 122, 0.9); animation: twinkle 2.4s ease-in-out infinite; animation-delay: var(--d); }
.spark::before, .spark::after { content: ""; position: absolute; background: var(--cream); inset: 0; }
.spark::before { transform: scaleX(2.4); } .spark::after { transform: scaleY(2.4); }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(0.5); } 50% { opacity: 1; transform: scale(1); } }

.hero__nav { position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; }
.hero__brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--pixel); font-size: 20px; color: var(--gold); text-shadow: 2px 2px 0 #000; }
.hero__brandcoin { width: 26px; height: 26px; }

.hero__inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 20px; max-width: 1120px; width: 100%; margin: 0 auto; padding: 0 28px; }
.hero__title { margin: 0 0 24px; line-height: 1.18; }
.hero__title span { display: block; font-family: var(--pixel); color: var(--gold); text-shadow: 4px 4px 0 #2a1806, 0 0 18px rgba(255, 204, 51, 0.45); }
.hero__title-1, .hero__title-2 { font-size: 48px; }
.hero__title-3 { font-size: 48px; color: var(--gold-hi); }
.hero__ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__howto { font-family: var(--mono); font-size: 19px; color: var(--muted); margin: 14px 0 0; }
.hero__feats { list-style: none; margin: 26px 0 0; padding: 0; display: flex; gap: 26px; flex-wrap: wrap; }
.hero__feats li { display: flex; flex-direction: column; align-items: center; gap: 8px; font-family: var(--pixel); font-size: 11px; color: var(--muted); }
.feat__icon { width: 30px; height: 30px; }

.hero__scroll { position: absolute; bottom: 16px; left: 50%; transform: translate(-50%, 0); z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 8px; font-family: var(--pixel); font-size: 11px; color: var(--gold); text-decoration: none; text-shadow: 2px 2px 0 #000; animation: bobDown 1.6s ease-in-out infinite; }
.hero__scroll span { font-size: 18px; }
@keyframes bobDown { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* coin stage */
.hero__stage { position: relative; height: 400px; display: flex; align-items: center; justify-content: center; }
.podium { position: absolute; bottom: 56px; left: 50%; transform: translateX(-50%); width: 280px; height: 46px; background: linear-gradient(180deg, var(--gold-deep), var(--bronze)); border: 4px solid var(--bronze-dk); border-radius: 6px; box-shadow: 0 10px 0 rgba(0,0,0,0.4), 0 0 50px rgba(255, 180, 40, 0.35); }
.podium::before { content: ""; position: absolute; left: 50%; top: -10px; transform: translateX(-50%); width: 220px; height: 12px; background: var(--gold-hi); border: 3px solid var(--bronze-dk); }
.coin { image-rendering: pixelated; }
.coin--main { position: relative; width: 270px; height: 270px; margin-bottom: 44px; filter: drop-shadow(0 0 34px rgba(255, 200, 60, 0.65)); animation: float 3.4s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
.coin--mini { position: absolute; width: 54px; height: 54px; filter: drop-shadow(0 0 12px rgba(255, 200, 60, 0.55)); animation: bob 4s ease-in-out infinite; }
.coin--f1 { top: 6%; left: 8%; animation-delay: .2s; }
.coin--f2 { top: 18%; right: 6%; animation-delay: 1.1s; width: 40px; height: 40px; }
.coin--f3 { bottom: 22%; left: 2%; animation-delay: .7s; width: 44px; height: 44px; }
.coin--f4 { bottom: 8%; right: 10%; animation-delay: 1.6s; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-12px) rotate(4deg); } }

/* ================= LIVE PANEL / ARCADE CABINET ================= */
.live { max-width: 720px; margin: 64px auto 0; padding: 0 20px; }
.live__heading { margin-bottom: 26px; }
.cabinet { position: relative; text-align: center; padding: 30px 22px 26px; border: 4px solid var(--gold); background: linear-gradient(180deg, rgba(255,204,51,0.05), rgba(0,0,0,0.25)); box-shadow: 0 0 30px rgba(255, 204, 51, 0.18), inset 0 0 22px rgba(255, 204, 51, 0.08); }
.cabinet__corner { position: absolute; width: 10px; height: 10px; background: var(--gold); }
.cabinet__corner--tl { top: -7px; left: -7px; } .cabinet__corner--tr { top: -7px; right: -7px; }
.cabinet__corner--bl { bottom: -7px; left: -7px; } .cabinet__corner--br { bottom: -7px; right: -7px; }
.cabinet__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; font-family: var(--pixel); font-size: 11px; }
.cabinet__title { color: var(--gold); display: inline-flex; align-items: center; gap: 8px; }
.cabinet__demo { color: #2a1806; background: var(--bronze); padding: 4px 7px; font-size: 9px; letter-spacing: 1px; }
.live-dot { width: 9px; height: 9px; background: var(--green); display: inline-block; box-shadow: 0 0 8px var(--green); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

.live__tierbar { display: flex; justify-content: center; gap: 16px; align-items: center; font-family: var(--pixel); font-size: 11px; color: var(--muted); margin-bottom: 20px; }
.live__tier { color: #2a1806; background: var(--gold-hi); padding: 6px 10px; border: 2px solid #2a1806; }
.live__mc b { color: var(--gold); }

.live__label { font-family: var(--pixel); font-size: 12px; color: var(--muted); margin: 0 0 14px; }
.countdown { font-family: var(--pixel); font-size: 64px; color: var(--count); text-shadow: 0 0 22px rgba(255, 204, 51, 0.55), 4px 4px 0 #2a1806; letter-spacing: 2px; transition: color 0.4s; }
@media (max-width: 600px) { .countdown { font-size: 40px; } }

.pot { margin: 28px auto 8px; display: inline-flex; flex-direction: column; gap: 8px; padding: 18px 34px; border: 4px solid var(--gold); background: rgba(255, 204, 51, 0.06); box-shadow: 0 0 26px rgba(255, 204, 51, 0.25), inset 0 0 14px rgba(255, 204, 51, 0.1); }
.pot__label, .pot__sub { font-family: var(--pixel); font-size: 11px; color: var(--muted); }
.pot__value-wrap { position: relative; display: inline-block; }
.pot__value { font-family: var(--pixel); font-size: 38px; color: var(--gold); text-shadow: 2px 2px 0 #2a1806; }
.pot__delta { position: absolute; top: -10px; right: -8px; font-family: var(--pixel); font-size: 12px; color: var(--green); opacity: 0; }
.pot__delta.show { animation: deltaPop 1s ease-out; }
@keyframes deltaPop { 0% { opacity: 0; transform: translateY(6px); } 25% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }

/* last winner ticker line */
.laststrip { margin-top: 20px; font-family: var(--mono); font-size: 19px; color: var(--muted); }
.laststrip b { color: var(--green); font-family: var(--pixel); font-size: 12px; }

/* Solscan / proof links */
.sol-link { color: var(--gold-hi); text-decoration: none; }
.sol-link:hover { text-decoration: underline; }
.proof-link { color: var(--green); text-decoration: none; border-bottom: 1px dotted var(--green-dk); }
.proof-link:hover { color: var(--gold-hi); border-bottom-color: var(--gold-hi); }
.winners__item a.w-wallet { text-decoration: none; }
.winners__item a.w-wallet:hover { text-decoration: underline; }
.winners__item a.w-time { color: var(--muted); text-decoration: none; }
.winners__item a.w-time:hover { color: var(--green); }
.modal__verify { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; font-family: var(--mono); font-size: 17px; }
.picker__reel a { color: inherit; text-decoration: none; }
.picker__reel a:hover { text-decoration: underline; }

/* ===== DRAW MODAL (raffle flash picker) ===== */
.modal { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(8, 5, 1, 0.86); }
.modal[hidden] { display: none; }
.modal__box { position: relative; width: 100%; max-width: 520px; text-align: center; padding: 34px 26px 28px; border: 4px solid var(--gold); background: linear-gradient(180deg, #1c1206, #0d0802); box-shadow: 0 0 50px rgba(255, 204, 51, 0.3), inset 0 0 24px rgba(255, 204, 51, 0.08); animation: modalIn 0.25s ease-out; }
@keyframes modalIn { 0% { transform: scale(0.85); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.modal__head { font-family: var(--pixel); font-size: 14px; color: var(--gold); display: inline-flex; align-items: center; gap: 10px; }
.modal__sub { font-family: var(--mono); font-size: 18px; color: var(--muted); margin-top: 10px; }
.picker { margin: 22px auto; padding: 22px 14px; border: 3px solid var(--bronze-dk); background: #1b1206; box-shadow: inset 0 0 18px #000; overflow: hidden; }
.picker__reel { font-family: var(--mono); font-size: 40px; color: var(--gold-hi); letter-spacing: 1px; text-shadow: 0 0 14px rgba(255, 204, 51, 0.5); }
.picker__reel.is-locked { color: var(--green); font-family: var(--pixel); font-size: 26px; animation: lockFlash 0.5s steps(2) 3; text-shadow: 0 0 18px rgba(95, 224, 138, 0.8); }
@keyframes lockFlash { 50% { opacity: 0.4; } }
.modal__result { display: flex; flex-direction: column; align-items: center; gap: 12px; animation: modalIn 0.3s ease-out; }
.modal__result[hidden] { display: none; }
.modal__result-label { font-family: var(--pixel); font-size: 14px; color: var(--green); }
.modal__result-prize { font-family: var(--pixel); font-size: 30px; color: var(--gold); text-shadow: 2px 2px 0 #2a1806; }
.modal__close { background: none; color: var(--muted); border-color: var(--bronze); box-shadow: none; cursor: pointer; }
.modal__close:hover { color: var(--gold); border-color: var(--gold); }
@media (max-width: 520px) { .picker__reel { font-size: 30px; } }

/* live eligibility status */
.eligible { max-width: 430px; margin: 22px auto 4px; display: flex; flex-direction: column; align-items: center; gap: 5px; border: 3px solid var(--green-dk); background: rgba(95, 224, 138, 0.08); padding: 12px 16px; }
.eligible__dot { width: 9px; height: 9px; background: var(--green); box-shadow: 0 0 8px var(--green); animation: blink 1.1s steps(1) infinite; }
.eligible__main { font-family: var(--pixel); font-size: 11px; color: var(--green); text-align: center; }
.eligible__sub { font-family: var(--mono); font-size: 17px; color: var(--muted); text-align: center; }

.cabinet__buy { margin-top: 22px; }

/* ================= THIS COULD BE YOUR FUTURE ================= */
.future { max-width: 900px; margin: 52px auto; padding: 0 20px; }
.future__frame { position: relative; height: 230px; border: 4px solid var(--gold); overflow: hidden; box-shadow: 0 0 26px rgba(255, 204, 51, 0.2); }
.future__scene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.7s ease; }
.future__scene.is-active { opacity: 1; }
.future__copy { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; background: linear-gradient(180deg, rgba(0,0,0,0.45), rgba(0,0,0,0.15)); }
.future__title { font-family: var(--pixel); font-size: 26px; color: var(--gold-hi); margin: 0; line-height: 1.4; text-shadow: 3px 3px 0 #000, 0 0 16px rgba(0,0,0,0.8); }
.future__sub { font-family: var(--mono); font-size: 21px; color: var(--cream); margin: 12px 0 0; text-shadow: 2px 2px 0 #000; }
@media (max-width: 600px) { .future__title { font-size: 18px; } }

/* ================= LIVE FEED / WINNERS ================= */
.winners { max-width: 900px; margin: 46px auto; padding: 0 20px; }
.winners__stats { display: flex; gap: 14px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; }
.stat { border: 3px solid var(--bronze); background: rgba(40,24,6,0.5); padding: 12px 18px; text-align: center; }
.stat__label { display: block; font-family: var(--pixel); font-size: 9px; color: var(--muted); margin-bottom: 8px; }
.stat__val { font-family: var(--pixel); font-size: 16px; color: var(--gold); }
.stat__val--green { color: var(--green); }
.winners__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.winners__item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 16px; background: linear-gradient(90deg, rgba(255,204,51,0.07), rgba(255,204,51,0.02)); border-left: 4px solid var(--gold); font-family: var(--mono); font-size: 21px; }
.winners__item--top { border-left-color: var(--green); background: linear-gradient(90deg, rgba(95,224,138,0.12), rgba(95,224,138,0.02)); }
.winners__list[data-expanded="false"] .winners__item:nth-child(n+6) { display: none; }
.winners__item .w-wallet { color: var(--gold-hi); }
.winners__item .w-prize { color: var(--green); font-family: var(--pixel); font-size: 12px; }
.winners__item .w-time { color: var(--muted); font-size: 17px; }
.winners__toggle { display: block; margin: 14px auto 0; font-family: var(--pixel); font-size: 10px; color: var(--gold); background: none; border: 2px solid var(--bronze); padding: 9px 14px; cursor: pointer; }
.winners__toggle:hover { border-color: var(--gold); }

/* ================= HOW ================= */
.how { max-width: 920px; margin: 58px auto; padding: 0 20px; }
.how__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 700px) { .how__grid { grid-template-columns: 1fr; } }
.how__card { border: 3px solid var(--bronze); background: rgba(40, 24, 6, 0.55); padding: 24px 18px; text-align: center; box-shadow: inset 0 0 18px rgba(0,0,0,0.4); }
.how__icon { width: 44px; height: 44px; }
.how__card h3 { font-family: var(--pixel); font-size: 11px; color: var(--gold); margin: 14px 0 10px; }
.how__card p { color: var(--muted); font-size: 19px; line-height: 1.45; }

/* ================= FOOTER ================= */
.footer { max-width: 900px; margin: 0 auto; padding: 40px 20px 64px; text-align: center; }
.footer__coin { width: 46px; height: 46px; margin-bottom: 16px; filter: drop-shadow(0 0 14px rgba(255,200,60,0.5)); }
.footer__ca { font-family: var(--pixel); font-size: 11px; color: var(--muted); margin-bottom: 18px; }
.footer__ca code { color: var(--gold); display: block; margin-top: 8px; font-family: var(--mono); font-size: 19px; word-break: break-all; }
.footer__links { display: flex; gap: 14px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; }
.footer__links a { display: inline-flex; align-items: center; gap: 8px; font-family: var(--pixel); font-size: 10px; color: #2a1806; background: var(--gold); padding: 10px 14px; text-decoration: none; border: 2px solid #2a1806; box-shadow: 0 3px 0 #2a1806; }
.footer__links a img { width: 16px; height: 16px; }
.footer__links a:active { transform: translateY(2px); box-shadow: 0 1px 0 #2a1806; }
.footer__disclaimer { color: var(--muted); font-size: 17px; }

/* ================= CONFETTI ================= */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.confetti i { position: absolute; width: 8px; height: 8px; background: var(--gold); will-change: transform, opacity; }
@keyframes fall { to { transform: translateY(var(--fall, 600px)) translateX(var(--drift, 0)) rotate(180deg); opacity: 0; } }

/* ================= RESPONSIVE ================= */
@media (max-width: 820px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__copy { order: 2; }
  .hero__stage { order: 1; height: 300px; }
  .hero__ctas, .hero__feats { justify-content: center; }
  .hero__rays { left: 50%; top: 42%; }
  .hero__title-1, .hero__title-2, .hero__title-3 { font-size: 34px; }
  .coin--main { width: 200px; height: 200px; }
}
@media (max-width: 560px) { .hero__nav .btn--sm { display: none; } }
@media (max-width: 460px) { .hero__title-1, .hero__title-2, .hero__title-3 { font-size: 26px; } }

@media (prefers-reduced-motion: reduce) {
  .hero__rays, .coin--main, .coin--mini, .spark, .live-dot, .eligible__dot, .hero__scroll { animation: none; }
  .stage[data-mode="winner"] .stage__winner { animation: none; }
  .future__scene { transition: none; }
  body { transition: none; }
}
