
:root {
  --bg: #0b1020;
  --panel: #121a32;
  --panel-2: #17213d;
  --text: #f5f7fb;
  --muted: #aab5cf;
  --line: rgba(255,255,255,.12);
  --brand: #80ffdb;
  --brand-2: #64dfdf;
  --danger: #ff6b6b;
  --ok: #70e000;
  --wait: #ffd166;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(128,255,219,.18), transparent 32rem),
    radial-gradient(circle at bottom right, rgba(100,223,223,.14), transparent 28rem),
    var(--bg);
}
a { color: inherit; }
main {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 1rem;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem clamp(1rem, 3vw, 2rem);
  background: rgba(11,16,32,.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-weight: 900;
  letter-spacing: -.04em;
  text-decoration: none;
  font-size: 1.25rem;
  white-space: nowrap;
}
.brand span { color: var(--brand); }
nav {
  display: flex;
  justify-content: flex-end;
  gap: .35rem;
  flex-wrap: wrap;
}
nav a {
  text-decoration: none;
  color: var(--muted);
  padding: .45rem .65rem;
  border-radius: 999px;
}
nav a:hover { color: var(--text); background: rgba(255,255,255,.08); }
.hero {
  padding: clamp(2rem, 8vw, 5rem) 0 1rem;
}
.hero h1, h1, h2, h3, p { margin-top: 0; }
.hero h1 {
  font-size: clamp(2.8rem, 12vw, 7rem);
  line-height: .88;
  letter-spacing: -.08em;
  margin-bottom: 1rem;
}
.hero p:last-child { max-width: 42rem; color: var(--muted); font-size: 1.1rem; }
.panel, .card {
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid var(--line);
  box-shadow: 0 24px 80px rgba(0,0,0,.22);
}
.panel {
  border-radius: 28px;
  padding: clamp(1rem, 3vw, 1.5rem);
  margin-bottom: 1rem;
}
.narrow { max-width: 560px; margin-inline: auto; }
.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.eyebrow {
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .72rem;
  font-weight: 800;
  margin-bottom: .35rem;
}
.muted, .card span { color: var(--muted); }
.success { color: var(--ok); }
.error { color: var(--danger); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .9rem .7rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; }
.num { text-align: right; }
.rank { color: var(--brand); font-weight: 900; }
.stat-grid, .quick-grid, .store-grid, .participant-grid, .checkbox-grid, .result-grid, .game-choice-grid {
  display: grid;
  gap: .8rem;
}
.stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 1rem 0; }
.stat-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1rem;
}
.stat span { display: block; color: var(--muted); font-size: .85rem; }
.stat strong { font-size: clamp(1.5rem, 5vw, 2.4rem); }
.quick-grid, .store-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.participant-grid, .checkbox-grid, .result-grid, .game-choice-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.card-list { display: grid; gap: .75rem; }
.card {
  border-radius: 20px;
  padding: 1rem;
}
.link-card {
  display: grid;
  gap: .35rem;
  text-decoration: none;
}
.link-card:hover { border-color: rgba(128,255,219,.45); transform: translateY(-1px); }
.admin-card, .edit-card {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: .75rem;
  align-items: end;
}
.edit-card { grid-template-columns: 86px repeat(auto-fit, minmax(150px, 1fr)); }
.store-card { display: grid; gap: 1rem; align-content: space-between; }
.store-card strong { color: var(--brand); }
.media-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.thumb, .admin-thumb, .game-choice-image, .store-image {
  object-fit: cover;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
}
.thumb { width: 88px; height: 88px; border-radius: 24px; flex: 0 0 auto; }
.admin-thumb { width: 72px; height: 72px; border-radius: 18px; }
.store-image { width: 100%; aspect-ratio: 16 / 10; border-radius: 18px; }
.game-choice-image { width: 100%; aspect-ratio: 4 / 3; border-radius: 16px; }
.image-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  font-weight: 900;
  letter-spacing: -.04em;
}
.game-choice {
  position: relative;
  display: grid;
  gap: .7rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: .75rem;
  background: rgba(255,255,255,.05);
  color: var(--text);
}
.game-choice input { position: absolute; top: .8rem; right: .8rem; width: auto; accent-color: var(--brand); }
.game-choice:has(input:checked) { border-color: rgba(128,255,219,.75); box-shadow: 0 0 0 2px rgba(128,255,219,.18); }
.game-choice small { display: block; color: var(--muted); margin-top: .15rem; }
.mini-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: .75rem;
}
.round-summary, .round-box, fieldset {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1rem;
}
legend { color: var(--brand); font-weight: 800; padding: 0 .35rem; }
.round-list { display: grid; gap: 1rem; }
.subsection { margin-top: 1.5rem; }
.stacked-form, .inline-add { display: grid; gap: 1rem; }
.inline-add { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: end; }
.inline-add .button { width: fit-content; }
label { display: grid; gap: .4rem; color: var(--muted); font-weight: 700; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .8rem .9rem;
  color: var(--text);
  background: rgba(255,255,255,.07);
  font: inherit;
}
textarea { resize: vertical; }
.check-card, .check-inline {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--text);
}
.check-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: .8rem;
  background: rgba(255,255,255,.05);
}
input[type="checkbox"] { width: auto; accent-color: var(--brand); }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }
.inline-form { display: inline-flex; margin: 1rem .5rem 0 0; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: .85rem 1.1rem;
  min-height: 44px;
  color: #06111f;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}
.button.secondary { color: var(--text); background: rgba(255,255,255,.1); border: 1px solid var(--line); }
.button.danger { color: #240505; background: var(--danger); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.badge, .pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: .25rem .6rem;
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.pill { color: var(--brand); background: rgba(128,255,219,.12); border: 1px solid rgba(128,255,219,.2); }
.badge.good { color: #102000; background: var(--ok); }
.badge.wait { color: #241600; background: var(--wait); }
.badge.bad { color: #250606; background: var(--danger); }
.token-box {
  display: block;
  overflow-wrap: anywhere;
  background: #050814;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  font-size: 1.05rem;
}
@media (max-width: 760px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  nav { justify-content: flex-start; }
  nav a { padding: .4rem .55rem; }
  .stat-grid, .stat-grid.two, .quick-grid, .store-grid, .inline-add, .admin-card, .edit-card { grid-template-columns: 1fr; }
  .section-title { flex-direction: column; }
  th, td { padding: .75rem .45rem; }
  .hero { padding-top: 2rem; }
}
