/* Страницы игр: шапка с артом игры, карточки замера, плитки других игр.
 *
 * --accent — цвет игры (из front matter). Он только украшает: полосы, свечение, рамки.
 * Текст остаётся цветами темы, поэтому контраст во всех четырёх темах тот же, что у
 * остальных страниц. Арт — кроп library_hero из Steam, объект кадра по центру.
 */

.doc.game { padding-top: clamp(16px, 3vw, 32px); }

.game-hero {
  position: relative;
  width: min(1080px, calc(100vw - 32px));
  left: 50%;
  transform: translateX(-50%);
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 16 / 6;
  min-height: 280px;
  margin: 0 0 18px;
  background: #111;
  box-shadow: 0 24px 60px -28px var(--accent), 0 2px 0 0 var(--accent) inset;
  isolation: isolate;
}
.game-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -2;
}
/* Затемнение снизу — чтобы белое название читалось на любом арте (светлый туман у HL2 тоже). */
.game-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.55) 62%, rgba(0,0,0,.86) 100%);
}
.game-hero-text {
  position: absolute;
  left: clamp(18px, 4vw, 44px);
  right: clamp(18px, 4vw, 44px);
  bottom: clamp(16px, 3.4vw, 38px);
  color: #fff;
}
.doc .game-hero .kicker {
  display: inline-block;
  font-family: "DM Mono", monospace;
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0,0,0,.35);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 4px 10px;
  margin: 0 0 12px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.doc .game-hero h1 {
  color: #fff;
  font-size: clamp(28px, 4.4vw, 50px);
  margin: 0 0 8px;
  max-width: 22ch;
  text-shadow: 0 2px 18px rgba(0,0,0,.5);
}
.doc .game-hero .tagline {
  color: rgba(255,255,255,.88);
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.45;
  margin: 0;
  max-width: 52ch;
}
.doc.game .updated { margin-bottom: 22px; }

/* Карточки замера: число крупно, подпись мелко; полоса сверху — цвет игры. */
.game-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 30px;
}
.game-stats .stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 14px;
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.game-stats b {
  font-size: clamp(19px, 2.4vw, 24px);
  letter-spacing: -.01em;
  line-height: 1.15;
  color: var(--ink);
}
.game-stats span { font-size: 13px; line-height: 1.35; color: var(--muted); }

/* Подзаголовки — с короткой полосой цвета игры. */
.doc.game h2 { position: relative; padding-left: 14px; }
.doc.game h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: .2em;
  bottom: .2em;
  width: 4px;
  border-radius: 2px;
  background: var(--accent);
}
.doc.game .lead { border-left: 3px solid var(--accent); padding-left: 14px; }
.doc.game table.spec thead th { border-bottom: 2px solid var(--accent); }

/* Другие игры. */
.game-more {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 30px;
}
.doc .game-more a.game-tile {
  position: relative;
  display: block;
  aspect-ratio: 16 / 7;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  border: 1px solid var(--line);
  isolation: isolate;
  transition: transform .18s ease, box-shadow .18s ease;
}
.game-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -2;
}
.game-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.8) 100%);
}
.game-tile span {
  position: absolute;
  left: 14px;
  bottom: 10px;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  text-shadow: 0 1px 8px rgba(0,0,0,.6);
}
.doc .game-more a.game-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -16px var(--accent);
}
@media (prefers-reduced-motion: reduce) {
  .doc .game-more a.game-tile { transition: none; }
  .doc .game-more a.game-tile:hover { transform: none; }
}

@media (max-width: 760px) {
  .game-hero { aspect-ratio: auto; height: 340px; border-radius: 16px; }
  .game-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-more { grid-template-columns: 1fr; }
}
