/* ==========================================================================
   cs_download — «Скачать CS 1.6»: каталог и страницы сборок (шаблон SLIM)
   Палитра шаблона (акцент rgb(251, 71, 75)) + золотой акцент CS
   ========================================================================== */

:root {
    --csd-primary: rgb(251, 71, 75);
    --csd-gold: #ffb547;
    --csd-gold-2: #ffd27a;
    --csd-card: rgb(36, 39, 49);
    --csd-card-2: rgb(44, 48, 60);
    --csd-text: rgb(165, 169, 180);
    --csd-dim: rgba(165, 169, 180, 0.6);
    --csd-bright: #ffffff;
    --csd-line: rgba(255, 255, 255, 0.06);
}

.csd-hidden {
    display: none !important;
}

.csd-page {
    position: relative;
    padding: 18px 22px 22px;
    border-radius: 16px;
    background: rgba(24, 26, 33, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    color: var(--csd-text);
}

.csd-page::before {
    content: "";
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--csd-gold), var(--csd-primary), transparent);
}

.csd-muted {
    color: var(--csd-dim);
    font-size: 0.875rem;
}

/* Хлебные крошки */
.csd-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-bottom: 16px;
    font-size: 0.8125rem;
    color: var(--csd-dim);
}

.csd-crumbs a {
    color: var(--csd-text);
    text-decoration: none;
}

.csd-crumbs a:hover {
    color: var(--csd-gold);
}

.csd-crumbs i {
    font-size: 0.625rem;
    opacity: 0.6;
}

.csd-crumbs span {
    color: var(--csd-bright);
}

.csd-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--csd-gold);
}

.csd-section {
    margin-top: 30px;
}

.csd-h2 {
    margin: 0 0 16px;
    font-size: 1.375rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--csd-bright);
}

/* ------------------------------ Главный экран ---------------------------- */

.csd-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: center;
    gap: 30px;
    padding: 32px;
    overflow: hidden;
    border-radius: 18px;
    background:
        radial-gradient(90% 120% at 0% 0%, rgba(255, 181, 71, 0.14), transparent 55%),
        radial-gradient(80% 120% at 100% 100%, rgba(251, 71, 75, 0.12), transparent 55%),
        linear-gradient(135deg, rgb(33, 36, 46), rgb(25, 27, 34));
    border: 1px solid rgba(255, 181, 71, 0.18);
}

/* Прицел-водяной знак */
.csd-hero::after {
    content: "\f05b";
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    left: -60px;
    bottom: -90px;
    font-size: 16rem;
    line-height: 1;
    color: rgba(255, 181, 71, 0.04);
    pointer-events: none;
}

.csd-hero > * {
    position: relative;
    z-index: 1;
}

.csd-hero__title {
    margin: 10px 0 12px;
    font-size: 2.75rem;
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--csd-bright);
}

.csd-hero__intro {
    max-width: 520px;
    margin: 0 0 18px;
    font-size: 1rem;
    line-height: 1.65;
}

.csd-hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.csd-hero__stats span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.8125rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--csd-line);
}

.csd-hero__stats b {
    color: var(--csd-bright);
}

.csd-hero__stats i {
    color: #3ad16b;
}

.csd-hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.csd-hero__more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--csd-dim);
    text-decoration: none;
}

.csd-hero__more:hover {
    color: var(--csd-gold);
}

.csd-hero__art {
    position: relative;
    display: block;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid rgba(255, 181, 71, 0.45);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45), 0 0 0 6px rgba(255, 181, 71, 0.06);
    transform: perspective(900px) rotateY(-6deg);
    transition: transform 0.4s ease;
}

.csd-hero__art:hover {
    transform: perspective(900px) rotateY(0deg) translateY(-3px);
}

.csd-hero__art img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.csd-hero__badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--csd-bright);
    background: rgba(15, 16, 21, 0.8);
    backdrop-filter: blur(4px);
}

.csd-hero__badge i {
    color: var(--csd-gold);
}

/* ------------------------------ Кнопки скачивания ------------------------ */

.csd-dl {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 8px 20px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--csd-bright);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.csd-dl:hover {
    color: var(--csd-bright);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.09);
}

.csd-dl i {
    font-size: 1.125rem;
}

.csd-dl span {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.csd-dl b {
    font-size: 0.9375rem;
}

.csd-dl small {
    font-size: 0.75rem;
    color: inherit;
    opacity: 0.75;
}

/* Шаблон красит <small> светлым — на золотой кнопке текст должен быть тёмным */
.csd-dl--main small {
    color: rgba(27, 29, 36, 0.75);
    opacity: 1;
}

.csd-dl--main {
    color: #1b1d24;
    background: linear-gradient(135deg, var(--csd-gold-2), var(--csd-gold));
    border-color: transparent;
    box-shadow: 0 12px 28px rgba(255, 181, 71, 0.3);
}

.csd-dl--main:hover {
    color: #1b1d24;
    background: linear-gradient(135deg, #ffe0a0, var(--csd-gold-2));
    box-shadow: 0 16px 34px rgba(255, 181, 71, 0.45);
}

/* ---------------------------------- Карточки ----------------------------- */

.csd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
    gap: 16px;
}

.csd-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 14px;
    background: var(--csd-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.csd-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 181, 71, 0.4);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35);
}

.csd-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #15171d;
}

.csd-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.csd-card:hover .csd-card__media img {
    transform: scale(1.05);
}

.csd-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #1b1d24;
    background: var(--csd-gold);
}

.csd-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
    padding: 14px 16px 16px;
}

.csd-card__title {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 800;
}

.csd-card__title a {
    color: var(--csd-bright);
    text-decoration: none;
}

.csd-card__title a:hover {
    color: var(--csd-gold);
}

.csd-card__tagline {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.csd-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.csd-chips span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 0.6875rem;
    color: var(--csd-text);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--csd-line);
}

.csd-chips--lg span {
    padding: 5px 11px;
    font-size: 0.8125rem;
}

.csd-chips--lg i {
    color: var(--csd-gold);
}

.csd-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 8px;
}

.csd-card__count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--csd-dim);
}

.csd-card__go {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--csd-gold);
    text-decoration: none;
}

.csd-card__go:hover {
    color: var(--csd-bright);
}

/* --------------------------------- Сравнение ----------------------------- */

.csd-compare {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--csd-line);
}

.csd-compare table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.csd-compare th,
.csd-compare td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--csd-line);
}

.csd-compare thead th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--csd-dim);
    background: rgba(255, 255, 255, 0.03);
}

.csd-compare tbody tr:last-child th,
.csd-compare tbody tr:last-child td {
    border-bottom: 0;
}

.csd-compare tbody th a {
    color: var(--csd-bright);
    text-decoration: none;
    font-weight: 700;
}

.csd-compare tbody th a:hover {
    color: var(--csd-gold);
}

/* ----------------------------- Блоки в две колонки ----------------------- */

.csd-duo {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 30px;
}

.csd-box {
    padding: 22px;
    border-radius: 14px;
    background: var(--csd-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.csd-steps {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.csd-steps li {
    display: flex;
    gap: 12px;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.csd-steps li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.8125rem;
    color: #1b1d24;
    background: var(--csd-gold);
}

.csd-server {
    background:
        radial-gradient(100% 120% at 100% 0%, rgba(251, 71, 75, 0.14), transparent 55%),
        var(--csd-card);
}

.csd-server .csd-h2 {
    margin-top: 8px;
}

.csd-server p {
    margin: -6px 0 14px;
    font-size: 0.875rem;
}

.csd-server__ip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.csd-server__ip code {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9375rem;
    color: var(--csd-bright);
    background: rgba(0, 0, 0, 0.3);
}

.csd-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8125rem;
    color: var(--csd-text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.csd-copy:hover {
    color: var(--csd-bright);
}

.csd-copy.is-done {
    color: #3ad16b;
}

/* ------------------------------ Вопросы и статья ------------------------- */

.csd-faq {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.csd-faq__item {
    border-radius: 12px;
    background: var(--csd-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.csd-faq__item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    font-weight: 700;
    color: var(--csd-bright);
    cursor: pointer;
    list-style: none;
}

.csd-faq__item summary::-webkit-details-marker {
    display: none;
}

.csd-faq__item summary i {
    flex: 0 0 auto;
    color: var(--csd-gold);
    transition: transform 0.2s ease;
}

.csd-faq__item[open] summary i {
    transform: rotate(45deg);
}

.csd-faq__item p {
    margin: 0;
    padding: 0 18px 16px;
    line-height: 1.6;
}

.csd-article {
    max-width: 860px;
}

.csd-article h2,
.csd-article h3 {
    margin: 22px 0 10px;
    font-weight: 800;
    color: var(--csd-bright);
}

.csd-article h2 {
    font-size: 1.25rem;
}

.csd-article h3 {
    font-size: 1.0625rem;
}

.csd-article p,
.csd-article li {
    font-size: 0.9375rem;
    line-height: 1.75;
}

.csd-article p {
    margin: 0 0 12px;
}

.csd-article ul {
    margin: 0 0 12px;
    padding-left: 20px;
}

.csd-article b {
    color: var(--csd-bright);
}

.csd-steam a {
    color: var(--csd-gold);
}

/* ------------------------------ Страница сборки -------------------------- */

.csd-build {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.csd-gallery__main {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(255, 181, 71, 0.25);
    background: #15171d;
}

.csd-gallery__main img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    cursor: zoom-in;
}

.csd-zoom {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    color: #fff;
    background: rgba(15, 16, 21, 0.75);
    border: 0;
    cursor: pointer;
}

.csd-gallery__thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.csd-thumb {
    flex: 0 0 auto;
    width: 110px;
    padding: 0;
    overflow: hidden;
    border-radius: 8px;
    border: 2px solid transparent;
    background: none;
    cursor: pointer;
    opacity: 0.65;
    transition: opacity 0.18s ease, border-color 0.18s ease;
}

.csd-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.csd-thumb:hover,
.csd-thumb.is-active {
    opacity: 1;
    border-color: var(--csd-gold);
}

.csd-panel {
    position: sticky;
    top: 90px;
    padding: 24px;
    border-radius: 16px;
    background:
        radial-gradient(100% 100% at 100% 0%, rgba(255, 181, 71, 0.12), transparent 55%),
        var(--csd-card);
    border: 1px solid rgba(255, 181, 71, 0.18);
}

.csd-panel__title {
    margin: 0 0 8px;
    font-size: 1.875rem;
    line-height: 1.15;
    font-weight: 900;
    color: var(--csd-bright);
}

.csd-panel__tagline {
    margin: 0 0 14px;
    font-size: 0.9375rem;
    line-height: 1.55;
}

.csd-panel__buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 18px 0 14px;
}

.csd-panel__buttons .csd-dl {
    justify-content: flex-start;
}

.csd-panel__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: 0.75rem;
    color: var(--csd-dim);
}

.csd-panel__stats i {
    margin-right: 5px;
}

.csd-panel__server {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--csd-line);
    font-size: 0.8125rem;
}

.csd-panel__server span i {
    margin-right: 6px;
    color: var(--csd-gold);
}

.csd-panel__server code {
    color: var(--csd-bright);
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    border-radius: 6px;
}

.csd-panel__server .csd-copy {
    padding: 5px 9px;
}

.csd-specs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.csd-spec {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--csd-line);
}

.csd-spec span {
    font-size: 0.75rem;
    color: var(--csd-dim);
}

.csd-spec b {
    font-size: 0.875rem;
    color: var(--csd-bright);
}

.csd-features {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.csd-features li {
    display: flex;
    gap: 10px;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.csd-features i {
    margin-top: 4px;
    color: #3ad16b;
}

/* Лайтбокс */
.csd-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 70px;
    background: rgba(8, 9, 12, 0.92);
}

.csd-lightbox[hidden] {
    display: none;
}

.csd-lightbox img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

.csd-lightbox button {
    position: absolute;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 0;
    font-size: 1.125rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.csd-lightbox__close { top: 16px; right: 16px; }
.csd-lightbox__nav--prev { left: 14px; top: 50%; transform: translateY(-50%); }
.csd-lightbox__nav--next { right: 14px; top: 50%; transform: translateY(-50%); }

/* Уведомление о начале скачивания */
.csd-toast {
    position: fixed;
    z-index: 2100;
    right: 20px;
    bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 340px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 0.875rem;
    color: #fff;
    background: rgb(30, 33, 42);
    border: 1px solid rgba(255, 181, 71, 0.45);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
    animation: csd-in 0.3s ease;
}

.csd-toast i {
    color: var(--csd-gold);
}

@keyframes csd-in {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: none; opacity: 1; }
}

/* ---------------------------------- Адаптив ------------------------------ */

@media (max-width: 991.98px) {
    .csd-hero,
    .csd-build {
        grid-template-columns: 1fr;
    }

    .csd-hero__art {
        transform: none;
        order: -1;
    }

    .csd-panel {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .csd-duo {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .csd-page {
        padding: 14px 12px 16px;
        border-radius: 12px;
    }

    .csd-hero {
        padding: 18px 16px;
        gap: 18px;
    }

    .csd-hero__title {
        font-size: 2rem;
    }

    .csd-hero__intro {
        font-size: 0.9375rem;
    }

    .csd-hero__cta .csd-dl,
    .csd-panel__buttons .csd-dl {
        flex: 1 1 100%;
        justify-content: center;
    }

    .csd-h2 {
        font-size: 1.1875rem;
    }

    .csd-box {
        padding: 16px;
    }

    .csd-panel {
        padding: 18px 16px;
    }

    .csd-panel__title {
        font-size: 1.5rem;
    }

    .csd-specs {
        grid-template-columns: 1fr;
    }

    .csd-server__ip {
        flex-wrap: wrap;
    }

    .csd-server .csd-dl {
        width: 100%;
        justify-content: center;
    }

    .csd-lightbox {
        padding: 60px 10px;
    }

    .csd-lightbox__nav--prev,
    .csd-lightbox__nav--next {
        top: auto;
        bottom: 14px;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .csd-hero__art,
    .csd-card,
    .csd-card__media img,
    .csd-dl {
        transition: none;
    }
}
