:root {
  --bg: #ffffff;
  --ink: #0b0b0b;
  --muted: #6f6f6b;
  --line: #ebebe7;
  --soft: #f6f6f3;
  --red: #e3350d;
  --epic: #c2410c;
  --rare: #6d28d9;
  --uncommon: #1d4ed8;
  --common: #57534e;
  --display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 15px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
h2, h3, dt, th, .eyebrow, .badge, .logo span, .countdown, .tag {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
h2 { margin: 0; font-size: 22px; line-height: 1; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo span { font-size: 30px; line-height: 1; }
.top-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ca {
  display: inline-flex; align-items: center; gap: 10px; min-width: 0;
  border: 1px solid var(--line); background: var(--bg); border-radius: 999px;
  padding: 8px 8px 8px 14px; font: 600 13px var(--body); color: var(--ink); cursor: pointer;
}
.ca:hover { border-color: var(--ink); }
.pump { font: 400 14px/1 var(--display); letter-spacing: 0.03em; text-decoration: none; white-space: nowrap; background: var(--red); color: #fff; border-radius: 999px; padding: 11px 14px; }
.pump:hover { background: var(--ink); }
.ca-k { font-family: var(--display); color: var(--muted); }
#ca-v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ca-copy { font-family: var(--display); background: var(--ink); color: var(--bg); border-radius: 999px; padding: 3px 10px; }

.badge { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; border-radius: 999px; padding: 4px 10px; line-height: 1.2; }
.badge-dry { background: var(--soft); border: 1px dashed var(--muted); color: var(--muted); }
.badge-live { background: var(--red); color: #fff; }
.badge-live i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }

/* Hero */
.hero { padding: 40px 0 44px; text-align: center; border-bottom: 1px solid var(--line); }
.eyebrow { font-size: 18px; color: var(--muted); }
.countdown { font-size: clamp(88px, 19vw, 210px); line-height: 0.95; font-variant-numeric: tabular-nums; margin: 6px 0 14px; }
.countdown.rolling { color: var(--red); }
.sub { max-width: 560px; margin: 0 auto; color: var(--muted); font-size: 16px; }
.last-winner { margin: 14px auto 0; font-size: 14px; }
.last-winner b { font-weight: 800; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 34px auto 0; max-width: 900px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stats div { padding: 16px 12px; border-left: 1px solid var(--line); }
.stats div:first-child { border-left: 0; }
.stats dt { font-size: 14px; color: var(--muted); }
.stats dd { margin: 4px 0 0; font: 800 26px/1.1 var(--body); font-variant-numeric: tabular-nums; }

/* Panels */
.packs { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 36px 0 0; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.panel-body { margin-top: 16px; }
.feature { display: grid; grid-template-columns: 150px 1fr; gap: 20px; align-items: center; }
.feature-img { background: var(--soft); border-radius: 10px; aspect-ratio: 3 / 4; display: grid; place-items: center; overflow: hidden; }
.feature-img img { width: 100%; height: 100%; object-fit: contain; }
.feature-title { font-weight: 800; font-size: 17px; line-height: 1.3; margin: 8px 0 4px; }
.feature-meta { color: var(--muted); font-size: 14px; margin: 0; }
.feature-value { font-family: var(--display); font-size: 34px; line-height: 1; margin-top: 12px; }
.feature-value small { font-family: var(--body); font-weight: 600; font-size: 13px; color: var(--muted); margin-left: 6px; }

.tag { display: inline-block; font-size: 12px; padding: 3px 8px; border-radius: 6px; color: #fff; background: var(--common); line-height: 1.2; }
.tag.epic { background: var(--epic); }
.tag.rare { background: var(--rare); }
.tag.uncommon { background: var(--uncommon); }

.progress { height: 12px; background: var(--soft); border-radius: 999px; overflow: hidden; margin-top: 14px; }
.progress span { display: block; height: 100%; background: var(--red); border-radius: 999px; transition: width 0.6s ease; }
.progress-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }

/* Queue */
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.count { font: 700 12px/1 var(--body); background: var(--ink); color: var(--bg); border-radius: 999px; padding: 5px 9px; }
.queue { padding: 40px 0 0; }
.queue-row.is-empty { display: block; }
.queue-row { display: grid; grid-auto-flow: column; grid-auto-columns: 168px; gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
.qcard { border: 1px solid var(--line); border-radius: 12px; padding: 10px; scroll-snap-align: start; position: relative; min-width: 0; }
.qcard.next { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.qcard .feature-img { aspect-ratio: 3 / 4; }
.qcard-name { font-weight: 700; font-size: 13px; line-height: 1.3; margin: 8px 0 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.qcard-value { font-family: var(--display); font-size: 20px; }
.qcard-flag { position: absolute; top: 16px; left: 16px; z-index: 1; }
.qcard-flag.tag { background: var(--ink); }

/* Columns */
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 40px 0 0; }
.col { min-width: 0; }
.scroller { border: 1px solid var(--line); border-radius: var(--radius); height: 560px; overflow: auto; }
.note { color: var(--muted); font-size: 13px; margin: 8px 2px 0; }

.holders { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.holders th { white-space: nowrap; position: sticky; top: 0; background: var(--bg); text-align: left; font-size: 13px; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); }
.holders td { padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.holders tr:last-child td { border-bottom: 0; }
.holders .num { text-align: right; }
.holders td:first-child { color: var(--muted); width: 48px; }
.holders a { text-decoration: none; font-weight: 600; }
.holders a:hover { text-decoration: underline; }
.holders tr.hit td { background: #fff4f1; }

.txs { list-style: none; margin: 0; padding: 0; }
.txs li { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: start; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.txs li:last-child { border-bottom: 0; }
.txs .tag { text-align: center; }
.tag.k-buy { background: var(--ink); }
.tag.k-open { background: var(--rare); }
.tag.k-swap { background: var(--muted); }
.tag.k-raffle { background: var(--red); }
.tx-text { min-width: 0; overflow-wrap: anywhere; }
.tx-time { color: var(--muted); font-size: 12px; text-align: right; white-space: nowrap; }
.tx-time a { display: block; color: var(--ink); font-weight: 700; text-decoration: none; }
.tx-time a:hover { text-decoration: underline; }

.empty { color: var(--muted); margin: 0; padding: 14px; }
.txs li.empty, td.empty { display: block; padding: 18px 14px; border: 0; }

.foot { padding-top: 44px; padding-bottom: 48px; color: var(--muted); font-size: 13px; }
.foot p { max-width: 720px; margin: 0; }

/* Live overlay */
.live { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: grid; place-items: center; padding: 24px 16px; overflow-y: auto; }
.live[hidden] { display: none; }
.live-inner { width: 100%; max-width: 560px; text-align: center; }
.live-top, .live-title, .live-status { position: relative; z-index: 2; }
.live-top { display: flex; justify-content: space-between; align-items: center; }
.live-close { font: 400 14px var(--display); letter-spacing: 0.04em; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.live-close:hover { border-color: var(--ink); }
.live-title { font-size: clamp(36px, 8vw, 60px); line-height: 1; margin: 22px 0 18px; }
.live-status { color: var(--muted); font-size: 15px; min-height: 1.5em; margin: 18px 0 0; }
.live-stage { min-height: 380px; display: grid; place-items: center; }

.pack { width: 240px; height: 340px; display: grid; place-items: center; }
.pack img { max-height: 100%; width: auto; object-fit: contain; filter: drop-shadow(0 18px 24px rgba(0,0,0,0.18)); }
.pack.buying img { animation: bob 1.6s ease-in-out infinite; }
.pack.opening img { animation: shake 0.5s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px); } }
@keyframes shake {
  0%, 100% { transform: rotate(0) scale(1.02); }
  25% { transform: rotate(-4deg) scale(1.05); }
  75% { transform: rotate(4deg) scale(1.05); }
}

/* Reveal: the card is the hero */
.reveal { --rc: #94a3b8; --holo: 0.38; position: relative; display: grid; justify-items: center; width: 100%; }
.reveal.r-uncommon { --rc: #3b82f6; --holo: 0.48; }
.reveal.r-rare { --rc: #8b5cf6; --holo: 0.6; }
.reveal.r-epic { --rc: #f59e0b; --holo: 0.75; }

.rays {
  position: fixed; left: 50%; top: 46%; width: 180vmax; height: 180vmax; translate: -50% -50%;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rc) 20%, transparent) 0deg 5deg, transparent 5deg 15deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, rgba(0,0,0,0.5) 18%, transparent 42%);
  mask-image: radial-gradient(circle, #000 0%, rgba(0,0,0,0.5) 18%, transparent 42%);
  pointer-events: none; z-index: 0;
  animation: fade-in 0.9s ease-out 1.25s both, rays-spin 60s linear infinite;
}
@keyframes rays-spin { to { rotate: 360deg; } }
@keyframes fade-in { from { opacity: 0; } }

.card-stage { position: relative; z-index: 1; display: grid; place-items: center; perspective: 1400px; padding: 8px 0 4px; }
.card-stage .glow {
  position: absolute; width: 150%; height: 105%; border-radius: 50%; background: var(--rc);
  filter: blur(70px); opacity: 0.5; pointer-events: none;
  animation: glow-in 1s ease-out 1.2s both, breathe 3.2s ease-in-out 2.2s infinite;
}
@keyframes glow-in { from { opacity: 0; transform: scale(0.4); } }
@keyframes breathe { 50% { opacity: 0.32; transform: scale(0.92); } }

.tilt { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d; will-change: transform; touch-action: none; }
.spin { position: relative; transform-style: preserve-3d; animation: card-in 1.45s cubic-bezier(0.16, 0.84, 0.24, 1) both; }
@keyframes card-in {
  0% { transform: translateY(42vh) rotateY(-900deg) rotateZ(-8deg) scale(0.3); opacity: 0; }
  10% { opacity: 1; }
  72% { transform: translateY(-14px) rotateY(-12deg) rotateZ(0) scale(1.05); }
  100% { transform: translateY(0) rotateY(0) scale(1); }
}

.face { position: absolute; inset: 0; border-radius: 12px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.face.front { box-shadow: 0 34px 60px -22px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,0,0,0.06); background: #fff; }
.face.front img { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.front-fallback { height: 100%; display: grid; place-items: center; padding: 24px; font-weight: 800; font-size: 18px; background: var(--soft); }
.face.back { transform: rotateY(180deg); background: radial-gradient(circle at 50% 42%, #2b2b2b, #0b0b0b 70%); display: grid; place-items: center; box-shadow: inset 0 0 0 10px #161616, inset 0 0 0 12px var(--rc); }
.face.back img { width: 36%; }

/* Foil: a rainbow band that slides with the light, concentrated where the light hits */
.holo {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color-dodge; opacity: var(--holo);
  background-image: repeating-linear-gradient(115deg, #ff6f91 0%, #ffd36b 7%, #a6ff6b 14%, #6bfff3 21%, #6b8bff 28%, #d36bff 35%, #ff6f91 42%);
  background-size: 260% 260%;
  background-position: var(--hx, 50%) var(--hy, 50%);
  filter: brightness(0.55) contrast(1.5) saturate(1.3);
  -webkit-mask-image: radial-gradient(farthest-corner circle at var(--mx, 50%) var(--my, 50%), #000 0%, rgba(0,0,0,0.55) 35%, rgba(0,0,0,0.12) 80%);
  mask-image: radial-gradient(farthest-corner circle at var(--mx, 50%) var(--my, 50%), #000 0%, rgba(0,0,0,0.55) 35%, rgba(0,0,0,0.12) 80%);
}
.glare {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: overlay;
  background: radial-gradient(farthest-corner circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.7) 0%, rgba(255,255,255,0.18) 24%, rgba(0,0,0,0.28) 95%);
}
.sweep {
  position: absolute; inset: -30%; pointer-events: none; mix-blend-mode: soft-light;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,0.95) 50%, transparent 62%);
  animation: sweep 4.2s ease-in-out 1.35s infinite both;
}
@keyframes sweep { 0% { transform: translateX(-75%); } 32%, 100% { transform: translateX(75%); } }

/* Sparkles burst out when the card lands */
.sparks { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.sparks i {
  position: absolute; width: var(--s); height: var(--s); background: var(--rc); opacity: 0;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  animation: spark 1.1s cubic-bezier(0.1, 0.8, 0.3, 1) calc(1.15s + var(--t)) both;
}
@keyframes spark {
  0% { opacity: 1; transform: rotate(var(--a)) translateX(0) scale(1.4); }
  100% { opacity: 0; transform: rotate(var(--a)) translateX(var(--d)) scale(0.2); }
}

/* Title, details and status arrive after the card lands */
.late { display: inline-block; animation: late-in 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3) 1.25s both; }
.late-2 { display: block; width: 100%; animation-delay: 1.5s; animation-name: rise-in; animation-timing-function: ease-out; }
@keyframes late-in { from { opacity: 0; transform: scale(0.6); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } }
.reveal .late-2 { position: relative; z-index: 1; max-width: 520px; }

.reveal-name { font-weight: 800; font-size: 18px; line-height: 1.35; margin: 20px auto 14px; max-width: 460px; }

/* Rail: a bordered row of label/value cells, same language as the hero stats */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-align: center; }
.rail div { padding: 12px 10px; border-left: 1px solid var(--line); min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.rail div:first-child { border-left: 0; }
.rail dt { font-family: var(--display); font-size: 13px; letter-spacing: 0.02em; color: var(--muted); line-height: 1; }
.rail dd { margin: 0; font: 800 17px/1.2 var(--body); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rail dd .tag { font-size: 13px; }
.rail div:last-child dd { font: 400 26px/1 var(--display); letter-spacing: 0.01em; }

.draw { width: 100%; }
.draw-card { width: 120px; aspect-ratio: 3 / 4; margin: 0 auto 18px; background: var(--soft); border-radius: 10px; overflow: hidden; }
.draw-card img { width: 100%; height: 100%; object-fit: contain; }
.ticker { font-family: var(--display); font-size: clamp(28px, 7vw, 46px); line-height: 1.1; border: 2px solid var(--ink); border-radius: var(--radius); padding: 18px 12px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ticker.landed { background: var(--ink); color: var(--bg); }
.draw-meta { color: var(--muted); margin-top: 12px; font-size: 14px; }
.draw .reveal-name { margin-top: 18px; }
.draw .reveal { margin-bottom: 18px; }
.draw.won .ticker.landed, .draw.won .reveal-name, .draw.won .rail { animation: late-in 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3) 1.25s both; }

@media (max-width: 900px) {
  .packs, .columns { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(3) { border-left: 0; }
  .stats div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .scroller { height: 460px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .logo span { font-size: 24px; }
  .logo img { width: 30px; height: 30px; }
  .ca-k { display: none; }
  .top { flex-wrap: wrap; }
  .top-right { flex-wrap: wrap; justify-content: flex-end; }
  .pump { font-size: 13px; padding: 9px 12px; }
  .hero { padding: 28px 0 32px; }
  .stats dd { font-size: 21px; }
  .feature { grid-template-columns: 110px 1fr; gap: 14px; }
  .feature-value { font-size: 28px; }
  .holders th, .holders td { padding: 10px 8px; }
  .holders th { font-size: 12px; }
  .txs li { grid-template-columns: 56px 1fr; }
  .tx-time { grid-column: 2; text-align: left; }
  .live-stage { min-height: 320px; }
  .pack { width: 200px; height: 280px; }
  .rail { grid-auto-flow: row; }
  .rail div { border-left: 0; border-top: 1px solid var(--line); flex-direction: row; justify-content: space-between; align-items: center; }
  .rail div:first-child { border-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
