:root {
  --bg: #0a0a0a;
  --panel: rgba(12, 10, 16, 0.84);
  --panel-solid: #121016;
  --panel-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f0f0f0;
  --muted: #a8a3b3;
  --orange: #ff6600;
  --accent-rgb: 255, 102, 0;
  --orange-2: #ff8a1f;
  --cyan: #00e5f0;
  --cyan-rgb: 0, 229, 240;
  --purple: #8e2de2;
  --green: #7cff4f;
  --gold: #ffb000;
  --radius: 12px;
  --head: "Anton", "Impact", sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

/* Seasonal themes (picked on the admin page; the server sets data-theme on <html>). */
:root[data-theme="thanksgiving"] {
  --panel: rgba(22, 13, 8, 0.84);
  --panel-solid: #1a110b;
  --muted: #bfae9c;
  --orange: #e8771e;
  --accent-rgb: 232, 119, 30;
  --orange-2: #f4a340;
  --cyan: #f2c14e;
  --cyan-rgb: 242, 193, 78;
  --purple: #8e3b12;
  --gold: #ffc857;
}
:root[data-theme="christmas"] {
  --panel: rgba(8, 14, 26, 0.84);
  --panel-solid: #0c1424;
  --muted: #a9b8cc;
  --orange: #e53935;
  --accent-rgb: 229, 57, 53;
  --orange-2: #ff6f61;
  --cyan: #2ecc71;
  --cyan-rgb: 46, 204, 113;
  --purple: #1b7a3d;
  --gold: #ffd54f;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.5;
  background: transparent; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
canvas.backdrop { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; display: block; }
a { color: var(--cyan); }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 400; letter-spacing: 1px; }

/* ---------- header (Woody-style: black top bar, centered mark, uppercase nav) ---------- */
.topbar {
  background: #000; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 7px 16px; font-family: var(--head); font-size: 12px; letter-spacing: 1px; text-transform: uppercase;
}
.topbar a { color: var(--text); display: inline-flex; }
.topbar span { text-align: center; flex: 1; color: var(--orange-2); }
.topbar-r { flex: 0 0 16px !important; }

header.site { background: rgba(10, 10, 18, 0.72); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.site-row { max-width: 1280px; margin: 0 auto; padding: 14px 16px 6px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.mark { grid-column: 2; text-decoration: none; text-align: center; display: grid; line-height: 1; }
.mark-big {
  font-family: var(--head); font-size: clamp(30px, 5vw, 46px); color: var(--orange); letter-spacing: 2px;
  text-shadow: 0 0 22px rgba(var(--accent-rgb), 0.45);
}
.mark-big.small { font-size: 28px; }
.mark-sub { font-family: var(--head); color: var(--text); font-size: 12px; letter-spacing: 4px; text-transform: uppercase; margin-top: 4px; }
.util { grid-column: 3; justify-self: end; display: flex; gap: 18px; }
.util a { font-family: var(--head); color: var(--text); text-decoration: none; text-transform: uppercase; letter-spacing: 1px; font-size: 14px; }
.util a:hover { color: var(--orange); }

.mainnav {
  display: flex; justify-content: center; gap: 4px 26px; padding: 10px 16px 14px; overflow-x: auto; scrollbar-width: none;
  max-width: 1280px; margin: 0 auto;
}
.mainnav::-webkit-scrollbar { display: none; }
.mainnav a {
  font-family: var(--head); color: var(--text); text-decoration: none; text-transform: uppercase; letter-spacing: 1px;
  font-size: 15px; white-space: nowrap; padding: 2px 0; border-bottom: 2px solid transparent;
}
.mainnav a:hover, .mainnav a[aria-current="page"] { color: var(--orange); border-bottom-color: var(--orange); }

/* ---------- layout ---------- */
.wrap { max-width: 1280px; margin: 0 auto; padding: 28px 16px 40px; }
.section-title { text-align: center; margin: 0 0 22px; }
.section-title h2 { color: var(--orange); font-size: clamp(28px, 4vw, 40px); margin: 0; line-height: 1.1; }
.section-title h2::after { content: ""; display: block; width: 36px; height: 3px; background: var(--orange); margin: 12px auto 0; }
.section-title p { color: var(--text); font-family: var(--head); letter-spacing: 0.5px; margin: 12px 0 0; }

.hero-card {
  max-width: 620px; margin: 0 auto 28px; padding: 30px clamp(20px, 4vw, 52px); border-radius: var(--radius);
  background: rgba(30, 26, 34, 0.72); backdrop-filter: blur(4px); border: 1px solid var(--line);
}
.hero-card h1 { color: var(--orange); font-size: clamp(34px, 6vw, 54px); margin: 0; line-height: 1.05; }
.hero-card h1::after { content: ""; display: block; width: 36px; height: 3px; background: var(--orange); margin-top: 14px; }
.hero-card p { font-family: var(--head); font-size: 18px; letter-spacing: 0.3px; margin: 16px 0 0; }
.btns { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 22px; }

button, .btn {
  font-family: var(--head); font-size: 15px; letter-spacing: 1px; text-transform: none; border: 0; border-radius: 999px;
  padding: 13px 28px; cursor: pointer; color: #000; background: var(--cyan); text-decoration: none; display: inline-block;
  transition: transform 0.15s, box-shadow 0.15s;
}
button:hover, .btn:hover { transform: translateY(-1px); box-shadow: 0 0 22px rgba(var(--cyan-rgb), 0.45); }
.btn.outline, button.outline { background: transparent; color: var(--text); border: 1.5px solid var(--text); }
.btn.outline:hover { box-shadow: 0 0 18px rgba(255, 255, 255, 0.2); }
button.orange, .btn.orange { background: var(--orange); color: #fff; }
button.orange:hover { box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.55); }
button:disabled { opacity: 0.5; cursor: default; transform: none; box-shadow: none; }

.badge {
  display: inline-block; background: var(--purple); color: #fff; font-family: var(--head); font-size: 11px; letter-spacing: 1px;
  padding: 4px 10px; border-radius: 999px; text-transform: uppercase;
}

.card { background: var(--panel); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card h2 {
  margin: 0 0 14px; font-size: 22px; color: var(--orange); display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
}
.card h2 small { color: var(--muted); font-family: var(--body); font-size: 13px; letter-spacing: 0; }

input[type="text"], input[type="email"], input[type="search"], input[type="password"], input[type="number"], .search {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.45);
  color: var(--text); font: inherit;
}
input:focus { outline: 2px solid var(--orange); outline-offset: 1px; }
.msg { font-size: 14px; min-height: 20px; }
.msg.ok { color: var(--green); }
.msg.err { color: #ff5470; }

/* ---------- raffle page ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--panel); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat .k { color: var(--muted); font-family: var(--head); font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; }
.stat .v { font-family: var(--head); font-size: clamp(22px, 3.4vw, 34px); margin-top: 2px; line-height: 1.15; }
.stat .v.prize { color: var(--orange); text-shadow: 0 0 18px rgba(var(--accent-rgb), 0.4); }
.stat .sub { color: var(--muted); font-size: 13px; }

.main { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; align-items: start; }

/* The wheel floats directly on the animated night — no box behind it. */
.wheel-card { position: relative; background: none; border: 0; padding: 0; }
.wheel-box { position: relative; width: 100%; aspect-ratio: 1; }
.wheel-box canvas { width: 100%; height: 100%; display: block; }
.pointer {
  position: absolute; left: 50%; top: -4px; transform: translateX(-50%); width: 0; height: 0;
  border-left: 20px solid transparent; border-right: 20px solid transparent; border-top: 42px solid #fff;
  filter: drop-shadow(0 0 8px var(--orange)) drop-shadow(0 0 2px #000); z-index: 2;
}
.empty-msg {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center; text-align: center;
  color: var(--text); padding: 30%; font-family: var(--head); font-size: 18px; letter-spacing: 1px; pointer-events: none;
}
.empty .empty-msg { display: flex; }

.side { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.search { margin-bottom: 10px; }
.board { list-style: none; margin: 0; padding: 0; max-height: 520px; overflow-y: auto; }
.board li {
  display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center;
  padding: 9px 6px; border-bottom: 1px solid var(--line); transition: background 0.4s;
}
.board li:last-child { border-bottom: 0; }
.board li.flash { background: rgba(var(--accent-rgb), 0.22); }
.board .rank { color: var(--muted); font-family: var(--head); text-align: center; }
.board .who { min-width: 0; display: flex; align-items: center; gap: 8px; }
.board .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.board .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.board .num { text-align: right; font-variant-numeric: tabular-nums; }
.board .num b { font-family: var(--head); font-weight: 400; font-size: 18px; }
.board .num span { display: block; color: var(--muted); font-size: 12px; }
.board .none { color: var(--muted); padding: 14px 4px; display: block; }

form.free, form.notify { display: grid; gap: 10px; }
label.chk { display: flex; gap: 8px; font-size: 14px; color: var(--muted); align-items: flex-start; }
.how ol { margin: 0; padding-left: 20px; line-height: 1.65; }
.how li { margin-bottom: 4px; }
.how b { color: var(--orange-2); }

.last-draw { text-align: center; color: var(--muted); margin-top: 18px; font-size: 14px; }

/* toasts */
.toasts { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 50; width: min(420px, calc(100% - 32px)); }
.toast {
  background: rgba(14, 10, 18, 0.95); border: 1px solid var(--orange); border-radius: 12px; padding: 10px 14px;
  box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.35); animation: pop 0.3s ease-out; font-weight: 600; text-align: center;
}
@keyframes pop { from { transform: translateY(10px); opacity: 0; } }

/* winner overlay */
.winner {
  position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(4px); padding: 16px;
}
.winner.show { display: flex; }
.winner .box {
  text-align: center; padding: 34px 28px; border-radius: 18px; background: var(--panel-solid);
  border: 2px solid var(--orange); box-shadow: 0 0 70px rgba(var(--accent-rgb), 0.45); max-width: 540px; width: 100%;
  animation: pop 0.4s ease-out;
}
.winner .k { color: var(--muted); letter-spacing: 4px; text-transform: uppercase; font-family: var(--head); font-size: 14px; }
.winner .n { font-family: var(--head); font-size: clamp(34px, 8vw, 58px); margin: 8px 0; word-break: break-all; color: #fff; text-shadow: 0 0 24px rgba(var(--accent-rgb), 0.7); }
.winner .p { color: var(--orange); font-family: var(--head); font-size: 26px; letter-spacing: 1px; }
.winner .d { color: var(--muted); margin-top: 10px; font-size: 14px; }
.winner button { margin-top: 20px; }
canvas.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 61; width: 100%; height: 100%; }

/* ---------- shop ---------- */
.collections { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 44px; }
.coll {
  position: relative; display: block; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; text-decoration: none;
  color: #fff; border: 1px solid var(--line); background: var(--panel-solid);
}
.coll .art { position: absolute; inset: 0; }
.coll .art svg { position: absolute; left: 50%; top: 42%; width: 58%; transform: translate(-50%, -50%); filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.6)); transition: transform 0.35s; }
.coll:hover .art svg { transform: translate(-50%, -54%) scale(1.04); }
.coll .label { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.85)); }
.coll .label h3 { margin: 0; font-size: 28px; line-height: 1; }
.coll .label span { font-family: var(--head); font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--orange-2); }
.coll .badge { position: absolute; top: 12px; right: 12px; }

.products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.product { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.product .ph {
  aspect-ratio: 1; display: grid; place-items: center; position: relative;
  background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.03) 0 14px, transparent 14px 28px), #16121c;
}
.product .ph svg { width: 46%; opacity: 0.35; }
.product .ph .badge { position: absolute; top: 10px; right: 10px; }
.product .info { padding: 14px 16px 16px; }
.product .info h4 { margin: 0 0 6px; font-size: 18px; }
.product .bar { height: 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); margin-top: 8px; }
.product .bar.short { width: 45%; }
.product .soon { font-family: var(--head); color: var(--orange-2); letter-spacing: 1px; font-size: 13px; text-transform: uppercase; }

.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 44px 0; }
.perk { text-align: center; padding: 22px 16px; }
.perk .ic { font-size: 30px; }
.perk h4 { margin: 8px 0 4px; font-size: 20px; color: var(--orange); }
.perk p { margin: 0; color: var(--muted); }

.signup { max-width: 640px; margin: 0 auto; text-align: center; }
.signup form.notify { grid-template-columns: 1fr auto; }
.signup form.notify .msg { grid-column: 1 / -1; }

/* under-construction panel */
.uc {
  max-width: 760px; margin: 0 auto; text-align: center; padding: 0; overflow: hidden;
}
.tape {
  height: 22px; background: repeating-linear-gradient(-45deg, var(--orange) 0 18px, #0a0a0a 18px 36px);
  animation: tape 1.2s linear infinite; background-size: 51px 22px;
}
@keyframes tape { to { background-position: 51px 0; } }
.uc .inner { padding: 34px clamp(18px, 5vw, 54px) 38px; }
.uc .ic svg { width: 120px; height: auto; }
.uc h1 { color: var(--orange); font-size: clamp(32px, 6vw, 52px); margin: 10px 0 4px; line-height: 1.05; }
.uc .kicker { font-family: var(--head); letter-spacing: 4px; text-transform: uppercase; color: var(--muted); font-size: 13px; }
.uc p.lead { font-size: 18px; max-width: 520px; margin: 14px auto 22px; }
.uc form.notify { grid-template-columns: 1fr auto; max-width: 480px; margin: 0 auto; }
.uc form.notify .msg { grid-column: 1 / -1; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 16px; font-family: var(--head); letter-spacing: 1px; text-transform: uppercase; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--orange); }
.progress { max-width: 420px; margin: 0 auto 26px; text-align: left; }
.progress .row { display: flex; justify-content: space-between; font-family: var(--head); letter-spacing: 1px; font-size: 13px; color: var(--muted); }
.progress .track { height: 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.1); overflow: hidden; margin-top: 6px; }
.progress .fill { height: 100%; background: linear-gradient(90deg, var(--orange), var(--gold)); border-radius: 6px; }
.other { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }

/* ---------- footer ---------- */
footer.site { background: rgba(0, 0, 0, 0.8); border-top: 1px solid var(--line); margin-top: 40px; }
.foot-grid { max-width: 1280px; margin: 0 auto; padding: 34px 16px 10px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
.foot-grid h4 { margin: 0 0 10px; color: var(--orange); font-size: 18px; }
.foot-grid a { display: block; color: var(--text); text-decoration: none; margin-bottom: 6px; }
.foot-grid a:hover { color: var(--orange); }
.foot-grid p { color: var(--muted); }
.legal { max-width: 1280px; margin: 0 auto; padding: 14px 16px 26px; color: var(--muted); font-size: 12px; text-align: center; border-top: 1px solid var(--line); }

/* rules / admin */
.doc { max-width: 800px; }
.doc h1 { color: var(--orange); font-size: clamp(34px, 6vw, 50px); margin: 0 0 12px; }
.doc h2 { margin-top: 28px; color: var(--orange); font-size: 22px; }
.doc p, .doc li { line-height: 1.7; }
.note { border-left: 3px solid var(--orange); padding: 10px 14px; background: rgba(var(--accent-rgb), 0.08); border-radius: 8px; }

@media (max-width: 980px) {
  .main { grid-template-columns: 1fr; }
  .collections, .products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stats .stat:first-child { grid-column: span 2; }
  .site-row { grid-template-columns: 1fr auto; }
  .mark { grid-column: 1; text-align: left; }
  .util { grid-column: 2; gap: 12px; }
  .util a.cart { display: none; }
  .util a.watch-live { background: var(--orange); color: #fff; padding: 7px 12px; border-radius: 999px; font-size: 13px; white-space: nowrap; }
  .mainnav { justify-content: flex-start; gap: 4px 20px; }
  .perks { grid-template-columns: 1fr; }
  .signup form.notify, .uc form.notify { grid-template-columns: 1fr; }
  .collections { gap: 12px; }
  .coll .label h3 { font-size: 22px; }
  .topbar span { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .tape { animation: none; } }

.live-dot { font-size: 11px; color: var(--muted); margin-left: 6px; letter-spacing: 1px; }
.live-dot.on { color: var(--green); }
.uc form.trackform { display: grid; grid-template-columns: 1fr auto; gap: 10px; max-width: 480px; margin: 0 auto 14px; }

.board .name-wrap { min-width: 0; display: grid; }
.board .gifted { color: var(--orange-2); font-size: 12px; }
.sound-btn {
  position: fixed; right: 16px; bottom: 16px; z-index: 40; padding: 10px 16px; font-size: 14px;
  background: rgba(14, 10, 18, 0.9); color: var(--text); border: 1px solid var(--orange); box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.3);
}
.sound-btn.off { border-color: var(--line); box-shadow: none; color: var(--muted); }
@media (max-width: 600px) { .sound-btn { right: 12px; bottom: 12px; padding: 8px 12px; font-size: 13px; } .toasts { bottom: 64px; } }
