/* ===== ИЗОЛИРОВАННЫЕ СТИЛИ ТОЛЬКО ДЛЯ ЭТОГО БЛОКА ===== */

/* Контейнер карточки */
.cs-card {
    max-width: 1500px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    padding: 40px 50px 50px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

/* Заголовок */
.cs-title {
    font-size: 42px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 8px;
    position: relative;
    display: inline-block;
}
.cs-title span { font-size: 28px; font-weight: 400; color: #555; margin-left: 12px; }
.cs-title::after {
    content: ''; position: absolute; bottom: -6px; left: 0;
    width: 60px; height: 4px; background: #2563eb; border-radius: 2px;
}

/* Меню с иконками (центровка) */
.catmenu-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px 25px;
    list-style: none;
    padding: 0;
    margin: 30px auto;
    max-width: 900px;
}
.catmenu-info li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #333;
}
.catmenu-info li img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Карусель */
.carousel-container {
    position: relative; width: 100%; height: 280px;
    margin: 20px 0 30px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.carousel-track { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.carousel-slide {
    position: absolute; transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 12px; }

.carousel-slide.pos-center { width: 420px; height: 280px; z-index: 5; transform: translateX(0) scale(1); box-shadow: 0 8px 30px rgba(0,0,0,0.3); }
.carousel-slide.pos-left-1 { width: 320px; height: 220px; z-index: 4; transform: translateX(-280px) scale(0.9); box-shadow: 0 4px 20px rgba(0,0,0,0.25); }
.carousel-slide.pos-right-1 { width: 320px; height: 220px; z-index: 4; transform: translateX(280px) scale(0.9); box-shadow: 0 4px 20px rgba(0,0,0,0.25); }
.carousel-slide.pos-left-2 { width: 240px; height: 170px; z-index: 3; transform: translateX(-480px) scale(0.8); box-shadow: 0 2px 15px rgba(0,0,0,0.2); opacity: 0.85; }
.carousel-slide.pos-right-2 { width: 240px; height: 170px; z-index: 3; transform: translateX(480px) scale(0.8); box-shadow: 0 2px 15px rgba(0,0,0,0.2); opacity: 0.85; }
.carousel-slide.pos-hidden { width: 200px; height: 140px; z-index: 1; opacity: 0; pointer-events: none; }

.carousel-nav {
    position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px;
    background: rgba(255,255,255,0.9); border: none; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 20px; color: #333;
    z-index: 10; transition: all 0.2s ease; box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.carousel-nav:hover { background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.25); transform: translateY(-50%) scale(1.05); }
.carousel-nav.prev { left: 20px; }
.carousel-nav.next { right: 20px; }

.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.carousel-dot { width: 10px; height: 10px; border-radius: 50%; background: #ddd; border: none; cursor: pointer; transition: all 0.3s ease; }
.carousel-dot.active { background: #2563eb; width: 28px; border-radius: 5px; }

/* Описание */
.cs-description {
    border-left: 4px solid #2563eb; padding-left: 20px; margin: 30px 0 35px;
    font-size: 15px; color: #444; line-height: 1.75;
}

/* Контейнер кнопок (ТОЛЬКО выравнивание, стили текста остаются вашими из style.css!) */
.download_cs {
    display: flex;
    gap: 20px;
    justify-content: center !important;
    flex-wrap: wrap;
    margin-bottom: 35px;
}
/* Убрали стилизацию span и a, чтобы не ломать ваш родной дизайн кнопок */


/* Стили для таблицы требований (изолированные) */
.requirements-container { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 5px 0; font-size: 0.875rem; }
.requirements-column { background: #fff; border-radius: 10px; padding: 20px; border: 1px solid #e5e7eb; }
.requirements-column h3 { margin: 0 0 15px 0; font-size: 1rem; font-weight: 700; padding-bottom: 10px; border-bottom: 2px solid #e5e7eb; }
.requirements-column.min h3 { color: #dc2626; border-bottom-color: #dc2626; }
.requirements-column.rec h3 { color: #16a34a; border-bottom-color: #16a34a; }
.requirements-list { list-style: none; padding: 0; margin: 0; }
.requirements-list li { padding: 8px 0; border-bottom: 1px solid #e5e7eb; display: flex; align-items: flex-start; gap: 8px; }
.requirements-list li:last-child { border-bottom: none; }
.requirements-list li::before { content: '•'; color: #6b7280; font-weight: bold; flex-shrink: 0; }
.requirements-column.min .requirements-list li::before { color: #dc2626; }
.requirements-column.rec .requirements-list li::before { color: #16a34a; }

/* Стили для гайда установки (изолированные) */
.cs-install-guide { font-size: 1rem; line-height: 1.6; color: #374151; }
.install-title { font-size: 1.15rem; font-weight: 700; color: #1a1a1a; margin: 0 0 16px 0; }
.install-warning { background: #fff7ed; border-left: 4px solid #f97316; padding: 16px 20px; border-radius: 8px; margin-bottom: 24px; color: #9a3412; }
.install-warning strong { color: #7c2d12; }
.install-steps { list-style: none; padding: 0; margin: 0 0 20px 0; counter-reset: step-counter; }
.install-steps li { position: relative; padding-left: 36px; margin-bottom: 12px; color: #4b5563; }
.install-steps li::before {
    counter-increment: step-counter; content: counter(step-counter); position: absolute; left: 0; top: 2px;
    width: 24px; height: 24px; background: #2563eb; color: #fff; border-radius: 50%; font-size: 13px;
    font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.install-image-wrapper { text-align: center; margin: 20px 0 10px; }
.install-image-wrapper img { max-width: 100%; height: auto; border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,0.1); transition: transform 0.3s ease; }
.install-image-wrapper img:hover { transform: scale(1.02); }
.install-caption { font-size: 0.875rem; color: #6b7280; margin-top: -25px; font-style: italic; }
.install-note { margin: 24px 0 16px; color: #374151; }
.install-note a { color: #ea580c; text-decoration: none; font-weight: 600; border-bottom: 1px dashed #ea580c; }
.install-note a:hover { border-bottom-style: solid; }
.install-features { list-style: none; padding: 0; margin: 0; }
.install-features li { margin-bottom: 12px; padding-left: 28px; position: relative; }
.install-features li::before { content: '✓'; position: absolute; left: 0; top: 1px; color: #16a34a; font-weight: 800; font-size: 1.1em; }
.install-features strong { color: #1f2937; }

/* Lightbox */
.lightbox-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); z-index: 9999; justify-content: center; align-items: center; cursor: pointer;
}
.lightbox-overlay.active { display: flex; }
.lightbox-overlay img { max-width: 90%; max-height: 90vh; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); cursor: default; animation: lightboxZoom 0.3s ease; }
@keyframes lightboxZoom { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.lightbox-close {
    position: absolute; top: 20px; right: 30px; font-size: 36px; color: #fff; cursor: pointer; z-index: 10000;
    width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: rgba(255,255,255,0.15); transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.3); }

/* Адаптивность */
@media (max-width: 900px) {
    .cs-card { padding: 30px 25px 35px; }
    .carousel-container { height: 260px; }
    .carousel-slide.pos-center { width: 320px; height: 210px; }
    .carousel-slide.pos-left-1, .carousel-slide.pos-right-1 { width: 250px; height: 170px; transform: translateX(-200px) scale(0.85); }
    .carousel-slide.pos-right-1 { transform: translateX(200px) scale(0.85); }
    .carousel-slide.pos-left-2, .carousel-slide.pos-right-2 { width: 190px; height: 130px; transform: translateX(-360px) scale(0.75); }
    .carousel-slide.pos-right-2 { transform: translateX(360px) scale(0.75); }
    .cs-title { font-size: 32px; }
    .cs-title span { font-size: 22px; }
}
@media (max-width: 768px) {
    .carousel-container { height: 220px; }
    .carousel-slide.pos-center { width: 280px; height: 185px; }
    .carousel-slide.pos-left-1, .carousel-slide.pos-right-1 { width: 220px; height: 150px; transform: translateX(-170px) scale(0.8); }
    .carousel-slide.pos-right-1 { transform: translateX(170px) scale(0.8); }
    .carousel-slide.pos-left-2, .carousel-slide.pos-right-2 { width: 170px; height: 115px; transform: translateX(-310px) scale(0.7); }
    .carousel-slide.pos-right-2 { transform: translateX(310px) scale(0.7); }
    .carousel-nav { width: 38px; height: 38px; font-size: 18px; }
    .requirements-container { grid-template-columns: 1fr; gap: 15px; }
}
@media (max-width: 600px) {
    .carousel-container { height: 200px; }
    .carousel-slide.pos-center { width: 240px; height: 160px; }
    .carousel-slide.pos-left-1, .carousel-slide.pos-right-1 { width: 190px; height: 130px; transform: translateX(-140px) scale(0.75); }
    .carousel-slide.pos-right-1 { transform: translateX(140px) scale(0.75); }
    .carousel-slide.pos-left-2, .carousel-slide.pos-right-2 { width: 150px; height: 100px; transform: translateX(-260px) scale(0.65); }
    .carousel-slide.pos-right-2 { transform: translateX(260px) scale(0.65); }
}
@media (max-width: 480px) {
    .cs-title { font-size: 22px; }
    .cs-title span { display: block; font-size: 18px; margin-left: 0; margin-top: 4px; }
    .cs-title::after { bottom: -4px; }
    .carousel-container { height: 180px; }
    .carousel-slide.pos-center { width: 200px; height: 135px; }
    .carousel-slide.pos-left-1, .carousel-slide.pos-right-1 { width: 160px; height: 110px; transform: translateX(-110px) scale(0.7); }
    .carousel-slide.pos-right-1 { transform: translateX(110px) scale(0.7); }
    .carousel-slide.pos-left-2, .carousel-slide.pos-right-2 { width: 130px; height: 90px; transform: translateX(-210px) scale(0.6); }
    .carousel-slide.pos-right-2 { transform: translateX(210px) scale(0.6); }
    .carousel-nav { width: 34px; height: 34px; font-size: 16px; }
    .carousel-nav.prev { left: 10px; }
    .carousel-nav.next { right: 10px; }
    .download_cs { flex-direction: column; align-items: stretch; }
    .catmenu-info { flex-direction: column; align-items: center; gap: 12px; }
}

/* Стили для гайда по модам */
.mods-intro {
    font-size: 15px;
    line-height: 1.7;
    color: #444;
    margin-bottom: 25px;
}

.mods-guide h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px 0;
}

.mods-guide ol, .mods-guide ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.mods-guide li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Автоматическое центрирование и адаптивность картинок в гайде */
.guide-img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 15px auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Красивый список расширений файлов */
.file-list {
    list-style: none !important;
    padding: 0;
    margin: 15px 0;
    background: #f9fafb;
    border-radius: 8px;
    padding: 15px 20px;
    border: 1px solid #e5e7eb;
}

.file-list li {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-list li:last-child {
    margin-bottom: 0;
}

.file-list code {
    background: #e0e7ff;
    color: #3730a3;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

/* ===== ЕДИНЫЙ БЛОК АККОРДЕОНА (Заменяет всё старое) ===== */

/* Базовые стили */
.cs-card .cs-accordion { display: flex; flex-direction: column; gap: 10px; }
.cs-card .accordion-item { border-radius: 10px; overflow: hidden; border: 1px solid #e5e7eb; }

.cs-card .accordion-header {
    display: flex; align-items: center; justify-content: space-between; padding: 6px 10px;;
    cursor: pointer; user-select: none; transition: background 0.2s ease; font-size: 15px; font-weight: 500;
}
.cs-card .accordion-header:hover { filter: brightness(0.97); }
.cs-card .accordion-header .acc-left { display: flex; align-items: center; gap: 12px; }
.cs-card .accordion-header .acc-icon { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cs-card .accordion-header .acc-icon svg { width: 20px; height: 20px; }
.cs-card .accordion-header .acc-text { color: #333; }
.cs-card .accordion-header .acc-toggle { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #666; font-weight: 500; flex-shrink: 0; }
.cs-card .accordion-header .acc-toggle .arrow { transition: transform 0.3s ease; font-size: 12px; }
.cs-card .accordion-item.active .acc-toggle .arrow { transform: rotate(180deg); }

/* === КРИТИЧЕСКИ ВАЖНО: Скрытое состояние (для всех уровней) === */
.cs-card .accordion-body {
    max-height: 0 !important;
    overflow: hidden !important;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: #f9fafb;
}
.cs-card .accordion-body-inner { 
    padding: 0 20px 20px; 
    font-size: 14px; 
    color: #555; 
    line-height: 1.7; 
}

/* === КРИТИЧЕСКИ ВАЖНО: Открытое состояние (только для прямого потомка) === */
/* Символ > гарантирует, что стиль применится только к телу текущего активного спойлера, а не ко всем вложенным */
.cs-card .accordion-item.active > .accordion-body {
    max-height: 10000px !important;
    overflow: visible !important;
    padding-top: 15px;
}

/* === Стили для вложенных спойлеров (чтобы отличались от родителя) === */
.cs-card .accordion-body-inner .accordion-item {
    margin: 12px 0;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
}
.cs-card .accordion-body-inner .accordion-header {
    background: #ffffff !important;
    /*padding: 12px 16px;*/
}
.cs-card .accordion-body-inner .accordion-body {
    background: #ffffff;
}
.cs-card .accordion-body-inner .accordion-body-inner {
    padding: 0 16px 16px 16px;
    background: #ffffff;
}

/* Цвета заголовков */
.cs-card .acc-purple .accordion-header { background: #f0eef8; }
.cs-card .acc-blue .accordion-header   { background: #eef4fb; }
.cs-card .acc-green .accordion-header  { background: #eef8f0; }
.cs-card .acc-orange .accordion-header { background: #fdf4ee; }
.cs-card .acc-purple .acc-icon svg { color: #7c3aed; }
.cs-card .acc-blue .acc-icon svg   { color: #2563eb; }
.cs-card .acc-green .acc-icon svg  { color: #16a34a; }
.cs-card .acc-orange .acc-icon svg { color: #ea580c; }

/* ===== СТИЛИ ДЛЯ ИНФОРМАЦИОННЫХ СПИСКОВ И СЕТОК ===== */

/* Основной список характеристик игры (вместо первой таблицы) */
.game-info-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.game-info-list li {
    background: #f9fafb;
    padding: 14px 18px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
}

.game-info-list li strong {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    font-weight: 700;
}

/* Сетка для оружия, снаряжения и персонажей (вместо широких таблиц) */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin: 16px 0;
    list-style: none;
    padding: 0;
}

.data-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.data-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.data-card img {
    max-width: 100%;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    margin-bottom: 12px;
}

.data-card-title {
    font-weight: 700;
    font-size: 15px;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.data-card-stats {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

.data-card-stats span {
    display: block;
    margin-bottom: 4px;
}

/* Универсальный стиль для картинок внутри аккордеона */
.accordion-body-inner img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 12px auto;
    display: block;
}

/* Стили для текстовых блоков внутри сценариев */
.scenario-text {
    font-size: 14px;
    line-height: 1.7;
    color: #4b5563;
    margin-bottom: 16px;
}

/* ===== ГАЛЕРЕЯ УСТАНОВЩИКА ===== */
.installer-gallery {
    display: grid;
    /* 4 равные колонки на больших экранах */
    grid-template-columns: repeat(4, 1fr);
    gap: 15px; /* Расстояние между картинками */
    margin: 25px 0;
}

.installer-gallery img {
    width: 100%; /* Заставляет картинку занимать всю ширину своей колонки */
    height: auto; /* Автоматически сохраняет пропорции, игнорируя height="460" */
    border-radius: 8px; /* Скругление углов (по желанию) */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* Легкая тень для красоты */
    object-fit: cover; /* Гарантирует, что картинка заполнит область без искажений */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
}

/* Эффект при наведении (по желанию) */
.installer-gallery img:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* ===== АДАПТИВНОСТЬ ===== */

/* Планшеты и небольшие ноутбуки: 2 колонки */
@media (max-width: 900px) {
    .installer-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* Мобильные телефоны: 1 колонка (или 2, если хотите компактнее) */
@media (max-width: 480px) {
    .installer-gallery {
        grid-template-columns: 1fr; /* 1 колонка на всю ширину */
        gap: 10px;
    }
    
    /* Если на мобильном хотите оставить 2 маленькие колонки, 
       замените '1fr' выше на 'repeat(2, 1fr)' */
}