/* Bebas Neue — condensed display face for the lotto/casino look (ticket
   numbers, pot, headings, buttons). Self-hosted woff2 (latin subset) in
   fonts/, downloaded from Google Fonts — no CDN dependency at runtime.
   Fallback: Arial Narrow / Impact / sans-serif. Body text stays on the
   system sans for readability. */
@font-face {
  font-family: "Bebas Neue";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/bebas-neue-latin.woff2") format("woff2");
}
:root {
  /* Cosmic theme shared with Tip Jar + Quantum Sentinel (QoreChain family):
     deep-space purple bg, violet / fuchsia / cyan orbs, gold kept for the
     QOR + Vegas identity. */
  --font-display: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  --bg: #150a33;
  --panel: #1e0f45;
  --panel-2: #2a1a5e;
  --gold: #f5c542;
  --gold-dim: #c9a227;
  --purple: #7c3aed;
  --pink: #d946ef;
  --cyan: #22d3ee;
  --text: #f3f1f8;
  --muted: #c4b5fd;
  --line: #3b2a6d;
  --green: #34d399;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}
/* Cosmic background (Tip Jar / Sentinel): fixed gradient + twinkling stars
   + floating orbs behind the content. pointer-events:none so it never
   blocks clicks; content sits above it (main/footer z-index 1). */
.qj-bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(1200px 800px at 80% -10%, #4c1d95 0%, transparent 60%),
    radial-gradient(1000px 700px at 0% 20%, #701a75 0%, transparent 55%),
    radial-gradient(900px 900px at 50% 110%, #1e3a8a 0%, transparent 60%),
    linear-gradient(180deg, #150a33 0%, #1e0f45 50%, #12081f 100%);
}
.qj-orb {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55;
  animation: qj-float 14s ease-in-out infinite alternate;
}
.qj-orb-1 { width: 420px; height: 420px; left: -80px; top: 8%; background: #7c3aed; }
.qj-orb-2 { width: 360px; height: 360px; right: -60px; top: 32%; background: #d946ef; animation-delay: -4s; animation-duration: 18s; }
.qj-orb-3 { width: 300px; height: 300px; left: 38%; bottom: -60px; background: #22d3ee; opacity: .35; animation-delay: -8s; animation-duration: 16s; }
.qj-orb-4 { width: 220px; height: 220px; right: 22%; top: 4%; background: #f59e0b; opacity: .3; animation-delay: -2s; }
.qj-stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 130px 90px, #e9d5ff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 220px 160px, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 320px 60px, #a5f3fc 50%, transparent 51%),
    radial-gradient(1px 1px at 420px 200px, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 520px 40px, #fde68a 50%, transparent 51%);
  background-size: 560px 260px; opacity: .7;
  animation: qj-twinkle 4s ease-in-out infinite alternate;
}
@keyframes qj-float {
  from { transform: translateY(-16px) scale(1); }
  to { transform: translateY(18px) scale(1.08); }
}
@keyframes qj-twinkle {
  from { opacity: .35; }
  to { opacity: .85; }
}
main, footer { position: relative; z-index: 1; }
.topbar {
  display: flex; align-items: center; gap: 24px;
  padding: 14px 28px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(21, 10, 51, .95); z-index: 10;
}
.brand { font-family: var(--font-display); font-weight: 400; letter-spacing: 3px; font-size: 24px; }
.brand-mark { color: var(--gold); }
.brand-vegas { color: var(--pink); }
nav { display: flex; gap: 18px; margin-left: 12px; }
nav a { color: var(--muted); text-decoration: none; font-size: 13px; letter-spacing: 1px; }
nav a.nav-active { color: var(--gold); border-bottom: 2px solid var(--gold); padding-bottom: 2px; }
#connectBtn { margin-left: auto; }
main { max-width: 1080px; margin: 0 auto; padding: 28px 20px 40px; }
/* Hero banner — short casino strip (the old full 1280x720 cover was too
   tall). The casino/lotto artwork (casino-banner.svg, local file) is
   cropped to a banner with object-fit: cover; the draw message stays as
   HTML text on top so it is always crisp and readable. */
.hero-banner {
  position: relative; border-radius: 16px; overflow: hidden;
  box-shadow: 0 8px 32px rgba(124, 58, 237, .35); margin-bottom: 24px;
}
.hero-cover {
  width: 100%; height: 220px; object-fit: cover; object-position: center; display: block;
}
.hero-banner-text {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 12px;
  background: linear-gradient(180deg, rgba(21, 10, 51, .25), rgba(21, 10, 51, .60));
}
.hero-banner-title { font-family: var(--font-display); font-size: 44px; font-weight: 400; letter-spacing: 6px; color: var(--gold); text-shadow: 0 2px 14px rgba(0, 0, 0, .65); }
.hero-banner-sub { font-size: 15px; font-weight: 800; letter-spacing: 2px; color: #fff; text-shadow: 0 1px 10px rgba(0, 0, 0, .75); }
.hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; align-items: start; }
.eyebrow { color: var(--muted); letter-spacing: 2px; font-size: 12px; margin-bottom: 10px; }
h1 { font-family: var(--font-display); font-size: 76px; line-height: 1; font-weight: 400; letter-spacing: 1px; }
#potAmount { color: var(--gold); }
h1 .unit { color: var(--purple); font-size: 40px; }
h1 .pot-word { color: var(--muted); font-size: 26px; font-weight: 400; }
.sub { color: var(--muted); margin: 14px 0 20px; }
.sub strong { color: var(--gold); }
.prizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.prize { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.prize.first { background: linear-gradient(135deg, #3d2f10, #241c08); border-color: var(--gold-dim); }
.prize span { display: block; color: var(--muted); font-size: 11px; letter-spacing: 1px; }
.prize strong { font-family: var(--font-display); font-size: 26px; color: var(--gold); letter-spacing: 1px; }
.lucky { color: var(--muted); margin-top: 12px; font-size: 14px; }
/* ---- YOUR LUCKY TICKET box — persistent, directly below the pot ---- */
.lucky-ticket-box {
  margin-top: 18px;
  background: linear-gradient(180deg, #1d1533, var(--panel));
  border: 1px solid var(--gold-dim);
  border-radius: 12px;
  padding: 14px 16px;
}
.lucky-ticket-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  margin-bottom: 10px;
}
.lucky-ticket-title {
  font-family: var(--font-display); font-size: 22px; letter-spacing: 2px; color: var(--gold);
}
.lucky-ticket-count { color: var(--muted); font-size: 12px; letter-spacing: 1px; white-space: nowrap; }
.lucky-ticket-numbers { display: flex; flex-wrap: wrap; gap: 8px; }
.lucky-ticket-empty { color: var(--muted); font-size: 13px; margin-top: 10px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-top: 24px; }
.card-head { display: flex; justify-content: space-between; color: var(--muted); letter-spacing: 2px; font-size: 12px; margin-bottom: 14px; font-family: var(--font-display); font-size: 17px; }
.buy-card { margin-top: 0; }
.ticket-box {
  background: linear-gradient(135deg, rgba(245, 197, 66, .92), rgba(232, 160, 32, .92)), url("cover.png") center/cover;
  color: #1a1200; border-radius: 10px; padding: 14px 16px; margin-bottom: 14px;
}
.ticket-label { font-size: 11px; letter-spacing: 2px; font-weight: 700; }
.ticket-no { font-family: var(--font-display); font-size: 38px; font-weight: 400; letter-spacing: 2px; }
.ticket-week { font-size: 12px; opacity: .75; }
.picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.qty {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px; font-size: 16px; cursor: pointer;
}
.qty.selected { border-color: var(--gold); color: var(--gold); }
.picked { text-align: center; color: var(--muted); margin-bottom: 12px; }
.row { display: flex; justify-content: space-between; margin: 6px 0; }
.row.muted { color: var(--muted); font-size: 14px; }
.btn {
  border: none; border-radius: 8px; padding: 10px 18px; font-weight: 400;
  cursor: pointer; font-size: 15px; font-family: var(--font-display); letter-spacing: 2px;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-gold { background: var(--gold); color: #1a1200; }
.btn-purple { background: var(--purple); color: #fff; }
.btn-ghost { background: transparent; color: var(--gold); border: 1px solid var(--gold-dim); width: 100%; margin-top: 8px; }
a.btn-ghost { display: block; text-align: center; text-decoration: none; }
.btn-big { width: 100%; padding: 12px; font-size: 20px; letter-spacing: 3px; margin-top: 10px; }

/* ---- animated ticket reveal (shown after a successful buy) ---- */
.hidden { display: none; }
.ticket-reveal {
  border-color: var(--gold-dim);
  background: linear-gradient(180deg, #1d1533, var(--panel));
  perspective: 800px;
}
.ticket-reveal.reveal { animation: ticketFlip .7s cubic-bezier(.2, .7, .3, 1.2) both; }
@keyframes ticketFlip {
  from { opacity: 0; transform: rotateY(70deg) translateY(14px) scale(.96); }
  to { opacity: 1; transform: rotateY(0) translateY(0) scale(1); }
}
.reveal-ticket {
  background: linear-gradient(135deg, rgba(245, 197, 66, .92), rgba(232, 160, 32, .92)), url("cover.png") center/cover;
  color: #1a1200; border-radius: 10px; padding: 16px; text-align: center;
  border: 2px dashed rgba(26, 18, 0, .35); outline: 2px solid rgba(245, 197, 66, .25); outline-offset: 4px;
}
.reveal-label { font-size: 11px; letter-spacing: 2px; font-weight: 700; }
.reveal-date { font-size: 12px; font-weight: 700; letter-spacing: 1px; opacity: .8; margin-top: 2px; }
.reveal-big { font-family: var(--font-display); font-size: 42px; font-weight: 400; margin: 4px 0; letter-spacing: 2px; }
.reveal-sub { font-size: 12px; opacity: .75; }
.reveal-numbers { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.ticket-chip {
  background: var(--panel-2); border: 1px solid var(--gold-dim); color: var(--gold);
  border-radius: 999px; padding: 6px 14px; font-weight: 400; font-size: 18px;
  font-family: var(--font-display); letter-spacing: 2px;
  opacity: 0; animation: chipIn .45s ease-out forwards;
}
.ticket-chip-empty {
  border-style: dashed; color: var(--muted); border-color: var(--line);
  background: transparent; animation: none; opacity: .7;
}
@keyframes chipIn {
  from { opacity: 0; transform: translateY(10px) scale(.85); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.hint { color: var(--muted); font-size: 13px; margin-top: 10px; }
.next-draw { margin-top: 12px; font-size: 15px; }
.next-draw strong { color: var(--cyan); }
#winnersList p, #winnersList li { margin: 6px 0; }
.muted { color: var(--muted); }
#how ol { margin: 0 0 12px 20px; }
#how li { margin: 8px 0; line-height: 1.5; }
footer { text-align: center; color: var(--muted); padding: 20px; font-size: 13px; }
footer a { color: var(--gold); }
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--panel-2); border: 1px solid var(--gold-dim); color: var(--text);
  padding: 12px 20px; border-radius: 8px; display: none; max-width: 90vw; z-index: 50;
}
/* ---- connect-wallet picker modal ---- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(5, 3, 10, .75);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px;
}
/* .hidden is defined earlier in this file; the overlay's display:flex would
   otherwise win over it (same specificity, later rule) and the modal would
   always show. This more specific rule keeps it hidden until opened. */
.modal-overlay.hidden { display: none; }
.modal-panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 20px; width: min(440px, 94vw); max-height: 85vh; overflow-y: auto;
}
.modal-close {
  background: transparent; border: none; color: var(--muted); font-size: 16px;
  cursor: pointer; padding: 2px 6px;
}
.modal-close:hover { color: var(--text); }
.wallet-row {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px;
}
.wallet-row .wallet-info { flex: 1; min-width: 0; }
.wallet-name { font-weight: 800; font-size: 15px; }
.wallet-status { font-size: 12px; color: var(--muted); margin-top: 2px; }
.wallet-status.installed { color: var(--green); }
.wallet-row .btn { padding: 8px 14px; white-space: nowrap; width: auto; margin-top: 0; flex-shrink: 0; }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  h1 { font-size: 52px; }
  nav { display: none; }
  .hero-cover { height: 160px; }
  .hero-banner-title { font-size: 26px; letter-spacing: 2px; }
  .hero-banner-sub { font-size: 12px; letter-spacing: 1px; }
}
