:root {
  color-scheme: dark;
  --bg: #0d1018;
  --bg-2: #111621;
  --panel: rgba(24, 30, 43, .78);
  --panel-solid: #171d29;
  --panel-2: #202838;
  --border: rgba(255,255,255,.085);
  --text: #f3f5fb;
  --muted: #929caf;
  --accent: #9b7cff;
  --accent-2: #63d8ff;
  --shadow: 0 30px 90px rgba(0,0,0,.38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% 0%, rgba(94, 72, 180, .22), transparent 34rem),
    radial-gradient(circle at 90% 12%, rgba(42, 168, 216, .13), transparent 32rem),
    var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
code {
  padding: .13em .38em;
  border: 1px solid var(--border);
  border-radius: .45em;
  background: rgba(255,255,255,.045);
}
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  padding: 0 max(20px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--border);
  background: rgba(13,16,24,.76);
  backdrop-filter: blur(22px);
}
.brand { display:flex; align-items:center; gap:11px; font-size:18px; font-weight:800; letter-spacing:-.02em; }
.brand-mark {
  display:grid; place-items:center; width:34px; height:34px; border-radius:10px;
  background: linear-gradient(145deg, var(--accent), #7258dd);
  box-shadow: 0 8px 24px rgba(123,92,232,.28);
  font-size:12px; letter-spacing:.03em;
}
.topnav { display:flex; align-items:center; gap:26px; color:#c1c7d3; font-size:14px; }
.topnav > a:not(.button):hover { color:#fff; }

.button {
  display:inline-flex; align-items:center; justify-content:center;
  min-height:46px; padding:0 21px; border-radius:12px;
  border:1px solid transparent; font-weight:750; font-size:14px;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary {
  background: linear-gradient(135deg, var(--accent), #775ee7);
  box-shadow: 0 12px 32px rgba(121,91,229,.25);
}
.button-secondary { background: var(--panel-2); border-color: var(--border); }
.button-ghost { background: rgba(255,255,255,.045); border-color: var(--border); }
.button-small { min-height:36px; padding-inline:15px; border-radius:10px; }

.hero {
  min-height: 610px;
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  align-items:center;
  gap:64px;
  padding-block:72px 82px;
}
.eyebrow { color:var(--accent-2); font-size:12px; font-weight:850; letter-spacing:.17em; text-transform:uppercase; }
.hero h1, .game-copy h1 {
  margin:15px 0 18px;
  font-size:clamp(46px, 6vw, 76px);
  line-height:.98;
  letter-spacing:-.055em;
}
.hero h1 span { color:#9e88ff; }
.hero-text { max-width:650px; color:#aab2c2; font-size:18px; line-height:1.7; }
.hero-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:30px; }
.microcopy { color:#778196; font-size:12px; margin-top:15px; }

.hero-panel { display:flex; justify-content:center; }
.console-card {
  width:min(480px,100%);
  padding:22px;
  border:1px solid rgba(255,255,255,.11);
  border-radius:28px;
  background: linear-gradient(165deg, rgba(31,39,55,.93), rgba(17,22,32,.86));
  box-shadow: var(--shadow);
  transform: perspective(900px) rotateY(-4deg) rotateX(2deg);
}
.console-header, .console-footer {
  display:flex; align-items:center; gap:10px; color:#a5adbd; font-size:11px; font-weight:800; letter-spacing:.13em;
}
.console-version { margin-left:auto; }
.dot { width:8px; height:8px; border-radius:999px; background:#75e5b2; box-shadow:0 0 18px rgba(117,229,178,.8); }
.cover-stack { position:relative; height:335px; margin:24px 0; }
.cover {
  position:absolute; left:50%; top:50%; width:218px; height:294px;
  border-radius:15px; border:1px solid rgba(255,255,255,.11); box-shadow:0 24px 55px rgba(0,0,0,.4);
}
.cover-back { background:#273044; transform:translate(-72%,-50%) rotate(-10deg); opacity:.66; }
.cover-mid { background:#322d53; transform:translate(-32%,-50%) rotate(8deg); opacity:.83; }
.cover-front {
  display:grid; place-items:center; text-align:center; font-size:37px; line-height:.9; font-weight:950; letter-spacing:-.06em;
  background:
    radial-gradient(circle at 50% 25%, rgba(130,101,255,.8), transparent 35%),
    linear-gradient(145deg,#1d2330,#11151f);
  transform:translate(-50%,-50%);
}
.console-footer { justify-content:space-between; }

.catalog-section, .steps-section { padding-block:70px; }
.section-heading { display:flex; align-items:end; justify-content:space-between; margin-bottom:26px; }
.section-heading h2 { margin:6px 0 0; font-size:38px; letter-spacing:-.04em; }
.catalog-count { color:var(--muted); font-size:14px; }

.catalog-toolbar { display:grid; grid-template-columns:1fr 220px 200px; gap:10px; margin-bottom:24px; }
.search { display:flex; align-items:center; gap:10px; padding:0 14px; height:46px; border:1px solid var(--border); border-radius:12px; background:rgba(255,255,255,.035); }
.search input { width:100%; color:var(--text); border:0; outline:0; background:transparent; }
.search input::placeholder { color:#737d90; }
select {
  height:46px; padding:0 12px; color:var(--text); border:1px solid var(--border); border-radius:12px; outline:0;
  background:var(--panel-solid);
}

.game-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:18px; }
.game-card {
  overflow:hidden; border:1px solid var(--border); border-radius:18px;
  background:var(--panel); box-shadow:0 14px 42px rgba(0,0,0,.14);
  transition:transform .18s ease,border-color .18s ease;
}
.game-card:hover { transform:translateY(-4px); border-color:rgba(158,136,255,.36); }
.game-card-cover { aspect-ratio: 4 / 5.4; background:#1b2230; overflow:hidden; }
.game-card-cover img { width:100%; height:100%; object-fit:cover; display:block; }
.card-cover-placeholder {
  width:100%; height:100%; display:grid; place-items:center; color:#6f788b; font-weight:900; letter-spacing:.12em;
  background:linear-gradient(145deg,#222a3a,#141923);
}
.game-card-body { padding:17px; }
.game-card-platform { color:#737f95; font-size:10px; font-weight:800; letter-spacing:.13em; text-transform:uppercase; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.game-card h3 { margin:7px 0 10px; font-size:17px; letter-spacing:-.02em; }
.game-card-meta { display:flex; justify-content:space-between; gap:10px; color:#929bad; font-size:12px; }

.empty-state {
  display:flex; min-height:220px; flex-direction:column; align-items:center; justify-content:center; gap:8px;
  padding:34px; text-align:center; border:1px dashed var(--border); border-radius:18px; color:var(--muted);
}
.empty-state strong { color:var(--text); font-size:20px; }
.empty-state .button { margin-top:14px; }
.hidden { display:none !important; }

.steps { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.steps article { padding:25px; border:1px solid var(--border); border-radius:18px; background:rgba(255,255,255,.025); }
.steps h3 { margin:15px 0 8px; }
.steps p { margin:0; color:var(--muted); line-height:1.6; }
.step-number { color:var(--accent); font-size:12px; font-weight:900; letter-spacing:.12em; }

.footer { display:flex; justify-content:space-between; gap:30px; padding-block:38px; border-top:1px solid var(--border); color:#70798b; font-size:12px; }

.game-page { padding-block:48px 80px; }
.back-link { display:inline-block; margin-bottom:26px; color:#aeb6c5; font-size:14px; }
.back-link:hover { color:#fff; }
.game-detail {
  display:grid; grid-template-columns:330px 1fr; gap:54px;
  padding:34px; border:1px solid var(--border); border-radius:26px;
  background:rgba(23,29,41,.73); box-shadow:var(--shadow);
}
.loading-card { display:block; color:var(--muted); }
.game-cover-large { aspect-ratio:4/5.45; overflow:hidden; border-radius:17px; background:#161c28; border:1px solid var(--border); }
.game-cover-large img { width:100%; height:100%; object-fit:cover; display:block; }
.cover-placeholder { width:100%; height:100%; display:grid; place-items:center; color:#778095; font-weight:900; letter-spacing:.15em; }
.game-copy h1 { font-size:clamp(38px,5vw,62px); margin-top:13px; }
.game-description { color:#aeb6c5; font-size:16px; line-height:1.72; max-width:680px; }
.game-meta { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:28px 0; }
.game-meta div { padding:14px 15px; border:1px solid var(--border); border-radius:12px; background:rgba(255,255,255,.025); }
.game-meta span { display:block; margin-bottom:4px; color:#747f91; font-size:10px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.game-meta strong { font-size:14px; }
.game-actions { display:flex; flex-wrap:wrap; gap:10px; }

@media (max-width: 900px) {
  .hero { grid-template-columns:1fr; min-height:0; }
  .hero-panel { order:-1; }
  .game-grid { grid-template-columns:repeat(2,1fr); }
  .catalog-toolbar { grid-template-columns:1fr 1fr; }
  .catalog-toolbar .search { grid-column:1/-1; }
  .game-detail { grid-template-columns:260px 1fr; gap:30px; padding:24px; }
}
@media (max-width: 640px) {
  .shell { width:min(100% - 26px,1180px); }
  .topbar { height:66px; padding-inline:13px; }
  .topnav > a:not(.button) { display:none; }
  .hero { padding-block:42px 55px; gap:30px; }
  .hero h1 { font-size:48px; }
  .console-card { transform:none; }
  .game-grid { grid-template-columns:1fr 1fr; gap:10px; }
  .game-card-body { padding:12px; }
  .catalog-toolbar { grid-template-columns:1fr; }
  .catalog-toolbar .search { grid-column:auto; }
  .steps { grid-template-columns:1fr; }
  .footer { flex-direction:column; }
  .game-detail { grid-template-columns:1fr; padding:18px; gap:25px; }
  .game-cover-large { width:min(310px,100%); margin-inline:auto; }
}
