:root {
  --bg: #0a0612;
  --card: #1a1130;
  --border: #3a2864;
  --text: #f3eafd;
  --muted: #a99bc7;
  --gold: #a855f7;       /* SafeBank purple (kept var name to avoid sweeping changes) */
  --gold-2: #d8b4fe;
  --green: #5ef39a;
  --red: #ff6b6b;
  --ink: #14062e;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  background:
    radial-gradient(1100px 600px at 10% -10%, rgba(168, 85, 247, 0.22), transparent 60%),
    radial-gradient(900px 600px at 110% 10%, rgba(124, 58, 237, 0.18), transparent 55%),
    radial-gradient(900px 700px at 50% 110%, rgba(216, 180, 254, 0.10), transparent 60%),
    var(--bg);
  min-height: 100vh;
}

/* Accessibility helpers */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--gold); color: var(--ink); padding: 8px 14px; border-radius: 8px; font-weight: 700; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  button:hover, button:active { transform: none; }
}
.wrap { max-width: 760px; margin: 0 auto; padding: 36px 22px 96px; }

.banner { display: block; margin: 0 0 28px; border-radius: 22px; overflow: hidden; border: 1px solid rgba(168,85,247,0.25); box-shadow: 0 24px 60px -28px rgba(168,85,247,0.45), 0 8px 20px -10px rgba(0,0,0,0.6); }
.banner img { display: block; width: 100%; height: auto; }

.brand { display: flex; align-items: center; gap: 16px; justify-content: center; margin-bottom: 6px; }
.brand .logo { width: 72px; height: 72px; filter: drop-shadow(0 4px 16px rgba(168,85,247,0.45)); }
.brand h1 { font-size: 44px; margin: 0; letter-spacing: -1px; line-height: 1; }
.brand .ticker { margin: 4px 0 0; }
header.brand + .tag { text-align: center; color: var(--muted); margin: 4px 0 36px; }

header { text-align: center; margin-bottom: 36px; }
h1 { font-size: 56px; margin: 0; letter-spacing: -1px; }
.lucky { color: var(--gold); }
.ticker { font-size: 24px; color: var(--gold); margin: 6px 0 8px; font-weight: 700; letter-spacing: 2px; }
.tag { color: var(--muted); margin: 0; }
.card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)) padding-box,
    linear-gradient(180deg, rgba(168,85,247,0.45), rgba(168,85,247,0.12)) border-box;
  border: 1px solid transparent;
  border-radius: 22px;
  padding: 28px;
  margin-bottom: 18px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 18px 48px -24px rgba(0,0,0,0.7),
    0 4px 14px -6px rgba(168,85,247,0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.card h2 { margin: 0 0 14px; font-size: 18px; letter-spacing: -0.2px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
form { display: flex; gap: 8px; margin-top: 12px; }
input[type=text] {
  flex: 1; min-width: 0; background: rgba(15,8,32,0.7); border: 1px solid rgba(168,85,247,0.2); color: var(--text);
  padding: 12px 16px; border-radius: 999px; font-size: 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input[type=text]:focus { outline: none; border-color: var(--gold-2); box-shadow: 0 0 0 4px rgba(168,85,247,0.15); }
input[type=text][aria-invalid="true"]:not(:placeholder-shown) { border-color: var(--red); }
input[type=text].valid:not(:placeholder-shown) { border-color: var(--green); }
button {
  background: linear-gradient(180deg, #ffffff 0%, #ece1ff 100%);
  color: #1a0830;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  letter-spacing: 0.2px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 8px 24px -10px rgba(168,85,247,0.55),
    0 2px 0 rgba(0,0,0,0.25);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
button:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset, 0 14px 32px -10px rgba(168,85,247,0.7), 0 2px 0 rgba(0,0,0,0.25); }
button:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 4px 12px -6px rgba(168,85,247,0.5); }
button:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* Dark pill variant (like Dribbble's "Get in touch") */
button.pill-dark, .pill-dark {
  background: linear-gradient(180deg, #1a0c2e 0%, #0a0418 100%);
  color: var(--text);
  border: 1px solid rgba(168,85,247,0.35);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 8px 24px -12px rgba(0,0,0,0.8);
}

.hint { font-size: 12px; margin: 8px 2px 0; }
.entry-status { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; background: #0f0820; border: 1px solid var(--gold); color: var(--text); }
.entry-status[hidden] { display: none; }
.entry-status .pill { display: inline-block; background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #ffffff; font-weight: 800; padding: 2px 8px; border-radius: 999px; font-size: 11px; letter-spacing: 1px; margin-right: 8px; }

.copy-btn { background: transparent; color: var(--muted); border: 1px solid var(--border); padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; cursor: pointer; box-shadow: none; letter-spacing: 0.5px; }
.copy-btn:hover { color: var(--gold); border-color: var(--gold); transform: none; }
.copy-btn.copied { color: #ffffff; background: var(--gold); border-color: var(--gold); }
.result { margin-top: 16px; padding: 14px; border-radius: 10px; border: 1px solid var(--border); background: #0f0820; font-size: 14px; }
.result.ok { border-color: var(--green); }
.result.err { border-color: var(--red); }
.hidden { display: none; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat { background: #0f0820; padding: 12px; border-radius: 10px; border: 1px solid var(--border); }
.stat .k { color: var(--muted); font-size: 12px; }
.stat .v { font-size: 20px; font-weight: 700; margin-top: 4px; color: var(--gold-2); }
code { background: #0f0820; padding: 2px 6px; border-radius: 4px; font-size: 12px; color: var(--gold-2); }

.payout { background:
    linear-gradient(180deg, rgba(42,20,86,0.55), rgba(26,17,48,0.55)) padding-box,
    linear-gradient(180deg, rgba(216,180,254,0.6), rgba(168,85,247,0.2)) border-box;
  border: 1px solid transparent;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 24px 60px -28px rgba(168,85,247,0.55),
    0 8px 20px -10px rgba(0,0,0,0.6);
  text-align: center;
}
.pot-hero { padding: 8px 0 4px; }
.pot-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 3px; }
.pot-prize { font-size: 64px; font-weight: 900; background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; margin-top: 8px; text-shadow: 0 0 24px rgba(168,85,247,0.55); letter-spacing: -1px; }
.pot-prize .unit { font-size: 22px; color: var(--muted); font-weight: 700; letter-spacing: 2px; margin-left: 6px; -webkit-text-fill-color: var(--muted); }
.pot-sub { font-size: 12px; color: var(--muted); margin-top: 8px; }
.pot-sub strong { color: var(--text); }
.pot-breakdown { font-size: 12px; color: var(--muted); margin-top: 10px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pot-breakdown strong { color: var(--gold-2); font-weight: 700; }
.pot-breakdown .pb-sep { opacity: 0.5; }

/* Airdrop / buyback split */
.split-row { margin: 16px auto 0; max-width: 360px; }
.split-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--border); border: 1px solid var(--border); }
.split-airdrop { background: linear-gradient(90deg, #22c55e, #16a34a); transition: width 0.4s ease; }
.split-buyback { background: linear-gradient(90deg, #a855f7, #7e22ce); transition: width 0.4s ease; }
.split-legend { display: flex; gap: 14px; justify-content: center; margin-top: 8px; font-size: 11px; color: var(--muted); letter-spacing: 0.3px; }
.split-pill { display: inline-flex; align-items: center; gap: 6px; }
.split-pill strong { color: var(--text); font-weight: 700; }
.split-pill .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.split-pill-airdrop .dot { background: #22c55e; }
.split-pill-buyback .dot { background: #a855f7; }
.timer-row { display: inline-flex; align-items: baseline; gap: 10px; margin: 16px auto 0; padding: 8px 18px; border: 1px solid var(--border); border-radius: 999px; background: rgba(0,0,0,0.25); }
.timer-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 2px; }
.timer-value { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 20px; font-weight: 800; color: var(--gold-2); }

/* CA bar */
.ca-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 12px 18px; margin-bottom: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  border: 1px solid rgba(168,85,247,0.25); border-radius: 999px; font-size: 13px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 10px 24px -16px rgba(0,0,0,0.7);
}
.ca-bar[hidden] { display: none; }
.ca-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 2px; font-weight: 700; }
.ca-addr { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text); background: transparent; padding: 0; font-size: 13px; }
.ca-link { color: var(--gold); text-decoration: none; font-weight: 700; font-size: 12px; }
.ca-link:hover { text-decoration: underline; }

/* Winners feed */
.winners-list { list-style: none; padding: 0; margin: 0; }
.winners-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.winners-list li:last-child { border-bottom: none; }
.winners-list .w-addr { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--gold-2); text-decoration: none; }
.winners-list .w-addr:hover { text-decoration: underline; }
.winners-list .w-amt { color: var(--green); font-weight: 800; }
.winners-list .w-when { color: var(--muted); font-size: 12px; margin-left: auto; }
.payout-note { margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.payout-note strong { color: var(--green); }
.winner-row { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 13px; }
.winner-row[hidden] { display: none; }
.winner-label { color: var(--muted); text-transform: uppercase; letter-spacing: 2px; font-size: 11px; }
.winner-addr { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--gold-2); text-decoration: none; }
.winner-addr:hover { text-decoration: underline; }
.winner-amt { color: var(--green); font-weight: 800; }
.winner-tx { color: var(--gold-2); text-decoration: none; font-size: 12px; padding: 2px 8px; border: 1px solid var(--border); border-radius: 999px; }
.winner-tx:hover { background: rgba(255,255,255,0.04); text-decoration: underline; }
.winner-tx[hidden] { display: none; }
.w-tx { color: var(--gold-2); text-decoration: none; font-size: 12px; margin-left: 6px; }
.w-tx:hover { text-decoration: underline; }
.w-tx-pending { color: var(--muted); font-size: 11px; margin-left: 6px; font-style: italic; }
.winner-when { color: var(--muted); font-size: 12px; margin-left: auto; }

/* Multi-winner "Last draw winners" panel on the hero card */
.winners-row { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border); }
.winners-row[hidden] { display: none; }
.winners-row-label { color: var(--muted); text-transform: uppercase; letter-spacing: 2px; font-size: 11px; margin-bottom: 8px; }
.last-winners { list-style: none; padding: 0; margin: 0; counter-reset: lw; }
.last-winners li { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13px; counter-increment: lw; }
.last-winners li::before { content: counter(lw); width: 18px; height: 18px; border-radius: 999px; background: var(--ink); color: var(--gold-2); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 18px; }
.last-winners .w-addr { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--gold-2); text-decoration: none; }
.last-winners .w-addr:hover { text-decoration: underline; }
.last-winners .w-amt { color: var(--green); font-weight: 800; margin-left: auto; }

/* Recent draws feed: each li is one draw containing N winner sub-rows */
.winners-list .draw-item { display: block; padding: 12px 0; }
.draw-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.draw-pot { color: var(--gold-2); font-weight: 800; font-size: 15px; }
.draw-meta { color: var(--muted); font-size: 12px; }
.draw-winners { display: flex; flex-direction: column; gap: 4px; padding-left: 4px; }
.draw-winner { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.draw-winner .w-amt { margin-left: auto; }
/* Tier badge on winner rows */
.w-tier {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-2), var(--gold-1));
  color: var(--ink);
}
ol { padding-left: 20px; line-height: 1.7; color: var(--muted); }
ol li { margin-bottom: 4px; }
footer { text-align: center; margin-top: 24px; }
.powered-by { margin-top: 6px; letter-spacing: 0.02em; }
.powered-by strong { color: var(--gold-1); font-weight: 600; }
.powered-row { text-align: center; margin: -8px 0 14px; }
.powered-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: -8px auto 14px;
  padding: 4px 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
}
.powered-badge { text-decoration: none; }
.powered-badge:hover { border-color: rgba(255,255,255,0.18); }
.powered-badge strong { color: var(--gold-2); font-weight: 700; letter-spacing: 0.06em; }
.powered-by a { color: var(--gold-2); text-decoration: none; }
.powered-by a:hover { text-decoration: underline; }
#mint { font-family: ui-monospace, monospace; color: var(--text); word-break: break-all; }

/* Activity + execution list extras */
.pill-paid { background: linear-gradient(135deg, var(--green), #2cc77a); color: var(--ink); }
.pill-linked { background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #ffffff; }
.exec-ok { color: var(--green); font-weight: 800; width: 16px; display: inline-block; text-align: center; }
.exec-fail { color: var(--red); font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.winners-list li .pill { font-size: 10px; padding: 2px 8px; border-radius: 999px; font-weight: 800; letter-spacing: 1px; }

/* Card header with a side link */
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.head-link { color: var(--gold-2); text-decoration: none; font-size: 12px; font-weight: 600; letter-spacing: 0.3px; }
.head-link:hover { text-decoration: underline; color: var(--gold); }

/* Clickable execution rows */
.winners-list li:has(.exec-row) { padding: 0; }
.exec-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 0; color: inherit; text-decoration: none; transition: background-color 0.15s ease; border-radius: 6px; }
.exec-row:hover { background: rgba(168, 85, 247, 0.06); padding-left: 6px; padding-right: 6px; }
.exec-arrow { color: var(--muted); font-size: 12px; margin-left: 4px; opacity: 0.6; }
.exec-row:hover .exec-arrow { color: var(--gold-2); opacity: 1; }
.exec-note { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); font-size: 11px; opacity: 0.75; }
.rank { color: var(--muted); font-weight: 700; font-size: 11px; width: 28px; text-align: right; }
.head-link.muted { color: var(--muted); }

/* Mobile */
@media (max-width: 560px) {
  .wrap { padding: 16px 14px 60px; }
  .banner { margin-bottom: 18px; border-radius: 12px; }
  .brand { gap: 12px; }
  .brand .logo { width: 56px; height: 56px; }
  .brand h1 { font-size: 32px; }
  .ticker { font-size: 18px; }
  .card { padding: 18px; border-radius: 12px; }
  .pot-prize { font-size: 48px; }
  .pot-prize .unit { font-size: 16px; }
  .timer-value { font-size: 18px; }
  .ca-bar { font-size: 12px; padding: 8px 12px; }
  form { flex-direction: column; gap: 10px; }
  button { width: 100%; padding: 14px; font-size: 15px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .winner-when { margin-left: 0; width: 100%; }
}
@media (max-width: 360px) {
  .stats { grid-template-columns: 1fr; }
}
