:root {
  --bg: #070b16;
  --bg-soft: #10182c;
  --card: rgba(16, 24, 44, 0.78);
  --line: rgba(240, 193, 75, 0.18);
  --gold: #f0c14b;
  --gold-2: #ffe9a0;
  --coral: #ff6b6b;
  --teal: #3ee0c6;
  --violet: #8b7cff;
  --text: #eef2ff;
  --muted: #9aa6c4;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 22px;
  --max: 1180px;
  --font: "Sora", "Noto Sans SC", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, .btn { font-family: inherit; cursor: pointer; }

.stars {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(139,124,255,.18), transparent 55%),
    radial-gradient(900px 420px at 10% 0%, rgba(62,224,198,.1), transparent 50%),
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.35) 0 1px, transparent 2px),
    radial-gradient(circle at 70% 60%, rgba(255,255,255,.25) 0 1px, transparent 2px),
    radial-gradient(circle at 40% 80%, rgba(240,193,75,.35) 0 1px, transparent 2px);
}

.wrap { position: relative; z-index: 1; }

.nav {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(7,11,22,.72);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; letter-spacing: .08em;
}
.brand svg, .brand img.logo {
  width: 36px; height: 36px; border-radius: 10px;
}
.nav-links { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nav-links a {
  color: var(--muted); padding: 8px 12px; border-radius: 999px; font-size: 14px;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold-2); background: rgba(240,193,75,.08); }

.hero {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr .9fr;
  gap: 40px; padding: 56px 22px 28px; align-items: center;
}
.eyebrow {
  color: var(--teal); letter-spacing: .22em; text-transform: uppercase;
  font-size: 12px; font-weight: 700; margin-bottom: 12px;
}
.hero h1 {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05; letter-spacing: -.03em; margin-bottom: 16px;
}
.hero h1 span { color: var(--gold); }
.hero p.lead { color: var(--muted); font-size: 18px; max-width: 520px; margin-bottom: 28px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 20px; font-weight: 650;
}
.btn-gold { background: linear-gradient(180deg, #ffe08a, var(--gold)); color: #1a1404; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn:hover { transform: translateY(-1px); }

.hero-art {
  position: relative; border-radius: 28px; overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.hero-art img { width: 100%; height: 420px; object-fit: cover; }
.hero-badge {
  position: absolute; left: 16px; bottom: 16px;
  background: rgba(7,11,22,.72); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; font-size: 13px;
}

.stats {
  max-width: var(--max); margin: 0 auto 18px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; padding: 0 22px;
}
.stat {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 16px 18px;
}
.stat b { display: block; font-size: 22px; color: var(--gold); }
.stat span { color: var(--muted); font-size: 13px; }

section { max-width: var(--max); margin: 0 auto; padding: 42px 22px; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 22px; }
.sec-head h2 { font-size: 28px; }
.sec-head p { color: var(--muted); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.filter {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 7px 13px; font-size: 13px;
}
.filter.on, .filter:hover { color: #1a1404; background: var(--gold); border-color: var(--gold); }

.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px;
}
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: .25s transform, .25s border-color;
}
.card:hover { transform: translateY(-6px); border-color: rgba(240,193,75,.45); }
.thumb { height: 180px; overflow: hidden; position: relative; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.tag {
  position: absolute; top: 12px; left: 12px;
  background: rgba(7,11,22,.75); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 10px; font-size: 12px; color: var(--gold-2);
}
.card-body { padding: 16px 16px 18px; }
.card-body h3 { font-size: 18px; margin-bottom: 6px; }
.card-body p { color: var(--muted); font-size: 14px; margin-bottom: 14px; min-height: 44px; }
.meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }

.about-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; }
.panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
}
.panel h3 { margin-bottom: 10px; }
.panel li { margin: 8px 0 8px 18px; color: var(--muted); }

.footer {
  border-top: 1px solid var(--line); margin-top: 20px;
  padding: 28px 22px 40px; color: var(--muted); font-size: 13px;
}
.footer-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

.game-page { min-height: 100vh; display: flex; flex-direction: column; }
.game-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 18px; border-bottom: 1px solid var(--line);
  background: rgba(7,11,22,.85); position: sticky; top: 0; z-index: 5;
}
.hud { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; }
.hud b { color: var(--gold); }
.stage-wrap { flex: 1; display: grid; place-items: center; padding: 18px; }
canvas, .board {
  background: linear-gradient(180deg, #10182c, #070b16);
  border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
}
.help { color: var(--muted); font-size: 13px; text-align: center; padding: 8px 16px 20px; }

.overlay {
  position: fixed; inset: 0; background: rgba(4,7,14,.72);
  display: none; place-items: center; z-index: 30;
}
.overlay.show { display: grid; }
.modal {
  width: min(420px, 92vw); background: #121a30; border: 1px solid var(--line);
  border-radius: 20px; padding: 26px; text-align: center;
}
.modal h2 { margin-bottom: 8px; }
.modal p { color: var(--muted); margin-bottom: 18px; }

.compass-pad {
  display: grid; grid-template-columns: repeat(3, 64px); gap: 8px; justify-content: center; margin-top: 10px;
}
.compass-pad button {
  width: 64px; height: 54px; border-radius: 12px; border: 1px solid var(--line);
  background: #18233d; color: var(--text); font-size: 18px;
}
.compass-pad button:nth-child(5) { visibility: hidden; }

@media (max-width: 860px) {
  .hero, .about-grid { grid-template-columns: 1fr; }
  .hero-art img { height: 280px; }
  .stats { grid-template-columns: 1fr 1fr; }
}
