:root {
  --bg: #07060d;
  --bg2: #0e0c1a;
  --panel: rgba(255, 255, 255, .035);
  --line: rgba(255, 255, 255, .09);
  --text: #eeeaf6;
  --dim: #9a93b3;
  --gold: #ffc043;
  --buy: #4fd18b;
  --sell: #ff5a6e;
  --pink: #ff5ec4;
  --violet: #8b6bff;
  --cyan: #34e1ff;
  --lime: #b6ff5c;
  --holo: linear-gradient(115deg, #ff5ec4, #8b6bff 20%, #34e1ff 40%, #b6ff5c 60%, #ffc043 80%, #ff5ec4);
  --rarity: #9fb4c8;
  --r: 14px;
  --display: 'Bungee', system-ui, sans-serif;
  --ui: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--ui); }
body {
  min-height: 100vh; overflow-x: hidden;
  background:
    radial-gradient(900px 600px at 50% 18%, rgba(139, 107, 255, .16), transparent 70%),
    radial-gradient(700px 500px at 15% 90%, rgba(255, 94, 196, .07), transparent 70%),
    radial-gradient(700px 500px at 90% 80%, rgba(52, 225, 255, .06), transparent 70%),
    var(--bg);
}
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 30; }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: 12px 22px; background: rgba(7, 6, 13, .78); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.logo img { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 0 18px rgba(139, 107, 255, .45); }
.logo-word {
  font-family: var(--display); font-size: 28px; letter-spacing: 1px; line-height: 1;
  background: var(--holo); -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% 100%; animation: holoShift 6s linear infinite;
}
.tick { font-family: var(--mono); font-size: 12px; color: var(--dim); }
@keyframes holoShift { to { background-position: -200% 0; } }
.status { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); color: var(--dim); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.status.live { color: var(--buy); border-color: rgba(79, 209, 139, .35); }
.status.live i { background: var(--buy); box-shadow: 0 0 10px var(--buy); animation: blink 1.6s infinite; }
.status.sim { color: var(--gold); border-color: rgba(255, 192, 67, .35); }
.status.sim i { background: var(--gold); }
@keyframes blink { 50% { opacity: .35; } }
.mc { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.mc small, .ca small { font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.mc b { font-family: var(--mono); font-size: 16px; }
.ca { display: flex; flex-direction: column; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 5px 10px; line-height: 1.15; }
.ca span { font-family: var(--mono); font-size: 12px; }
.icon { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; width: 38px; height: 38px; font-size: 16px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  font-weight: 700; font-size: 14px; padding: 10px 16px; border-radius: 12px; border: 0;
  background: var(--holo); background-size: 200% 100%; color: #120d1f; animation: holoShift 8s linear infinite;
  box-shadow: 0 6px 24px rgba(139, 107, 255, .25); transition: transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: var(--panel); color: var(--text); border: 1px solid var(--line); box-shadow: none; animation: none; }
.btn.small { padding: 8px 12px; font-size: 13px; }

/* ---------- stage ---------- */
.stage { display: grid; grid-template-columns: 300px minmax(380px, 1fr) 320px; gap: 22px; padding: 22px; max-width: 1480px; margin: 0 auto; }
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.panel h3 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); display: flex; justify-content: space-between; align-items: baseline; }
.panel h3 small { font-family: var(--mono); letter-spacing: 0; text-transform: none; }
.empty { color: var(--dim); font-size: 14px; margin: 0; grid-column: 1 / -1; }

.center { align-items: center; }
.banner { text-align: center; min-height: 74px; }
.b1 { font-family: var(--display); font-size: 30px; letter-spacing: 1px; line-height: 1.1; }
.b2 { color: var(--dim); font-size: 15px; margin-top: 4px; }
.banner.hot .b1 { color: var(--gold); text-shadow: 0 0 24px rgba(255, 192, 67, .5); }
.banner.win .b1 { background: var(--holo); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 100%; animation: holoShift 3s linear infinite; }

/* ---------- the pack ---------- */
.machine { position: relative; width: 100%; height: 470px; overflow: hidden; display: grid; place-items: center; perspective: 1100px; }
.pack { position: relative; width: 250px; height: 380px; transform-style: preserve-3d; transition: transform .25s ease-out; }
.pack-top, .pack-body { position: absolute; left: 0; right: 0; overflow: hidden; }
.pack-top { top: 0; height: 58px; border-radius: 10px 10px 0 0; z-index: 2; }
.pack-body { top: 58px; bottom: 0; border-radius: 0 0 14px 14px; }
/* the painted pack (art/packfront.png) is split across the tear line: top strip + body */
.pack .foil {
  position: absolute; left: 0; right: 0; top: 0; height: 380px;
  background: url(/img/pack.webp) 0 0 / 250px 380px no-repeat, #2a1b4f;
}
.pack-body .foil { top: -58px; }
.pack-body .foil::after { /* calm the art behind the logo */
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 34% at 50% 58%, rgba(20, 10, 40, .55), transparent 75%);
}
.pack-top .foil { filter: brightness(1.1); }
.pack { filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .55)) drop-shadow(0 0 30px rgba(139, 107, 255, .25)); }
.fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0%; transition: height .8s cubic-bezier(.2, .8, .2, 1); }
.fill-glow {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255, 192, 67, .55), rgba(255, 94, 196, .35) 60%, rgba(139, 107, 255, .3));
  mix-blend-mode: screen; opacity: .5;
}
.fill::before { /* the surface line */
  content: ''; position: absolute; left: 0; right: 0; top: -2px; height: 4px;
  background: linear-gradient(90deg, transparent, #fff6d6, transparent); box-shadow: 0 0 16px #ffc043; opacity: .9;
}
.pack-face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 18px; }
.pack-face { transition: opacity .3s; }
.pack.counting .pack-face { opacity: .18; }
.pf-kicker, .pf-sub { padding: 3px 9px; border-radius: 99px; background: rgba(12, 6, 28, .72); color: #fff; text-shadow: 0 1px 2px #000; }
.pf-kicker { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }
.pf-logo {
  font-family: var(--display); font-size: 70px; line-height: 1; margin: 16px 0 10px;
  background: var(--holo); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 100%;
  animation: holoShift 5s linear infinite; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .7)) drop-shadow(0 0 14px rgba(0, 0, 0, .6));
}
.pf-tier { font-family: var(--mono); font-weight: 700; font-size: 13px; padding: 5px 10px; border-radius: 6px; background: rgba(12, 6, 28, .8); border: 1px solid rgba(255, 255, 255, .2); }
.pf-sub { margin-top: 14px; font-size: 11px; }
.shine {
  position: absolute; inset: -40%; pointer-events: none;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .22) 48%, rgba(255, 255, 255, .05) 52%, transparent 60%);
  transform: translateX(var(--sx, -30%)); mix-blend-mode: screen;
}
.count {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3;
  font-family: var(--display); font-size: 96px; color: #fff; text-shadow: 0 0 30px rgba(255, 192, 67, .9), 0 6px 0 rgba(0, 0, 0, .4);
  pointer-events: none; opacity: 0;
}
.beam {
  position: absolute; left: 50%; top: 45px; width: 250px; height: 520px; transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 12%, rgba(255, 246, 214, .95), rgba(255, 192, 67, .35) 30%, transparent 65%);
  opacity: 0; pointer-events: none; mix-blend-mode: screen; filter: blur(6px);
}

/* the card */
.card3d { position: absolute; left: 50%; top: 50%; width: 236px; height: 372px; margin: -186px 0 0 -118px; perspective: 1000px; opacity: 0; pointer-events: none; z-index: 4; }
.card-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.card-back, .card-front { position: absolute; inset: 0; border-radius: 14px; backface-visibility: hidden; overflow: hidden; }
.card-back {
  display: grid; place-items: center; border: 6px solid #1a1430;
  background: repeating-linear-gradient(45deg, #2a1b4f 0 10px, #22163f 10px 20px);
}
.card-back span { font-family: var(--display); font-size: 40px; background: var(--holo); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card-front { transform: rotateY(180deg); background: #0c0a16; border: 2px solid var(--rarity); box-shadow: 0 0 40px color-mix(in srgb, var(--rarity) 55%, transparent); }
.card-front img { width: 100%; height: 100%; object-fit: contain; display: block; }
.holo {
  position: absolute; inset: 0; mix-blend-mode: color-dodge; opacity: .22; pointer-events: none;
  background: linear-gradient(115deg, transparent 25%, rgba(255, 94, 196, .8), rgba(52, 225, 255, .8), rgba(182, 255, 92, .8), transparent 75%);
  background-size: 250% 250%; animation: holoSweep 3.5s ease-in-out infinite;
}
@keyframes holoSweep { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* draw reel */
.reel {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); width: 280px; height: 132px; overflow: hidden;
  border-radius: 14px; background: rgba(7, 6, 13, .88); border: 1px solid var(--line); opacity: 0; pointer-events: none; z-index: 5;
  -webkit-mask: linear-gradient(transparent, #000 30%, #000 70%, transparent);
  mask: linear-gradient(transparent, #000 30%, #000 70%, transparent);
}
.reel-list { position: absolute; left: 0; right: 0; top: 0; will-change: transform; }
.reel-list div { height: 44px; display: grid; place-items: center; font-family: var(--mono); font-size: 20px; font-weight: 700; color: var(--dim); }
.reel-list div.win { color: var(--gold); }
.reel-mark { position: absolute; left: 10px; right: 10px; top: 44px; height: 44px; border-top: 1px solid rgba(255, 192, 67, .5); border-bottom: 1px solid rgba(255, 192, 67, .5); }

/* result */
.result { text-align: center; min-height: 0; max-height: 0; overflow: hidden; opacity: 0; transition: opacity .4s, max-height .5s; }
.result.on { max-height: 240px; opacity: 1; }
.r-rarity { display: inline-block; font-family: var(--display); font-size: 14px; letter-spacing: 2px; padding: 4px 12px; border-radius: 99px; color: #0c0a16; background: var(--rarity); }
.r-name { font-weight: 700; font-size: 18px; margin: 10px auto 4px; max-width: 520px; }
.r-meta { font-family: var(--mono); color: var(--dim); font-size: 13px; }
.r-won { margin-top: 8px; font-size: 15px; }
.r-won b { font-family: var(--mono); color: var(--gold); }
.r-actions { display: flex; gap: 10px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }

/* meter */
.meter { width: min(460px, 100%); }
.m-top { display: flex; align-items: baseline; gap: 8px; justify-content: center; font-family: var(--mono); }
.m-top b { font-size: 26px; }
.m-top span { color: var(--dim); }
.m-top em { font-style: normal; color: var(--dim); font-family: var(--ui); font-size: 13px; margin-left: 4px; }
.m-bar { position: relative; height: 16px; border-radius: 99px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); overflow: hidden; margin: 8px 0 6px; }
.m-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0%; background: var(--holo); background-size: 300% 100%; animation: holoShift 4s linear infinite; transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.m-sheen { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, .25), transparent 60%); }
.m-sub { text-align: center; color: var(--dim); font-size: 13px; }
.cta { margin-top: 6px; font-size: 15px; padding: 13px 20px; }
.cta.hot { animation: holoShift 2s linear infinite, pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.04); box-shadow: 0 8px 36px rgba(255, 192, 67, .5); } }

/* last pull + wall */
.last-body { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; }
.last-body img { width: 96px; height: 150px; object-fit: contain; border-radius: 8px; background: #0c0a16; border: 1px solid var(--line); }
.last-body .nm { font-weight: 700; font-size: 14px; line-height: 1.3; }
.last-body .vl { font-family: var(--mono); font-size: 20px; color: var(--gold); margin: 6px 0 2px; }
.last-body .wn { font-size: 12px; color: var(--dim); }
.last-body .wn b { font-family: var(--mono); color: var(--text); }
.tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border-radius: 99px; color: #0c0a16; }
.simtag { display: inline-block; font-size: 10px; font-weight: 700; color: var(--gold); border: 1px solid rgba(255, 192, 67, .4); border-radius: 99px; padding: 1px 6px; margin-left: 6px; }
.wall { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-height: 420px; overflow: auto; }
.wall a { position: relative; display: block; aspect-ratio: 5 / 8; border-radius: 6px; overflow: hidden; background: #0c0a16; border: 1px solid var(--line); text-decoration: none; }
.wall img { width: 100%; height: 100%; object-fit: contain; }
.wall a span { position: absolute; left: 0; right: 0; bottom: 0; font-family: var(--mono); font-size: 10px; text-align: center; padding: 2px; background: rgba(0, 0, 0, .7); }
.wall a.new { animation: pop .6s ease-out; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

/* right column */
.me-form { display: flex; gap: 8px; }
.me-form input { flex: 1; min-width: 0; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); border-radius: 10px; color: var(--text); padding: 9px 10px; font-family: var(--mono); font-size: 12px; }
.in-draw { margin-top: 10px; font-family: var(--mono); font-size: 12px; color: var(--gold); }
.in-draw:empty { display: none; }
.me-out { margin-top: 10px; font-size: 13px; color: var(--dim); line-height: 1.45; }
.me-out b { color: var(--text); }
.me-out .big { display: block; font-family: var(--mono); font-size: 26px; color: var(--gold); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats div { display: flex; flex-direction: column; gap: 2px; }
.stats b { font-family: var(--mono); font-size: 20px; }
.stats small { font-size: 11px; color: var(--dim); line-height: 1.25; }
.tape { display: flex; flex-direction: column; gap: 4px; max-height: 330px; overflow: hidden; font-family: var(--mono); font-size: 12px; }
.tape div { display: grid; grid-template-columns: 38px 1fr auto; gap: 8px; align-items: center; padding: 5px 8px; border-radius: 8px; background: rgba(255, 255, 255, .025); animation: slide .35s ease-out; }
.tape div a { text-decoration: none; color: var(--dim); }
.tape .b { color: var(--buy); }
.tape .s { color: var(--sell); }
.tape .x2 { color: #120d1f; background: var(--gold); font-weight: 700; font-size: 10px; padding: 1px 6px; border-radius: 99px; }
@keyframes slide { from { transform: translateY(-8px); opacity: 0; } }

/* roadmap */
.road, .how { max-width: 1480px; margin: 0 auto; padding: 8px 22px 22px; }
.road h2, .how h2 { font-family: var(--display); font-size: 22px; letter-spacing: .5px; margin: 10px 0 14px; }
.road h2 small { font-family: var(--ui); font-size: 13px; color: var(--dim); letter-spacing: 0; margin-left: 10px; }
.road-line { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ms { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.ms .at { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.ms .tt { font-weight: 700; font-size: 16px; margin: 4px 0; }
.ms .tx { font-size: 13px; color: var(--dim); line-height: 1.4; }
.ms .st { position: absolute; right: 12px; top: 12px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.ms.done { border-color: rgba(79, 209, 139, .4); }
.ms.done .st { color: var(--buy); }
.ms.next { border-color: rgba(255, 192, 67, .5); box-shadow: 0 0 30px rgba(255, 192, 67, .12); }
.ms.next .st { color: var(--gold); }
.ms .bar { height: 4px; background: rgba(255, 255, 255, .07); border-radius: 99px; margin-top: 10px; overflow: hidden; }
.ms .bar i { display: block; height: 100%; background: var(--holo); }

/* how + proof */
.how-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 22px; }
.how ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 12px; font-size: 15px; line-height: 1.55; color: #d9d3ea; }
.how ol b { color: var(--text); }
.fine { font-size: 13px; color: var(--dim); line-height: 1.5; margin-top: 16px; }
.proof-rows { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.proof-rows div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--line); padding-bottom: 7px; }
.proof-rows span { color: var(--dim); }
.proof-rows b { font-family: var(--mono); font-weight: 500; text-align: right; }
.proof-rows a { color: var(--cyan); }
.ok { color: var(--buy); } .warn { color: var(--gold); }
.odds-h { margin-top: 16px !important; }
.odds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.odds div { border: 1px solid var(--line); border-radius: 10px; padding: 8px; text-align: center; }
.odds b { display: block; font-family: var(--mono); font-size: 16px; }
.odds small { font-size: 11px; color: var(--dim); }

.foot { max-width: 1480px; margin: 0 auto; padding: 22px; color: var(--dim); font-size: 12px; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); }
.foot .links { display: flex; gap: 16px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(80px); background: #1b1630; border: 1px solid var(--line); padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 50; transition: transform .3s; }
.toast.on { transform: translateX(-50%) translateY(0); }
.announce { position: fixed; inset: 0; display: none; place-items: center; z-index: 60; background: rgba(7, 6, 13, .7); backdrop-filter: blur(4px); }
.announce.on { display: grid; }
.announce div { font-family: var(--display); font-size: clamp(34px, 7vw, 80px); text-align: center; background: var(--holo); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 100%; animation: holoShift 2s linear infinite; }
.announce small { display: block; font-family: var(--ui); font-size: 18px; color: var(--text); -webkit-text-fill-color: var(--text); margin-top: 10px; }

/* ---------- phones ---------- */
@media (max-width: 1100px) {
  .stage { grid-template-columns: 1fr 1fr; }
  .center { grid-column: 1 / -1; order: -1; }
}
@media (max-width: 720px) {
  .top { padding: 10px 14px; gap: 8px; flex-wrap: wrap; }
  .status .long { display: none; }
  .icon { width: 34px; height: 34px; font-size: 14px; }
  .banner { min-height: 64px; }
  .logo-word { font-size: 24px; }
  .mc, .tick { display: none; }
  .ca { order: 5; flex: 1 1 100%; flex-direction: row; gap: 8px; align-items: center; }
  .ca span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .status { font-size: 10px; padding: 5px 9px; }
  .top .buy { padding: 8px 12px; font-size: 13px; }
  .stage { grid-template-columns: 1fr; padding: 14px 16px; gap: 14px; }
  .machine { height: 420px; }
  .pack { transform: scale(.9); }
  .b1 { font-size: 21px; }
  .count { font-size: 80px; }
  .road-line { grid-template-columns: 1fr 1fr; }
  .how-grid { grid-template-columns: 1fr; }
  .road, .how { padding: 8px 16px 16px; }
  .foot { flex-direction: column; padding: 16px; }
  .wall { grid-template-columns: repeat(4, 1fr); max-height: 300px; }
}
