:root {
  --bg: #070a08;
  --ink: #e7f0df;
  --muted: #9aa892;
  --card: #0c120f;
  --amber: #e2a21a;
  --phosphor: #b6f25a;
  --line: rgba(178, 214, 122, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 500;
  letter-spacing: 0.02em;
  background:
    linear-gradient(rgba(182, 242, 90, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(182, 242, 90, 0.04) 1px, transparent 1px),
    var(--bg);
  background-size: 48px 48px, 48px 48px, auto;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(0, 0, 0, 0.13) 2px 3px
  );
  mix-blend-mode: multiply;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
button, input { font: inherit; }

.sky-photo, #stars, .flyers { position: fixed; inset: 0; pointer-events: none; }
.sky-photo {
  background: url("/media/stars.jpg") center/cover;
  opacity: 0.28;
  filter: grayscale(0.55) sepia(0.45) hue-rotate(55deg) brightness(0.55);
  z-index: 0;
}
#stars { z-index: 1; }
.flyers { z-index: 2; overflow: hidden; }
.flyer {
  position: absolute;
  height: 64px;
  width: auto;
  image-rendering: pixelated;
  animation: fly linear infinite;
  filter: drop-shadow(0 0 6px rgba(226, 162, 26, 0.45));
}
@keyframes fly {
  from { transform: translateX(-40vw); }
  to { transform: translateX(110vw); }
}

.classbar, .top, main, footer, .player { position: relative; z-index: 3; }
.classbar {
  margin: 0;
  padding: 6px 22px;
  background: #10160f;
  color: var(--amber);
  font-family: "Share Tech Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.top {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 22px;
  position: sticky;
  top: 0;
  backdrop-filter: blur(16px);
  background: rgba(7, 10, 8, 0.86);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: "Press Start 2P", monospace;
  font-size: 12px;
  color: var(--phosphor);
}
.brand img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid var(--amber);
}
nav { display: flex; gap: 18px; margin-left: auto; }
nav a {
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 15px;
}
.play-top, .wallet, .player button {
  border: 1px solid var(--amber);
  cursor: pointer;
  color: #14180c;
  background: var(--amber);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 2px;
  padding: 8px 14px;
}
.play-top.playing { background: transparent; color: var(--amber); }

.hero { position: relative; min-height: 52vh; display: grid; align-items: start; overflow: hidden; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(0.72) contrast(1.08) hue-rotate(18deg); }
.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 10, 8, 0.15), rgba(7, 10, 8, 0.9)),
    repeating-linear-gradient(transparent 0 3px, rgba(0, 0, 0, 0.18) 3px 4px);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(226, 162, 26, 0.55);
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(182, 242, 90, 0.12);
}
.hero-copy { position: relative; padding: 36px 6vw 28px; max-width: 820px; }
.pair {
  font-family: "Share Tech Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--amber);
}
h1 {
  margin: 8px 0;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(28px, 5vw, 58px);
  line-height: 1.2;
  color: var(--phosphor);
  text-shadow: 0 0 18px rgba(182, 242, 90, 0.35);
}
.lede { font-size: 26px; font-weight: 700; max-width: 34ch; line-height: 1.15; }
#board { scroll-margin-top: 92px; }

.board {
  display: grid;
  grid-template-columns: 300px 1fr 280px;
  gap: 14px;
  padding: 18px 6vw 8px;
}
.pair-banner {
  grid-column: 1 / -1;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: rgba(226, 162, 26, 0.08);
  font-family: "Share Tech Mono", monospace;
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: 0.08em;
  color: var(--amber);
}
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 16px 16px 18px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.card::before,
.card::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid var(--amber);
}
.card::before { top: 4px; left: 4px; border-right: 0; border-bottom: 0; }
.card::after { right: 4px; bottom: 4px; border-left: 0; border-top: 0; }
.kicker {
  margin: 0;
  font-family: "Share Tech Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--phosphor);
}
.ring {
  width: 220px;
  height: 220px;
  margin: 16px auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle, transparent 58%, rgba(226, 162, 26, 0.15) 59% 62%, transparent 63%),
    conic-gradient(var(--amber) calc(var(--p) * 1turn), rgba(182, 242, 90, 0.12) 0);
  box-shadow: 0 0 0 1px rgba(226, 162, 26, 0.4);
}
.ring-face {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  background: #0b100d;
  border: 1px dashed rgba(182, 242, 90, 0.35);
}
.ring-face b {
  font-family: "Share Tech Mono", monospace;
  font-size: 40px;
  font-weight: 400;
  color: var(--amber);
}
.ring-face span {
  font-family: "Share Tech Mono", monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
}
.phase, .fine, .you { color: var(--muted); }
.phase, .fine { font-family: "Share Tech Mono", monospace; font-size: 13px; }
.pot-card h2 {
  margin: 8px 0 0;
  font-size: clamp(42px, 6vw, 76px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: 0.02em;
}
.prize-unit {
  margin: 6px 0 0;
  font-family: "Share Tech Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--phosphor);
}
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.stats div {
  background: rgba(182, 242, 90, 0.04);
  border: 1px solid rgba(182, 242, 90, 0.12);
  border-radius: 2px;
  padding: 8px 10px;
}
.stats dt {
  color: var(--muted);
  font-family: "Share Tech Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.stats dd { margin: 2px 0 0; font-weight: 700; font-size: 20px; overflow-wrap: anywhere; }
.buyer {
  font-weight: 700;
  font-size: 28px;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
  min-height: 2.4em;
}
.buyer-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 2px;
  margin-top: 12px;
  filter: saturate(0.8) contrast(1.05);
}
.wallet { width: 100%; }

.rules, .split, .history-wrap { padding: 28px 6vw; }
.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.rules article, .split {
  background: rgba(8, 14, 10, 0.82);
  border: 1px solid var(--line);
  border-radius: 2px;
}
.rules article { padding: 12px 12px 18px; }
.rules img, .split img, .split video {
  height: 180px;
  width: 100%;
  object-fit: cover;
  border-radius: 2px;
  filter: saturate(0.75) contrast(1.06) hue-rotate(12deg);
}
.rules h3 {
  margin: 12px 8px 4px;
  font-size: 26px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.rules p { margin: 0 8px; color: var(--muted); font-size: 18px; }

.split {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.6fr;
  gap: 18px;
  align-items: center;
  margin: 0 6vw;
  padding: 16px;
}
.split h2 { margin: 8px 0; font-size: 36px; letter-spacing: 0.03em; text-transform: uppercase; }
.split p { font-size: 18px; }
.mint { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mint span {
  font-family: "Share Tech Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--amber);
}
.mint code { overflow-wrap: anywhere; color: var(--muted); font-family: "Share Tech Mono", monospace; }

.history-wrap h2 {
  font-family: "Share Tech Mono", monospace;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
#history { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
#history li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 2px;
  border: 1px solid rgba(182, 242, 90, 0.12);
  background: rgba(182, 242, 90, 0.03);
  font-family: "Share Tech Mono", monospace;
}
#history .empty { color: var(--muted); }

.reel { overflow: hidden; padding-bottom: 120px; }
.track { display: flex; gap: 10px; width: max-content; animation: ticker 48s linear infinite; }
.track img {
  height: 160px;
  width: auto;
  border-radius: 2px;
  border: 1px solid var(--line);
  filter: saturate(0.7) contrast(1.05);
}
@keyframes ticker { to { transform: translateX(-50%); } }

footer {
  padding: 10px 6vw 120px;
  color: var(--muted);
  font-family: "Share Tech Mono", monospace;
  font-size: 13px;
}

.player {
  position: fixed;
  z-index: 5;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 2px;
  background: rgba(8, 12, 9, 0.94);
  border: 1px solid var(--amber);
  backdrop-filter: blur(12px);
}
.player b { display: block; letter-spacing: 0.08em; text-transform: uppercase; }
.player span, .you { font-variant-numeric: tabular-nums; font-family: "Share Tech Mono", monospace; }
#volume { margin-left: auto; width: 120px; accent-color: var(--amber); }

@media (max-width: 980px) {
  .board, .rules, .split { grid-template-columns: 1fr; }
  nav { display: none; }
  .hero { min-height: 42vh; }
  .classbar { font-size: 11px; letter-spacing: 0.04em; line-height: 1.45; }
  .pair-banner { font-size: 11px; }
  .lede { font-size: 22px; }
  .split { margin: 0 6vw; }
  #volume { width: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}
