:root {
  color-scheme: dark;
  font-family: 'Aptos', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  color: #f7f7ef;
  background: #121311;
  --accent: #ddf85e;
  --muted: #bfc2b4;
  --line: #353730;
  --display: 'Arial Black', 'Aptos Display', 'Arial', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-inline-size: 280px; min-block-size: 100svh; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.sr-only { position: absolute; inline-size: 1px; block-size: 1px; padding: 0; overflow: hidden; white-space: nowrap; clip-path: inset(50%); }

.shell { inline-size: min(100% - 52px, 1180px); margin-inline: auto; }
.site-header { border-bottom: 1px solid #2b2c27; background: #151614; }
.masthead { display: flex; min-block-size: 70px; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 9px; inline-size: fit-content; }
.brand-mark { display: block; flex: 0 0 auto; inline-size: 34px; block-size: auto; }
.brand-word { font: italic 1000 1.84rem/.95 var(--display); letter-spacing: -.075em; white-space: nowrap; }
.brand-description { align-self: center; margin-inline-start: 4px; padding-inline-start: 13px; border-inline-start: 1px solid #525347; color: var(--muted); font-size: .88rem; white-space: nowrap; }
.nav-link { display: inline-flex; min-block-size: 42px; align-items: center; gap: 8px; padding-inline: 11px; border-radius: 7px; color: #eff1e6; font-size: .89rem; font-weight: 700; }
.nav-link::before { inline-size: 12px; block-size: 12px; background: linear-gradient(#151614 0 0) center / 2px 100% no-repeat, linear-gradient(#151614 0 0) center / 100% 2px no-repeat, var(--accent); content: ''; }
.nav-link:hover { color: var(--accent); }

.content { padding-block: 26px max(34px, env(safe-area-inset-bottom)); }
.feature {
  position: relative;
  display: grid;
  min-block-size: 420px;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  overflow: clip;
  isolation: isolate;
  border: 1px solid #3c3e35;
  border-radius: 17px;
  background: #1a1b17;
  box-shadow: 0 16px 35px #08090646;
}
.feature-copy { position: relative; z-index: 1; display: grid; min-inline-size: 0; align-content: center; justify-items: start; padding: clamp(23px, 5.1vw, 68px); padding-inline-end: 12px; }
.feature-copy::before { position: absolute; z-index: -1; inset: 0 -70px 0 0; background: radial-gradient(ellipse at 15% 100%, #2f351b82, transparent 69%), linear-gradient(90deg, #191a17 77%, transparent); content: ''; }
.feature-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.feature-tag { display: inline-flex; min-block-size: 28px; align-items: center; padding: 2px 9px; border: 1px solid #575d41; border-radius: 5px; background: #252a1e; color: #e3edb9; font-size: .82rem; font-weight: 750; }
.feature h1 { margin: 13px 0 11px; overflow-wrap: anywhere; color: #fffdf1; font: italic 1000 clamp(2.8rem, 7.35vw, 6.5rem)/.92 var(--display); letter-spacing: -.075em; text-transform: uppercase; }
.feature p { max-inline-size: 24em; margin: 0 0 23px; color: #e1e3d4; font-size: clamp(.93rem, 1.5vw, 1.08rem); line-height: 1.65; }
.feature-art { position: relative; display: grid; min-inline-size: 0; min-block-size: 0; align-self: stretch; background: #322057; }
.feature-art img { position: absolute; inline-size: 100%; block-size: 100%; object-fit: cover; object-position: 50% 52%; }
.feature-art::after { position: absolute; inset: 0; background: linear-gradient(90deg, #181916e8, #18191622 22%, transparent 43%); pointer-events: none; content: ''; }
.launch { display: inline-flex; min-block-size: 48px; align-items: center; justify-content: center; gap: 9px; padding: 8px 19px; border: 1px solid #e5fd88; border-radius: 8px; background: var(--accent); color: #161905; font-weight: 850; box-shadow: 0 3px 0 #7f9326; }
.launch:hover { background: #efffa4; }
.play-mark { display: inline-block; inline-size: 13px; block-size: 15px; flex: 0 0 auto; clip-path: polygon(0 0, 100% 50%, 0 100%); background: currentColor; }

.library { padding-block-start: clamp(28px, 5vw, 52px); scroll-margin-block-start: 14px; }
.library-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-block-end: 15px; }
.library h2 { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 900; letter-spacing: -.045em; white-space: nowrap; }
.search { position: relative; inline-size: min(100%, 238px); }
.search input { inline-size: 100%; min-block-size: 42px; padding: 5px 11px 5px 34px; border: 1px solid #3c4034; border-radius: 8px; background: #20211d; color: #fafaf0; font-size: .9rem; }
.search input::placeholder { color: #bfc2b4; opacity: 1; }
.search-icon { position: absolute; top: calc(50% - 7px); left: 13px; inline-size: 13px; block-size: 13px; border: 1.5px solid #bdc3aa; border-radius: 50%; pointer-events: none; }
.search-icon::after { position: absolute; right: -4px; bottom: -1px; inline-size: 5px; block-size: 1.5px; transform: rotate(45deg); background: #bdc3aa; content: ''; }
.filters { display: flex; flex-wrap: wrap; gap: 7px; margin-block-end: 13px; }
.filter { min-block-size: 40px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 7px; background: #1b1c18; color: #e1e3d4; font-size: .87rem; font-weight: 750; }
.filter[aria-pressed='true'] { border-color: #7c8b43; background: #2b3320; color: var(--accent); }
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 174px), 1fr)); gap: 14px; }
.game-card { position: relative; display: grid; min-inline-size: 0; overflow: hidden; border: 1px solid #3e4036; border-radius: 11px; background: #1b1c18; }
.game-card:hover { border-color: #aabd53; }
.game-image { position: relative; display: grid; aspect-ratio: 1; overflow: hidden; background: #30244d; }
.game-image img { inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform 180ms ease-out; }
.game-card:hover img { transform: scale(1.035); }
.game-image .play-mark { position: absolute; right: 10px; bottom: 10px; inline-size: 32px; block-size: 32px; clip-path: none; border-radius: 7px; background: #18191be8; color: #f9ffe1; }
.game-image .play-mark::before { position: absolute; inset: 9px 10px 9px 12px; clip-path: polygon(0 0, 100% 50%, 0 100%); background: currentColor; content: ''; }
.game-caption { display: grid; min-inline-size: 0; gap: 3px; padding: 9px 10px 11px; }
.game-title { overflow-wrap: anywhere; color: #fffdf2; font-size: 1.01rem; font-weight: 850; }
.game-detail { color: var(--muted); font-size: .84rem; }
.empty-state { margin: 0; padding: 18px; border: 1px dashed #45483d; border-radius: 9px; color: var(--muted); }
.empty-state button { margin-inline-start: 8px; padding: 5px 2px; border: 0; background: none; color: var(--accent); text-decoration: underline; }

@media (max-width: 780px) {
  .shell { inline-size: min(100% - 30px, 1180px); }
  .masthead { min-block-size: 60px; }
  .content { padding-block-start: 16px; }
  .feature { min-block-size: 320px; }
  .feature-copy { padding-inline-start: 24px; }
  .feature h1 { font-size: clamp(2.6rem, 8vw, 4rem); }
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 145px), 1fr)); }
}

@media (max-width: 520px) {
  .shell { inline-size: calc(100% - 24px); }
  .masthead { min-block-size: 55px; }
  .brand-mark { inline-size: 29px; }
  .brand-word { font-size: clamp(1.12rem, 4.65vw, 1.6rem); }
  .brand-description { padding-inline-start: 8px; margin-inline-start: 0; }
  .nav-link { padding-inline: 6px; }
  .feature { min-block-size: 0; grid-template-columns: 1fr; border-radius: 12px; }
  .feature-art { grid-row: 1; aspect-ratio: 1.7; }
  .feature-art img { object-position: 50% 46%; }
  .feature-art::after { background: linear-gradient(0deg, #1a1b17, #1a1b170d 32%, transparent 55%); }
  .feature-copy { grid-row: 2; margin-block-start: -11px; padding: 0 15px 17px; }
  .feature-copy::before { content: none; }
  .feature h1 { margin-block: 9px 7px; font-size: clamp(2.6rem, 10vw, 3.5rem); }
  .feature p { margin-block-end: 13px; }
  .launch { min-block-size: 44px; }
  .library-heading { margin-block-end: 11px; }
  .search { inline-size: min(54%, 188px); }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

@media (max-width: 360px) {
  .brand-description { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .game-image img { transition: none; }
}
