:root {
  --bg: #0b0c14;
  --bg-2: #11131f;
  --surface: #161927;
  --surface-2: #1d2133;
  --line: #2a2f45;
  --text: #eef0f7;
  --muted: #9aa0b8;
  --gold: #f4c25b;
  --gold-2: #ffdf94;
  --accent: #8b5cf6;
  --ok: #34d399;
  --danger: #f87171;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .7);
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --display: 'Sora', 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.hidden, [hidden] { display: none !important; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 12, 20, .8); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 18px var(--display); letter-spacing: -.01em; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold), #e08a2c); color: #1a1205; font-weight: 800; font-size: 15px;
}
.nav { display: flex; gap: 6px; align-items: center; }
.nav a { padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); font-weight: 600; cursor: pointer; transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: #3d4463; background: #242941; }
.btn-gold { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #1a1205; border-color: transparent; }
.btn-gold:hover { filter: brightness(1.06); background: linear-gradient(135deg, var(--gold-2), var(--gold)); }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--danger); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn svg { width: 16px; height: 16px; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 56px; }
.hero::before {
  content: ''; position: absolute; inset: -40% -10% auto; height: 700px; z-index: -1;
  background:
    radial-gradient(600px 300px at 20% 40%, rgba(139, 92, 246, .28), transparent 70%),
    radial-gradient(500px 280px at 80% 30%, rgba(244, 194, 91, .18), transparent 70%);
}
.eyebrow { color: var(--gold); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: 12px; }
.hero h1 {
  font: 800 clamp(34px, 6vw, 62px)/1.05 var(--display); letter-spacing: -.03em; margin: 12px 0 16px; max-width: 820px;
}
.hero h1 .grad { background: linear-gradient(90deg, var(--gold-2), var(--gold) 50%, #f59e0b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 620px; margin: 0 0 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.stats { display: flex; gap: 36px; margin-top: 44px; flex-wrap: wrap; }
.stat b { display: block; font: 700 28px var(--display); }
.stat span { color: var(--muted); font-size: 13px; }

/* ---------- featured ---------- */
.featured {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 0; border-radius: 22px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); margin-bottom: 56px;
}
.featured .media { aspect-ratio: 16/10; background: var(--surface-2) center/cover; position: relative; }
.featured .body { padding: 32px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.featured h2 { font: 700 30px/1.15 var(--display); margin: 0; }

/* ---------- toolbar / filters ---------- */
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.section-head h2 { font: 700 28px var(--display); margin: 0; letter-spacing: -.02em; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 24px; }
.search {
  flex: 1 1 240px; max-width: 340px; padding: 10px 14px 10px 38px; border-radius: 999px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239aa0b8' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 14px 50% no-repeat;
  border: 1px solid var(--line); outline: none;
}
.search:focus { border-color: var(--gold); }
.chip {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 500;
}
.chip:hover { color: var(--text); }
.chip.active { background: var(--gold); border-color: var(--gold); color: #1a1205; }

/* ---------- game grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); border-color: #414968; box-shadow: var(--shadow); }
.card .thumb { aspect-ratio: 4/3; background: var(--surface-2) center/cover; position: relative; }
.card .thumb .badge { position: absolute; top: 12px; left: 12px; }
.card .play-overlay {
  position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: .2s;
  background: linear-gradient(to top, rgba(0, 0, 0, .6), rgba(0, 0, 0, .1));
}
.card:hover .play-overlay { opacity: 1; }
.play-circle {
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold); color: #1a1205; box-shadow: 0 10px 30px rgba(244, 194, 91, .4);
}
.card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { margin: 0; font: 700 18px var(--display); }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.pill {
  font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
}
.pill b { color: var(--text); font-weight: 600; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(6px); color: var(--gold-2);
}
.badge.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.badge.soon { color: var(--muted); }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- about / contact ---------- */
.band { padding: 72px 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.about-grid h2 { font: 700 32px/1.15 var(--display); margin: 8px 0 14px; }
.contact-card {
  background: linear-gradient(135deg, rgba(244, 194, 91, .12), rgba(139, 92, 246, .12));
  border: 1px solid var(--line); border-radius: 22px; padding: 40px; text-align: center;
}
.contact-card h2 { font: 700 30px var(--display); margin: 0 0 10px; }
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 13px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- game detail ---------- */
.detail-top { padding: 28px 0 12px; }
.back { color: var(--muted); display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }
.back:hover { color: var(--text); }
.detail-title { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin: 16px 0 22px; }
.detail-title h1 { font: 800 clamp(30px, 5vw, 46px)/1.05 var(--display); margin: 0 0 8px; letter-spacing: -.02em; }
.detail-title p { margin: 0; color: var(--muted); font-size: 17px; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.player {
  background: #05060a; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow);
}
.player-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px;
  background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.player-bar .left, .player-bar .right { display: flex; gap: 8px; align-items: center; }
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 999px; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 600; }
.seg button.active { background: var(--surface-2); color: var(--text); }
.stage { display: grid; place-items: center; padding: 0; background: radial-gradient(circle at 50% 30%, #1a1d2e, #05060a 70%); }
.stage .frame { width: 100%; aspect-ratio: 16/9; border: 0; display: block; background: #000; transition: width .3s; }
.stage.mobile { padding: 28px 0; }
.stage.mobile .frame { width: min(390px, 92%); aspect-ratio: 9/19.5; border-radius: 28px; border: 10px solid #1d2133; }
.stage.portrait .frame { aspect-ratio: 9/16; width: min(480px, 100%); }
.placeholder-stage {
  aspect-ratio: 16/9; width: 100%; display: grid; place-items: center; text-align: center; position: relative;
  background: var(--surface-2) center/cover;
}
.placeholder-stage::after { content: ''; position: absolute; inset: 0; background: rgba(5, 6, 10, .6); }
.placeholder-stage > div { position: relative; z-index: 1; padding: 20px; }
.placeholder-stage h3 { font: 700 24px var(--display); margin: 10px 0 6px; }
.launch-cover { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(5,6,10,.55) center/cover; cursor: pointer; }
.launch-cover .play-circle { width: 84px; height: 84px; }
.stage-wrap { position: relative; }

.detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 32px; margin: 40px 0 72px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel h2 { font: 700 20px var(--display); margin: 0 0 14px; }
.panel + .panel { margin-top: 20px; }
.prose { color: #cfd3e3; }
.prose p { margin: 0 0 14px; }
.prose ul { padding-left: 20px; margin: 0 0 14px; }
.prose strong { color: var(--text); }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; border-radius: var(--radius-sm); overflow: hidden; }
.spec { background: var(--surface-2); padding: 12px 14px; }
.spec span { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.spec b { font: 700 16px var(--display); }
.spec.wide { grid-column: span 2; }
.features { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.features li { display: flex; gap: 10px; align-items: flex-start; }
.features li::before {
  content: ''; flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 6px;
  background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1205' stroke-width='3'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center/14px no-repeat;
}
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.shots img { border-radius: var(--radius-sm); aspect-ratio: 16/10; object-fit: cover; cursor: zoom-in; border: 1px solid var(--line); }
.shots video { width: 100%; border-radius: var(--radius-sm); }
.lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, .9); display: grid; place-items: center; z-index: 100; padding: 20px; cursor: zoom-out; }
.lightbox img { max-height: 90vh; border-radius: 12px; }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--surface-2);
  border: 1px solid var(--line); padding: 10px 18px; border-radius: 999px; z-index: 200; box-shadow: var(--shadow);
}

@media (max-width: 900px) {
  .featured, .about-grid, .detail-grid { grid-template-columns: 1fr; }
  .nav a.hide-sm { display: none; }
}
@media (max-width: 560px) {
  .hero { padding: 48px 0 36px; }
  .featured .body, .panel, .contact-card { padding: 22px; }
  .stats { gap: 22px; }
}
@media (max-width: 560px) {
  .player-bar { padding: 8px 10px; }
  .player-bar #viewSeg { display: none; }
  .player-bar .btn-ghost { font-size: 0; gap: 0; padding: 8px 10px; }
  .detail-actions .btn { flex: 1; }
}
