:root {
  color-scheme: dark;
  --ink: #0b0d0f;
  --surface: #15191e;
  --surface-2: #1b2026;
  --line: rgba(245, 242, 233, .13);
  --paper: #f5f2e9;
  --muted: #a9afb7;
  --orange: #ff6b35;
  --orange-bright: #ff8658;
  --lime: #d7ff45;
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html,
body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body {
  overflow: auto;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000 0, transparent 72%);
}
button,
input { font: inherit; }
button,
a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }

.shell { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 13, 15, .88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.header-inner {
  min-height: 72px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--orange);
  color: #17100d;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -.06em;
  transform: rotate(-3deg);
}
.brand-copy { font-weight: 800; letter-spacing: -.04em; }
.desktop-nav { display: flex; align-items: center; justify-content: center; gap: 26px; }
.desktop-nav a { color: var(--muted); font-size: 14px; font-weight: 700; text-decoration: none; }
.desktop-nav a:hover { color: var(--paper); }
.header-tools { display: flex; align-items: center; gap: 10px; }
.search {
  width: min(270px, 24vw);
  height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.search svg { width: 16px; flex: 0 0 auto; color: var(--muted); }
.search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--paper); font-size: 13px; }
.search input::placeholder { color: #737a83; }
.search:focus-within { border-color: var(--lime); }
.saved-games {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--paper);
  cursor: pointer;
}
.saved-games svg { width: 18px; }
.saved-games[aria-pressed="true"] { border-color: var(--orange); color: var(--orange-bright); }

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}
.genre-bar {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.genre-bar::-webkit-scrollbar { display: none; }
.genre-chip,
.preference-toggle {
  flex: 0 0 auto;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.preference-toggle { border-color: var(--paper); background: var(--paper); color: var(--ink); }
.genre-chip:hover { border-color: var(--paper); color: var(--paper); }
.catalog-count { flex: 0 0 auto; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

.game-grid {
  width: min(var(--max), calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 14px;
  padding: 0 0 72px;
}
.game-card { position: relative; min-width: 0; }
.game-art {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 14px;
  background: var(--surface);
  text-decoration: none;
}
.game-cover {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform .4s cubic-bezier(.2, .8, .2, 1), filter .3s ease;
}
.game-art:hover .game-cover { transform: scale(1.035); filter: saturate(1.08); }
.snack-score {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  min-width: 50px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(7, 8, 9, .84);
  color: var(--paper);
  font-size: 16px;
  font-style: italic;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -.03em;
  text-decoration: none;
  box-shadow: 0 5px 18px rgba(0, 0, 0, .3);
  backdrop-filter: blur(8px);
  pointer-events: none;
}
.snack-score--high { border-color: transparent; background: var(--lime); color: #151806; }
.snack-score--mid { border-color: transparent; background: #ffd76a; color: #1b1608; }
.snack-score--low { background: rgba(57, 62, 68, .9); color: #d9dde1; }
.snack-score--new { min-width: 46px; color: #d1d5da; font-size: 11px; letter-spacing: .08em; }
.favorite-button {
  position: absolute;
  top: calc(100% - 49px);
  right: 0;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.favorite-button[aria-pressed="true"] { color: var(--orange-bright); }
.game-content { padding-top: 12px; padding-right: 38px; }
.game-label { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.game-verdict { margin: 7px 0 0; color: #d6d8db; font-size: 12px; line-height: 1.4; }
.game-content h2 { min-width: 0; margin: 0; font-size: 17px; line-height: 1.25; letter-spacing: -.035em; }
.game-title-link { color: inherit; text-decoration: none; }
.game-title-link:hover { color: var(--orange-bright); }
.play-button {
  display: inline-block;
  margin-top: 9px;
  color: var(--orange-bright);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}
.play-button:hover { color: var(--paper); }
.empty-state { grid-column: 1 / -1; padding: 64px 0; color: var(--muted); text-align: center; }

.site-about { border-top: 1px solid var(--line); padding: 64px 20px; background: rgba(21, 25, 30, .54); }
.about-inner { width: min(760px, 100%); margin: 0 auto; }
.about-inner h2 { margin: 0 0 14px; font-size: 26px; letter-spacing: -.04em; }
.about-inner > p { margin: 0 0 28px; color: var(--muted); font-size: 16px; line-height: 1.7; }
.genre-links { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 38px; }
.genre-links a { padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: none; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { padding: 15px 0; cursor: pointer; font-size: 15px; font-weight: 700; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; display: inline-block; width: 1.2em; color: var(--orange); }
.faq details[open] summary::before { content: "−"; }
.faq details p { margin: 0 0 16px; color: var(--muted); font-size: 16px; line-height: 1.6; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 130px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 32px; }
.footer-kicker { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 20px; }
.footer-links a { color: var(--muted); font-size: 13px; text-decoration: none; }
.footer-links a:hover { color: var(--paper); }

.game-player { position: fixed; inset: 0; z-index: 80; background: #050506; }
.game-player iframe { width: 100%; height: 100%; border: 0; background: #050506; }
.close-player,
.quick-exit {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  z-index: 81;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(7, 7, 8, .76);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(10px);
}
.close-player { right: max(12px, env(safe-area-inset-right)); width: 44px; height: 44px; border-radius: 50%; font-size: 24px; }
.quick-exit { right: max(68px, calc(env(safe-area-inset-right) + 56px)); min-height: 44px; padding: 0 16px; border-radius: 999px; font-size: 12px; font-weight: 850; }
.quick-exit span { margin-right: 6px; color: var(--orange-bright); }
.preference-panel,
.analytics-consent {
  position: fixed;
  z-index: 60;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(18, 18, 19, .96);
  box-shadow: 0 18px 55px rgba(0, 0, 0, .5);
  backdrop-filter: blur(18px);
}
.preference-panel {
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  width: min(760px, calc(100% - 28px));
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 48px 12px 16px;
  transform: translateX(-50%);
}
.preference-copy { min-width: 150px; line-height: 1.2; }
.preference-copy strong { display: block; font-size: 14px; }
.preference-copy span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.preference-options { display: flex; flex: 1; flex-wrap: wrap; gap: 7px; }
.preference-chip,
.preference-done,
.analytics-actions button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.preference-chip[aria-pressed="true"] { border-color: var(--orange); background: rgba(255, 107, 53, .2); }
.preference-done,
.analytics-actions .analytics-accept { border-color: transparent; background: var(--paper); color: var(--ink); font-weight: 850; }
.preference-close { position: absolute; top: 9px; right: 9px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; }
.privacy-toggle {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 61;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 7, 8, .82);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.analytics-consent { right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); width: min(390px, calc(100% - 28px)); padding: 18px; }
.analytics-consent strong { display: block; margin-bottom: 6px; font-size: 15px; }
.analytics-consent p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.analytics-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

@media (min-width: 1440px) {
  :root { --max: 1320px; }
  .game-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .shell,
  .game-grid { width: min(100% - 32px, var(--max)); }
  .desktop-nav { display: none; }
  .header-inner { grid-template-columns: auto 1fr; }
  .header-tools { justify-content: end; }
  .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .site-header { position: relative; }
  .header-inner { min-height: 64px; }
  .search { width: min(125px, 32vw); padding: 0 12px; }
  .search input { min-width: 0; }
  .catalog-toolbar { padding: 14px 0; }
  .catalog-count { display: none; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 10px; padding-bottom: 56px; }
  .game-content h2 { font-size: 14px; }
  .game-label,
  .play-button { font-size: 11px; }
  .game-verdict { font-size: 11px; }
  .snack-score { right: 8px; bottom: 8px; min-width: 43px; min-height: 30px; padding: 0 8px; font-size: 14px; }
  .snack-score--new { font-size: 10px; }
  .favorite-button { top: calc(100% - 45px); }
  .preference-panel { bottom: max(8px, env(safe-area-inset-bottom)); width: calc(100% - 16px); min-height: 0; display: block; padding: 14px 44px 14px 14px; border-radius: 18px; }
  .preference-copy { margin-bottom: 11px; }
  .analytics-consent { right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); width: calc(100% - 16px); padding: 16px; border-radius: 18px; }
  .footer-inner { grid-template-columns: 1fr; align-content: center; padding: 30px 0; }
  .footer-links { justify-content: flex-start; }
}
@media (max-width: 375px) {
  .shell,
  .game-grid { width: calc(100% - 20px); }
  .brand-copy { font-size: 14px; }
  .saved-games { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after { transition: none; }
}
[hidden] { display: none; }
