:root {
  --bg: #0d0f12;
  --bg-2: #14171c;
  --card: #181c22;
  --card-hover: #1e232b;
  --line: #2a3039;
  --text: #eef1f5;
  --muted: #9aa3ae;
  --accent: #c6ff3d;      /* «свежий» лайм */
  --accent-ink: #0d0f12;
  --good: #6fdc8c;
  --ok: #f0c35a;
  --bad: #ff7a6b;
  --coop: #7cc4ff;
  --radius: 14px;
  --font-head: "Unbounded", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; color: transparent; }
a { color: inherit; text-decoration: none; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* --- шапка --- */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(13, 15, 18, .86);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.logo { font: 800 20px/1 var(--font-head); letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.logo-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 16px var(--accent); }
.site-header nav { display: flex; gap: 18px; font-size: 14px; color: var(--muted); }
.site-header nav a { white-space: nowrap; }
.site-header nav a:hover { color: var(--text); }

/* --- первый экран --- */
.hero { padding: 48px 0 16px; background: radial-gradient(900px 300px at 20% 0%, rgba(198, 255, 61, .10), transparent 70%); }
.hero .date { color: var(--accent); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 8px; }
.hero h1 { font: 800 clamp(30px, 5vw, 52px)/1.05 var(--font-head); letter-spacing: -.03em; margin: 0 0 12px; }
.lead { color: var(--muted); font-size: 17px; max-width: 640px; margin: 0; }

.block { padding: 28px 16px 8px; }
.block h2 { font: 700 24px/1.2 var(--font-head); letter-spacing: -.02em; margin: 0 0 4px; }
.sub { color: var(--muted); margin: 0 0 16px; }
.block > h2 + .top-grid, .block > h2 + .grid, .block > h2 + .filters { margin-top: 16px; }

/* --- топ-3 --- */
.top-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.top-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .15s, border-color .15s;
  display: flex; flex-direction: column; }
.top-link { flex: 1; }
.top-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.top-img { position: relative; aspect-ratio: 460 / 215; background: var(--bg-2); }
.top-img img { width: 100%; height: 100%; object-fit: cover; }
.place { position: absolute; left: 12px; top: 12px; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font: 800 22px/1 var(--font-head); box-shadow: 0 6px 20px rgba(0, 0, 0, .4); }
.top-body { padding: 14px 16px 16px; }
.top-body h3 { font: 700 18px/1.25 var(--font-head); margin: 0 0 6px; letter-spacing: -.01em; }
.why { margin: 0 0 10px; color: var(--text); }

/* --- карточки --- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: background .15s, border-color .15s;
  display: flex; flex-direction: column; }
.card:hover { background: var(--card-hover); border-color: #3a424e; }
.card[hidden] { display: none; }
.card-link { display: flex; flex-direction: column; flex: 1; }
.thumb { position: relative; aspect-ratio: 460 / 215; background: var(--bg-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.label { position: absolute; right: 8px; top: 8px; background: rgba(0, 0, 0, .7); color: var(--muted); font-size: 11px; padding: 2px 8px; border-radius: 6px; }
.card.promo { border-color: rgba(198, 255, 61, .35); }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { font: 600 16px/1.3 var(--font-body); margin: 0; }
.desc { color: var(--muted); font-size: 13.5px; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 6px; }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 13px; color: var(--muted); margin: 0; }
.rating { font-weight: 700; }
.rating.good { color: var(--good); }
.rating.ok { color: var(--ok); }
.rating.bad { color: var(--bad); }
.price { font-weight: 700; white-space: nowrap; color: var(--text); }
.price.big { font: 700 24px/1 var(--font-head); }

.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: #232831; color: var(--muted); }
.badge.coop { background: rgba(124, 196, 255, .14); color: var(--coop); }
.badge.free { background: rgba(198, 255, 61, .14); color: var(--accent); }
.badge.sale { background: rgba(111, 220, 140, .14); color: var(--good); }

/* --- фильтры --- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; align-items: center; }
.chip { font: 600 13px/1 var(--font-body); color: var(--muted); background: var(--card); border: 1px solid var(--line);
  padding: 9px 14px; border-radius: 999px; cursor: pointer; }
.chip:hover { color: var(--text); }
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
#sort { margin-left: auto; font: 500 13px var(--font-body); color: var(--text); background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 10px; }
.empty { color: var(--muted); }

/* --- страница игры --- */
.game { padding-top: 24px; padding-bottom: 40px; }
.back { color: var(--muted); font-size: 14px; display: inline-block; margin-bottom: 16px; }
.back:hover { color: var(--text); }
.game-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.game-cover { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.game h1 { font: 800 clamp(26px, 4vw, 40px)/1.1 var(--font-head); letter-spacing: -.02em; margin: 0 0 10px; }
.game .meta { margin-bottom: 12px; }
.game .badges { margin-bottom: 14px; }
.game .desc { -webkit-line-clamp: unset; font-size: 15.5px; color: var(--text); margin-bottom: 12px; }
.facts { display: flex; flex-direction: column; gap: 2px; color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.buy { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.btn { background: var(--accent); color: var(--accent-ink); font-weight: 700; padding: 12px 20px; border-radius: 12px; }
.btn:hover { filter: brightness(1.08); }
.video { margin-top: 28px; }
.video video { width: 100%; border-radius: var(--radius); background: #000; aspect-ratio: 16 / 9; }
.video-fallback { color: var(--muted); }
.video-fallback a { color: var(--accent); }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 16px; }
.shots img { border-radius: 10px; border: 1px solid var(--line); width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* --- подвал --- */
.site-footer { margin-top: 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 20px 0 32px; }
.site-footer p { margin: 4px 0; }
.site-footer a { color: var(--accent); }

@media (max-width: 860px) {
  .top-grid { grid-template-columns: 1fr; }
  .game-head { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .site-header nav { gap: 12px; font-size: 13px; }
  .site-header nav a:nth-child(-n+2) { display: none; }
  .hero { padding-top: 32px; }
  #sort { margin-left: 0; }
  .grid { grid-template-columns: 1fr; }
}

.ad-line { margin: 4px 0 0; font-size: 11.5px; color: var(--muted); letter-spacing: .01em; }

/* --- галерея: трейлер, потом скриншоты --- */
.gallery { margin-top: 28px; display: flex; flex-direction: column; gap: 10px; }
.stage { position: relative; aspect-ratio: 16 / 9; max-width: 100%; background: #000; border-radius: var(--radius); overflow: hidden; }
.slide { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.slide[hidden] { display: none; }
.slide video, .slide img { width: 100%; height: 100%; object-fit: contain; background: #000; }
.slide .video-fallback { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; }
.nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(13, 15, 18, .7); color: var(--text); font-size: 28px; line-height: 1; cursor: pointer; display: grid; place-items: center; z-index: 2; }
.nav:hover { background: var(--accent); color: var(--accent-ink); }
.nav:focus-visible, .strip-btn:focus-visible, .chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.prev { left: 12px; }
.next { right: 12px; }
.counter { position: absolute; right: 12px; top: 12px; background: rgba(13, 15, 18, .7); color: var(--text); font-size: 12px;
  padding: 3px 9px; border-radius: 999px; font-variant-numeric: tabular-nums; z-index: 2; }
.strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.strip-btn { position: relative; flex: 0 0 auto; width: 168px; aspect-ratio: 16 / 9; padding: 0; border: 2px solid transparent;
  border-radius: 10px; overflow: hidden; background: var(--bg-2); cursor: pointer; opacity: .6; transition: opacity .15s, border-color .15s; }
.strip-btn:hover { opacity: .9; }
.strip-btn.active { opacity: 1; border-color: var(--accent); }
.strip-btn img { width: 100%; height: 100%; object-fit: cover; }
.play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 22px; text-shadow: 0 2px 8px rgba(0, 0, 0, .8); }
@media (max-width: 520px) {
  .strip-btn { width: 116px; }
  .nav { width: 36px; height: 36px; font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* --- лайки / дизлайки --- */
:root { --up: #4ee06a; --down: #ff5a4a; }
.votes { display: flex; gap: 8px; padding: 0 14px 14px; }
.top-card .votes { padding: 0 16px 16px; }
.vote { display: inline-flex; align-items: center; gap: 7px; font: 700 13px/1 var(--font-body); font-variant-numeric: tabular-nums;
  color: var(--muted); background: #20252d; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer;
  transition: background .12s, border-color .12s, color .12s, transform .08s; }
.vote .px { width: 18px; height: 14px; display: block; image-rendering: pixelated; }
.vote.up .px { color: var(--up); }
.vote.down .px { color: var(--down); transform: scale(-1, -1); }
.vote:hover { color: var(--text); border-color: #3a424e; }
.vote:active { transform: translateY(1px); }
.vote:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vote.up.on { background: rgba(78, 224, 106, .16); border-color: var(--up); color: var(--up); }
.vote.down.on { background: rgba(255, 90, 74, .16); border-color: var(--down); color: var(--down); }
.vote.on .px { animation: pop .25s steps(3); }
@keyframes pop { 50% { scale: 1.3; } }
.rate { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.rate-q { color: var(--muted); font-size: 14px; }
.votes.big { padding: 0; }
.votes.big .vote { font-size: 15px; padding: 9px 14px; border-radius: 10px; }
.votes.big .vote .px { width: 25px; height: 20px; }

/* --- топ за 7 дней --- */
.rank { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.rank-row a { display: grid; grid-template-columns: 40px 120px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 10px 10px; transition: background .15s, border-color .15s; }
.rank-row a:hover { background: var(--card-hover); border-color: #3a424e; }
.rank-n { font: 800 22px/1 var(--font-head); color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.rank-row:nth-child(-n+3) .rank-n { color: var(--accent); }
.rank-img { width: 120px; aspect-ratio: 460 / 215; object-fit: cover; border-radius: 8px; background: var(--bg-2); }
.rank-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rank-name { font-weight: 600; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-main .meta { font-size: 12.5px; }
@media (max-width: 860px) { .rank { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .rank-row a { grid-template-columns: 28px 84px minmax(0, 1fr); gap: 10px; }
  .rank-n { font-size: 18px; }
  .rank-img { width: 84px; }
  .rank-row .price { display: none; }
}
.tr { font-weight: 600; }
.tr.tw { color: #b9a3ff; }
.tr.yt { color: #ff8a80; }
