﻿/* VGBase вЂ” С‚С‘РјРЅР°СЏ С‚РµРјР° РІ РґСѓС…Рµ Steam-СЃС‚РѕСЂР°, РЅРѕ СЃРѕ СЃРІРѕРµР№ Р°Р№РґРµРЅС‚РёРєРѕР№ */
:root {
  --bg: #0b1218;
  --bg-2: #101b26;
  --panel: #16232f;
  --panel-2: #1c2c3b;
  --line: #24384a;
  --text: #c3d0dc;
  --bright: #f0f6fa;
  --muted: #7d8b98;
  --accent: #1a9fff;
  --accent-2: #66c0f4;
  --green: #a4d007;
  --disc-bg: #345c22;
  --disc-text: #d2efa9;
  --gold: #f0c674;
  --danger: #e05c5c;
  --link: #66c0f4;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { scrollbar-color: #2c4258 var(--bg); }
body {
  margin: 0;
  background:
    radial-gradient(1200px 400px at 70% -50px, rgba(26,159,255,.08), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 14px/1.55 "Segoe UI", Roboto, Arial, sans-serif;
}
a { color: var(--link); text-decoration: none; transition: color .1s; }
a:hover { color: var(--bright); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.empty { color: var(--muted); padding: 18px 4px; font-style: italic; }

/* ---------- header ---------- */
.site-header {
  background: linear-gradient(180deg, #131c26 0%, #0f1720 100%);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 18px rgba(0,0,0,.45);
}
.header-inner { display: flex; align-items: center; gap: 22px; height: 62px; }
.logo { font-size: 24px; font-weight: 800; color: var(--bright); letter-spacing: .4px; }
.logo span { color: var(--accent); }
.search input {
  background: #0d1721; border: 1px solid var(--line); border-radius: 4px;
  color: var(--bright); padding: 8px 14px; width: 280px; outline: none;
  transition: border-color .15s, width .2s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: var(--accent); width: 340px; }
.user-nav { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.user-link { display: flex; align-items: center; gap: 8px; color: var(--bright); font-weight: 600; }
.avatar { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); }
.lang-switch { color: var(--muted); font-weight: 600; padding: 4px 10px; border: 1px solid var(--line); border-radius: 4px; }
.lang-switch:hover { color: var(--accent-2); border-color: var(--accent); }

.btn {
  display: inline-block; background: linear-gradient(135deg, #3d9be9, #2a7cc0);
  color: #fff; border: none; border-radius: 4px; padding: 9px 20px;
  font-weight: 700; cursor: pointer; font-size: 14px;
  box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 2px 6px rgba(0,0,0,.35);
  transition: filter .12s;
}
.btn:hover { filter: brightness(1.15); color: #fff; }
.btn-lg { padding: 12px 26px; font-size: 15px; }
.btn.small { padding: 4px 12px; font-size: 12px; }
.linklike { background: none; border: none; color: var(--link); cursor: pointer; font: inherit; padding: 0; }
.linklike:hover { color: var(--bright); }
.inline-form { display: inline; }

/* ---------- РєР°С‚Р°Р»РѕРі ---------- */
.main-nav a { color: var(--text); font-weight: 600; padding: 6px 12px; border-radius: 4px; }
.main-nav a:hover { color: var(--bright); background: rgba(255,255,255,.06); }
.count { font-size: 14px; font-weight: 400; }

/* ---------- тулбар фильтров (2 строки) ---------- */
.toolbar {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 22px;
}
.tb-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.tb-row + .tb-row { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.tb-tabs { display: flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.tb-tab input { display: none; }
.tb-tab span {
  display: inline-block; padding: 7px 16px; color: var(--muted);
  font-weight: 600; cursor: pointer; transition: background .1s, color .1s;
}
.tb-tab input:checked + span { background: var(--accent); color: #fff; }
.tb-tab span:hover { color: var(--bright); }
.tb-tab input:checked + span:hover { color: #fff; }
.tb-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 16px;
  padding: 6px 14px; color: var(--muted); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .12s; user-select: none;
}
.tb-chip input { display: none; }
.tb-chip:hover { border-color: var(--accent); color: var(--text); }
.tb-chip.on { background: rgba(26,159,255,.14); border-color: var(--accent); color: var(--accent-2); }
.tb-genres { position: relative; }
.tb-genres summary {
  list-style: none; cursor: pointer; user-select: none;
  border: 1px solid var(--line); border-radius: 16px; padding: 6px 14px;
  color: var(--muted); font-size: 13px; font-weight: 600; display: inline-flex; gap: 6px;
  transition: border-color .12s, color .12s;
}
.tb-genres summary::-webkit-details-marker { display: none; }
.tb-genres summary:hover { border-color: var(--accent); color: var(--text); }
.tb-genres.open summary { background: rgba(26,159,255,.14); border-color: var(--accent); color: var(--accent-2); }
.genres-drop {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 60;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0,0,0,.55);
  padding: 10px 14px; display: grid; grid-template-columns: 1fr 1fr;
  gap: 2px 18px;
  max-height: 320px; overflow-y: auto; overflow-x: hidden;
  width: 420px; max-width: calc(100vw - 48px);
}
.g-item { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 4px; cursor: pointer; font-size: 13px; color: var(--text); }
.g-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-item:hover { background: rgba(26,159,255,.08); color: var(--bright); }
.g-item input { accent-color: var(--accent); }
.tb-price { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.tb-price-label { white-space: nowrap; }
.tb-dash { color: var(--muted); }
.tb-cur { color: var(--muted); }
.price-input {
  display: flex; align-items: center; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 4px; overflow: hidden;
}
.price-input input {
  width: 64px; background: transparent; border: none; color: var(--bright);
  padding: 7px 4px 7px 10px; outline: none; font-variant-numeric: tabular-nums;
}
.price-input input:focus { background: rgba(26,159,255,.06); }
.price-input span { color: var(--muted); padding-right: 10px; }
.tb-sort { margin-left: auto; }
.tb-sort select {
  background: var(--bg-2); color: var(--bright); border: 1px solid var(--line);
  border-radius: 4px; padding: 7px 10px; outline: none; cursor: pointer; font-weight: 600;
}
.tb-sort select:focus { border-color: var(--accent); }
.tb-mindisc select {
  background: var(--bg-2); color: var(--bright); border: 1px solid var(--line);
  border-radius: 4px; padding: 7px 10px; outline: none; cursor: pointer; font-weight: 600;
}
.tb-mindisc select:focus { border-color: var(--accent); }
.tb-reset { color: var(--muted); font-size: 12px; align-self: center; }
.tb-reset:hover { color: var(--accent-2); }

.grid-3 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.pager { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 28px 0 6px; }
.pg {
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px;
  padding: 8px 16px; color: var(--link); font-weight: 600;
}
.pg:hover { border-color: var(--accent); color: var(--bright); }
.pg-info { color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .tb-sort { margin-left: 0; }
  .genres-drop { width: calc(100vw - 48px); grid-template-columns: 1fr; }
}

/* ---------- СЃС‚СЂР°РЅРёС†Р° РёРіСЂС‹ ---------- */
.app-hero {
  height: 340px; border-radius: var(--radius); margin-bottom: 22px;
  background-size: cover; background-position: center 20%;
  position: relative; overflow: hidden; border: 1px solid var(--line);
  background-color: #0d1520;
}
.app-hero-fade {
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg) 3%, rgba(11,18,24,.55) 40%, rgba(11,18,24,.15) 75%);
}
.app-hero-body { position: absolute; bottom: 20px; left: 24px; right: 24px; z-index: 1; }
.app-crumb { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.app-crumb a { color: var(--accent-2); }
.app-hero-body h1 { margin: 0 0 8px; color: var(--bright); font-size: 34px; text-shadow: 0 2px 12px rgba(0,0,0,.85); }
.app-desc { margin: 0 0 12px; max-width: 760px; color: #d3dce4; text-shadow: 0 1px 8px rgba(0,0,0,.9); }
.app-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.meta-item {
  background: rgba(13,23,33,.75); border: 1px solid var(--line); border-radius: 12px;
  padding: 3px 12px; font-size: 12px; color: var(--text); backdrop-filter: blur(3px);
}
.meta-item.genre { color: var(--accent-2); }
.meta-item.metacritic { background: rgba(164,208,7,.15); border-color: #6b8f1d; color: var(--green); font-weight: 800; }
.app-layout { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { .app-layout { grid-template-columns: 1fr; } }
.app-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 78px; }
@media (max-width: 860px) { .app-side { position: static; } }
.price-card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
}
.pc-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .9px; margin-bottom: 10px; }
.pc-price { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.pc-final { font-size: 32px; font-weight: 800; color: var(--bright); font-variant-numeric: tabular-nums; }
.pc-final.free { color: var(--green); font-size: 26px; }
.discount-badge.big { font-size: 20px; padding: 4px 10px; }
.pc-initial { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.pc-initial s { color: #a8b6c2; }
.pc-low { font-size: 14px; color: var(--text); padding-top: 10px; border-top: 1px solid var(--line); }
.pc-low b { color: var(--gold); }
.pc-watch { width: 100%; margin-top: 14px; }
.side-facts {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 16px;
}
.fact { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.fact:last-child { border-bottom: none; }
.fact span { color: var(--muted); }
.fact b { color: var(--bright); font-weight: 600; text-align: right; }
.fact .mc { color: var(--green); }
.app-main section { margin-bottom: 28px; }
.chart-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; position: relative; }
.chart-tip {
  position: absolute; pointer-events: none; opacity: 0; transition: opacity .1s;
  background: #0d1721; border: 1px solid var(--accent); color: var(--bright);
  font-size: 12px; padding: 4px 9px; border-radius: 4px; white-space: nowrap; z-index: 5;
}
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.shots img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px;
  border: 1px solid var(--line); background: #0a0f14; transition: border-color .12s;
}
.shots img:hover { border-color: var(--accent); }

/* лайтбокс */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(5,9,14,.92); display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox .lb-img { max-width: 90vw; max-height: 88vh; border-radius: 4px; box-shadow: 0 10px 60px rgba(0,0,0,.8); }
.lightbox button {
  position: absolute; background: rgba(22,35,47,.8); color: var(--bright);
  border: 1px solid var(--line); border-radius: 4px; font-size: 26px;
  width: 44px; height: 44px; cursor: pointer; line-height: 1;
}
.lightbox button:hover { border-color: var(--accent); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
canvas { width: 100%; height: auto; display: block; }

/* ---------- hero (РіР»Р°РІРЅР°СЏ) ---------- */
.hero {
  background:
    radial-gradient(900px 300px at 25% 0%, rgba(26,159,255,.16), transparent 65%),
    linear-gradient(180deg, #0e1a26 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
  padding: 54px 0 44px;
  text-align: center;
  margin-bottom: 34px;
}
.hero h1 { margin: 0 0 10px; font-size: 38px; color: var(--bright); letter-spacing: .3px; }
.hero-sub { margin: 0 0 26px; color: var(--muted); font-size: 16px; }
.hero-search { display: flex; gap: 10px; justify-content: center; margin-bottom: 30px; }
.hero-search input {
  background: rgba(13,23,33,.85); border: 1px solid var(--line); border-radius: 4px;
  color: var(--bright); padding: 12px 16px; width: min(440px, 70vw); font-size: 15px; outline: none;
}
.hero-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(26,159,255,.15); }
.hero-stats { display: flex; gap: 44px; justify-content: center; }
.stat { display: flex; flex-direction: column; }
.stat b { font-size: 26px; color: var(--accent-2); }
.stat span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .8px; }

/* ---------- sections ---------- */
main { padding: 10px 0 56px; }
.section { margin-bottom: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
h2 {
  font-size: 16px; color: var(--accent-2); text-transform: uppercase;
  letter-spacing: 1.2px; margin: 0; position: relative; padding-left: 14px;
}
h2::before { content: ''; position: absolute; left: 0; top: 3px; bottom: 3px; width: 3px; background: var(--accent); border-radius: 2px; }
.more { font-size: 13px; color: var(--muted); }
.more:hover { color: var(--accent-2); }
.page-title { font-size: 28px; color: var(--bright); font-weight: 700; margin: 8px 0 18px; }

/* ---------- РєР°СЂС‚РѕС‡РєРё РёРіСЂ ---------- */
.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.app-card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .13s ease, border-color .13s, box-shadow .13s;
}
.app-card:hover {
  transform: translateY(-3px);
  border-color: #3a5a78;
  box-shadow: 0 10px 24px rgba(0,0,0,.5);
}
.card-media { position: relative; background: #0a0f14; }
.card-media img { width: 100%; aspect-ratio: 184/69; object-fit: cover; display: block; }
.discount-badge {
  position: absolute; left: 8px; bottom: 8px;
  background: var(--disc-bg); color: var(--disc-text);
  font-weight: 800; font-size: 16px; padding: 3px 8px; border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.low-badge {
  position: absolute; right: 8px; top: 8px;
  background: rgba(240,198,116,.15); color: var(--gold);
  border: 1px solid var(--gold); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .6px; padding: 2px 7px; border-radius: 10px;
}
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.card-body .name {
  color: var(--bright); font-weight: 600; font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.price-row { display: flex; align-items: center; gap: 9px; }
.price-row .muted { font-size: 12px; }
.final { color: var(--disc-text); font-weight: 700; font-size: 15px; }
.final.free { color: var(--green); }
.low-line { font-size: 12px; color: var(--muted); }
.low-line b { color: var(--gold); }
.app-card.is-lowest { border-color: rgba(240,198,116,.45); }

/* ---------- С‚Р°Р±Р»РёС†С‹ ---------- */
.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table { width: 100%; border-collapse: collapse; margin: 0; }
.table th, .table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.table th {
  color: var(--muted); font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: .8px; background: rgba(0,0,0,.18);
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: rgba(26,159,255,.05); }
.cell-app { display: flex; align-items: center; gap: 12px; min-width: 260px; }
.cell-app .cap { width: 92px; height: 34px; object-fit: cover; border-radius: 3px; background: #0a0f14; }
.price-cell { font-variant-numeric: tabular-nums; }
.price-cell .old { color: var(--muted); margin-right: 8px; font-size: 12px; }
.price-cell .new { color: var(--disc-text); font-weight: 700; }
.price-cell .new.free { color: var(--green); }

/* ---------- СЃС‚СЂР°РЅРёС†Р° РёРіСЂС‹ ---------- */
.app-hero {
  height: 300px; border-radius: var(--radius); margin-bottom: 22px;
  background-size: cover; background-position: center 20%;
  position: relative; overflow: hidden; border: 1px solid var(--line);
}
.app-hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg) 4%, rgba(11,18,24,.35) 45%, transparent 75%);
}
.app-hero-body { position: absolute; bottom: 18px; left: 22px; right: 22px; z-index: 1; }
.app-hero-body h1 { margin: 0 0 6px; color: var(--bright); font-size: 32px; text-shadow: 0 2px 10px rgba(0,0,0,.8); }
.app-hero-body p { margin: 0; max-width: 720px; color: #cfd9e2; text-shadow: 0 1px 6px rgba(0,0,0,.8); }
.app-layout { display: grid; grid-template-columns: 330px 1fr; gap: 24px; }
@media (max-width: 820px) { .app-layout { grid-template-columns: 1fr; } }
.price-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; align-self: start; }
.price-box h2 { margin-bottom: 10px; }
.big-price { font-size: 30px; color: var(--bright); font-weight: 800; margin: 10px 0; font-variant-numeric: tabular-nums; }
canvas { width: 100%; height: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }

/* ---------- С„РѕСЂРјС‹ ---------- */
.search-page-form { display: flex; gap: 10px; margin: 14px 0 26px; }
.search-page-form input {
  background: var(--panel); color: var(--bright); border: 1px solid var(--line);
  border-radius: 4px; padding: 10px 14px; width: min(420px, 80vw); outline: none;
}
.search-page-form input:focus { border-color: var(--accent); }

/* ---------- С„СѓС‚РµСЂ ---------- */
.site-footer {
  border-top: 1px solid var(--line); padding: 26px 0 34px;
  background: #0d141c; font-size: 13px; color: var(--muted);
}
.site-footer a { color: var(--muted); text-decoration: underline; }
.site-footer a:hover { color: var(--accent-2); }

@media (max-width: 720px) {
  .hero h1 { font-size: 28px; }
  .hero-stats { gap: 24px; }
  .search input { width: 150px; }
  .search input:focus { width: 180px; }
  .header-inner { gap: 12px; }
  .cell-app .cap { display: none; }
}

/* ---------- ЛК ---------- */
.acc-section { margin-bottom: 36px; }
.acc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.acc-head h2 { margin: 0; }
.acc-toolbar { padding: 10px; }
.acc-search {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 4px;
  color: var(--bright); padding: 7px 12px; width: 220px; outline: none;
}
.acc-search:focus { border-color: var(--accent); }
.acc-toolbar .tb-genres summary { display: inline-flex; }
.lib-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.lib-card .lib-playtime { color: var(--muted); font-size: 12px; }
.acc-flash { color: var(--gold); background: rgba(240,198,116,.08); border: 1px solid rgba(240,198,116,.4); border-radius: 4px; padding: 8px 12px; }

/* ЛК: добор */
.g-all { grid-column: 1 / -1; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.acc-sort { background: var(--bg-2); border: 1px solid var(--line); border-radius: 4px; color: var(--bright); padding: 7px 10px; outline: none; }
.acc-sort:focus { border-color: var(--accent); }
.card .initial { color: var(--muted); text-decoration: line-through; font-size: 12px; }
.lib-card-note { color: var(--muted); font-size: 12px; }
.acc-flash.ok { color: #8fce6e; background: rgba(143,206,110,.08); border-color: rgba(143,206,110,.4); }
