/* KickGW — flat Kick-style UI (same structure as the stream wheel page, Kick colours) */
:root {
  --bg: #0b0e0f; --panel: #191b1f; --panel2: #24272c; --panel3: #2f3238; --line: #2f3238;
  --text: #ffffff; --muted: #a8afb8; --faint: #6f7680;
  --accent: #53fc18; --accent-h: #6bff34; --ink: #0b0e0f;
  --warn: #fbbf24; --bad: #ff4d6a; --good: #53fc18;
  --font: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.15; font-weight: 800; text-wrap: balance; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
@media (max-width: 520px) { .wrap { padding-left: 14px; padding-right: 14px; } }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.label { font-size: 12px; font-weight: 700; color: var(--muted); }

/* header / footer */
.topbar { background: var(--panel); border-bottom: 1px solid var(--line); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 54px; }
.brand { display: inline-flex; align-items: center; }
.brand:hover { text-decoration: none; }
.brand img { height: 22px; width: auto; display: block; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--text); font-weight: 600; font-size: 14px; padding: 7px 12px; border-radius: 4px; }
.nav a:hover { background: var(--panel2); text-decoration: none; }
.nav a.nav-cta { background: var(--accent); color: var(--ink); font-weight: 800; }
.nav a.nav-cta:hover { background: var(--accent-h); }
@media (max-width: 520px) { .nav a:not(.nav-cta) { display: none; } .nav a.nav-cta { font-size: 13px; padding: 7px 10px; } }
.howto { list-style: none; counter-reset: step; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.howto li { counter-increment: step; background: var(--panel); border-radius: 4px; padding: 16px 18px 6px 62px; position: relative; }
.howto li::before { content: counter(step); position: absolute; left: 16px; top: 16px; width: 30px; height: 30px; border-radius: 4px; background: var(--accent); color: var(--ink);
  font-weight: 900; display: flex; align-items: center; justify-content: center; }
.howto li h2 { margin: 3px 0 6px; font-size: 18px; }
.howto li p { margin: 0 0 10px; }
.connect-strip { margin-top: 20px; display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; padding: 18px; background: var(--panel); border-radius: 4px; border-left: 4px solid var(--accent); }
@media (max-width: 700px) { .connect-strip { grid-template-columns: 1fr; } }
.connect-strip ol { margin: 0; padding-left: 20px; color: var(--muted); display: grid; gap: 4px; }
.connect-strip ol strong { color: var(--text); }
.foot { margin-top: 56px; padding: 22px 0 32px; color: var(--faint); font-size: 13px; border-top: 1px solid var(--line); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }
.foot a { color: var(--muted); }

/* panels */
.card, .panel { background: var(--panel); border-radius: 4px; }
.pad { padding: 18px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 8px; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } }

/* form + buttons */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 700; color: var(--muted); }
.input { width: 100%; min-width: 0; font: inherit; font-size: 16px; color: var(--text); background: var(--panel2); border: 1px solid var(--panel3); border-radius: 4px; padding: 11px 12px; outline: none; }
.input:focus { border-color: var(--accent); }
.input-pre { display: flex; }
.input-pre span { display: flex; align-items: center; padding: 0 10px; background: var(--panel3); border-radius: 4px 0 0 4px; color: var(--muted); font-size: 14px; }
.input-pre .input { border-radius: 0 4px 4px 0; }
.btn { appearance: none; border: 0; background: var(--panel2); color: var(--text); font: inherit; font-weight: 700; font-size: 14px; padding: 10px 14px; border-radius: 4px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; }
.btn:hover { background: var(--panel3); text-decoration: none; }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn-primary { background: var(--accent); color: var(--ink); }
.btn-primary:hover { background: var(--accent-h); }
.btn-danger { color: #ff8095; }
.btn-lg { font-size: 16px; min-height: 50px; padding: 12px 18px; }
.btn-sm { font-size: 13px; min-height: 34px; padding: 6px 10px; }
.err { color: var(--bad); font-size: 14px; min-height: 18px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 4px; background: var(--panel2); color: var(--muted); }
.chip-live { background: rgba(83,252,24,0.14); color: var(--accent); }
.chip-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: blink 1.4s infinite; }
.chip-warn { background: rgba(251,191,36,0.14); color: var(--warn); }
.chip-off { color: var(--faint); }
@keyframes blink { 50% { opacity: 0.35; } }

/* home */
.hero { display: grid; grid-template-columns: 1fr 400px; gap: 32px; align-items: start; padding-top: 40px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; gap: 22px; padding-top: 22px; } }
.hero h1 { font-size: clamp(32px, 5vw, 50px); letter-spacing: -0.02em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lead { font-size: 17px; color: var(--muted); max-width: 54ch; margin: 14px 0 0; }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; }
.ticks li { display: flex; gap: 10px; align-items: baseline; }
.ticks li::before { content: ""; flex: 0 0 8px; height: 8px; background: var(--accent); transform: translateY(-1px); }
.section { padding-top: 48px; }
.section h2 { font-size: clamp(24px, 3.4vw, 32px); letter-spacing: -0.01em; }
.section .sub { color: var(--muted); margin: 8px 0 0; max-width: 64ch; }
.steps, .features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
@media (max-width: 820px) { .steps, .features { grid-template-columns: 1fr; } }
.step, .feature { padding: 16px 18px; border-radius: 4px; background: var(--panel); }
.step .n { color: var(--accent); font-weight: 800; font-size: 13px; }
.step h3, .feature h3 { font-size: 17px; margin: 6px 0 4px; }
.step p, .feature p { color: var(--muted); margin: 0; font-size: 14.5px; }
.fair-box { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 820px) { .fair-box { grid-template-columns: 1fr; } }
.fair-box > div { padding: 18px; background: var(--panel); border-radius: 4px; min-width: 0; }
.fair-box .code { background: #050607; font-family: var(--mono); font-size: 13px; color: #c7cdd4; line-height: 1.7; overflow-x: auto; white-space: pre; }
.faq details { background: var(--panel); border-radius: 4px; padding: 14px 16px; margin-top: 8px; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 800; }
.faq details[open] summary::after { content: "\2212"; }
.faq p { color: var(--muted); margin: 10px 0 0; max-width: 78ch; }
.prose { max-width: 760px; }
.prose h1 { font-size: clamp(28px, 4.4vw, 42px); margin: 28px 0 14px; }
.prose h2 { font-size: 21px; margin: 30px 0 8px; }
.prose p, .prose li { color: #d3d8de; }
.prose code { font-family: var(--mono); font-size: 0.9em; background: var(--panel2); padding: 1px 6px; border-radius: 3px; }
.prose pre { font-family: var(--mono); font-size: 13px; background: #050607; border-radius: 4px; padding: 14px; overflow-x: auto; }

/* giveaway app — side panel + stage, like the stream wheel */
.gwapp { display: flex; gap: 12px; padding: 12px; min-height: calc(100vh - 55px); align-items: stretch; }
@media (max-width: 900px) { .gwapp { flex-direction: column; padding: 10px; min-height: 0; } }
.side { width: 360px; flex: 0 0 360px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
@media (max-width: 900px) { .side { display: contents; } .side > .box { order: 1; } .main { order: 2; } .list { order: 3; min-height: 200px; } }
.box { background: var(--panel); border-radius: 4px; padding: 12px 14px; }
.gw-ch { display: flex; align-items: center; gap: 12px; }
.gw-avatar { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; object-fit: cover; background: var(--panel2); }
.gw-ch > div { min-width: 0; }
.gw-ch h1 { font-size: 19px; word-break: break-word; }
.gw-ch .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.cnt { display: flex; align-items: baseline; justify-content: space-between; }
.cnt b { color: var(--accent); font-size: 28px; font-variant-numeric: tabular-nums; }
.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.controls .wide { grid-column: 1 / -1; }
.winbox .name { display: block; font-size: 28px; font-weight: 800; color: var(--accent); word-break: break-word; margin-top: 2px; min-height: 34px; line-height: 1.2; }
.list { background: var(--panel); border-radius: 4px; display: flex; flex-direction: column; min-height: 240px; flex: 1; }
.list-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.list-h .input { max-width: 170px; padding: 7px 10px; font-size: 14px; }
.entrants { flex: 1; overflow-y: auto; max-height: 52vh; }
.entrant { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 14px; font-size: 14px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.entrant .u { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entrant.win { background: rgba(83,252,24,0.14); color: var(--accent); font-weight: 700; }
.entrant .won { font-size: 11px; font-weight: 800; }
.entrant.new { animation: flash 1.2s ease-out; }
@keyframes flash { from { background: rgba(83,252,24,0.22); } }
.empty { padding: 22px 14px; text-align: center; color: var(--faint); font-size: 14px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.stage { position: relative; overflow: hidden; flex: 1; min-height: 380px; background: var(--panel); border-radius: 4px; display: flex; align-items: center; justify-content: center; }
@media (max-width: 900px) { .stage { min-height: 300px; } }
.stage-body { width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; padding: 28px 18px; }
.stage-idle h2 { font-size: clamp(26px, 4vw, 44px); }
.stage-idle .cmd { color: var(--ink); background: var(--accent); padding: 0 10px; border-radius: 4px; }
.reel { position: relative; width: min(100%, 620px); height: 180px; overflow: hidden; background: var(--bg); border-radius: 4px;
  -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); }
.reel::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 56px; margin-top: -28px; border-top: 2px solid var(--accent); border-bottom: 2px solid var(--accent); pointer-events: none; }
.reel-track { position: absolute; left: 0; right: 0; top: 0; will-change: transform; }
.reel-item { height: 56px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 30px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 16px; }
.winner { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.winner .kicker { font-size: 14px; font-weight: 800; color: var(--muted); }
.winner .name { font-weight: 900; font-size: clamp(40px, 8vw, 84px); line-height: 1; color: var(--accent); word-break: break-word; }
.winner .sub { color: var(--muted); font-size: 14px; }
.pop { animation: pop 0.5s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes pop { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.links { display: grid; gap: 8px; }
.linkrow { display: flex; gap: 8px; align-items: center; }
.linkrow .input { font-family: var(--mono); font-size: 12.5px; padding: 8px 10px; }
.linkrow .btn { flex: 0 0 auto; }
.fair { display: grid; gap: 10px; }
.hash { font-family: var(--mono); font-size: 12px; color: #c7cdd4; word-break: break-all; background: var(--bg); border-radius: 4px; padding: 8px 10px; }
.round { background: var(--panel2); border-radius: 4px; padding: 10px 12px; display: grid; gap: 6px; }
.round-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
details.more > summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: "+"; color: var(--accent); font-weight: 800; font-size: 18px; }
details.more[open] > summary::after { content: "\2212"; }
details.more[open] > summary { margin-bottom: 12px; }
.ok { color: var(--good); font-weight: 700; font-size: 14px; }
.bad { color: var(--bad); font-weight: 700; font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--panel3); padding: 10px 14px; border-radius: 4px; font-size: 14px; font-weight: 600; z-index: 50; }
canvas.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* admin */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 860px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile { padding: 14px; border-radius: 4px; background: var(--panel); }
.tile .v { font-weight: 800; font-size: 26px; font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 4px; margin: 14px 0 16px; overflow-x: auto; }
.tab { padding: 9px 14px; font: inherit; font-weight: 700; color: var(--muted); background: transparent; border: 0; border-radius: 4px; cursor: pointer; white-space: nowrap; }
.tab:hover { background: var(--panel2); }
.tab.on { color: var(--ink); background: var(--accent); }
.panel-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; padding: 8px 12px; border-bottom: 1px solid var(--line); }
table.t td { padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); font-variant-numeric: tabular-nums; }
.tscroll { overflow-x: auto; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 90px; }
.bars span { flex: 1; background: var(--accent); min-height: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
