:root {
  color-scheme: dark;
  --bg: #0b0b10;
  --surface: #121219;
  --surface-raised: #191922;
  --line: #292933;
  --text: #f4f2f7;
  --muted: #9b99a7;
  --accent: #d4ff67;
  --purple: #a27cff;
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "DM Sans", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
}

button, input, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--accent);
  color: #10110b;
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  height: 76px;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(5.5vw, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid rgb(255 255 255 / 6%);
  background: #0b0b10;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 700 21px var(--font-display);
  letter-spacing: -1.2px;
}

.brand-mark {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 9px 3px 9px 3px;
  color: var(--accent);
  font: 600 17px var(--font-display);
  transform: rotate(-6deg);
}

.brand-period { color: var(--accent); }
.main-nav { display: flex; align-items: center; gap: 38px; height: 100%; }
.nav-link { display: grid; height: 100%; align-items: center; color: #aaa8b2; font-size: 13px; }
.nav-link:hover, .nav-link.is-active { color: var(--text); }
.nav-link.is-active { box-shadow: inset 0 -2px var(--accent); }

.header-favorites {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #c3c1cc;
  font-size: 12px;
}

.header-favorites > span:first-child { color: var(--accent); font-size: 19px; }
.favorite-count { color: var(--muted); }

.hero {
  position: relative;
  display: flex;
  min-height: 490px;
  align-items: center;
  overflow: hidden;
  padding: 66px max(8.5vw, calc((100vw - 1120px) / 2));
  background: #17151b;
}

.hero-art {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #0b0b10 2%, rgb(11 11 16 / 94%) 26%, rgb(11 11 16 / 42%) 68%, rgb(11 11 16 / 52%)),
    linear-gradient(0deg, #0b0b10 0%, transparent 26%),
    url("https://images.unsplash.com/photo-1518709268805-4e9042af9f23?auto=format&fit=crop&w=2000&q=85") center 53% / cover;
  filter: saturate(.72);
}

.hero::after {
  position: absolute;
  top: -130px;
  right: 16%;
  width: 500px;
  height: 500px;
  border: 1px solid rgb(212 255 103 / 9%);
  border-radius: 50%;
  box-shadow: 0 0 0 36px rgb(212 255 103 / 2%), 0 0 0 90px rgb(212 255 103 / 2%);
  content: "";
  pointer-events: none;
}

.hero-content, .hero-feature, .hero-coordinate { position: relative; z-index: 1; }
.hero-content { max-width: 560px; }

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font: 600 10px var(--font-display);
  letter-spacing: 1.8px;
}

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgb(212 255 103 / 60%);
  vertical-align: 1px;
}

.hero h1, .preview-heading h1 {
  margin: 0;
  font: 600 clamp(42px, 5.4vw, 70px)/1.03 var(--font-display);
  letter-spacing: -3.7px;
}

.hero h1 span { color: var(--accent); }
.hero-copy { max-width: 380px; margin: 19px 0 27px; color: #c1bfca; font-size: 15px; }

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 19px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-weight: 700;
  font-size: 12px;
  transition: transform .18s ease, background .18s ease;
}

.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--accent); color: #11120c; }
.button-primary:hover { background: #e2ff9c; }
.button-outline { border-color: #454450; background: transparent; color: var(--text); }
.button-outline:hover { border-color: var(--accent); }

.hero-feature {
  position: absolute;
  right: max(8.5vw, calc((100vw - 1120px) / 2));
  bottom: 66px;
  display: flex;
  width: 223px;
  flex-direction: column;
  padding: 17px 18px;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 7px;
  background: rgb(15 14 20 / 72%);
  backdrop-filter: blur(12px);
}

.feature-kicker, .detail-label { color: var(--accent); font: 600 9px var(--font-display); letter-spacing: 1.5px; }
.feature-title { margin-top: 5px; font: 600 22px var(--font-display); }
.feature-caption { color: #aaa8b2; font-size: 12px; }
.hero-feature a { margin-top: 14px; color: var(--accent); font-size: 12px; }
.hero-feature a span { padding-left: 5px; }
.hero-coordinate { position: absolute; right: 5.5vw; bottom: 26px; color: rgb(255 255 255 / 33%); font: 9px var(--font-display); letter-spacing: 1px; }

.content-wrap { max-width: 1180px; margin: 0 auto; padding: 0 30px; }

.ad-slot {
  position: relative;
  display: flex;
  min-height: 83px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  overflow: hidden;
  border: 1px solid #32313c;
  border-radius: 7px;
  background:
    radial-gradient(ellipse at 50% 160%, rgb(162 124 255 / 10%), transparent 58%),
    #101016;
}

.ad-label { padding: 4px 7px; border: 1px solid rgb(162 124 255 / 30%); border-radius: 3px; color: #c4b2ff; font: 600 11px var(--font-display); letter-spacing: 1.2px; }
.ad-copy { color: #a7a5b1; font: 500 13px var(--font-display); }
.ad-decoration { position: absolute; right: 28px; color: rgb(162 124 255 / 45%); font-size: 38px; }
.ad-home { margin: 34px 0 57px; }
.ad-in-player { min-height: 55px; border-width: 1px 0 0; border-radius: 0; }
.ad-in-player .ad-decoration { right: 16px; font-size: 26px; }
.catalog-section { scroll-margin-top: 24px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; }
.section-heading .eyebrow { margin-bottom: 7px; }
.section-heading h2 { margin: 0; font: 600 26px var(--font-display); letter-spacing: -.8px; }
.catalog-count { margin: 0 0 3px; color: var(--muted); font-size: 12px; }

.filter-panel { display: flex; align-items: center; gap: 9px; }
.search-box, .select-wrap { position: relative; display: flex; height: 41px; align-items: center; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.search-box { min-width: 250px; flex: 1; padding: 0 12px; }
.select-wrap { min-width: 0; flex: 1 1 130px; }
.search-icon { margin-right: 9px; color: #9e9ba9; font-size: 24px; line-height: 1; transform: rotate(-15deg); }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; }
.search-box input::placeholder { color: #777582; }
.search-box kbd { flex: none; color: #716f7c; font: 10px var(--font-body); }
.select-wrap select { width: 100%; height: 100%; min-width: 0; padding: 0 30px 0 12px; appearance: none; border: 0; outline: 0; background: transparent; color: #cac8d1; font-size: 13px; cursor: pointer; }
.select-wrap::after { position: absolute; right: 12px; color: #888693; content: "⌄"; pointer-events: none; }
.select-wrap option { background: #191922; }
.filter-favorites { display: inline-flex; height: 41px; flex: none; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: #c5c2cd; font-size: 13px; cursor: pointer; }
.filter-favorites span { color: var(--accent); font-size: 18px; }
.filter-favorites[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }

.genre-row { display: flex; align-items: center; gap: 8px; overflow-x: auto; padding: 15px 0 22px; scrollbar-width: none; }
.genre-row::-webkit-scrollbar { display: none; }
.genre-label { flex: none; margin-right: 4px; color: #777582; font: 600 11px var(--font-display); letter-spacing: 1.3px; }
.genre-chip { flex: none; padding: 6px 11px; border: 1px solid #282832; border-radius: 30px; background: transparent; color: #a7a5b0; font-size: 12px; cursor: pointer; }
.genre-chip:hover { border-color: #686575; color: var(--text); }
.genre-chip.is-selected { border-color: rgb(212 255 103 / 45%); background: rgb(212 255 103 / 8%); color: var(--accent); }

.game-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; }
.game-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid #23232c; border-radius: 7px; background: var(--surface); transition: transform .2s ease, border-color .2s ease; }
.game-card:hover { transform: translateY(-4px); border-color: #4b4857; }
.card-art { position: relative; display: block; height: 174px; overflow: hidden; background: #201c27; }
.card-art::after { position: absolute; inset: 0; background: linear-gradient(0deg, rgb(10 10 15 / 83%), transparent 60%), linear-gradient(90deg, rgb(12 12 17 / 14%), transparent); content: ""; }
.card-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.game-card:hover .card-art img { transform: scale(1.045); }
.card-art-fallback { position: absolute; inset: 0; background: radial-gradient(circle at 60% 30%, rgb(162 124 255 / 47%), transparent 39%), linear-gradient(135deg, #171822, #373048 54%, #17151c); }
.card-topline { position: absolute; z-index: 1; top: 11px; left: 11px; display: flex; gap: 6px; }
.card-badge { padding: 4px 7px; border: 1px solid rgb(255 255 255 / 18%); border-radius: 3px; background: rgb(12 12 18 / 74%); color: #e1dfe7; font: 600 10px var(--font-display); letter-spacing: .6px; backdrop-filter: blur(8px); }
.card-badge.is-live { border-color: rgb(212 255 103 / 40%); color: var(--accent); }
.favorite-button { position: absolute; z-index: 1; top: 9px; right: 9px; display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid rgb(255 255 255 / 20%); border-radius: 50%; background: rgb(12 12 18 / 65%); color: white; font-size: 18px; cursor: pointer; backdrop-filter: blur(8px); }
.favorite-button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.card-image-title { position: absolute; z-index: 1; bottom: 12px; left: 14px; margin: 0; color: rgb(255 255 255 / 72%); font: 600 9px var(--font-display); letter-spacing: 1.4px; text-transform: uppercase; }
.card-body { padding: 13px 14px 14px; }
.card-meta { display: flex; justify-content: space-between; gap: 8px; color: #aaa8b2; font-size: 12px; }
.card-meta .category { color: var(--purple); font-weight: 600; }
.card-body h3 { overflow: hidden; margin: 7px 0 4px; font: 600 16px var(--font-display); letter-spacing: -.3px; text-overflow: ellipsis; white-space: nowrap; }
.card-version { overflow: hidden; margin: 0 0 6px; color: #c0bdc9; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.card-description { display: -webkit-box; min-height: 39px; overflow: hidden; margin: 0; color: #b4b1bd; font-size: 13px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 13px; padding-top: 11px; border-top: 1px solid #25252e; }
.card-creator { overflow: hidden; color: #c0bdc9; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.card-play { flex: none; color: var(--accent); font: 600 12px var(--font-display); }
.empty-state { padding: 60px 15px; text-align: center; }
.empty-icon { color: var(--purple); font-size: 34px; }
.empty-state h3 { margin: 9px 0 4px; font: 600 19px var(--font-display); }
.empty-state p { margin: 0 0 18px; color: var(--muted); font-size: 12px; }

.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 72px; padding: 21px 0 25px; border-top: 1px solid #24242d; }
.footer-brand { gap: 8px; font-size: 15px; }
.footer-brand .brand-mark { width: 23px; height: 23px; border-radius: 7px 2px 7px 2px; font-size: 13px; }
.site-footer p { margin: 0; color: #aaa8b2; font-size: 12px; }
.site-footer > span { color: #9694a0; font: 11px var(--font-display); letter-spacing: .7px; }

.preview-view { min-height: calc(100vh - 76px); }
.preview-shell { max-width: 1120px; margin: 0 auto; padding: 29px 30px 70px; }
.back-link { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 27px; color: #c0bdc9; font-size: 13px; }
.back-link:hover { color: var(--accent); }
.preview-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 19px; }
.preview-heading .eyebrow { margin-bottom: 9px; }
.preview-heading h1 { font-size: 38px; letter-spacing: -1.3px; }
.preview-meta { margin: 6px 0 0; color: #b9b6c2; font-size: 13px; }
.play-external { min-width: 137px; }
.ad-preview { min-height: 69px; margin-bottom: 14px; }
.preview-card { display: grid; min-height: 390px; grid-template-columns: 1.05fr 1fr; overflow: hidden; border: 1px solid #30303a; border-radius: 7px; background: #121218; box-shadow: 0 22px 70px rgb(0 0 0 / 24%); }
.preview-card > img { width: 100%; height: 100%; min-height: 390px; object-fit: cover; }
.preview-card-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(25px, 5vw, 64px); }
.preview-card-copy .eyebrow { margin-bottom: 12px; color: var(--accent); }
.preview-card-copy h2 { max-width: 390px; margin: 0; font: 600 clamp(24px, 3vw, 37px)/1.12 var(--font-display); letter-spacing: -1.3px; }
.preview-card-copy > p:not(.eyebrow) { max-width: 400px; margin: 14px 0 22px; color: #c0bdc9; font-size: 14px; line-height: 1.7; }
.preview-card-copy .button { min-height: 44px; }
.preview-unavailable { color: #aaa8b4; }
.player-frame { overflow: hidden; border: 1px solid #30303a; border-radius: 7px; background: #101015; box-shadow: 0 22px 70px rgb(0 0 0 / 28%); }
.player-topbar { display: grid; height: 41px; grid-template-columns: 1fr minmax(120px, 430px) 1fr; align-items: center; border-bottom: 1px solid #292932; background: #17171e; }
.window-dots { display: flex; gap: 6px; padding-left: 14px; }
.window-dots i { width: 7px; height: 7px; border-radius: 50%; background: #4b4955; }
.window-dots i:first-child { background: #ef6d68; }
.window-dots i:nth-child(2) { background: #e5b858; }
.window-dots i:nth-child(3) { background: #79c46c; }
.player-address { overflow: hidden; padding: 5px 13px; border: 1px solid #30303b; border-radius: 4px; color: #b9b6c2; font: 12px var(--font-body); text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.player-popout { justify-self: end; margin-right: 15px; color: #bbb9c4; font-size: 16px; }
.player-frame iframe { display: block; width: 100%; height: min(68vh, 650px); min-height: 390px; border: 0; background: #08080b; }
.player-status { margin: 0; padding: 9px 14px; border-top: 1px solid #292932; color: #b9b6c2; font-size: 12px; }
.player-status:empty { display: none; }
.player-placeholder { display: flex; min-height: 390px; flex-direction: column; align-items: center; justify-content: center; padding: 36px 20px; text-align: center; }
.placeholder-symbol { color: var(--purple); font-size: 39px; }
.player-placeholder .eyebrow { margin: 7px 0; color: var(--purple); }
.player-placeholder h2 { margin: 0; font: 600 21px var(--font-display); }
.player-placeholder p:not(.eyebrow) { max-width: 390px; margin: 8px 0 18px; color: #b4b1bd; font-size: 14px; }
.preview-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; color: #b4b1bd; font-size: 12px; }
.preview-note > span { color: var(--purple); }
.preview-note p { margin: 0; }
.preview-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.game-details { display: grid; grid-template-columns: 1.4fr 1fr; gap: 55px; margin-top: 32px; padding: 22px 0; border-top: 1px solid #272730; }
.game-details > div > p { max-width: 590px; margin: 9px 0 0; color: #c0bdc9; font-size: 14px; line-height: 1.7; }
.detail-list { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 23px; margin: 0; }
.detail-list div { min-width: 0; }
.detail-list dt { color: #9694a0; font: 600 11px var(--font-display); letter-spacing: 1.2px; }
.detail-list dd { overflow: hidden; margin: 4px 0 0; color: #e0dee6; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

@media (max-width: 900px) {
  .site-header { padding: 0 26px; }
  .hero { min-height: 455px; padding-right: 6vw; padding-left: 7vw; }
  .hero-feature { right: 6vw; }
  .content-wrap, .preview-shell { padding-right: 24px; padding-left: 24px; }
  .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
  .card-art { height: 155px; }
  .filter-panel { flex-wrap: wrap; }
  .search-box { min-width: 100%; }
  .select-wrap { flex: 1 1 130px; }
}

@media (max-width: 620px) {
  .site-header { height: 63px; padding: 0 17px; }
  .brand { font-size: 19px; }
  .main-nav { gap: 20px; }
  .nav-link { min-width: 44px; font-size: 12px; }
  .header-favorites { min-width: 44px; min-height: 44px; justify-content: center; gap: 5px; font-size: 0; }
  .header-favorites > span:first-child { font-size: 22px; }
  .favorite-count { font-size: 12px; }
  .hero { min-height: 477px; align-items: flex-start; padding: 62px 23px; }
  .hero-art { background-position: 56% center; }
  .hero::after { top: 135px; right: -160px; width: 350px; height: 350px; }
  .hero h1 { font-size: 48px; letter-spacing: -2.9px; }
  .hero-copy { max-width: 310px; font-size: 13px; }
  .hero-feature { right: 22px; bottom: 29px; width: 201px; padding: 12px 14px; }
  .feature-title { font-size: 18px; }
  .feature-caption { font-size: 12px; }
  .hero-coordinate { display: none; }
  .content-wrap, .preview-shell { padding-right: 17px; padding-left: 17px; }
  .ad-home { min-height: 73px; margin: 23px 0 40px; }
  .ad-slot { justify-content: flex-start; gap: 9px; padding: 0 13px; }
  .ad-label { font-size: 12px; }
  .ad-copy { max-width: calc(100% - 45px); font-size: 12px; }
  .ad-decoration { right: 11px; font-size: 30px; opacity: .65; }
  .section-heading { align-items: flex-end; }
  .section-heading h2 { font-size: 21px; }
  .section-heading .eyebrow { font-size: 10px; }
  .catalog-count { font-size: 12px; text-align: right; }
  .filter-panel { gap: 7px; }
  .search-box, .select-wrap { min-height: 44px; }
  .search-box input { font-size: 13px; }
  .search-box kbd { display: none; }
  .select-wrap select { padding-right: 25px; font-size: 13px; }
  .filter-favorites { min-height: 44px; padding: 0 12px; font-size: 13px; }
  .genre-row { margin-right: -17px; }
  .genre-chip { display: inline-flex; min-height: 44px; align-items: center; padding: 0 14px; font-size: 12px; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .card-art { height: 135px; }
  .card-body { padding: 11px 10px 12px; }
  .favorite-button { top: 7px; right: 7px; width: 44px; height: 44px; }
  .card-meta { font-size: 12px; }
  .card-body h3 { font-size: 14px; }
  .card-version { font-size: 12px; white-space: normal; }
  .card-description { min-height: 42px; font-size: 12px; line-height: 1.5; }
  .card-footer { gap: 4px; }
  .card-creator { font-size: 12px; }
  .card-play { display: inline-flex; min-height: 44px; align-items: center; font-size: 12px; }
  .site-footer { flex-wrap: wrap; margin-top: 48px; }
  .site-footer p { order: 1; width: 100%; font-size: 12px; }
  .site-footer > span { font-size: 12px; }
  .preview-shell { padding-top: 21px; }
  .back-link { min-height: 44px; align-items: center; font-size: 12px; }
  .preview-heading { align-items: flex-start; gap: 12px; }
  .preview-heading h1 { font-size: 31px; }
  .preview-heading .button { min-height: 44px; gap: 7px; padding: 0 10px; font-size: 12px; }
  .preview-meta { max-width: 230px; font-size: 12px; }
  .ad-preview { min-height: 62px; }
  .preview-card { min-height: 0; grid-template-columns: 1fr; }
  .preview-card > img { height: 220px; min-height: 0; }
  .preview-card-copy { padding: 25px 21px 27px; }
  .preview-card-copy h2 { font-size: 25px; }
  .preview-card-copy > p:not(.eyebrow) { margin: 10px 0 17px; }
  .player-topbar { grid-template-columns: 55px 1fr 42px; }
  .window-dots { gap: 4px; padding-left: 9px; }
  .window-dots i { width: 6px; height: 6px; }
  .player-address { font-size: 12px; }
  .player-popout { display: grid; width: 44px; height: 44px; margin-right: 0; place-items: center; }
  .player-frame iframe { height: 65vh; min-height: 340px; }
  .player-status, .preview-note { font-size: 12px; }
  .player-placeholder { min-height: 340px; padding: 25px 18px; }
  .player-placeholder h2 { font-size: 18px; }
  .game-details { grid-template-columns: 1fr; gap: 20px; margin-top: 23px; padding-top: 19px; }
  .detail-list { gap: 14px; }
  .detail-label, .detail-list dt { font-size: 11px; }
  .detail-list dd { font-size: 13px; }
}

@media (max-width: 460px) {
  .game-grid { grid-template-columns: 1fr; }
  .card-art { height: 190px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
