:root {
  color-scheme: dark;
  --background: #101019;
  --panel: #191923;
  --border: #2b2a38;
  --ink: #f6f4fb;
  --muted: #a7a3b5;
  --accent: #b59aff;
  --accent-ink: #1a1031;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--background); color: var(--ink); }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.shell { width: min(1220px, calc(100% - 80px)); margin-inline: auto; }
.skip { position: fixed; z-index: 4; inset: 12px auto auto 12px; padding: 10px 16px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); transform: translateY(-150%); }
.skip:focus { transform: none; }

.site-header { border-bottom: 1px solid #242330; }
.header-inner { display: flex; align-items: center; min-height: 72px; gap: 38px; }
.brand { display: inline-flex; align-items: center; white-space: nowrap; font-size: 24px; font-weight: 780; letter-spacing: -.065em; }
.brand-mark { display: grid; width: 34px; height: 34px; margin-right: 10px; place-items: center; border-radius: 9px; background: var(--accent); color: var(--accent-ink); box-shadow: 0 3px 18px #a483ff25; }
.brand-mark .icon { width: 19px; height: 19px; }
.brand-accent { color: var(--accent); }
.nav-link { color: var(--muted); font-size: 14px; font-weight: 620; }
.nav-link:hover, .top-link:hover { color: var(--ink); }
.search-trigger { margin-left: auto; min-width: 211px; min-height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 13px; color: var(--muted); background: var(--panel); border: 1px solid var(--border); border-radius: 9px; text-align: left; font-size: 13px; }
.search-trigger:hover { color: var(--ink); border-color: #5b4d77; }
kbd { margin-left: auto; padding: 1px 7px; border: 1px solid #3b3748; border-radius: 4px; color: #c4bed1; font-size: 12px; }

.hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; min-height: 382px; margin-top: 24px; border-radius: 19px; border: 1px solid #3d2c52; background: #21132e; }
.hero-art, .hero-scrim { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-art { inset: 0 0 0 auto; width: 73%; object-fit: cover; object-position: center; }
.hero-scrim { background: linear-gradient(90deg, #130b20f7 0%, #170c25d9 27%, #1b0d2855 56%, #16092000 79%), linear-gradient(0deg, #10091970, transparent 45%); }
.hero-copy { padding: 44px clamp(30px, 5vw, 68px); }
.hero-label { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border: 1px solid #c6a6ff55; border-radius: 6px; background: #241736d9; color: #dbc6ff; font-size: 10px; font-weight: 790; letter-spacing: .16em; }
.status-dot { display: inline-block; width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--accent); }
.hero-label .status-dot { box-shadow: 0 0 9px #bc99ff; }
.hero h1 { margin: 15px 0 10px; font-size: clamp(56px, 7.1vw, 105px); line-height: .98; font-weight: 850; letter-spacing: -.075em; }
.hero h1 span { color: var(--accent); }
.hero p { max-width: 355px; margin: 16px 0 27px; color: #d5cce0; font-size: clamp(15px, 1.6vw, 18px); line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.primary-button, .secondary-button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 10px; padding: 0 16px; border: 1px solid transparent; border-radius: 8px; font-size: 14px; font-weight: 730; }
.primary-button { color: var(--accent-ink); background: var(--accent); }
.primary-button:hover { background: #cdbaff; }
.secondary-button { color: var(--ink); background: #181020a8; border-color: #b3a0c05e; }
.secondary-button:hover { background: #322347; }

.catalog { margin-block: 34px 60px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 14px; }
.eyebrow { margin: 0 0 7px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .17em; }
.section-heading h2 { margin: 0; font-size: clamp(29px, 3.6vw, 42px); font-weight: 790; letter-spacing: -.055em; line-height: 1.1; }
.section-description { margin: 8px 0 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.catalog-count { margin: 0 0 2px; white-space: nowrap; color: var(--muted); font-size: 13px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 21px 19px; }
.pill { min-height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 0 13px; border-radius: 8px; border: 1px solid var(--border); background: #181822; color: #c5c0d0; font-size: 13px; font-weight: 650; }
.pill:hover { color: var(--ink); border-color: #685683; }
.pill[aria-pressed="true"] { color: #e6d8ff; background: #34244e; border-color: #684e9a; }
.game-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.game-card { position: relative; overflow: hidden; background: var(--panel); border-radius: 12px; border: 1px solid var(--border); transition: border-color .2s ease, transform .2s ease; }
.game-card:hover { border-color: #785ca7; transform: translateY(-3px); }
.game-card:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.game-art { position: relative; overflow: hidden; aspect-ratio: 1.64; background: #291d42; }
.game-art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.game-card:hover img { transform: scale(1.045); }
.card-status { position: absolute; left: 9px; top: 9px; display: flex; align-items: center; gap: 6px; padding: 5px 7px; border: 1px solid #dcc8ff36; border-radius: 5px; color: #f1eafb; background: #100b1bdd; font-size: 10px; font-weight: 720; }
.card-status .status-dot { width: 5px; height: 5px; }
.card-status--playable { color: #d6fce7; border-color: #8cf2bc55; background: #10291fee; }
.card-status--playable .status-dot { background: #8cf2bc; }
.game-info { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 13px 12px 13px 14px; }
.game-info h3 { margin: 0 0 3px; font-size: 16px; font-weight: 745; letter-spacing: -.02em; }
.game-tile { padding: 0; color: inherit; background: none; border: 0; text-align: left; font-weight: inherit; }
.game-tile::after { position: absolute; inset: 0; content: ""; }
.game-tile:focus-visible { outline: none; }
.game-genre { color: var(--muted); font-size: 12px; }
.card-arrow { display: grid; flex: none; width: 30px; height: 30px; place-items: center; border: 1px solid #333041; border-radius: 7px; color: #b6acc8; }
.game-card:hover .card-arrow { color: var(--ink); background: #392853; }

.site-footer { border-top: 1px solid #242330; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-block: 26px 30px; }
.footer-inner .brand { font-size: 19px; }
.footer-inner .brand-mark { width: 27px; height: 27px; border-radius: 7px; margin-right: 7px; }
.footer-inner .brand-mark .icon { width: 15px; height: 15px; }
.footer-inner p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.top-link { display: inline-flex; flex: none; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; }

.panel-dialog { width: min(520px, calc(100% - 32px)); max-height: min(85vh, 750px); padding: 0; overflow: auto; color: var(--ink); border: 1px solid #484052; border-radius: 16px; background: #1c1a28; box-shadow: 0 24px 90px #0008; }
.panel-dialog::backdrop { background: #080710c9; backdrop-filter: blur(5px); }
.dialog-inner { position: relative; padding: 24px; }
.dialog-close { position: absolute; right: 16px; top: 16px; z-index: 1; display: grid; min-width: 34px; min-height: 34px; place-items: center; border-radius: 7px; border: 1px solid #504661; background: #1a1427; color: var(--ink); font-size: 20px; line-height: 1; }
.dialog-close:hover { background: #44345b; }
.dialog-art { display: block; width: 100%; max-height: 260px; aspect-ratio: 1.65; object-fit: cover; border-radius: 9px; background: #302049; margin: 0 0 16px; }
.dialog-title { margin: 4px 38px 12px 0; font-size: 27px; letter-spacing: -.03em; }
.dialog-description { color: #d1cada; line-height: 1.6; }
.dialog-label { color: var(--accent); font-size: 13px; font-weight: 650; }
.game-dialog-status { display: inline-flex; padding: 7px 9px; border: 1px solid #574177; border-radius: 7px; background: #33244b; }
.search-input { display: block; width: 100%; padding: 11px 12px; color: var(--ink); border: 1px solid #4d435d; border-radius: 8px; background: #13121e; }
.search-results { display: grid; gap: 7px; padding: 0; list-style: none; }
.search-result { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 10px 12px; text-align: left; color: var(--ink); background: #272235; border: 1px solid #41364f; border-radius: 7px; }
.search-result:hover { background: #392b4c; }
.search-result-genre { color: #c6b9d6; font-size: 12px; }

@media (max-width: 950px) {
  .shell { width: calc(100% - 48px); }
  .hero { min-height: 380px; }
  .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 660px) {
  .shell { width: calc(100% - 28px); }
  .header-inner { min-height: 61px; gap: 12px; }
  .brand { font-size: 21px; }
  .brand-mark { width: 30px; height: 30px; margin-right: 7px; }
  .header-inner nav, .search-trigger kbd { display: none; }
  .search-trigger { min-width: auto; padding: 0 10px; }
  .hero { min-height: 390px; align-items: end; margin-top: 14px; border-radius: 13px; }
  .hero-art { width: 100%; height: 72%; object-position: center 42%; }
  .hero-scrim { background: linear-gradient(0deg, #140c21 0%, #150a21ee 22%, #1b0d2880 54%, #16092009 87%); }
  .hero-copy { padding: 22px 18px; }
  .hero h1 { font-size: clamp(48px, 11vw, 68px); }
  .hero p { margin: 10px 0 17px; }
  .primary-button, .secondary-button { min-height: 42px; padding-inline: 11px; font-size: 13px; }
  .catalog { margin-block: 29px 37px; }
  .section-description { font-size: 13px; }
  .catalog-count { font-size: 12px; }
  .filters { gap: 6px; margin-block: 16px 14px; }
  .pill { min-height: 36px; padding-inline: 8px; font-size: 12px; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .game-info { padding: 9px 7px 9px 9px; }
  .game-info h3 { font-size: 14px; }
  .card-arrow { width: 24px; height: 24px; font-size: 13px; }
  .card-status { top: 6px; left: 6px; padding: 3px 5px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
