:root {
  --bg: #0b0d17;
  --panel: rgba(255, 255, 255, .035);
  --panel-2: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .09);
  --text: #eef0ff;
  --muted: #8b90ad;
  --lime: #c6ff3d;
  --violet: #8b5cff;
  --cyan: #3de0ff;
  --radius: 22px;
  --display: "Unbounded", system-ui, sans-serif;
  --body: "Manrope", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background:
    radial-gradient(900px 600px at 0% -10%, rgba(139, 92, 255, .22), transparent 60%),
    radial-gradient(800px 600px at 110% 110%, rgba(61, 224, 255, .14), transparent 60%),
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 100% 44px,
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--body);
  overflow-x: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 24px;
  background: rgba(11, 13, 23, .72); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--lime); }
.logo span { font-family: var(--display); font-weight: 700; font-size: 19px; color: var(--text); letter-spacing: -.01em; }
.nav-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ca {
  display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 260px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px 6px 6px;
}
.ca:hover { border-color: rgba(198, 255, 61, .4); }
.ca-k { font-family: var(--mono); font-size: 11px; font-weight: 600; background: var(--violet); color: #fff; border-radius: 999px; padding: 2px 8px; }
.ca-v { font-family: var(--mono); font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.live b { color: var(--text); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(198,255,61,.15); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(198,255,61,0); } }

.btn {
  border: 0; border-radius: 999px; padding: 11px 20px; font-weight: 700; font-size: 14px;
  transition: transform .15s, box-shadow .15s, filter .15s; white-space: nowrap;
}
.btn-lime { background: var(--lime); color: #0b0d17; box-shadow: 0 6px 24px rgba(198,255,61,.22); }
.btn-lime:hover { transform: translateY(-1px); box-shadow: 0 10px 32px rgba(198,255,61,.35); }
.btn-lime:active { transform: translateY(1px); }

/* ---------- layout ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 32px 20px 48px; display: grid; gap: 20px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; min-width: 0; }
.eyebrow { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
h2 { font-family: var(--display); font-weight: 700; font-size: 18px; margin: 0; letter-spacing: -.01em; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; }
.pot-panel { display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  background: linear-gradient(135deg, rgba(139,92,255,.18), rgba(255,255,255,.03) 55%); }
.pot {
  font-family: var(--display); font-weight: 800; font-size: clamp(46px, 8.5vw, 92px); line-height: 1; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
}
.pot span {
  background: linear-gradient(100deg, var(--lime), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pot small { font-size: .32em; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.pot.bump span { animation: glow .6s; }
@keyframes glow { 40% { filter: drop-shadow(0 0 18px rgba(198,255,61,.6)); } }
.pot-sub { margin: 0; color: var(--muted); font-size: 16px; }
.pot-sub em { color: var(--text); font-style: normal; font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stats > div { background: rgba(0,0,0,.22); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 4px; }
.stats .k { font-size: 12px; color: var(--muted); }
.stats .v { font-family: var(--mono); font-weight: 600; font-size: 18px; }

.clock-panel { position: relative; display: grid; place-items: center; min-height: 300px; }
.ring { width: min(100%, 250px); aspect-ratio: 1; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(255,255,255,.07); stroke-width: 10; }
.ring-fill { fill: none; stroke: url(#ringGrad); stroke-width: 10; stroke-linecap: round;
  stroke-dasharray: 552.92; stroke-dashoffset: 0; transition: stroke-dashoffset .3s linear; }
.clock-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 4px; }
.timer { font-family: var(--display); font-weight: 700; font-size: 52px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.timer.hot { color: var(--lime); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .6; } }
.clock-note { font-size: 12px; color: var(--muted); max-width: 150px; justify-self: center; }

/* ---------- draw / drum ---------- */
.draw-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.tag { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.tag a { color: var(--cyan); text-decoration: none; }

.drum {
  --row: 58px;
  position: relative; height: calc(var(--row) * 5); overflow: hidden; border-radius: 16px;
  background: rgba(0,0,0,.3); border: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent);
          mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent);
}
.drum-window {
  position: absolute; left: 12px; right: 12px; top: 50%; height: var(--row); transform: translateY(-50%);
  border: 1.5px solid var(--lime); border-radius: 12px; pointer-events: none;
  box-shadow: 0 0 0 999px rgba(11,13,23,.25), 0 0 28px rgba(198,255,61,.25) inset;
}
.drum-strip { display: flex; flex-direction: column; will-change: transform; }
.chip {
  flex: 0 0 var(--row); height: var(--row); display: flex; align-items: center; justify-content: center; gap: 12px;
  font-family: var(--mono); font-size: 16px; color: var(--text);
}
.chip .av { width: 22px; height: 22px; border-radius: 7px; }
.chip .you-tag { font-family: var(--body); font-size: 11px; font-weight: 700; background: var(--violet); color: #fff; border-radius: 999px; padding: 2px 8px; }
.chip.win { color: var(--lime); font-weight: 600; }
.drum.idle .drum-strip { animation: idle 26s linear infinite; }
@keyframes idle { to { transform: translateY(-50%); } }

.btn-wide { width: 100%; margin-top: 20px; padding: 17px; font-size: 16px; font-family: var(--display); font-weight: 700; letter-spacing: -.01em; }
.btn-wide.entered { background: transparent; color: var(--lime); box-shadow: inset 0 0 0 1.5px var(--lime); }
.enter-note { text-align: center; color: var(--muted); font-size: 14px; margin: 12px 0 0; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.step .n { font-family: var(--mono); font-size: 12px; color: var(--lime); }
.step h3 { font-family: var(--display); font-weight: 500; font-size: 15px; margin: 10px 0 6px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }

/* ---------- winners ---------- */
.winners ul { list-style: none; margin: 0; padding: 0; display: grid; }
.winners li {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 12px 4px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 14px;
}
.winners li:first-child { border-top: 0; }
.winners li.empty { display: block; text-align: center; color: var(--muted); font-family: var(--body); }
.winners li.skip { color: var(--muted); grid-template-columns: 64px minmax(0, 1fr); }
.winners .rn { color: var(--muted); }
.winners .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.winners .who .av { width: 18px; height: 18px; border-radius: 6px; flex: none; }
.winners .amt { color: var(--lime); font-weight: 600; text-decoration: none; }
.winners a.amt:hover { text-decoration: underline; }
.winners .amt.test { color: var(--muted); font-weight: 400; }

/* ---------- footer ---------- */
.foot { text-align: center; font-size: 12px; color: var(--muted); padding-top: 12px; }
.foot p { margin: 6px 0; }
.demo-flag { display: inline-block; border: 1px dashed rgba(198,255,61,.5); color: var(--lime); padding: 5px 12px; border-radius: 999px; font-family: var(--mono); }

/* ---------- modal / toast ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(5,6,12,.7); backdrop-filter: blur(6px); }
.modal[hidden], .toast[hidden], .modal-link[hidden], .demo-flag[hidden] { display: none; }
.modal-card {
  width: 100%; max-width: 400px; text-align: center; padding: 32px 26px; border-radius: 26px;
  background: linear-gradient(160deg, #1a1d33, #0f1120); border: 1px solid rgba(198,255,61,.35);
  box-shadow: 0 0 60px rgba(198,255,61,.18); animation: rise .35s ease-out;
}
@keyframes rise { from { transform: translateY(16px) scale(.97); opacity: 0; } }
.modal-amt {
  font-family: var(--display); font-weight: 800; font-size: 46px; letter-spacing: -.03em; margin: 12px 0 6px;
  background: linear-gradient(100deg, var(--lime), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.modal-addr { font-family: var(--mono); font-size: 15px; color: var(--muted); word-break: break-all; }
.modal-link { display: block; font-size: 13px; color: var(--cyan); margin-top: 10px; }
.modal-card .btn { margin-top: 22px; min-width: 140px; }
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; max-width: calc(100% - 32px);
  background: #1a1d33; border: 1px solid var(--line); border-left: 3px solid var(--lime);
  padding: 12px 16px; border-radius: 12px; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.4);
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ca { display: none; }
}
@media (max-width: 560px) {
  .nav { padding: 12px 16px; }
  .live { display: none; }
  .wrap { padding: 20px 16px 40px; gap: 16px; }
  .panel { padding: 20px; }
  .stats .v { font-size: 15px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .chip { font-size: 14px; }
  .winners li { grid-template-columns: 44px minmax(0, 1fr) auto; font-size: 13px; }
  .winners li.skip { grid-template-columns: 44px minmax(0, 1fr); }
}
