/* =========================================================
   Old-Games v6 — шаблон DataLife Engine.
   Светлый архив: сайдбар с категориями, каталог списком,
   «Новинки», новости, файлы, популярные. Стили DLE-компонентов
   (формы, комментарии, поиск) — в css/dle.css.
   ========================================================= */

:root {
	--bg: #f5f3ee;
	--surface: #ffffff;
	--surface-2: #faf8f4;
	--surface-3: #f0ece4;
	--border: #e7e2d8;
	--border-strong: #d8d1c3;
	--text: #1f2228;
	--text-2: #4b505a;
	--muted: #7d828c;

	--accent: #e88a1c;
	--accent-hover: #d27a10;
	--accent-ink: #241400;
	--accent-text: #b45f06;
	--accent-soft: #fcefdc;
	--link: #1c58a9;
	--link-hover: #164a8f;
	--link-soft: #e8f0fb;

	--shadow: 0 1px 2px rgba(30, 25, 15, .05), 0 8px 24px rgba(30, 25, 15, .06);
	--shadow-lg: 0 2px 4px rgba(30, 25, 15, .06), 0 18px 48px rgba(30, 25, 15, .12);
	--radius: 14px;
	--radius-sm: 9px;
	--container: 1280px;
	--font: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-pixel: "Pixelify Sans", var(--font);

	--c-pc: #5b6577;
	--c-playstation: #2f63c9;
	--c-psp: #6a55c8;
	--c-xbox: #2f8f4a;
	--c-nintendo: #d33b3b;
	--c-sega: #1b74c4;

	--ts-size: 40px;
	--ts-radius: 10px;
	--ts-bg: var(--surface);
	--ts-border: var(--border-strong);
	--ts-color: var(--text-2);
	--ts-hover-bg: var(--surface-3);
	--ts-menu-bg: var(--surface);
	--ts-menu-border: var(--border);
	--ts-menu-color: var(--text);
	--ts-menu-hover: var(--surface-3);
	--ts-accent: var(--accent-text);
	--ts-shadow: var(--shadow-lg);
	--ts-font: 500 14px/1.2 var(--font);

	color-scheme: light;
}

:root[data-theme="dark"] {
	--bg: #11141a;
	--surface: #181c24;
	--surface-2: #1d222c;
	--surface-3: #252b37;
	--border: #2a303c;
	--border-strong: #363d4b;
	--text: #e9ebf0;
	--text-2: #b6bcc8;
	--muted: #848b99;

	--accent: #f0952e;
	--accent-hover: #f6a548;
	--accent-ink: #241400;
	--accent-text: #f5a54a;
	--accent-soft: #33260f;
	--link: #7aa9f0;
	--link-hover: #9cc0f5;
	--link-soft: #1a2740;

	--shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
	--shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 18px 48px rgba(0, 0, 0, .45);

	--c-pc: #9aa3b5;
	--c-playstation: #6f9cf0;
	--c-psp: #a395f0;
	--c-xbox: #5cc67a;
	--c-nintendo: #f07070;
	--c-sega: #5aa8f0;

	--ts-bg: var(--surface);
	--ts-border: var(--border-strong);
	--ts-color: var(--text-2);
	--ts-hover-bg: var(--surface-3);
	--ts-menu-bg: var(--surface);
	--ts-menu-border: var(--border);
	--ts-menu-color: var(--text);
	--ts-menu-hover: var(--surface-3);
	--ts-accent: var(--accent-text);
	--ts-shadow: var(--shadow-lg);

	color-scheme: dark;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; }
body {
	margin: 0; min-width: 320px; font-family: var(--font); font-size: 15px; line-height: 1.55;
	color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased;
}
body.lightbox-open { overflow: hidden; }
h1, h2, h3, h4, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
input, textarea, select, button { box-sizing: border-box; }
input[type="search"] { box-sizing: border-box; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 4px; }
.icon { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.skip-link:focus { top: 12px; }

/* ---------- Кнопки, бейджи ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px;
	border: 1px solid transparent; border-radius: var(--radius-sm); background: none; font-weight: 600; font-size: 14px;
	white-space: nowrap; transition: background .18s, border-color .18s, color .18s, transform .18s;
}
.btn:active { transform: translateY(1px); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: var(--accent-hover); }
.btn--ghost { border-color: var(--border-strong); background: var(--surface); color: var(--text); }
.btn--ghost:hover { border-color: var(--link); color: var(--link); }
.btn--small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn--block { width: 100%; }

.badge {
	display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600;
	background: var(--surface-3); color: var(--text-2);
}
.badge--accent { background: var(--accent); color: var(--accent-ink); }
.badge[data-badge="Новинка"] { background: var(--link); color: #fff; }
.badge[data-badge="Хит"] { background: var(--accent); color: var(--accent-ink); }
.badge[data-badge="Обновление"] { background: var(--link-soft); color: var(--link); }

/* ---------- Шапка ---------- */
.header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header__top { display: flex; align-items: center; gap: 24px; min-height: 76px; }

.logo { display: grid; grid-template-columns: auto auto; column-gap: 12px; align-items: center; flex: none; }
.logo__mark {
	grid-row: span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px;
	background: var(--accent); color: var(--accent-ink);
	box-shadow: inset 0 -4px 0 color-mix(in srgb, var(--accent-ink) 18%, transparent);
}
.logo__mark .icon { width: 26px; height: 26px; }
.logo__text { font-family: var(--font-pixel); font-weight: 700; font-size: 25px; line-height: 1; letter-spacing: .3px; }
.logo__tld { color: var(--accent-text); }
.logo__tagline { font-size: 12px; color: var(--muted); line-height: 1.3; margin-top: 3px; }
.logo--small .logo__mark { width: 36px; height: 36px; }
.logo--small .logo__mark .icon { width: 21px; height: 21px; }
.logo--small .logo__text { font-size: 21px; }

.search { position: relative; flex: 1; max-width: 560px; margin-left: auto; }
.search input[type="search"] {
	width: 100%; height: 44px; padding: 0 44px 0 42px; border: 1px solid var(--border); border-radius: 11px;
	background: var(--surface-2); outline: none; transition: border-color .18s, box-shadow .18s, background .18s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: var(--link); background: var(--surface); box-shadow: 0 0 0 4px var(--link-soft); }
.search__icon { position: absolute; left: 14px; top: 13px; color: var(--muted); pointer-events: none; }
.search__key {
	position: absolute; right: 10px; top: 10px; display: grid; place-items: center; width: 24px; height: 24px;
	border: 1px solid var(--border-strong); border-radius: 6px; font: 600 12px var(--font); color: var(--muted);
}

.header__actions { display: flex; align-items: center; gap: 10px; flex: none; }
.theme-select { --ts-size: 42px; }
.header__burger { display: none; width: 42px; height: 42px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); padding: 10px 9px; }
.header__burger span { display: block; height: 2px; margin: 4px 0; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
body.mobile-menu-open .header__burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.mobile-menu-open .header__burger span:nth-child(2) { opacity: 0; }
body.mobile-menu-open .header__burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav { border-top: 1px solid var(--border); }
.nav__inner { display: flex; align-items: center; gap: 4px; }
.nav__link {
	position: relative; display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 12px;
	font-weight: 600; font-size: 14px; color: var(--text-2); white-space: nowrap; cursor: pointer; transition: color .18s;
}
.nav__link .icon { color: var(--muted); transition: color .18s; }
.nav__link:hover, .nav__link.is-active { color: var(--text); }
.nav__link:hover .icon, .nav__link.is-active .icon { color: var(--accent-text); }
.nav__link.is-active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.nav__more { position: relative; }
.nav__more summary { list-style: none; }
.nav__more summary::-webkit-details-marker { display: none; }
.nav__chevron { width: 15px; height: 15px; transition: transform .18s; }
.nav__more[open] .nav__chevron { transform: rotate(180deg); }
.nav__menu {
	position: absolute; z-index: 30; top: 100%; left: 0; min-width: 230px; padding: 6px; border: 1px solid var(--border);
	border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-lg);
}
.nav__menu a { display: block; padding: 9px 12px; border-radius: 8px; font-size: 14px; }
.nav__menu a:hover { background: var(--surface-3); }

.mobile-nav { display: none; background: var(--surface); border-bottom: 1px solid var(--border); padding: 4px 16px 14px; }
.mobile-nav a { display: block; padding: 12px 4px; border-top: 1px solid var(--border); font-weight: 600; font-size: 14px; }
.mobile-nav a:first-child { border-top: 0; }

/* ---------- Платформенная панель ---------- */
.platform-bar { background: var(--surface); border-bottom: 1px solid var(--border); }
.platform-bar__inner { min-height: 55px; display: flex; align-items: center; gap: 22px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.platform-bar__inner::-webkit-scrollbar { display: none; }
.platform-bar__inner > span { font-size: 11px; font-weight: 800; letter-spacing: 1px; color: var(--muted); padding-right: 18px; border-right: 1px solid var(--border); }
.platform-bar .cat-menu { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.platform-bar .cat-item > a { display: flex; align-items: center; gap: 5px; font-weight: 700; font-size: 13px; color: var(--text-2); }
.platform-bar .cat-item > a:hover, .platform-bar .cat-item.is-current > a { color: var(--accent-text); }
.platform-bar .cat-item__count { font-size: 11px; font-weight: 700; color: var(--muted); }
.platform-bar__all { margin-left: auto; color: var(--accent-text); font-weight: 800; font-size: 13px; }

/* ---------- Каркас страницы ---------- */
.page { padding-top: 18px; padding-bottom: 56px; }
.crumbs, .breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; font-size: 13px; color: var(--muted); }
.crumbs a, .breadcrumbs a { color: var(--muted); }
.crumbs a:hover, .breadcrumbs a:hover { color: var(--link); }
.crumbs .icon { width: 14px; height: 14px; }
.crumbs span:last-child { color: var(--text-2); }
.breadcrumbs .arrow, .breadcrumbs .separator { color: var(--border-strong); }

.layout { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 28px; align-items: start; }
.content { display: flex; flex-direction: column; gap: 34px; min-width: 0; }

.panel { padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.panel__title { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 700; }
.panel__title .icon { color: var(--accent-text); }

.section { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.section__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section__title { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.section__title .icon { width: 22px; height: 22px; color: var(--accent-text); }
.section__more { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--link); white-space: nowrap; }
.section__more:hover { color: var(--link-hover); }
.section__more .icon { width: 16px; height: 16px; transition: transform .18s; }
.section__more:hover .icon { transform: translateX(3px); }
.eyebrow { font-family: var(--font-pixel); font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: var(--accent-text); }
.eyebrow .badge { font-family: var(--font); font-size: 11px; letter-spacing: 0; text-transform: none; vertical-align: 2px; margin-right: 4px; }

/* ---------- Сайдбар: каталог ---------- */
.aside { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; }
.catalog-nav > summary { list-style: none; cursor: pointer; }
.catalog-nav > summary::-webkit-details-marker { display: none; }
.catalog-nav__chevron { margin-left: auto; display: none; }
.catalog-nav__groups { display: flex; flex-direction: column; margin-top: 10px; }
.nav-group { border-top: 1px solid var(--border); padding-top: 10px; }
.nav-group__title { padding-bottom: 6px; font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.nav-list { display: flex; flex-direction: column; }
.nav-list .cat-menu { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.nav-list .cat-item > a {
	display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; margin: 0 -10px;
	border-radius: 8px; font-size: 14px; color: var(--text-2); transition: background .15s, color .15s;
}
.nav-list .cat-item > a:hover { background: var(--surface-3); color: var(--text); }
.nav-list .cat-item.is-current > a { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.nav-list .cat-item__count, .count { font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.nav-list .cat-item.is-current .cat-item__count { color: inherit; }
.nav-all {
	display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding: 10px;
	border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); font-size: 14px; font-weight: 700;
}
.nav-all:hover { border-color: var(--accent); color: var(--accent-text); }

.side-search { display: flex; flex-direction: column; gap: 8px; }
.side-search label { font-size: 13px; font-weight: 700; }
.side-search > div { display: flex; border: 1px solid var(--border); background: var(--surface-2); border-radius: 9px; overflow: hidden; }
.side-search input { min-width: 0; width: 100%; border: 0; background: none; padding: 11px 12px; outline: none; }
.side-search button { border: 0; background: var(--accent); color: var(--accent-ink); font-size: 22px; width: 44px; flex: none; }

.support { display: flex; flex-direction: column; gap: 12px; background: linear-gradient(160deg, var(--accent-soft), var(--surface) 70%); }
.support p { font-size: 14px; color: var(--text-2); }

/* ---------- Приветствие и «Случайная игра» ---------- */
.welcome {
	position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 1fr); gap: 28px;
	padding: 32px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface);
}
.welcome::before {
	content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
	background-image: radial-gradient(color-mix(in srgb, var(--text) 12%, transparent) 1px, transparent 1.4px);
	background-size: 14px 14px;
	mask-image: linear-gradient(120deg, transparent 35%, #000 100%);
}
.welcome__text { position: relative; display: flex; flex-direction: column; gap: 14px; }
.welcome__title { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.08; font-weight: 800; letter-spacing: -1px; }
.welcome__title span { color: var(--accent-text); }
.welcome__lead { max-width: 560px; color: var(--text-2); font-size: 16px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: auto; padding-top: 10px; }
.stats__item { display: flex; flex-direction: column-reverse; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.stats dd { font-family: var(--font-pixel); font-size: 26px; font-weight: 700; line-height: 1.1; color: var(--text); }
.stats dt { font-size: 12px; color: var(--muted); }

.random {
	position: relative; display: grid; grid-template-columns: 128px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 18px; row-gap: 12px;
	padding: 18px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.random__label { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.random__label .icon { color: var(--accent-text); }
.random__cover { display: block; }
.random__cover img { width: 128px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px; background: var(--surface-3); box-shadow: var(--shadow); }
.random__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.random__title { font-size: 21px; font-weight: 800; line-height: 1.2; }
.random__title a:hover { color: var(--link); }
.random__meta { font-size: 14px; color: var(--muted); }
.random__meta .cat-link { color: var(--link); }
.random__rating { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 6px; margin-top: 2px; }
.random__rating b { font-family: var(--font-pixel); font-size: 28px; line-height: 1; color: var(--accent-text); }
.random__rating > span { font-size: 13px; color: var(--muted); margin-right: 6px; }
.random .btn { align-self: flex-start; margin-top: auto; }

.pixels { display: inline-flex; gap: 3px; align-self: center; }
.pixels i { width: 9px; height: 9px; border-radius: 2px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border-strong); }
.pixels i.is-on { background: var(--accent); box-shadow: none; }

/* ---------- Карточки «Новинки» ---------- */
.cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card__cover { position: relative; display: block; overflow: hidden; border-radius: 12px; background: var(--surface-3); box-shadow: var(--shadow); }
.card__cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; transition: transform .35s; }
.card:hover .card__cover img { transform: scale(1.05); }
.card__badge { position: absolute; left: 8px; top: 8px; }
.card__body { display: flex; flex-direction: column; gap: 2px; }
.card__title { font-weight: 700; font-size: 15px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .18s; }
.card:hover .card__title { color: var(--link); }
.card__meta { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__rating { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--accent-text); }

/* ---------- Новости и файлы ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.split__side { display: flex; flex-direction: column; gap: 28px; }
.news { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.news__item { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; }
.news__item + .news__item { border-top: 1px solid var(--border); }
.news__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); }
.news__title { font-size: 18px; font-weight: 700; line-height: 1.3; }
.news__title a:hover { color: var(--link); }
.news__item p { color: var(--text-2); font-size: 14px; }
.news__comments { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-size: 13px; font-weight: 600; color: var(--link); }
.news__comments .icon { width: 16px; height: 16px; }

.files-feed { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.files-feed__item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 16px; }
.files-feed__item + .files-feed__item { border-top: 1px solid var(--border); }
.files-feed__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--link-soft); color: var(--link); }
.files-feed__game { display: block; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files-feed__game:hover { color: var(--link); }
.files-feed__meta { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files-feed time { font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }

.fact { display: flex; flex-direction: column; gap: 12px; border-style: dashed; border-color: var(--border-strong); background: var(--surface-2); }
.fact p { font-size: 14px; color: var(--text-2); }
.fact__next { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; font-size: 13px; font-weight: 600; color: var(--link); }
.fact__next .icon { width: 16px; height: 16px; }
.fact__next:hover { color: var(--link-hover); }

/* ---------- «Популярные» ---------- */
.popular { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; counter-reset: pop; }
.popular__item {
	display: grid; grid-template-columns: 34px 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 14px;
	border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
}
.popular__num { font-family: var(--font-pixel); font-size: 20px; color: var(--muted); }
.popular__num::before { counter-increment: pop; content: counter(pop, decimal-leading-zero); }
.popular__item:nth-child(-n + 3) .popular__num { color: var(--accent-text); }
.popular__item img { width: 44px; height: 58px; object-fit: cover; border-radius: 7px; background: var(--surface-3); }
.popular__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.popular__title { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.popular__title:hover { color: var(--link); }
.popular__meta { font-size: 12px; color: var(--muted); }
.popular__score { font-size: 13px; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ---------- Каталог ---------- */
.catalog__head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; margin-bottom: 14px; }
.catalog__title { font-size: 26px; font-weight: 800; letter-spacing: -.4px; line-height: 1.2; }
.catalog__count { font-size: 14px; color: var(--muted); }

.row-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 18px; padding: 16px 18px; transition: background .15s; }
.row + .row { border-top: 1px solid var(--border); }
.row:hover { background: var(--surface-2); }
.row__cover { display: block; }
.row__cover img { width: 72px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; background: var(--surface-3); }
.row__body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.row__title { font-size: 17px; font-weight: 700; line-height: 1.3; }
.row__title a { color: var(--link); }
.row__title a:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: 3px; }
.row__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.row__meta span:first-child { font-weight: 700; color: var(--text-2); }
.row__summary { font-size: 14px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
.row__lang { display: inline-flex; align-items: center; gap: 5px; margin-left: 4px; font-size: 12px; color: var(--muted); }
.row__lang .icon { width: 15px; height: 15px; }
.row__side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 10px; }
.row__rating {
	display: grid; place-items: center; min-width: 48px; height: 40px; padding: 0 8px; border-radius: 10px;
	background: var(--accent-soft); color: var(--accent-text); font-family: var(--font-pixel); font-size: 20px; font-weight: 700;
}
.row__files, .row__comments { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.row__files .icon, .row__comments .icon { width: 15px; height: 15px; }
.row--compact { grid-template-columns: minmax(0, 1fr) auto; }

.cat-link {
	display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600;
	color: var(--c, var(--accent-text)); background: color-mix(in srgb, var(--c, var(--accent)) 12%, transparent);
}
.cat-link:hover { background: color-mix(in srgb, var(--c, var(--accent)) 22%, transparent); }
.cat-link-1 { display: none; }
.cat-link-2 { --c: var(--c-pc); }
.cat-link-3 { --c: var(--c-playstation); }
.cat-link-4 { --c: var(--c-psp); }
.cat-link-5 { --c: var(--c-xbox); }
.cat-link-6 { --c: var(--c-nintendo); }
.cat-link-7 { --c: var(--c-sega); }

/* «Показать ещё» / навигация */
.more-wrap > a {
	display: block; width: 100%; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
	border-radius: 10px; padding: 15px; margin-top: 14px; font-size: 14px; font-weight: 700; text-align: center;
}
.more-wrap > a:hover { border-color: var(--accent); color: var(--accent-text); }
.more-wrap > a span { padding-left: 8px; color: var(--accent-text); }
.more-wrap > span { display: none; }
.navigation { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 20px; }
.navigation .pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.navigation .pages a, .navigation .pages span { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 700; }
.navigation .pages a:hover { border-color: var(--accent); color: var(--accent-text); }
.navigation .pages .nav_ext { color: var(--muted); }

/* ---------- Подвал ---------- */
.footer { border-top: 1px solid var(--border); background: var(--surface); }
.footer__grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 28px; padding-top: 36px; padding-bottom: 28px; }
.footer__about { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.footer__about p { max-width: 360px; font-size: 14px; color: var(--text-2); }
.footer__col { display: flex; flex-direction: column; gap: 8px; }
.footer__col h2 { margin-bottom: 4px; font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.footer__col a { font-size: 14px; color: var(--text-2); }
.footer__col a:hover { color: var(--link); }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; padding-top: 18px; padding-bottom: 22px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }

/* ---------- Вход / профиль в шапке ---------- */
.login-pane { position: relative; }
.login-pane__toggle {
	display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 8px 13px; border-radius: 10px;
	border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: 13px; font-weight: 700;
}
.login-pane__toggle:hover { border-color: var(--accent); color: var(--accent-text); }
.login-pane__toggle .icon { width: 18px; height: 18px; }
.login-pane__avatar { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-size: 12px; }
.login-pane__menu, .login-pane__form {
	position: absolute; right: 0; top: calc(100% + 8px); z-index: 80; min-width: 230px; padding: 8px; border-radius: 12px;
	background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-lg); display: none;
}
.login-pane.is-open .login-pane__menu, .login-pane.is-open .login-pane__form { display: grid; gap: 2px; }
.login-pane__menu a { padding: 10px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--text); }
.login-pane__menu a:hover { background: var(--surface-3); color: var(--accent-text); }
.login-pane__form { min-width: 280px; padding: 16px; gap: 7px; }
.login-pane__form label { font-size: 11px; font-weight: 700; color: var(--muted); }
.login-pane__form input { width: 100%; border: 1px solid var(--border); background: var(--surface-2); border-radius: 8px; padding: 10px 11px; color: var(--text); font-size: 13px; }
.login-pane__form .button { width: 100%; text-align: center; margin-top: 4px; }
.login-pane__links { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: 11px; }
.login-pane__links a { color: var(--accent-text); font-weight: 700; }

/* ---------- Поля и кнопки DLE ---------- */
.button {
	display: inline-block; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px;
	padding: 11px 16px; font-size: 13px; font-weight: 700; text-align: center;
}
.button:hover { background: var(--accent-hover); }
.button--ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.button--ghost:hover { background: var(--surface-3); color: var(--accent-text); }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], input[type="number"], textarea, select {
	background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 10px 11px;
}
textarea { min-height: 90px; resize: vertical; }
fieldset { border: 1px solid var(--border); border-radius: 9px; padding: 12px 14px; margin: 0 0 10px; }
legend { padding: 0 6px; font-size: 12px; font-weight: 700; color: var(--muted); }

/* ---------- Служебные страницы DLE ---------- */
.page-shell { margin-top: 24px; }
.box { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px; }
.box + .box { margin-top: 14px; }
.box_in { min-width: 0; }
.box .title, .static-page h1, .search-page .title { font-size: 26px; letter-spacing: -.8px; margin: 0 0 16px; }
.berrors { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.static-page { max-width: 860px; }
.static-page__body { font-size: 15px; line-height: 1.75; color: var(--text-2); }
.static-page__body h2, .static-page__body h3 { margin: 24px 0 10px; color: var(--text); }
.static-page__body p { margin: 0 0 12px; }
.static-page__body a { color: var(--link); }

/* ---------- Комментарии ---------- */
.com_list { display: flex; flex-direction: column; }
.comment { display: flex; gap: 12px; padding: 14px 0; }
.comment + .comment { border-top: 1px solid var(--border); }
.comment:first-child { padding-top: 0; }
.comment__avatar, .discussion__avatar {
	display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px;
	background: var(--accent-soft); color: var(--accent-text); font-size: 16px;
}
.comment__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 14px; color: var(--text-2); }
.comment__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.comment__head strong { color: var(--text); }
.comment__head small { font-size: 12px; color: var(--muted); }
.comment__text { overflow-wrap: anywhere; }
.comment__text p { margin: 0 0 8px; }
.comment__tools { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--muted); }
.comment__tool { cursor: default; }
.comment__tool:hover { color: var(--accent-text); }
.comment__title { font-size: 15px; }
.comment__images { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.comment__signature { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--border); font-size: 12px; color: var(--muted); }
.com-online { color: var(--accent-text); font-size: 11px; font-weight: 700; }

.discussion { display: flex; gap: 10px; padding: 13px 0; border-top: 1px solid var(--border); font-size: 13px; }
.discussion:first-child { border-top: 0; padding-top: 0; }
.discussion strong { display: block; line-height: 1.5; }
.discussion small { font-size: 11px; color: var(--muted); font-weight: 600; }
.discussion > span:last-child > span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: var(--muted); line-height: 1.5; margin-top: 5px; }

/* ---------- Адаптивность ---------- */
@media (max-width: 1200px) {
	.cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.welcome { grid-template-columns: 1fr; }
	.stats { margin-top: 6px; }
}
@media (max-width: 960px) {
	.layout { grid-template-columns: 1fr; }
	.aside { position: static; display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
	.aside .catalog-nav { grid-row: span 2; }
	.catalog-nav__chevron { display: block; transition: transform .18s; }
	.catalog-nav[open] .catalog-nav__chevron { transform: rotate(180deg); }
	.catalog-nav:not([open]) .catalog-nav__groups { display: none; }
	.support { display: none; }
	.split { grid-template-columns: 1fr; }
	.popular { grid-template-columns: 1fr; }
	.footer__grid { grid-template-columns: 1fr 1fr 1fr; }
	.footer__about { grid-column: 1 / -1; }
	.logo__tagline { display: none; }
	.logo__mark { grid-row: auto; }
	.header__burger { display: block; margin-left: auto; }
	.mobile-nav.is-open { display: block; }
	.header__actions { margin-left: 0; }
}
@media (max-width: 720px) {
	.container { padding: 0 16px; }
	.header__top { flex-wrap: wrap; gap: 12px; padding: 12px 16px; min-height: 0; }
	.header .search { order: 3; flex-basis: 100%; max-width: none; margin-left: 0; }
	.header__actions { margin-left: auto; }
	.header__burger { display: block; }
	.nav { display: none; }
	.aside { grid-template-columns: 1fr; }
	.aside .catalog-nav { grid-row: auto; }
	.welcome { padding: 20px; border-radius: 16px; }
	.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.random { grid-template-columns: 96px minmax(0, 1fr); }
	.random__cover img { width: 96px; }
	.cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
	.section__title { font-size: 19px; }
	.row { grid-template-columns: 56px minmax(0, 1fr); gap: 14px; padding: 14px; }
	.row__cover img { width: 56px; }
	.row__side { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; }
	.row__rating { height: 32px; min-width: 40px; font-size: 17px; }
	.popular__item { grid-template-columns: 28px 40px minmax(0, 1fr); }
	.popular__score { display: none; }
	.footer__grid { grid-template-columns: 1fr 1fr; }
	.footer__about { grid-column: 1 / -1; }
	.search-page .search-extended, .search-extended { display: block; }
}
@media (max-width: 480px) {
	.platform-bar__inner { gap: 14px; }
	.platform-bar .cat-menu { gap: 14px; }
	.platform-bar__inner > span { display: none; }
	.catalog__head { align-items: flex-start; flex-direction: column; }
	.news__item { padding: 16px; }
	.row__summary { -webkit-line-clamp: 3; }
	.random { grid-template-columns: 1fr; }
	.random__cover { display: none; }
	.login-pane__form { position: fixed; left: 12px; right: 12px; top: auto; min-width: 0; }
}
