/* --- ОСНОВНЫЕ НАСТРОЙКИ --- */
body {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    background-color: #0f0f13;
    color: #ffffff;
    overflow-x: hidden;
}

h1, h2, h3, .logo, .step-num {
    font-family: 'Russo One', sans-serif;
    text-transform: uppercase;
}

ul {
    padding-left: 20px;
    list-style-type: none; /* Убрали стандартные точки */
}

li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* --- НАВИГАЦИЯ --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    background: rgba(15, 15, 19, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(108, 92, 231, 0.3);
    box-sizing: border-box;
}

.logo {
    font-size: 24px;
    color: #6c5ce7;
    text-shadow: 0 0 10px rgba(108, 92, 231, 0.6);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: #ccc;
    font-weight: 600;
    transition: 0.3s;
    font-size: 14px;
    text-transform: uppercase;
}

.nav-links a:hover {
    color: #6c5ce7;
}

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    /* Можно потом добавить фоновую картинку */
    background: radial-gradient(circle at center, #1a1a24 0%, #0f0f13 100%);
    position: relative;
}

/* Декоративная сетка на фоне */
.hero::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(#1f1f26 1px, transparent 1px),
                      linear-gradient(90deg, #1f1f26 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.3;
    z-index: -1;
}

.hero h1 {
    font-size: 5vw;
    margin: 0;
    background: linear-gradient(90deg, #fff, #6c5ce7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: #aaa;
    margin-bottom: 30px;
}

/* Кнопки */
.btn-main, .btn-small, .btn-buy {
    background: #6c5ce7;
    color: white;
    padding: 12px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
    border: none;
    cursor: pointer;
}

.btn-small {
    padding: 8px 20px;
    font-size: 14px;
}

.btn-main:hover, .btn-small:hover, .btn-buy:hover {
    background: #5649c0;
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.4);
}

.btn-sec {
    padding: 10px 28px;
    border: 2px solid #6c5ce7;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    margin-left: 15px;
    transition: 0.3s;
}

.btn-sec:hover {
    background: #6c5ce7;
    color: #fff;
}

/* --- ФУНКЦИИ (СЕТКА) --- */
section {
    padding: 80px 20px;
    text-align: center;
}

.subtitle {
    color: #888;
    margin-top: -10px;
    margin-bottom: 50px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: #15151a;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #2a2a35;
    text-align: left;
    transition: 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: #6c5ce7;
}

.feature-card h3 {
    color: #fff;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    margin-top: 0;
}

.feature-card li {
    color: #bbb;
    font-size: 14px;
    margin-bottom: 12px;
}

.feature-card b {
    color: #6c5ce7;
}

/* --- ТЕРМИНАЛ (КОМАНДЫ) --- */
.terminal-section {
    background: #0a0a0c;
}

.terminal-window {
    background: #1e1e1e;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    overflow: hidden;
    text-align: left;
    font-family: 'Fira Code', monospace;
}

.terminal-header {
    background: #2d2d2d;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

.terminal-header .title {
    margin-left: 10px;
    font-size: 12px;
    color: #999;
}

.terminal-body {
    padding: 20px;
    color: #ccc;
    font-size: 14px;
}

.cmd-line {
    margin-bottom: 8px;
}

.cmd {
    color: #a6e22e; /* Зеленый хакерский цвет */
    font-weight: bold;
}

.comment {
    color: #75715e;
    font-style: italic;
}

/* --- ИНСТРУКЦИЯ (БЫСТРЫЙ СТАРТ) --- */
.steps-container {
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Выравниваем по верхнему краю */
    gap: 30px;
    flex-wrap: wrap;
    max-width: 1000px; /* Ограничиваем ширину, чтобы не разъезжалось на больших мониторах */
    margin: 40px auto; /* Центрируем сам контейнер */
}

.step {
    flex: 1; /* Шаги будут занимать равное пространство */
    min-width: 250px;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center; /* Жестко центрируем содержимое внутри шага */
    text-align: center;
    position: relative;
}

.step-num {
    font-size: 80px; /* Делаем цифру больше и эффектнее */
    font-weight: 900;
    color: rgba(108, 92, 231, 0.15); /* Полупрозрачный фиолетовый */
    line-height: 1;
    margin-bottom: -20px; /* Надвигаем заголовок на цифру для стиля */
    user-select: none; /* Запрещаем выделение цифры */
    z-index: 0;
}

.step h3 {
    color: #6c5ce7;
    font-size: 22px;
    margin-bottom: 10px;
    z-index: 1;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5); /* Тень, чтобы текст читался поверх цифры */
}

.step p {
    color: #ccc;
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
}

.step a {
    color: #6c5ce7;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.step a:hover {
    color: #00E5CC;
    text-shadow: 0 0 10px rgba(0, 229, 204, 0.5);
}

/* --- МАГАЗИН --- */
.shop-tabs {
    display: flex;
    justify-content: center;
}

.shop-card.premium {
    background: linear-gradient(145deg, #15151a, #1a1a22);
    border: 1px solid #6c5ce7;
    width: 350px;
    padding: 40px;
    border-radius: 15px;
}

.shop-card ul {
    text-align: left;
    margin: 20px 0;
}

.shop-card li {
    margin-bottom: 10px;
}

.price {
    font-size: 32px;
    color: #6c5ce7;
    font-weight: bold;
    margin: 10px 0;
}

footer {
    padding: 40px;
    color: #555;
    font-size: 12px;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }

    .hero h1 {
        font-size: 40px;
    }

    .nav-links {
        display: none; /* Пока скроем на мобиле для простоты */
    }
}

/* --- СТИЛИ ДЛЯ КАРТОЧЕК --- */
.assemblies-section {
    background-color: #0f0f13;
    padding-bottom: 50px;
}

.cards-container {
    display: grid;
    /* Адаптивная сетка: автозаполнение */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.assembly-card {
    background: #1a1a20;
    border-radius: 12px;
    border: 1px solid #2a2a35;
    overflow: hidden;
    cursor: pointer; /* Курсор руки */
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

/* Класс для скрытия лишних сборок */
.hidden-card {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.assembly-card:hover {
    transform: translateY(-5px);
    border-color: #6c5ce7;
}

/* Картинка */
.assembly-img-container {
    width: 100%;
    height: 160px; /* Фиксированная высота */
    background: #111;
    position: relative;
}

.assembly-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* КАРТИНКА БУДЕТ ОБРЕЗАТЬСЯ, НО ЗАПОЛНЯТЬ ВЕСЬ БЛОК */
    object-position: center;
}

/* Оверлей при наведении */
.overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.3s;
}

.assembly-card:hover .overlay {
    opacity: 1;
}

.btn-view {
    color: white;
    border: 1px solid white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
}

/* Инфо */
.assembly-info {
    padding: 15px;
}
.assembly-info h3 {
    margin: 0 0 10px 0;
    color: #fff;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.meta-row {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}
.stat-badge {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
}
.stat-badge.downloads { background: rgba(108, 92, 231, 0.2); color: #a29bfe; }
.stat-badge.likes { background: rgba(255, 118, 117, 0.2); color: #ff7675; }
.date { font-size: 11px; color: #666; margin: 0; }


/* --- КНОПКА "ПОКАЗАТЬ ВСЕ" --- */
.show-more-container {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 50px;
}

.btn-show-more {
    background: transparent;
    border: 2px solid #6c5ce7;
    color: #fff;
    padding: 12px 40px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-show-more:hover {
    background: #6c5ce7;
    transform: scale(1.05);
}


/* --- МОДАЛЬНОЕ ОКНО --- */
.modal {
    display: none; /* Скрыто по умолчанию */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #1a1a20;
    margin: 10% auto;
    padding: 30px;
    border: 1px solid #6c5ce7;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 0 30px rgba(108, 92, 231, 0.2);
    max-height: 80vh;
    overflow-y: auto;
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover { color: white; }

/* Кнопки аудио в модалке */
.audio-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    border-bottom: 1px solid #333;
    padding-bottom: 20px;
}

.btn-audio {
    background: #2d2d35;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-audio:hover { background: #6c5ce7; }

.audio-status {
    width: 100%;
    color: #00BFAE;
    font-size: 14px;
    margin-top: 5px;
    min-height: 20px;
}

.description-box pre {
    white-space: pre-wrap; /* Перенос строк */
    font-family: 'Montserrat', sans-serif;
    color: #ccc;
    background: #111;
    padding: 15px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

/* --- ПАНЕЛЬ УПРАВЛЕНИЯ (ПОИСК И СОРТИРОВКА) --- */
.controls-bar {
    max-width: 800px;
    margin: 20px auto;
    display: flex;
    gap: 15px;
    padding: 0 20px;
    flex-wrap: wrap;
}

#searchInput {
    flex: 2;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid #333;
    background: #1a1a20;
    color: white;
    font-family: 'Montserrat', sans-serif;
    outline: none;
}

#searchInput:focus {
    border-color: #6c5ce7;
}

#sortSelect {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #333;
    background: #1a1a20;
    color: white;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    min-width: 150px;
}

/* --- КНОПКИ В МОДАЛКЕ --- */
.modal-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* Стиль для кнопки ZIP */
#modalZipLink:hover {
    background: rgba(0, 191, 174, 0.1);
    box-shadow: 0 0 15px rgba(0, 191, 174, 0.2);
}

/* --- НОВЫЙ ДИЗАЙН ПАНЕЛИ УПРАВЛЕНИЯ --- */
.controls-bar {
    max-width: 900px;
    margin: 30px auto;
    display: flex;
    gap: 15px;
    padding: 0 20px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Принудительный стиль для инпутов */
.controls-bar input,
.controls-bar select {
    background-color: #1a1a20 !important;
    border: 1px solid #333 !important;
    color: #fff !important;
    padding: 14px 20px !important;
    border-radius: 12px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 14px !important;
    outline: none !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
}

/* Поле поиска */
#searchInput {
    flex: 2;
    min-width: 200px;
}

#searchInput::placeholder {
    color: #777 !important;
}

#searchInput:focus {
    border-color: #6c5ce7 !important;
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.2) !important;
}

/* Выпадающий список */
#sortSelect {
    flex: 1;
    min-width: 180px;
    cursor: pointer;
    /* Кастомная стрелочка */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c5ce7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 15px center !important;
    background-size: 16px !important;
    padding-right: 40px !important;
}

#sortSelect:focus {
    border-color: #6c5ce7 !important;
}

#sortSelect option {
    background-color: #1a1a20 !important;
    color: white !important;
    padding: 10px;
}

/* Новые стили для иконок в карточках */
.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 15px;
}

.badge-new {
    background: #EF4444;
    color: white;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 10px;
    margin-left: 5px;
}

/* Секция имитации интерфейса */
.phone-mockup {
    max-width: 500px;
    margin: 0 auto;
    background: #0A0A0F;
    border: 1px solid #333;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 0 50px rgba(108, 92, 231, 0.1);
}

.app-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.app-card {
    background: #1A1A1F;
    padding: 15px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: 0.3s;
    border: 1px solid transparent;
}

.app-card:hover {
    border-color: #333;
    transform: translateX(5px);
}

.app-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-icon img {
    width: 24px;
    height: 24px;
}

.app-text {
    flex: 1;
    text-align: left;
}

.app-text h4 {
    margin: 0;
    color: white;
    font-size: 15px;
}

.app-text p {
    margin: 2px 0 0 0;
    color: #606060;
    font-size: 12px;
}

.app-toggle {
    width: 40px;
    height: 20px;
    background: #2D2D35;
    border-radius: 10px;
    position: relative;
}

.app-toggle::after {
    content: '';
    position: absolute;
    left: 2px;
    top: 2px;
    width: 16px;
    height: 16px;
    background: #808080;
    border-radius: 50%;
    transition: 0.3s;
}

.app-toggle.active {
    background: rgba(0, 229, 204, 0.2);
}

.app-toggle.active::after {
    left: 22px;
    background: #00E5CC;
}

.app-arrow {
    color: #404040;
    font-size: 20px;
    font-weight: bold;
}

/* --- СТИЛИ ДЛЯ FAQ --- */
.faq-section {
    background-color: #0f0f13; /* Основной фон сайта, чтобы не было "черной дыры" */
    padding: 80px 20px;
    text-align: center;
}

.faq-container {
    max-width: 800px;
    margin: 40px auto 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
}

.faq-item {
    background: #1a1a20; /* Тот же цвет, что и у карточек сборок */
    border: 1px solid #2a2a35;
    border-radius: 12px;
    overflow: hidden;
    transition: 0.3s;
}

.faq-item:hover {
    border-color: #6c5ce7;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.1);
}

.faq-item summary {
    padding: 20px 25px;
    font-weight: 600;
    cursor: pointer;
    color: #fff;
    list-style: none; /* Убираем стандартный треугольник браузера */
    position: relative;
    outline: none;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

/* Скрываем стандартный маркер в Safari/Chrome */
.faq-item summary::-webkit-details-marker {
    display: none;
}

/* Кастомный плюсик */
.faq-item summary::after {
    content: '+';
    color: #6c5ce7;
    font-size: 24px;
    font-weight: 400;
    transition: transform 0.3s ease;
    line-height: 1;
}

/* При открытии плюсик становится минусом */
.faq-item[open] summary::after {
    content: '−'; /* Знак минуса */
    transform: rotate(180deg);
}

.faq-content {
    padding: 0 25px 25px 25px;
    color: #ccc;
    font-size: 14px;
    line-height: 1.6;
    border-top: 1px solid #2a2a35;
    margin-top: 5px;
    padding-top: 20px;
    animation: fadeIn 0.3s ease-in-out;
}

.faq-content strong {
    color: #fff;
}

.faq-content a {
    color: #6c5ce7;
    text-decoration: none;
    font-weight: bold;
    transition: 0.2s;
}

.faq-content a:hover {
    color: #00E5CC;
    text-shadow: 0 0 10px rgba(0, 229, 204, 0.5);
}

.faq-content code {
    background: #111;
    padding: 3px 6px;
    border-radius: 4px;
    color: #a6e22e;
    font-family: 'Fira Code', monospace;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}