/* GameISO v28 — базовые стили темы DLE.
   Источник дизайна: variants/v28. Токены и раскладка сохранены,
   добавлены стили для компонентов DLE (комментарии, формы, поиск, навигация). */

@font-face { font-family: Manrope; src: url('../fonts/manrope-400.ttf'); font-display: swap; }
@font-face { font-family: Manrope; src: url('../fonts/manrope-600.ttf'); font-weight: 600; font-display: swap; }
@font-face { font-family: Manrope; src: url('../fonts/manrope-700.ttf'); font-weight: 700; font-display: swap; }
@font-face { font-family: Manrope; src: url('../fonts/manrope-800.ttf'); font-weight: 800; font-display: swap; }

:root {
	--accent: #36856d;
	--bg: #f4f5f0;
	--surface: #fff;
	--text: #202c28;
	--muted: #7c8a83;
	--border: #e6eae4;
	--soft: #f1f5f0;
	--header: #1c2a25;
	--ts-size: 36px;
	--ts-radius: 9px;
	--ts-color: #fff;
	--ts-accent: var(--accent);
	--ts-bg: rgba(255, 255, 255, .08);
	--ts-border: rgba(255, 255, 255, .14);
	--ts-hover-bg: rgba(255, 255, 255, .16);
	--ts-menu-bg: var(--surface);
	--ts-menu-color: var(--text);
	--ts-menu-border: var(--border);
	--ts-menu-hover: var(--soft);
	font-family: Manrope, sans-serif;
	color: var(--text);
	background: var(--bg);
	font-synthesis: none;
}

:root[data-theme="dark"] {
	--bg: #151d1a;
	--surface: #202b26;
	--text: #e8eee9;
	--muted: #9aa9a0;
	--border: #334039;
	--soft: #28372f;
	--header: #111a16;
	--ts-menu-bg: #202b26;
	--ts-menu-color: #e8eee9;
	--ts-menu-border: #334039;
	--ts-menu-hover: #28372f;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-size: 14px; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { width: min(1280px, calc(100% - 64px)); margin: auto; }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 700; }
.skip-link:focus { left: 8px; }

/* Шапка */
.header { background: var(--header); color: #fff; }
.header__inner { min-height: 86px; display: flex; align-items: center; gap: 34px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.logo__mark { display: grid; place-items: center; width: 41px; height: 41px; border-radius: 12px; background: var(--accent); font-size: 24px; position: relative; }
.logo__mark span { font-size: 12px; position: absolute; right: 5px; top: 5px; }
.logo__accent, .footer__logo span { color: var(--accent); }
.logo small { display: block; font-size: 8px; letter-spacing: 1.1px; color: #aab9b0; margin-top: 6px; }
.header__nav { display: flex; align-items: center; gap: 33px; height: 86px; color: #b2c0b8; font-weight: 700; font-size: 13px; }
.header__nav a { height: 100%; display: flex; align-items: center; position: relative; }
.header__nav a:hover, .header__nav .is-current { color: #fff; }
.header__nav .is-current::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: var(--accent); }
.header__actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.header__hint { font-size: 11px; color: #98aaa0; margin-right: 6px; }
.header__burger { display: none; width: 42px; height: 42px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 10px; background: transparent; padding: 10px 9px; }
.header__burger span { display: block; height: 2px; margin: 4px 0; background: #fff; border-radius: 2px; transition: transform .2s, opacity .2s; }

.mobile-nav { display: none; background: var(--header); border-top: 1px solid rgba(255, 255, 255, .08); padding: 8px 16px 16px; }
.mobile-nav a { display: block; padding: 13px 4px; border-top: 1px solid rgba(255, 255, 255, .08); color: #d6e0da; font-weight: 700; font-size: 13px; }
.mobile-nav a:first-child { border-top: 0; }

/* Платформенная панель */
.platform-bar { background: var(--surface); border-bottom: 1px solid var(--border); }
.platform-bar__inner { min-height: 59px; display: flex; align-items: center; gap: 24px; overflow: auto; scrollbar-width: none; white-space: nowrap; }
.platform-bar__inner::-webkit-scrollbar { display: none; }
.platform-bar__inner > span { font-size: 10px; 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: 26px; list-style: none; margin: 0; padding: 0; }
.platform-bar .cat-item > a { display: flex; align-items: center; gap: 4px; font-weight: 700; font-size: 12px; }
.platform-bar .cat-item > a span:last-child { color: var(--accent); }
.platform-bar .cat-item:hover > a, .platform-bar .cat-item.is-current > a { color: var(--accent); }
.platform-bar__all { margin-left: auto; color: var(--accent); font-weight: 800; font-size: 12px; }

/* Общий каркас */
.page { padding-top: 32px; padding-bottom: 80px; }
.intro { min-height: 208px; border-radius: 14px; background: var(--header); color: #fff; padding: 34px 42px; display: flex; justify-content: space-between; align-items: center; overflow: hidden; position: relative; }
.intro::after { content: ''; width: 320px; height: 320px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 50%; position: absolute; right: 46px; top: -60px; box-shadow: 0 0 0 40px color-mix(in srgb, var(--accent) 8%, transparent), 0 0 0 80px color-mix(in srgb, var(--accent) 5%, transparent); }
.eyebrow, .section-kicker { font-size: 10px; font-weight: 800; letter-spacing: 1.3px; color: var(--accent); }
.eyebrow { color: color-mix(in srgb, var(--accent) 35%, white); display: flex; align-items: center; gap: 8px; }
.eyebrow span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.intro h1 { font-size: 36px; line-height: 1.14; letter-spacing: -1.6px; margin: 14px 0 10px; }
.intro h1 em { font-style: normal; color: color-mix(in srgb, var(--accent) 35%, white); }
.intro p { color: #a9b9af; margin: 0; font-size: 13px; }
.intro__stamp { width: 112px; height: 112px; border: 1px solid color-mix(in srgb, var(--accent) 80%, transparent); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-direction: column; color: color-mix(in srgb, var(--accent) 30%, white); transform: rotate(12deg); z-index: 1; font-size: 9px; font-weight: 800; letter-spacing: 2px; margin-right: 110px; }
.intro__stamp strong { font-size: 36px; line-height: 1.2; color: var(--accent); }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 28px; align-items: start; margin-top: 38px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin: 0 0 18px; gap: 16px; }
.section-heading h2, .side-heading h2 { margin: 6px 0 0; letter-spacing: -.6px; }
.section-heading h2 { font-size: 24px; }
.section-count { font-size: 11px; color: var(--muted); font-weight: 700; }
.feed__list { display: grid; gap: 14px; }

/* Карточка игры */
.game-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: grid; grid-template-columns: 154px minmax(0, 1fr); gap: 22px; min-height: 224px; }
.game-card__cover { border-radius: 8px; overflow: hidden; background: var(--soft); height: 196px; }
.game-card__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.game-card__cover:hover img { transform: scale(1.04); }
.game-card__body { min-width: 0; display: flex; flex-direction: column; padding: 4px 5px 1px 0; }
.game-card__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.game-card__platforms, .game-hero__tags { display: flex; gap: 5px; flex-wrap: wrap; }
.game-card__platforms .cat-link, .game-hero__tags .cat-link { background: var(--soft); color: var(--accent); font-size: 9px; font-weight: 800; padding: 5px 7px; border-radius: 4px; }
.game-card__year { color: var(--muted); font-size: 11px; font-weight: 700; }
.game-card h3 { font-size: 20px; letter-spacing: -.7px; margin: 10px 0 8px; line-height: 1.2; }
.game-card h3 a:hover, .game-card__bottom a:hover { color: var(--accent); }
.game-card__facts { display: flex; align-items: center; flex-wrap: wrap; gap: 0; font-size: 11px; color: var(--muted); }
.game-card__facts span + span::before { content: '·'; padding: 0 8px; color: var(--muted); }
.game-card__facts .game-card__rating { font-weight: 800; color: var(--accent); }
.game-card__body > p { font-size: 12px; line-height: 1.65; color: var(--muted); margin: 12px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.game-card__bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--border); padding-top: 11px; font-size: 11px; color: var(--muted); }
.game-card__bottom a { font-weight: 800; color: var(--text); }
.game-card__bottom a span { color: var(--accent); padding-left: 5px; }
.game-card--compact { grid-template-columns: 1fr; }
.game-card--compact .game-card__body > p { -webkit-line-clamp: 3; }

/* «Показать ещё» / навигация */
.more-wrap > a { display: block; width: 100%; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 10px; padding: 16px; margin-top: 14px; font-size: 12px; font-weight: 800; text-align: center; }
.more-wrap > a:hover { border-color: var(--accent); color: var(--accent); }
.more-wrap > a span { padding-left: 8px; color: var(--accent); }
.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: 32px; height: 32px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); font-size: 12px; font-weight: 700; }
.navigation .pages a:hover { border-color: var(--accent); color: var(--accent); }

/* Сайдбар */
.sidebar { display: grid; gap: 16px; }
.search, .side-block { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 21px; }
.search label { display: block; font-size: 12px; font-weight: 800; margin-bottom: 11px; }
.search > div { display: flex; border: 1px solid var(--border); background: var(--bg); border-radius: 7px; overflow: hidden; }
.search input { min-width: 0; width: 100%; background: none; border: 0; padding: 12px; color: var(--text); font-size: 12px; }
.search button { border: 0; background: var(--accent); color: #fff; font-size: 23px; width: 43px; flex: none; }
.side-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.side-heading h2 { font-size: 17px; }
.side-heading > span { color: var(--accent); font-size: 18px; }

/* Платформы в сайдбаре */
.platform-list .cat-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; list-style: none; margin: 0; padding: 0; }
.platform-list .cat-item > a { background: var(--soft); border-radius: 6px; min-height: 38px; padding: 10px; display: flex; justify-content: space-between; gap: 4px; align-items: center; font-size: 11px; font-weight: 700; }
.platform-list .cat-item > a span:last-child { color: var(--accent); }
.platform-list .cat-item > a:hover { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); }

/* Топ игр и обсуждения */
.popular { counter-reset: popular; }
.popular__item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); counter-increment: popular; }
.popular__item > span:last-child { margin-left: auto; color: var(--muted); }
.popular__num { font-size: 10px; color: var(--muted); font-weight: 800; }
.popular__num::before { content: "0" counter(popular); }
.popular img { width: 43px; height: 54px; object-fit: cover; border-radius: 5px; }
.popular__text { min-width: 0; display: grid; gap: 6px; }
.popular__text strong { font-size: 11px; line-height: 1.4; }
.popular__text small { font-size: 10px; color: var(--muted); }
.discussion { display: flex; gap: 10px; padding: 13px 0; border-top: 1px solid var(--border); font-size: 11px; }
.discussion__avatar { width: 32px; height: 32px; flex: none; border-radius: 50%; background: color-mix(in srgb, var(--accent) 15%, var(--surface)); color: var(--accent); display: grid; place-items: center; font-weight: 800; }
.discussion strong { display: block; line-height: 1.5; }
.discussion small { font-size: 10px; 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; }

/* Подвал */
.footer { border-top: 1px solid var(--border); background: var(--surface); }
.footer__inner { min-height: 100px; display: flex; align-items: center; gap: 30px; }
.footer__logo { font-size: 17px; font-weight: 800; }
.footer p { color: var(--muted); font-size: 11px; }
.footer__inner > a:last-child { margin-left: auto; font-weight: 800; font-size: 11px; color: var(--accent); }

/* Вход / профиль в шапке */
.login-pane { position: relative; }
.login-pane__toggle { display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .06); color: #fff; border-radius: 9px; padding: 8px 11px; font-size: 11px; font-weight: 800; }
.login-pane__toggle:hover { background: rgba(255, 255, 255, .14); }
.login-pane__avatar { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 55%, #111); font-size: 11px; }
.login-pane__menu, .login-pane__form { position: absolute; right: 0; top: calc(100% + 8px); z-index: 80; min-width: 220px; padding: 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 18px 44px rgba(0, 0, 0, .18); 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: 12px; font-weight: 700; }
.login-pane__menu a:hover { background: var(--soft); color: var(--accent); }
.login-pane__form { min-width: 270px; padding: 16px; gap: 7px; }
.login-pane__form label { font-size: 10px; font-weight: 800; color: var(--muted); }
.login-pane__form input { width: 100%; border: 1px solid var(--border); background: var(--bg); border-radius: 7px; padding: 10px 11px; color: var(--text); font-size: 12px; }
.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: 10px; }
.login-pane__links a { color: var(--accent); font-weight: 700; }

/* Поля и кнопки DLE */
.button, .btn { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 7px; padding: 12px 16px; font-size: 12px; font-weight: 800; text-align: center; }
.button:hover, .btn:hover { background: color-mix(in srgb, var(--accent) 84%, #000); }
.button--ghost { background: var(--soft); color: var(--text); border: 1px solid var(--border); }
.button--ghost:hover { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent); }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], input[type="number"], textarea, select { background: var(--bg); border: 1px solid var(--border); border-radius: 7px; 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: 11px; font-weight: 800; 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)); }
.ui-form { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ui-form .form-group { display: grid; gap: 6px; }
.ui-form label { font-size: 11px; font-weight: 700; color: var(--muted); }
.ui-form input[type="text"], .ui-form input[type="email"], .ui-form input[type="password"], .ui-form textarea { width: 100%; }
.combo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.combo_field { min-width: 0; }
.wide { width: 100%; }
.form_submit { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.btn-big { padding: 13px 18px; }
.c-captcha { display: flex; align-items: center; gap: 10px; }

/* Комментарии */
.com_list { display: grid; }
.comment { display: flex; gap: 12px; border-top: 1px solid var(--border); padding: 16px 0; font-size: 12px; }
.com_list > .comment:first-child { border-top: 0; padding-top: 0; }
.comment__body { min-width: 0; flex: 1; }
.comment__head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.comment__head strong { font-size: 12px; }
.comment__head small, .com-online { color: var(--muted); font-size: 10px; }
.comment__text { color: var(--text); line-height: 1.65; margin-top: 6px; }
.comment__text p { margin: 0 0 8px; }
.comment__images { margin-top: 10px; }
.comment__signature { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--border); color: var(--muted); font-size: 11px; }
.comment__tools { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.comment__tool { color: var(--muted); font-size: 10px; font-weight: 700; cursor: pointer; }
.comment__tool:hover { color: var(--accent); }
.comment__title { font-size: 13px; margin: 0 0 6px; }

.addcomment { margin-top: 22px; border-top: 1px solid var(--border); padding-top: 18px; }
.addcomment .plus_icon { display: none; }
.addcomment h3 { font-size: 15px; margin: 0 0 12px; }
.addcomment .box_in { padding: 0; }
.addcomment .btn { margin-top: 4px; }

/* Хлебные крошки / speedbar */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 11px; margin: 5px 0 20px; }
.breadcrumbs .over { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .speedbar { display: contents; }

/* Поиск */
.search-page { padding: 26px; }
.search-simple { display: grid; gap: 14px; max-width: 620px; }
.search-simple input[type="text"], .search-simple input[type="search"] { width: 100%; }
.search-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.search-extended { display: grid; grid-template-columns: 1.1fr .9fr; gap: 4px 18px; }
.search-extended .search-col { min-width: 0; }
.search_result_num { margin-top: 14px; color: var(--muted); font-size: 12px; }

/* Статические страницы */
.static-page { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 30px; }
.static-page__body { line-height: 1.75; color: var(--text); }
.static-page__body p { margin: 0 0 14px; }
.static-page__print { color: var(--accent); font-size: 12px; font-weight: 700; }
.static-page h1 { margin-bottom: 18px; }

/* DLE: иконки из спрайта */
.icon { width: 16px; height: 16px; fill: currentColor; vertical-align: -3px; }
.title_hide { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.grey, .muted { color: var(--muted); }

/* Скрытие несуществующих изображений и служебной категории «Все игры» */
.screenshots a[href=""], .screenshots img[src=""], .game-card__cover img[src=""] { display: none; }
.platform-bar .cat-1, .platform-list .cat-1, .game-card__platforms .cat-link-1, .game-hero__tags .cat-link-1 { display: none; }

@media (max-width: 1000px) {
	.header__inner { gap: 24px; }
	.header__hint { display: none; }
	.layout { grid-template-columns: minmax(0, 1fr) 270px; gap: 16px; }
	.game-card { grid-template-columns: 120px minmax(0, 1fr); gap: 16px; }
	.game-card__cover { height: 170px; }
	.game-card { min-height: 198px; }
	.intro__stamp { margin-right: 40px; }
}

@media (max-width: 760px) {
	.wrap { width: calc(100% - 32px); }
	.header__inner { min-height: 70px; gap: 14px; }
	.header__nav { display: none; }
	.header__burger { display: block; margin-left: auto; }
	.header__actions { margin-left: auto; }
	.header__actions .header__hint { display: none; }
	.mobile-nav.is-open { display: block; }
	.platform-bar__inner { gap: 18px; min-height: 50px; }
	.platform-bar .cat-menu { gap: 20px; }
	.page { padding-top: 20px; }
	.intro { min-height: 190px; padding: 26px; }
	.intro h1 { font-size: 29px; }
	.intro p { max-width: 330px; line-height: 1.6; }
	.intro__stamp, .intro::after { display: none; }
	.layout { grid-template-columns: 1fr; margin-top: 28px; }
	.sidebar { grid-template-columns: 1fr 1fr; }
	.search, .community { grid-column: 1 / -1; }
	.footer__inner { flex-wrap: wrap; gap: 12px; padding: 25px 0; }
	.footer p { order: 3; flex-basis: 100%; margin: 0; }
	.search-extended { grid-template-columns: 1fr; }
	.static-page, .search-page { padding: 20px; }
}

@media (max-width: 480px) {
	.game-card { grid-template-columns: 100px minmax(0, 1fr); gap: 12px; padding: 10px; }
	.game-card__cover { height: 145px; }
	.game-card h3 { font-size: 16px; }
	.game-card__body > p { font-size: 11px; -webkit-line-clamp: 2; margin: 8px 0; }
	.game-card__facts { font-size: 10px; }
	.game-card__bottom { padding-top: 8px; }
	.game-card__bottom > span { display: none; }
	.game-card__platforms .cat-link { font-size: 8px; padding: 4px; }
	.sidebar { grid-template-columns: 1fr; }
	.search, .community { grid-column: auto; }
	.section-heading h2 { font-size: 21px; }
	.combo { grid-template-columns: 1fr; }
	.login-pane__form { right: -8px; min-width: 240px; }
}

@media (max-width: 480px) {
	.header__inner { gap: 8px; }
	.logo { font-size: 18px; gap: 8px; }
	.logo small { display: none; }
	.logo__mark { width: 34px; height: 34px; border-radius: 10px; font-size: 20px; }
	.header__actions { gap: 6px; }
	.login-pane__toggle { padding: 7px 9px; font-size: 10px; }
	.header__burger { width: 38px; height: 38px; padding: 9px 8px; }
}
