:root {
  --bg: #0a1218;
  --bg2: #0e1a24;
  --panel: #111e2a;
  --panel2: #16283a;
  --text: #e6eef5;
  --muted: #94a7b8;
  --ice: #8fd3ff;
  --gold: #ffe040;
  --border: rgba(143, 211, 255, 0.18);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 50% -200px, #1b3348 0%, var(--bg2) 45%, var(--bg) 100%) fixed;
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
}
a { color: var(--ice); }
h1, h2, h3 { margin: 0 0 12px; line-height: 1.15; }
h2 { font-size: 28px; font-style: italic; font-weight: 800; margin-top: 8px; }
.container { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-weight: 400; }

/* header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(10, 18, 24, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.top-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-name { font-style: italic; font-weight: 800; font-size: 18px; letter-spacing: 0.2px; }
.chip { font-size: 12px; font-weight: 700; color: var(--bg); background: var(--ice); border-radius: 999px; padding: 2px 9px; }
nav { display: flex; gap: 18px; }
nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
nav a:hover { color: var(--text); }

/* hero */
.hero { text-align: center; padding: 56px 20px 12px; }
.kicker { color: var(--muted); text-transform: uppercase; letter-spacing: 2px; font-size: 12px; font-weight: 700; margin: 0 0 6px; }
.hero h1 {
  font-style: italic; font-weight: 900; font-size: clamp(42px, 8vw, 78px);
  text-shadow: 0 4px 0 #1a2430, 0 10px 30px rgba(0, 0, 0, 0.5);
}
.tag { max-width: 640px; margin: 0 auto; color: var(--muted); font-size: 17px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 860px; margin: 30px auto 0; text-align: left; }
.stat {
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px;
  display: flex; flex-direction: column; gap: 4px; min-height: 130px;
}
.label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; }
.value { color: var(--ice); font-size: 40px; font-weight: 800; line-height: 1.1; }
.sub { color: var(--muted); font-size: 13px; }
.contract code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px;
  word-break: break-all; color: var(--text); background: rgba(0, 0, 0, 0.3);
  padding: 8px 10px; border-radius: 6px; margin: 4px 0 8px;
}
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.cta { display: flex; justify-content: center; gap: 12px; margin: 26px 0 10px; flex-wrap: wrap; }

/* buttons */
.btn {
  display: inline-block; border: 1px solid var(--border); background: var(--panel2); color: var(--text);
  padding: 12px 22px; border-radius: 10px; font-weight: 700; font-size: 15px; cursor: pointer;
  text-decoration: none; font-family: var(--font); transition: transform 0.08s ease, background 0.15s ease;
}
.btn:hover { background: #1d3448; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ice); color: var(--bg); border-color: transparent; }
.btn.primary:hover { background: #b3e2ff; }
.btn.ghost { background: transparent; }
.btn.small { padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* game */
.game-section { padding: 24px 20px 8px; }
.game-frame {
  background: #000; border: 1px solid var(--border); border-radius: 12px; padding: 8px;
  display: flex; justify-content: center; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}
.game-frame canvas {
  display: block; max-width: 100%;
  image-rendering: pixelated; image-rendering: crisp-edges;
  cursor: crosshair; outline: none; border-radius: 4px;
}
.game-frame canvas:focus { box-shadow: 0 0 0 2px var(--ice); }
.game-frame:fullscreen { border: 0; border-radius: 0; padding: 0; align-items: center; }
.game-frame:fullscreen canvas { border-radius: 0; }
.game-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 4px; flex-wrap: wrap; }
.game-bar .hint { color: var(--muted); font-size: 13px; }
.game-bar .buttons { display: flex; gap: 8px; }

/* sections */
section.container { padding-top: 40px; padding-bottom: 8px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 20px; position: relative; }
.card .num { position: absolute; top: 14px; right: 16px; color: var(--ice); font-weight: 800; opacity: 0.5; }
.card h3 { font-size: 18px; }
.card p { color: var(--muted); margin: 0; font-size: 14px; }
.donation-box {
  display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center;
  background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--border); border-radius: 12px; padding: 32px 24px;
}
.donation-box .value { font-size: 56px; }

/* leaderboard */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); }
table.lb { width: 100%; border-collapse: collapse; font-size: 14px; }
table.lb th, table.lb td { padding: 11px 14px; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, 0.06); white-space: nowrap; }
table.lb th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
table.lb th.r, table.lb td.r { text-align: right; }
table.lb td.share { color: var(--ice); font-weight: 700; }
table.lb tr:last-child td { border-bottom: 0; }
table.lb td.empty { color: var(--muted); text-align: center; padding: 28px; white-space: normal; }
.note { color: var(--muted); font-size: 13px; }

main { padding-bottom: 48px; }

@media (max-width: 760px) {
  .stats, .cards { grid-template-columns: 1fr; }
  .donation-box .value { font-size: 40px; }
  nav { gap: 12px; }
  nav a { font-size: 13px; }
  .value { font-size: 32px; }
  .hero { padding-top: 36px; }
}
