/* ==========================================================================
   Download-CS.uz v3 — Main Stylesheet
   Microsoft-style design system + темы + адаптив
   ========================================================================== */

/* ── Дизайн-токены ─────────────────────────────────────────────────────── */
:root {
    --bg:               #ffffff;
    --bg-elevated:      #fafafa;
    --bg-section:       #f6f6f6;
    --text:             #1b1b1b;
    --text-muted:       #5d5d5d;
    --text-soft:        #8a8a8a;
    --accent:           #0067b8;
    --accent-hover:     #005da6;
    --accent-soft:      rgba(0, 103, 184, 0.08);
    --accent-strong:    rgba(0, 103, 184, 0.16);
    --border:           #e6e6e6;
    --border-strong:    #d1d1d1;
    --card-bg:          #ffffff;
    --shadow-sm:        0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow:           0 1px 2px rgba(0,0,0,.04), 0 4px 12px rgba(0,0,0,.04);
    --shadow-lg:        0 4px 8px rgba(0,0,0,.06), 0 16px 32px rgba(0,0,0,.06);
    --success:          #107c10;
    --warning:          #f59e0b;
    --danger:           #d13438;
    --info:             #0067b8;
    --radius-sm:        2px;
    --radius:           4px;
    --radius-lg:        8px;
    --radius-pill:      999px;
    --transition:       150ms ease;
    --header-h:         60px;
    --container:        1200px;
    --container-narrow: 720px;
    --font-sans:        'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

[data-theme="dark"] {
    --bg:            #1a1a1a;
    --bg-elevated:   #242424;
    --bg-section:    #222222;
    --text:          #ffffff;
    --text-muted:    #b8b8b8;
    --text-soft:     #888888;
    --accent:        #4db8ff;
    --accent-hover:  #3a96d1;
    --accent-soft:   rgba(77, 184, 255, 0.12);
    --accent-strong: rgba(77, 184, 255, 0.22);
    --border:        #333333;
    --border-strong: #444444;
    --card-bg:       #242424;
    --shadow-sm:     0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow:        0 1px 2px rgba(0,0,0,.3), 0 4px 12px rgba(0,0,0,.2);
    --shadow-lg:     0 4px 8px rgba(0,0,0,.4), 0 16px 32px rgba(0,0,0,.3);
}

/* Системная тёмная тема, если пользователь не выбрал */
@media (prefers-color-scheme: dark) {
    [data-theme="auto"] {
        --bg:            #1a1a1a;
        --bg-elevated:   #242424;
        --bg-section:    #222222;
        --text:          #ffffff;
        --text-muted:    #b8b8b8;
        --text-soft:     #888888;
        --accent:        #4db8ff;
        --accent-hover:  #3a96d1;
        --accent-soft:   rgba(77, 184, 255, 0.12);
        --accent-strong: rgba(77, 184, 255, 0.22);
        --border:        #333333;
        --border-strong: #444444;
        --card-bg:       #242424;
        --shadow-sm:     0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow:        0 1px 2px rgba(0,0,0,.3), 0 4px 12px rgba(0,0,0,.2);
        --shadow-lg:     0 4px 8px rgba(0,0,0,.4), 0 16px 32px rgba(0,0,0,.3);
    }
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition), color var(--transition);
	
	position: relative;
	isolation: isolate;
}

body::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 500px;

	background-position: center -120px;
	background-size: cover;
	background-repeat: no-repeat;
	background-image: url("../images/len_92348.jpeg");

    opacity: 0.1;

    pointer-events: none;

    z-index: -1;

    filter: blur(2px);

    -webkit-mask-image: linear-gradient(
        to bottom,
        rgba(0,0,0,1) 0%,
        rgba(0,0,0,0.9) 45%,
        rgba(0,0,0,0.4) 75%,
        rgba(0,0,0,0) 100%
    );

    mask-image: linear-gradient(
        to bottom,
        rgba(0,0,0,1) 0%,
        rgba(0,0,0,0.9) 45%,
        rgba(0,0,0,0.4) 75%,
        rgba(0,0,0,0) 100%
    );
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { text-decoration: underline; }

/* Глобальное правило: иконки (Font Awesome <i>, SVG) внутри ЛЮБЫХ
   элементов с подчёркиванием не должны подчёркиваться. text-decoration
   наследуется на inline-потомков, отменить можно через display:inline-block. */
i, svg, .fa, [class*="fa-solid"], [class*="fa-regular"], [class*="fa-brands"] {
    display: inline-block;
    text-decoration: none;
}
a i, button i, summary i, label i,
a svg, button svg, summary svg, label svg {
    text-decoration: none;
}

button { font-family: inherit; cursor: pointer; }

/* Скрытое для скринридеров, но фокусируется */
.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.focus-visible:focus {
    position: fixed; top: 8px; left: 8px; width: auto; height: auto;
    padding: 8px 14px; background: var(--accent); color: #fff; z-index: 9999;
    border-radius: var(--radius);
}

/* ── Контейнеры ─────────────────────────────────────────────────────────── */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 5%;
    width: 100%;
}
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 5%; }
.center-text { text-align: center; }

/* ── Top progress bar ──────────────────────────────────────────────────── */
.top-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px; width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    z-index: 9999;
    transition: width 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 0 8px rgba(0, 103, 184, 0.5);
    opacity: 0;
}
.top-progress.is-active { opacity: 1; }

/* ── Header ────────────────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
}

/* ── Верхний ряд ────────────────────────────────────────────────────────── */
.header-top {
    border-bottom: 1px solid var(--border);
}
.header-top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 5%;
    max-width: var(--container);
    margin: 0 auto;
    min-height: 56px;
}

.header-utils {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-sep {
    width: 1px;
    height: 18px;
    background: var(--border);
}

/* Логотип */
.logo-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}
.logo-wrap:hover { text-decoration: none; }
.logo-img { width: 28px; height: 28px; object-fit: contain; }
.logo-icon { color: var(--accent); font-size: 1.2rem; }
.logo-main {
    line-height: 1;
    white-space: nowrap;
}
.logo-tld {
    color: var(--accent);
    font-weight: 600;
}

/* ── Нижний ряд: меню слева + Документация справа ──────────────────────── */
.header-main-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-nav {
    display: flex;
    gap: 4px;
    justify-content: flex-start;
    padding: 4px 0;
    flex-wrap: wrap;
}

.site-nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Вертикальный сепаратор между основным меню и блоком Документации */
.header-vsep {
    width: 1px;
    height: 22px;
    background: var(--border);
}

.nav-link {
    padding: 10px 16px;
    color: var(--text-muted);
    font-weight: 500;
    border-radius: var(--radius);
    transition: color var(--transition), background var(--transition);
    font-size: 0.95rem;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
}
.nav-link:hover { color: var(--text); background: var(--accent-soft); text-decoration: none; }
.nav-link.is-active { color: var(--accent); background: var(--accent-soft); }

/* Иконки внутри nav-link — выравнивание baseline с текстом */
.nav-link .nav-link-icon,
.nav-link .nav-link-external {
    font-size: 0.85em;
    line-height: 1;
}
.nav-link-icon { opacity: 0.85; }
.nav-link-external {
    opacity: 0.5;
    font-size: 0.7em !important;
}

/* Документация — особый акцент (как «внешняя» ссылка) */
.nav-link-docs {
    color: var(--text) !important;
}
.nav-link-docs:hover {
    color: var(--accent) !important;
}
.nav-link-docs .nav-link-icon {
    color: var(--accent);
    opacity: 1;
}

/* ── Dropdown-меню в шапке ─────────────────────────────────────────────── */
.nav-dropdown {
    position: relative;
    display: inline-flex;
}

.nav-dropdown-trigger {
    /* display: inline-flex; */
	display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
}
.nav-dropdown-trigger .nav-dropdown-arrow {
    font-size: 9px;
    line-height: 1;
    opacity: .65;
    transition: transform var(--transition);
    margin-top: 1px;
}
.nav-dropdown.is-open .nav-dropdown-trigger {
    color: var(--text);
    background: var(--accent-soft);
}
.nav-dropdown.is-open .nav-dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    min-width: 320px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    z-index: 1000;
}
.nav-dropdown.is-open .nav-dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Правая dropdown — открывается ВЛЕВО от своего края, а не по центру */
.nav-dropdown-right .nav-dropdown-panel {
    left: auto;
    right: 0;
    transform: translateY(-4px);
    min-width: 340px;
}
.nav-dropdown-right.is-open .nav-dropdown-panel {
    transform: translateY(0);
}

/* Элемент в dropdown — flex с иконкой слева, текстом, и внешней стрелкой справа */
.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: background var(--transition);
}
.nav-dropdown-item:hover {
    background: var(--accent-soft);
    text-decoration: none;
}
.nav-dropdown-item.is-active {
    background: var(--accent-soft);
}
.nav-dropdown-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 7px;
    font-size: 13px;
}
.nav-dropdown-item-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.nav-dropdown-item-title {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.3;
    color: var(--text);
}
.nav-dropdown-item-desc {
    font-size: 0.8rem;
    line-height: 1.3;
    color: var(--text-muted);
}
.nav-dropdown-external {
    flex-shrink: 0;
    font-size: 11px !important;
    opacity: 0.45;
    color: var(--text-muted);
    align-self: flex-start;
    margin-top: 4px;
}
.nav-dropdown-item:hover .nav-dropdown-external {
    opacity: 0.8;
    color: var(--accent);
}

.nav-dropdown-sep {
    height: 1px;
    margin: 6px 8px;
    background: var(--border);
}
.nav-dropdown-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    transition: background var(--transition);
}
.nav-dropdown-link:hover {
    background: var(--accent-soft);
    text-decoration: none;
}
.nav-dropdown-link i {
    font-size: 10px;
    opacity: .8;
}

.header-controls { display: flex; align-items: center; gap: 12px; }

.stats-mini {
    display: flex; align-items: center; gap: 12px;
    font-size: 0.85rem; color: var(--text-muted);
}
.stat-item {
    /* display: inline-flex; */
	display: initial;
    align-items: center;
    gap: 5px;
    line-height: 1;
}
.stat-item i {
    color: var(--accent);
    font-size: 0.95em;
    line-height: 1;
}
.stat-item strong {
    color: var(--text);
    font-weight: 600;
    line-height: 1;
}
.stat-sep { width: 1px; height: 16px; background: var(--border); }

/* Общий fix выравнивания FontAwesome иконок внутри шапки —
   FA имеет смещение по baseline, line-height: 1 и flex-aligned контейнеры
   убирают визуальный сдвиг */
.site-header i.fa-solid,
.site-header i.fas {
    line-height: 1;
    vertical-align: -1px;
}
.site-header .header-utils i,
.site-header .nav-link i,
.site-header .stat-item i,
.site-header .lang-btn i,
.site-header button > i {
    vertical-align: 0;  /* в flex-контейнерах смещение не нужно */
}

.lang-switch {
    display: flex;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.lang-btn {
    background: transparent;
    color: var(--text);
    border: none;
    padding: 6px 11px;
    font-weight: 600;
    font-size: 0.8rem;
    transition: background var(--transition), color var(--transition);
}
.lang-btn:hover { background: var(--accent-soft); }
.lang-btn.is-active { background: var(--accent); color: #fff; }

.theme-toggle, .mobile-menu-toggle {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    width: 34px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.theme-toggle:hover, .mobile-menu-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.mobile-menu-toggle { display: none; }

/* ── Main / Hero ───────────────────────────────────────────────────────── */
.main-content { flex: 1; }

.hero {
    padding: 70px 0 60px;
    border-bottom: 1px solid var(--border);
}
.hero-compact { padding: 48px 0 36px; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1;
}
.hero-badge i { font-size: 0.9rem; }
.hero-badge-muted {
    background: var(--bg-section);
    color: var(--text-muted);
}
.hero-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 18px;
    line-height: 1.15;
    max-width: 800px;
}
.hero-title .accent { color: var(--accent); }
.hero-lead {
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    color: var(--text-muted);
    margin-bottom: 36px;
    max-width: 640px;
}

/* ── Кнопки ────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: var(--radius);
    transition: background var(--transition), border-color var(--transition), color var(--transition), opacity var(--transition);
    text-decoration: none;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn:disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn i { flex-shrink: 0; }
.btn span { display: inline-block; }

.btn-lg { padding: 14px 26px; font-size: 1rem; }
.btn-sm { padding: 7px 12px; font-size: 0.85rem; }

.btn-primary {
    background: var(--accent);
    color: #fff !important;
    border-color: var(--accent);
}
.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--text) !important;
    border-color: var(--border-strong);
}

.btn-ghost {
    background: transparent;
    color: var(--text) !important;
    border-color: var(--border-strong);
}
.btn-ghost:hover:not(:disabled) {
    background: var(--accent-soft);
    color: var(--accent) !important;
    border-color: var(--accent);
}
.btn-ghost .btn-trailing {
    font-size: 0.75em;
    opacity: 0.65;
    margin-left: 2px;
}

.hero-cta {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
}
.btn-secondary:hover:not(:disabled) {
    border-color: var(--text);
    background: var(--accent-soft);
}

/* ── Секции ────────────────────────────────────────────────────────────── */
.section { padding: 70px 0; }
.section-alt { background: var(--bg-section); }

.section-header { margin-bottom: 50px; max-width: 800px; }
.section-label {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent);
    margin-bottom: 12px;
}
.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    margin-bottom: 14px;
    line-height: 1.25;
}
.section-lead {
    font-size: 1.05rem;
    color: var(--text-muted);
}

/* ── About: верхний блок (2 фичи + слайдер) ────────────────────────────── */
.about-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 24px;
}
.about-top > * { min-width: 0; }

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.feature-list-top .feature-card { align-items: flex-start; }

.feature-grid-bottom {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.feature-card {
    display: flex;
    gap: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: var(--radius);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}
.feature-card-compact {
    flex-direction: column;
    gap: 12px;
    padding: 18px;
}
.feature-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
.feature-body { flex: 1; }
.feature-body h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    line-height: 1.4;
}
.feature-body p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}
.feature-body a { color: var(--accent); font-weight: 600; }

.feature-tag {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: var(--accent-soft);
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

/* ── Карусель ──────────────────────────────────────────────────────────── */
.carousel-wrap {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--card-bg);
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 10;
    min-width: 0;
    width: 100%;
}
.carousel-inner { position: relative; width: 100%; height: 100%; }
.carousel-slide {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}
.carousel-slide[hidden] { display: none; }

.carousel-controls {
    position: absolute;
    bottom: 12px; left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(6px);
    padding: 6px 10px;
    border-radius: var(--radius-pill);
}
.carousel-arrow {
    background: transparent;
    color: #fff;
    border: none;
    width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: background var(--transition);
    font-size: 0.85rem;
}
.carousel-arrow:hover { background: rgba(255,255,255,.2); }

.carousel-dots { display: flex; gap: 6px; }
.carousel-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.4);
    transition: background var(--transition);
}
.carousel-dot.is-active, .carousel-dot.active { background: #fff; }

/* ── Карточки сборок ───────────────────────────────────────────────────── */
.builds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 28px;
}
.build-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), box-shadow var(--transition);
}
.build-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.build-card-top {
    height: 4px;
    background: var(--accent);
}
.build-card-media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-elevated);
}
.build-media-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}
.build-media-img[hidden] { display: none; }
.build-media-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: var(--border-strong); font-size: 2.5rem;
}
.build-media-fade {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(0,0,0,.4), transparent);
    pointer-events: none;
}
.build-card-media .carousel-arrow {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(6px);
    width: 32px; height: 32px;
    z-index: 2;
    opacity: 0;
    transition: opacity var(--transition), background var(--transition);
}
.build-card:hover .build-card-media .carousel-arrow { opacity: 1; }
.build-card-media .carousel-arrow.prev { left: 10px; }
.build-card-media .carousel-arrow.next { right: 10px; }

.build-card-body {
    padding: 22px 24px 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.build-name { font-size: 1.3rem; font-weight: 600; margin-bottom: 12px; }

/* Версии-табы */
.b-versions {
    display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px;
}
.v-tag {
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid transparent;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 11px;
    border-radius: var(--radius-pill);
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.2;
}
.v-tag:hover { border-color: var(--accent); }
.v-tag.is-active, .v-tag.active {
    background: var(--accent);
    color: #fff;
}
.v-tag-new {
    background: var(--warning);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: var(--radius-pill);
    letter-spacing: 0.5px;
}
.v-tag-beta {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
    font-size: 0.65rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: var(--radius-pill);
    letter-spacing: 0.5px;
}
.v-tag.is-active .v-tag-new,
.v-tag.is-active .v-tag-beta { background: rgba(255,255,255,.25); color: #fff; }

.build-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 18px;
    flex-grow: 1;
    line-height: 1.6;
}
.build-desc strong { color: var(--text); }
.build-desc a { color: var(--accent); }

.build-stats {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 10px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.build-stat { display: inline-flex; align-items: center; gap: 5px; }
.build-stat i { color: var(--accent); }
.build-stat strong { color: var(--text); }
.build-stat[hidden] { display: none !important; }

.build-actions {
    display: flex; gap: 10px; flex-wrap: wrap;
}
.build-actions .btn {
    flex: 1;
    min-width: 130px;
    padding: 11px 14px;
    font-size: 0.9rem;
}

/* ── Партнёры ──────────────────────────────────────────────────────────── */
.partners {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    padding: 30px 0 0;
    margin-top: 40px;
    border-top: 1px solid var(--border);
}
.partner-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1;
    padding: 6px 4px;
}
.partner-link i { color: var(--accent); font-size: 1rem; }
.partner-link:hover { color: var(--accent); }
.partner-link span { display: inline-block; }

/* ── Footer ────────────────────────────────────────────────────────────── */
.site-footer {
    background: var(--bg-section);
    border-top: 1px solid var(--border);
    padding: 22px 5%;
    margin-top: auto;
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0;
}
.footer-text { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }
.footer-text a { color: var(--text-muted); }
.footer-text a:hover { color: var(--accent); }
.footer-counters {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.85;
    flex-wrap: wrap;
}
.counter-link,
.counter-tasix {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    transition: opacity var(--transition);
}
.counter-link:hover,
.counter-tasix:hover { opacity: 1; }

/* LiveInternet — 88×15 пиксельный бейдж */
.counter-link img {
    display: block;
    width: 88px; height: 15px;
    border: 1px solid var(--border);
    background: var(--card-bg);
}

/* Tas-IX через myip.uz/badge.js — НЕ трогаем его внутреннюю верстку,
   только убираем подчёркивание и выравниваем по середине */
.counter-tasix > * {
    vertical-align: middle;
}
.counter-tasix a { text-decoration: none; }

/* ── Серверы (страница) ────────────────────────────────────────────────── */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
    padding: 18px 22px;
    background: var(--bg-section);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 30px;
}
.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.filter-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--card-bg);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition);
    line-height: 1;
}
.filter-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}
.filter-chip.is-active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.filter-chip.is-active:hover { color: #fff; }

.servers-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    align-items: stretch;
}
@media (max-width: 768px) {
    .servers-grid { grid-template-columns: 1fr; }
}
.server-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), box-shadow var(--transition);
    overflow: hidden;
    /* В сетке все карточки растягиваются на одинаковую высоту */
    height: 100%;
}
.server-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* Скриншот сверху */
.server-card-shot {
    aspect-ratio: 16 / 9;
    background: var(--bg-section);
    overflow: hidden;
    cursor: zoom-in;
    flex-shrink: 0;
}
.server-card-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.server-card:hover .server-card-shot img { transform: scale(1.05); }

/* Тело карточки — flex column, дно прибито к низу */
.server-card-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.server-card-head {
    display: flex; gap: 8px; flex-wrap: wrap;
    align-items: center;
}
.server-os-badge, .server-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    line-height: 1.4;
}
.server-os-windows { background: rgba(0, 120, 215, 0.12); color: #0078d7; }
.server-os-linux   { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.server-type-clean  { background: rgba(16, 124, 16, 0.12); color: var(--success); }
.server-type-modded { background: var(--accent-soft); color: var(--accent); }

.server-version-pill,
.server-engine-pill {
    display: inline-block;
    background: var(--bg-section);
    color: var(--text-muted);
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.server-title { font-size: 1.15rem; font-weight: 600; line-height: 1.3; }

.server-desc {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}
.server-desc p:not(:last-child) { margin-bottom: 0.6em; }

.server-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.server-tag {
    background: var(--bg-section);
    color: var(--text-muted);
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Дно — прибито к низу через margin-top:auto */
.server-card-foot {
    margin-top: auto;
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Минимальные требования — компактная плашка */
.server-req {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    background: var(--bg-section);
    border-left: 3px solid var(--accent);
    padding: 8px 12px;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--text);
}
.server-req i {
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 2px;
}

.server-stats {
    display: flex; gap: 16px; flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--text-muted);
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.server-stats i { color: var(--accent); }
.server-stats strong { color: var(--text); font-weight: 600; }

.server-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.server-actions .btn { flex: 1; min-width: 120px; padding: 10px 14px; font-size: 0.9rem; }

/* Кнопка инструкции — текстовая, не громоздкая */
.server-guide-btn {
    background: transparent;
    border: 0;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    text-align: left;
    transition: color var(--transition);
    align-self: flex-start;
    font-family: inherit;
}
.server-guide-btn:hover { text-decoration: underline; }
.server-guide-btn i { font-size: 1rem; display: inline-block; text-decoration: none; }

/* Содержимое инструкции — отображается только в модалке */
.server-guide-body {
    color: var(--text);
    font-size: 0.96rem;
    line-height: 1.7;
}
.server-guide-body > *:first-child { margin-top: 0; }
.server-guide-body > *:last-child { margin-bottom: 0; }

.server-guide-body h1,
.server-guide-body h2,
.server-guide-body h3 {
    color: var(--text);
    font-weight: 600;
    line-height: 1.3;
    margin: 1.2em 0 0.5em;
}
.server-guide-body h1 { font-size: 1.3rem; }
.server-guide-body h2 { font-size: 1.15rem; }
.server-guide-body h3 { font-size: 1.05rem; }

.server-guide-body p { 
    margin: 0 0 0.9em;
    overflow-wrap: anywhere;
    word-break: normal;
}

.server-guide-body ol,
.server-guide-body ul {
    margin: 0.6em 0 1em 0;
    padding-left: 1.5em;
}
.server-guide-body li { margin-bottom: 0.5em; }
.server-guide-body li::marker { color: var(--accent); font-weight: 600; }

.server-guide-body a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.server-guide-body a:hover { text-decoration-thickness: 2px; }

.server-guide-body strong { color: var(--text); font-weight: 600; }
.server-guide-body em { color: var(--text-muted); }

.server-guide-body code {
    background: var(--bg-section);
    color: var(--accent);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.88em;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    border: 1px solid var(--border);
}
.server-guide-body pre {
    background: var(--bg-section);
    border: 1px solid var(--border);
    padding: 14px 16px;
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: 0.88em;
    line-height: 1.55;
    margin: 1em 0;
}
.server-guide-body pre code {
    background: transparent;
    padding: 0;
    border: 0;
    color: var(--text);
}

.server-guide-body blockquote {
    border-left: 3px solid var(--accent);
    padding: 4px 14px;
    background: var(--bg-section);
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 1em 0;
    color: var(--text-muted);
    font-style: italic;
}
.server-guide-body blockquote p { margin: 0.4em 0; }

.server-guide-body hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 1.5em 0;
}

.server-guide-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 1em 0;
    border: 1px solid var(--border);
}

/* ── Empty state ───────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state i { font-size: 3rem; color: var(--border-strong); margin-bottom: 16px; display: block; }
.empty-state p { margin-bottom: 20px; font-size: 1.05rem; }

/* ── Changelog ─────────────────────────────────────────────────────────── */
.changelog-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 900px;
    margin: 0 auto;
}
.changelog-entry {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 22px 26px;
    transition: box-shadow var(--transition);
}
.changelog-entry:hover { box-shadow: var(--shadow); }
.changelog-entry.is-hidden { display: none; }
.changelog-entry.is-revealed {
    display: block;
    animation: fadeUpIn 0.4s ease both;
}
@keyframes fadeUpIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.changelog-head {
    display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
    margin-bottom: 14px; padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.changelog-version {
    font-size: 1.15rem; font-weight: 700;
    color: var(--accent);
    font-family: 'Inter', monospace;
    letter-spacing: 0.5px;
    display: inline-flex; align-items: center; gap: 8px;
}
.changelog-beta {
    background: var(--warning);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    letter-spacing: 0.5px;
}
.changelog-date { font-size: 0.85rem; color: var(--text-muted); }
.changelog-items { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.changelog-items li {
    position: relative;
    /*padding-left: 22px;*/
    font-size: 0.92rem;
    line-height: 1.55;
}
/*
.changelog-items li::before {
    content: '';
    position: absolute;
    left: 0; top: 9px;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.7;
}*/
.changelog-toggle-wrap {
    display: flex; justify-content: center; margin-top: 28px;
}
#changelogToggleIcon { transition: transform 0.3s ease; }

added, fixed, deleted {
	display: block;
	margin: 10px 0;
	text-align: justify;
}

added:before, fixed:before, deleted:before {
	color: #FFF;
	font-weight: 500;
	border-radius: 10px;
	margin-right: 12px;
	padding: 2px 0;
	line-height: 1.5;

	background: var(--bg);
	box-shadow: 6px 0 0 var(--bg), 
				-6px 0 0 var(--bg);
}

added:before {
	content: "new";
	--bg: #00c98826;
    color: #16c316;
}

fixed:before {
	content: "fix";
    --bg: #e3a80026;
    color: #d17512;
}

/* ── Опросник удаления ─────────────────────────────────────────────────── */
.survey-form { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.hp-field { position: absolute; left: -9999px; top: -9999px; height: 0; width: 0; overflow: hidden; }

.survey-reasons { border: 0; padding: 0; margin-bottom: 24px; }
.survey-reasons legend {
    font-size: 1.05rem; font-weight: 600;
    margin-bottom: 16px;
    display: block;
}
.reason-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.reason-tile { cursor: pointer; }
.reason-tile input { position: absolute; opacity: 0; pointer-events: none; }
.reason-tile-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 14px;
    background: var(--bg-section);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    transition: all var(--transition);
    height: 100%;
}
.reason-tile-inner:hover { border-color: var(--accent); }
.reason-tile input:checked + .reason-tile-inner {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.reason-tile input:focus-visible + .reason-tile-inner {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.reason-icon {
    width: 44px; height: 44px;
    background: var(--card-bg);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--accent);
    font-size: 1.2rem;
}
.reason-text { font-size: 0.9rem; color: var(--text); }

.form-row { margin-bottom: 20px; }
.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}
.form-textarea, .form-input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-textarea:focus, .form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 6px; }
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* ── Спасибо-страница ──────────────────────────────────────────────────── */
.section-thanks { padding: 80px 0; }
.thanks-icon {
    width: 80px; height: 80px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: rgba(16, 124, 16, 0.12);
    color: var(--success);
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem;
}
.thanks-title { font-size: 2.2rem; font-weight: 700; margin-bottom: 14px; }
.thanks-lead { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 32px; }
.thanks-actions {
    display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
    margin-bottom: 24px;
}
.thanks-hint { color: var(--text-soft); font-size: 0.85rem; font-style: italic; }

/* ── Лайтбокс ──────────────────────────────────────────────────────────── */
.lightbox {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.92);
    z-index: 1000;
    justify-content: center; align-items: center;
    padding: 5vh 5vw;
    cursor: zoom-out;
}
.lightbox.is-open, .lightbox.show { display: flex; animation: fadeIn 0.25s ease; }
.lightbox img {
    max-width: 100%; max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.lightbox-close {
    position: absolute;
    top: 20px; right: 28px;
    color: #fff;
    font-size: 2.5rem; line-height: 1;
    background: transparent; border: 0;
    z-index: 1001;
}
.lightbox-close:hover { color: var(--accent); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Тосты ─────────────────────────────────────────────────────────────── */
.toasts {
    position: fixed;
    top: 80px; right: 16px;
    z-index: 1100;
    display: flex; flex-direction: column; gap: 10px;
    max-width: calc(100vw - 32px);
    pointer-events: none;
}
.toast {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-left: 3px solid var(--info);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 280px;
    max-width: 380px;
    font-size: 0.9rem;
    animation: toastIn 0.3s ease;
}
.toast-success { border-left-color: var(--success); }
.toast-error   { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }
.toast i { font-size: 1.05rem; color: var(--info); }
.toast-success i { color: var(--success); }
.toast-error i   { color: var(--danger); }
.toast-warning i { color: var(--warning); }
.toast span { flex: 1; }
.toast-close {
    background: transparent; border: 0;
    color: var(--text-muted);
    font-size: 1.2rem; line-height: 1;
    padding: 0 4px;
}
.toast.is-leaving { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn  { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); }   to { opacity: 0; transform: translateX(20px); } }

/* ── Modal ─────────────────────────────────────────────────────────────── */
.modal {
    display: none;
    position: fixed; inset: 0;
    z-index: 1200;
    align-items: center; justify-content: center;
    padding: 20px;
}
.modal.is-open {
    display: flex;
    animation: modalFadeIn .25s ease-out;
}
.modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
    animation: modalBackdropIn .25s ease-out;
}
.modal-dialog {
    position: relative;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 60px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.05);
    width: 100%;
    max-width: 480px;
    max-height: 88vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalDialogIn .3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-dialog-lg { max-width: 760px; }

@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalBackdropIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalDialogIn {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, var(--bg-section) 0%, var(--card-bg) 100%);
    flex-shrink: 0;
}
.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    line-height: 1.3;
}
.modal-close {
    background: transparent;
    border: 0;
    width: 36px; height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    transition: background var(--transition), color var(--transition), transform .15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.modal-close:hover {
    background: var(--bg-section);
    color: var(--text);
    transform: rotate(90deg);
}
.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}
.modal-body::-webkit-scrollbar { width: 8px; }
.modal-body::-webkit-scrollbar-track { background: transparent; }
.modal-body::-webkit-scrollbar-thumb { background: var(--border-strong, var(--border)); border-radius: 4px; }
.modal-body::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Заголовок модалки инструкции */
.guide-modal-header { padding: 22px 24px 18px; }
.guide-modal-title {
    display: flex;
    gap: 14px;
    align-items: center;
    flex: 1;
    min-width: 0;
}
.guide-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    background: var(--accent-soft, var(--bg-section));
    color: var(--accent);
    border-radius: 10px;
    flex-shrink: 0;
    font-size: 1.15rem;
}
.guide-modal-eyebrow {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 2px;
}
.guide-modal-title h3 {
    font-size: 1.2rem;
    line-height: 1.25;
    margin: 0;
    color: var(--text);
    word-break: break-word;
}

@media (max-width: 640px) {
    .modal { padding: 12px; }
    .modal-dialog { max-height: 92vh; }
    .modal-header { padding: 14px 18px; }
    .modal-body { padding: 18px; }
    .modal-header h3 { font-size: 1.05rem; }
}

/* ── Cookie consent ────────────────────────────────────────────────────── */
.cookie-consent {
    position: fixed;
    bottom: 16px; left: 16px; right: 16px;
    z-index: 900;
    max-width: 720px;
    margin: 0 auto;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: cookieIn 0.4s ease;
}
.cookie-consent[hidden] { display: none; }
.cookie-consent-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    flex-wrap: wrap;
}
.cookie-consent-inner i { color: var(--accent); font-size: 1.2rem; flex-shrink: 0; }
.cookie-consent-inner span { flex: 1; font-size: 0.9rem; color: var(--text-muted); min-width: 200px; }
@keyframes cookieIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ── Skeleton loaders ──────────────────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg,
        var(--bg-section) 0%,
        var(--border) 50%,
        var(--bg-section) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius);
}
.skeleton-line { height: 14px; margin-bottom: 10px; }
.skeleton-line:last-child { margin-bottom: 0; }
.skeleton-line.short { width: 60%; }
.skeleton-img { width: 100%; aspect-ratio: 16 / 9; }
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Страницы ошибок ───────────────────────────────────────────────────── */
.error-body {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.error-page {
    text-align: center;
    max-width: 520px;
    padding: 40px 20px;
}
.error-icon {
    width: 96px; height: 96px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 2.8rem;
}
.error-icon-warning { background: rgba(245, 158, 11, 0.12); color: var(--warning); }
.error-icon-danger  { background: rgba(209, 52, 56, 0.12);  color: var(--danger); }

.error-code {
    font-size: 4.5rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 12px;
    letter-spacing: -2px;
}
.error-title { font-size: 1.6rem; font-weight: 600; margin-bottom: 14px; }
.error-text { color: var(--text-muted); margin-bottom: 12px; line-height: 1.65; }
.error-hint { color: var(--text-soft); font-size: 0.9rem; margin-bottom: 24px; }
.error-actions {
    display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}

/* ── Адаптив ───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .stats-mini { display: none; }
}

@media (max-width: 980px) {
    .about-top { grid-template-columns: 1fr; gap: 24px; }
    .feature-list-top { flex-direction: row; gap: 16px; }
    .feature-list-top .feature-card { flex: 1; }
}

@media (max-width: 768px) {
    .hero { padding: 50px 0 40px; }
    .section { padding: 50px 0; }

    /* Верхний ряд — компактнее */
    .header-top-inner { padding: 10px 5%; gap: 8px; min-height: 52px; }
    .header-utils { gap: 6px; }
    .header-sep { display: none; }
    .logo-tld { display: none; }  /* экономим место — оставляем DOWNLOAD-CS */

    /* Нижний ряд — скрыт, превращается в выезжающее меню */
    .header-main { display: none; }
    .header-main.is-open {
        display: block;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: var(--bg);
        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
    }
    .header-main.is-open .header-main-inner {
        flex-direction: column;
        align-items: stretch;
        padding: 8px;
        gap: 4px;
    }
    .header-main.is-open .site-nav {
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        gap: 2px;
    }
    .header-main.is-open .site-nav-right {
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
    }
    .header-vsep {
        display: none;  /* на мобильном — отделяем горизонтальной чертой через padding-top */
    }
    .header-main.is-open .site-nav-right {
        border-top: 1px solid var(--border);
        margin-top: 4px;
        padding-top: 6px;
    }
    .nav-link { padding: 10px 14px; }

    /* Dropdown в мобильном — inline-список */
    .nav-dropdown { display: block; width: 100%; }
    .nav-dropdown-trigger {
        width: 100%;
        justify-content: space-between;
        padding: 10px 14px;
        text-align: left;
    }
    .nav-dropdown-panel,
    .nav-dropdown-right .nav-dropdown-panel {
        position: static;
        transform: none;
        left: auto;
        right: auto;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 2px 0 4px 28px;
        min-width: 0;
        display: none;
    }
    .nav-dropdown.is-open .nav-dropdown-panel {
        display: block;
        transform: none;
    }
    .nav-dropdown-item { padding: 8px 12px; }
    .nav-dropdown-item-desc { display: none; }
    .nav-dropdown-link { padding: 8px 12px; }

    .mobile-menu-toggle { display: inline-flex; }
    .footer-inner { flex-direction: column; text-align: center; }
    .build-actions .btn,
    .server-actions .btn { width: 100%; min-width: 0; }
    .feature-list-top { flex-direction: column; }
    .toasts { top: auto; bottom: 16px; left: 16px; right: 16px; }
    .toast { min-width: 0; max-width: none; }
}

@media (max-width: 480px) {
    .header-top-inner { gap: 4px; }
    .lang-switch .lang-btn { padding: 5px 8px; }
    .build-card-body { padding: 18px; }
    .reason-grid { grid-template-columns: 1fr 1fr; }
}
