:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #11151c;
  color: #f3f5f8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --surface: #191e27;
  --surface-raised: #1d232d;
  --line: #2b323d;
  --muted: #a0a8b5;
  --accent: #c7d4ff;
}

* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: #11151c; }
button, a { font: inherit; }
button { color: inherit; }
a { color: inherit; }

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  height: 68px;
  border-bottom: 1px solid rgba(255,255,255,.075);
  background: rgba(17,21,28,.92);
  backdrop-filter: blur(16px);
}
.header-inner {
  width: min(100% - 64px, 1720px);
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { text-decoration: none; font-weight: 700; font-size: 17px; letter-spacing: -.035em; }
.brand span { color: #aab2be; font-weight: 500; }
.contact-trigger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #171c24;
  color: #e8ebf0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}
.contact-trigger:hover { border-color: #505b6b; background: #202733; }
.contact-trigger svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.library { width: min(100% - 64px, 1720px); margin: 26px auto 0; }
.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.game-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #282f39;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(0,0,0,.12);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}
.game-card:hover { transform: translateY(-2px); border-color: #46505e; box-shadow: 0 18px 38px rgba(0,0,0,.22); }
.game-art {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #151a21;
  text-align: left;
}
button.game-art { cursor: pointer; }
.game-art:focus-visible, .game-title-link:focus-visible, .platform-link:focus-visible, button:focus-visible { outline: 2px solid #a9bdff; outline-offset: 3px; }
.game-art img { display: block; width: 100%; height: auto; transition: transform 220ms ease; }
.game-card:hover .game-art img { transform: scale(1.02); }
.game-content { padding: 16px 19px 17px; }
.game-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.game-title { margin: 0; font-size: clamp(19px, 1.55vw, 23px); line-height: 1.2; letter-spacing: -.04em; font-weight: 700; }
.game-title-link { text-decoration: none; border-radius: 3px; }
.game-description { max-width: 65ch; margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.platform-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.platform-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid #343c48;
  border-radius: 9px;
  background: #202630;
  color: #e2e6ed;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}
.platform-link:hover { transform: translateY(-1px); background: #29313d; border-color: #556171; }
.platform-link svg { width: 17px; height: 17px; flex: 0 0 17px; }
.platform-link .platform-wordmark { font-weight: 700; letter-spacing: -.04em; }
.platform-links[hidden] { display: none; }
.load-error { padding: 24px; color: var(--muted); text-align: center; }

.site-footer {
  width: min(100% - 64px, 1720px);
  margin: 29px auto 0;
  padding: 18px 0 24px;
  border-top: 1px solid rgba(255,255,255,.075);
  color: #828b99;
  font-size: 12px;
}
.contact-dialog {
  width: min(390px, calc(100vw - 32px));
  margin: auto;
  padding: 22px;
  border: 1px solid #343d49;
  border-radius: 17px;
  background: #1b212b;
  color: #f3f5f8;
  box-shadow: 0 24px 80px rgba(0,0,0,.5);
}
.contact-dialog::backdrop { background: rgba(5,8,13,.68); backdrop-filter: blur(3px); }
.dialog-topline { display: flex; justify-content: space-between; align-items: center; }
.dialog-eyebrow { margin: 0; color: #a0a8b5; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.contact-dialog h2 { margin: 19px 0 15px; font-size: 24px; letter-spacing: -.04em; }
.icon-close { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: #222a35; cursor: pointer; }
.icon-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.contact-details { display: grid; gap: 9px; }
.contact-detail { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid #303844; border-radius: 10px; color: #a0a8b5; font-size: 12px; }
.contact-detail a { color: #f1f3f7; text-decoration: none; font-size: 13px; font-weight: 600; }
.contact-detail a:hover { color: var(--accent); }

@media (min-width: 1700px) {
  .library { margin-top: 30px; }
  .game-grid { gap: 24px; }
  .game-content { padding: 18px 21px 19px; }
}
@media (max-width: 760px) {
  .site-header { height: 62px; }
  .header-inner, .library, .site-footer { width: calc(100% - 32px); }
  .library { margin-top: 16px; }
  .game-grid { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .game-card { border-radius: 15px; }
  .game-content { padding: 14px 15px 15px; }
  .game-title { font-size: 20px; }
  .game-description { margin-top: 6px; font-size: 13px; }
  .platform-links { margin-top: 12px; }
  .platform-link { width: 36px; height: 36px; min-height: 36px; padding: 8px; }
  .platform-link .platform-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
  .platform-link svg { width: 18px; height: 18px; }
  .site-footer { margin-top: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
