/*
Theme Name: Godot Hub
Description: Тёмная тема каталога ассетов для Godot Engine: карточки ассетов и статей, вход в окне, премиум. Работает вместе с плагином Godot Assets.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
Author: Godot Assets
License: GPL-2.0-or-later
Text Domain: godot-hub
*/

:root {
	--bg: #0e1319;
	--surface: #151c25;
	--surface-2: #1b2430;
	--surface-3: #222d3b;
	--border: #263342;
	--text: #e6edf3;
	--muted: #8d9db1;
	--accent: #478cbf;
	--accent-hover: #5c9fd2;
	--accent-soft: rgba(71, 140, 191, .16);
	--premium: #f2b13d;
	--premium-hover: #f7c461;
	--premium-soft: rgba(242, 177, 61, .14);
	--free: #3fb97a;
	--free-soft: rgba(63, 185, 122, .15);
	--danger: #f0645c;
	--radius: 12px;
	--radius-sm: 8px;
	--shadow: 0 10px 30px rgba(0, 0, 0, .35);
	--container: 1280px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 15px/1.6 var(--font);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-hover); text-decoration: none; }
a:hover { color: #8cc3ec; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 2px; }

.screen-reader-text, .gah-hp {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: var(--radius-sm); }
.skip-link:focus { left: 8px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.icon { width: 1em; height: 1em; flex: none; }

/* Кнопки */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	padding: .6em 1.15em; border-radius: var(--radius-sm); border: 1px solid transparent;
	font-weight: 600; line-height: 1.2; cursor: pointer; text-align: center;
	transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 1.1em; height: 1.1em; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-premium { background: var(--premium); color: #1d1503; }
.btn-premium:hover { background: var(--premium-hover); color: #1d1503; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }
.btn-sm { padding: .45em .85em; font-size: .9rem; }
.btn-lg { padding: .85em 1.3em; font-size: 1.05rem; }
.btn-block { display: flex; width: 100%; }
.btn-sub { font-weight: 500; opacity: .75; font-size: .85em; }
.btn.is-disabled { opacity: .6; cursor: default; }
.icon-btn {
	display: inline-grid; place-items: center; width: 40px; height: 40px;
	border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer;
}
.icon-btn svg { width: 20px; height: 20px; }

/* Значки */
.badge {
	display: inline-flex; align-items: center; gap: .3em; padding: .2em .55em; border-radius: 6px;
	font-size: .72rem; font-weight: 700; letter-spacing: .02em; line-height: 1.4; white-space: nowrap;
}
.badge svg { width: 1em; height: 1em; }
.badge-premium { background: var(--premium); color: #1d1503; }
.badge-free { background: var(--free); color: #04140b; }
.badge-godot { background: rgba(14, 19, 25, .82); color: #cfe3f3; border: 1px solid rgba(255, 255, 255, .12); }
.badge-article { background: var(--accent); color: #fff; }
.badge-staff { background: var(--accent-soft); color: var(--accent-hover); }
.badge-lg { font-size: .85rem; padding: .3em .7em; }
.badge-dot { padding: .25em; border-radius: 50%; }

/* Шапка */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(14, 19, 25, .92); backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border);
}
.admin-bar .site-header { top: 32px; }
.header-inner { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 1.1rem; flex: none; }
.brand:hover { color: var(--text); }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: #fff; }
.brand-mark svg { width: 20px; height: 20px; }
.brand-logo { max-height: 40px; width: auto; }

.site-nav { border-top: 1px solid var(--border); }
.site-nav .menu { display: flex; gap: 2px; list-style: none; margin: 0; padding: 4px 0; overflow-x: auto; scrollbar-width: none; }
.site-nav .menu::-webkit-scrollbar { display: none; }
.site-nav .menu a { display: block; padding: 7px 12px; border-radius: var(--radius-sm); color: var(--muted); font-weight: 600; font-size: .92rem; white-space: nowrap; }
.site-nav .menu a:hover, .site-nav .current-menu-item > a { color: var(--text); background: var(--surface-2); }
.site-nav .menu .sub-menu { display: none; }
.header-search { position: relative; flex: 1 1 auto; max-width: 520px; margin: 0 auto; }
.header-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; }
.header-search input {
	width: 100%; height: 38px; padding: 0 12px 0 34px; border-radius: var(--radius-sm);
	border: 1px solid var(--border); background: var(--surface); outline: none;
}
.header-search input:focus { border-color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.nav-toggle { display: none; }

.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 8px 4px 4px; border-radius: 999px; border: 1px solid var(--border); }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary img { border-radius: 50%; width: 30px; height: 30px; }
.user-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .9rem; }
.user-dropdown {
	position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px; padding: 6px;
	background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.user-dropdown a { display: block; padding: 8px 12px; border-radius: 6px; color: var(--text); }
.user-dropdown a:hover { background: var(--surface-3); }

/* Главная: шапка-приветствие */
.hero {
	background:
		radial-gradient(900px 300px at 15% 0%, rgba(71, 140, 191, .28), transparent 70%),
		radial-gradient(700px 260px at 90% 30%, rgba(242, 177, 61, .10), transparent 70%),
		var(--surface);
	border-bottom: 1px solid var(--border);
	padding: 48px 0 40px;
}
.hero-inner { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; }
.hero-text { max-width: 720px; }
.hero-text > p { color: var(--muted); font-size: 1.05rem; }
.hero-search { position: relative; display: flex; gap: 8px; margin: 20px 0 16px; max-width: 640px; }
.hero-search > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; height: 18px; }
.hero-search input {
	flex: 1; min-width: 0; height: 48px; padding: 0 14px 0 42px; border-radius: var(--radius-sm);
	border: 1px solid var(--border); background: var(--bg); outline: none; font-size: 1rem;
}
.hero-search input:focus { border-color: var(--accent); }
.hero-search .btn { height: 48px; }
.hero-search-inline { margin-top: 8px; }
.hero-stats { display: grid; gap: 10px; margin: 0; }
.hero-stats > div { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 22px; min-width: 200px; }
.hero-stats dt { color: var(--muted); font-size: .85rem; }
.hero-stats dd { margin: 0; font-size: 1.6rem; font-weight: 800; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
	display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
	background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-size: .88rem; font-weight: 600;
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip .count, .cat-list .count { color: var(--muted); font-weight: 500; }

/* Разметка страниц */
.site-main { flex: 1; padding-bottom: 56px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; margin-top: 32px; }
.section { margin-bottom: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-head h2 { margin: 0; }
.section-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .92rem; }
.page-head { padding-top: 24px; padding-bottom: 8px; }
.page-lead { color: var(--muted); max-width: 760px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .85rem; color: var(--muted); margin-bottom: 12px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs .sep { opacity: .5; }
.breadcrumbs [aria-current] { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60ch; }
.empty { padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); }

/* Сетка карточек */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
	display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border);
	border-radius: var(--radius); overflow: hidden; transition: transform .18s, border-color .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-3px); border-color: #34506b; box-shadow: var(--shadow); }
.card.is-premium { border-color: rgba(242, 177, 61, .35); }
.card.is-premium:hover { border-color: var(--premium); }
.card-media { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.card:hover .card-media img { transform: scale(1.04); }
.card-badge-left { position: absolute; left: 10px; top: 10px; }
.card-badge-right { position: absolute; right: 10px; top: 10px; }
.thumb-placeholder {
	display: grid; place-items: center; width: 100%; height: 100%;
	background: linear-gradient(135deg, hsl(var(--h) 45% 32%), hsl(calc(var(--h) + 40) 50% 18%));
	color: rgba(255, 255, 255, .85); font-size: 2.6rem; font-weight: 800;
}
.card-body { padding: 14px 16px 6px; flex: 1; }
.card-cat { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--accent-hover); }
.card-title { margin: 4px 0 6px; font-size: 1.02rem; }
.card-title a { color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-title a:hover { color: var(--accent-hover); }
.card-detail, .card-excerpt { color: var(--muted); font-size: .86rem; margin: 0; }
.card-excerpt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; gap: 14px; padding: 10px 16px 14px; color: var(--muted); font-size: .85rem; }
.stat { display: inline-flex; align-items: center; gap: 5px; }
.stat-rating svg { color: var(--premium); fill: var(--premium); }

/* Боковая колонка */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.widget-title { font-size: 1rem; margin-bottom: 12px; }
.widget-premium {
	background: linear-gradient(160deg, rgba(242, 177, 61, .22), rgba(242, 177, 61, .04) 60%), var(--surface);
	border-color: rgba(242, 177, 61, .4); text-align: center;
}
.widget-premium p { color: var(--muted); font-size: .92rem; }
.widget-premium-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--premium-soft); color: var(--premium); margin-bottom: 8px; }
.widget-premium-icon svg { width: 24px; height: 24px; }
.cat-list, .mini-list { list-style: none; margin: 0; padding: 0; }
.cat-list a { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 6px; color: var(--text); }
.cat-list a:hover { background: var(--surface-2); }
.mini-list li + li { margin-top: 10px; }
.mini-list a { display: flex; gap: 10px; color: var(--text); align-items: center; }
.mini-list a:hover .mini-title { color: var(--accent-hover); }
.mini-thumb { flex: none; width: 72px; height: 46px; border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.mini-thumb img, .mini-thumb .thumb-placeholder { width: 100%; height: 100%; object-fit: cover; font-size: 1.1rem; }
.mini-text { min-width: 0; display: flex; flex-direction: column; }
.mini-title { font-size: .88rem; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini-meta { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: .8rem; }
.mini-premium { color: var(--premium); font-weight: 700; margin-left: 4px; }

/* Каталог */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0 20px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; }
.segmented { display: inline-flex; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 3px; }
.segmented a { padding: 6px 12px; border-radius: 6px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.segmented a:hover { color: var(--text); }
.segmented a.is-active { background: var(--surface-3); color: var(--text); }
.segmented-sm a { font-size: .84rem; padding: 5px 10px; }

.pagination { margin-top: 28px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pagination .page-numbers {
	min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 10px; border-radius: var(--radius-sm);
	background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 600;
}
.pagination .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination a.page-numbers:hover { border-color: var(--accent); }

/* Страница ассета */
.title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.title-row h1 { margin: 0; }
.meta-row { display: flex; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: .9rem; margin-top: 10px; }
.meta-row > * { display: inline-flex; align-items: center; gap: 6px; }
.meta-row a { color: var(--muted); }
.meta-row a:hover { color: var(--text); }
.asset-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; margin-top: 16px; align-items: start; }
.asset-main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.panel-title { font-size: 1.15rem; margin-bottom: 14px; }
.panel-subtitle { font-size: .95rem; margin: 18px 0 10px; }
.sticky { position: sticky; top: 128px; }

.gallery-stage { border-radius: var(--radius); overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); aspect-ratio: 16 / 9; }
.gallery-stage img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.gallery-thumb { flex: none; width: 104px; height: 64px; padding: 0; border-radius: 8px; overflow: hidden; border: 2px solid transparent; background: none; cursor: pointer; opacity: .7; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.is-active, .gallery-thumb:hover { border-color: var(--accent); opacity: 1; }

.download-box { margin-bottom: 18px; }
.download-note { margin: 10px 0 0; font-size: .86rem; color: var(--muted); text-align: center; }
.info-list { margin: 0; }
.info-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.info-list > div:last-child { border-bottom: 0; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; text-align: right; font-weight: 600; }

/* Рейтинг */
.stars { position: relative; display: inline-block; line-height: 0; }
.stars svg { width: 18px; height: 18px; }
.stars-bg { display: inline-flex; color: var(--surface-3); fill: currentColor; }
.stars-fg { position: absolute; left: 0; top: 0; display: inline-flex; overflow: hidden; white-space: nowrap; color: var(--premium); fill: currentColor; }
.stars-bg svg, .stars-fg svg { fill: currentColor; flex: none; }
.rating-summary { display: flex; align-items: center; gap: 10px; }
.rating-value { font-size: 1.6rem; font-weight: 800; }
.rating-count { color: var(--muted); font-size: .88rem; }
.rating-form { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.rating-form.is-busy { opacity: .5; pointer-events: none; }
.rating-label { color: var(--muted); font-size: .88rem; }
.rate-buttons { display: inline-flex; flex-direction: row-reverse; }
.rate-btn { background: none; border: 0; padding: 2px; cursor: pointer; color: var(--surface-3); }
.rate-btn svg { width: 24px; height: 24px; fill: currentColor; }
.rate-btn.is-on { color: var(--premium); }
/* Подсветка при наведении: кнопки идут в обратном порядке, поэтому ~ выделяет звёзды левее курсора. */
.rate-buttons:hover .rate-btn { color: var(--surface-3); }
.rate-buttons .rate-btn:hover, .rate-buttons .rate-btn:hover ~ .rate-btn { color: var(--premium-hover); }
.rating-guest { margin: 8px 0 0; color: var(--muted); font-size: .9rem; }

/* Текст статей и описаний */
.content { overflow-wrap: anywhere; }
.content > *:last-child { margin-bottom: 0; }
.content h2, .content h3 { margin-top: 1.4em; }
.content ul, .content ol { padding-left: 1.3em; }
.content img { border-radius: var(--radius-sm); }
.content blockquote { margin: 1em 0; padding: 10px 16px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.content code { background: var(--surface-2); padding: .1em .35em; border-radius: 4px; font-size: .9em; }
.content pre { background: var(--bg); border: 1px solid var(--border); padding: 14px; border-radius: var(--radius-sm); overflow: auto; }
.content pre code { background: none; padding: 0; }
.content table { width: 100%; border-collapse: collapse; }
.content th, .content td { border: 1px solid var(--border); padding: 8px; text-align: left; }
.article { max-width: 880px; }
.article-cover { margin: 8px 0 20px; border-radius: var(--radius); overflow: hidden; }
.article-content { margin-bottom: 24px; }
.article-rating { margin-top: 24px; padding-top: 8px; border-top: 1px solid var(--border); }
.article .meta-row a[rel~=category] { color: var(--accent-hover); }

/* Комментарии */
.comment-list { list-style: none; margin: 0 0 20px; padding: 0; }
.comment-list .children { list-style: none; margin: 0; padding-left: 40px; }
.comment-body { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.comment-body > img { border-radius: 50%; width: 44px; height: 44px; flex: none; }
.comment-main { min-width: 0; flex: 1; }
.comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.comment-head time { color: var(--muted); font-size: .82rem; }
.comment-text p { margin-bottom: .5em; }
.comment-reply-link { font-size: .85rem; font-weight: 600; }
.comment-respond { margin-top: 10px; }
.comment-reply-title { font-size: 1rem; }
.comment-reply-title small { margin-left: 8px; font-size: .85rem; }
.comment-form textarea {
	width: 100%; padding: 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
	background: var(--bg); resize: vertical; outline: none;
}
.comment-form textarea:focus { border-color: var(--accent); }
.must-log-in { padding: 14px; background: var(--surface-2); border-radius: var(--radius-sm); margin: 0; }

/* Формы, уведомления, вкладки */
.gah-form { display: flex; flex-direction: column; gap: 12px; }
.gah-form label { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; color: var(--muted); }
.gah-form input[type=text], .gah-form input[type=email], .gah-form input[type=password] {
	height: 44px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
	background: var(--bg); color: var(--text); outline: none;
}
.gah-form input:focus { border-color: var(--accent); }
.gah-form .gah-check { flex-direction: row; align-items: flex-start; gap: 8px; }
.gah-form .gah-check input { margin-top: 4px; }
.gah-form-link { text-align: center; font-size: .9rem; }
.notice { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; border: 1px solid; }
.notice-ok { background: var(--free-soft); border-color: rgba(63, 185, 122, .4); }
.notice-info { background: var(--accent-soft); border-color: rgba(71, 140, 191, .4); }
.notice-error { background: rgba(240, 100, 92, .12); border-color: rgba(240, 100, 92, .4); }
.tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.tab { background: none; border: 0; padding: 10px 14px; color: var(--muted); font-weight: 700; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.is-active { color: var(--text); border-bottom-color: var(--accent); }
.auth-page { max-width: 420px; }

.auth-modal {
	width: min(440px, calc(100vw - 32px)); padding: 26px; border-radius: 16px;
	background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.auth-modal::backdrop { background: rgba(5, 8, 12, .7); backdrop-filter: blur(3px); }
.modal-close { position: absolute; right: 14px; top: 14px; width: 34px; height: 34px; }

/* Премиум и профиль */
.premium-lead { font-size: 1.05rem; color: var(--muted); }
.premium-benefits { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.premium-benefits li { padding-left: 26px; position: relative; }
.premium-benefits li::before { content: "✓"; position: absolute; left: 0; color: var(--premium); font-weight: 800; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan { position: relative; padding: 24px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); text-align: center; display: flex; flex-direction: column; }
.plan.is-featured { border-color: var(--premium); background: linear-gradient(180deg, var(--premium-soft), transparent 70%), var(--surface-2); }
.plan h3 { font-size: 1.1rem; }
.plan-price { font-size: 2rem; font-weight: 800; margin: 6px 0; }
.plan-term { color: var(--muted); font-size: .9rem; flex: 1; }
.plan-badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--premium); color: #1d1503; font-size: .75rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.premium-test-note { margin-top: 16px; color: var(--premium); font-size: .9rem; }
.account-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.account-head img { border-radius: 50%; }
.account-head h2 { margin: 0; }
.account-head p { margin: 0; }
.account-premium { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 24px; }
.account-premium.is-active { border-color: var(--premium); background: var(--premium-soft); }
.orders { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: .92rem; }
.orders th, .orders td { padding: 8px; border-bottom: 1px solid var(--border); text-align: left; }
.orders th { color: var(--muted); font-weight: 600; }
.not-found { text-align: center; padding: 80px 20px; }
.not-found h1 { font-size: 5rem; color: var(--accent); }

/* Подвал */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 32px 0; color: var(--muted); font-size: .9rem; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 16px 40px; }
.footer-about p { margin: 10px 0 0; max-width: 420px; }
.footer-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-nav a { color: var(--muted); }
.footer-nav a:hover { color: var(--text); }
.footer-copy { grid-column: 1 / -1; margin: 0; font-size: .82rem; }

/* Адаптив */
@media (max-width: 1180px) {
	.grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
	.layout, .asset-layout { grid-template-columns: minmax(0, 1fr); }
	.sticky { position: static; }
	.hero-inner { grid-template-columns: 1fr; }
	.hero-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.hero-stats > div { min-width: 0; }
}
@media (max-width: 782px) {
	.nav-toggle { display: inline-grid; order: 3; }
	.header-search { display: none; }
	.site-nav { display: none; }
	.nav-open .site-nav, .nav-open .header-search { display: block; }
	.nav-open .header-search { position: absolute; left: 16px; right: 16px; top: 72px; max-width: none; z-index: 2; }
	.nav-open .site-nav { padding-top: 56px; }
	.site-nav .menu { flex-direction: column; }
	.header-actions { margin-left: auto; }
}
@media (max-width: 782px) {
	.admin-bar .site-header { top: 46px; }
	.grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.plans { grid-template-columns: 1fr; }
	.premium-link span, .hide-sm, .user-name { display: none; }
}
@media (max-width: 520px) {
	.container { padding: 0 16px; }
	.grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
	.hero { padding: 32px 0; }
	.hero-stats dd { font-size: 1.2rem; }
	.hero-stats > div { padding: 10px 12px; }
	.hero-search .btn { padding: 0 14px; }
	.brand-name { display: none; }
	.toolbar { flex-direction: column; align-items: stretch; }
	.panel { padding: 16px; }
	.comment-list .children { padding-left: 16px; }
	.footer-inner { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Кнопка скачивания: размер файла отдельной строкой, чтобы длинный текст не ломал кнопку. */
.download-box .btn { flex-wrap: wrap; row-gap: 2px; }
.download-box .btn-sub { flex-basis: 100%; }
.asset-layout + .section { margin-top: 40px; }
