/* style.css - Яркий, "продающий" дизайн (Светлый + Градиенты + Анимация) */

/* --- Переменные для Цвета --- */
:root {
    --bg-color: #f8f9fa; /* Светло-серый фон */
    --card-color: #ffffff; /* Белые карточки */
    --text-color: #343a40; /* Темно-серый текст */
    --heading-color: #212529; /* Черный для заголовков */
    --primary-grad: linear-gradient(45deg, #4F46E5, #D946EF); /* Яркий сине-фиолетовый */
    --primary-start: #4F46E5; /* Начало градиента (для кнопок) */
}

/* --- Общие --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.7;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 0;
}

h1, h2, h3, h4 {
    color: var(--heading-color);
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 700;
}

h2 {
    font-size: 2.2em;
    text-align: center;
    margin-bottom: 40px;
    margin-top: 50px;
}

h3 {
    font-size: 1.5em;
}

p {
    margin-bottom: 15px;
    color: #555;
    font-size: 1.05em;
}

/* --- Хедер и Навигация (ОБНОВЛЕНО ДЛЯ МОБ. ВЕРСИИ) --- */
header {
    background-color: var(--card-color);
    border-bottom: 1px solid #e9ecef;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

nav.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%; /* Добавляем отступы для мобильной версии */
    width: 100%;
    box-sizing: border-box; /* Учитываем padding в ширине */
    position: relative; /* Для позиционирования мобильного меню */
}

.logo {
    font-size: 1.7em;
    font-weight: 700;
    color: var(--heading-color);
    text-decoration: none;
    z-index: 101; /* Логотип поверх меню */
}

.logo span {
    background: var(--primary-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav ul.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.3s ease-out;
}

nav li {
    margin-left: 0;
    display: flex;
    align-items: center;
}

/* Разделитель между навигацией и кнопками */
nav li.nav-divider {
    width: 1px;
    height: 24px;
    background: #e0e0e0;
    margin: 0 12px;
    flex-shrink: 0;
}

nav a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    font-size: 0.95em;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: nowrap;
}

nav a:not(.btn):hover,
nav a.active:not(.btn) {
    color: var(--primary-start);
    background-color: rgba(79, 70, 229, 0.05);
}

/* --- Language Switcher --- */
.language-switcher {
    position: relative;
}

.lang-dropdown {
    position: relative;
}

.lang-btn {
    background: transparent;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.95em;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: inherit;
}

.lang-btn:hover {
    border-color: var(--primary-start);
    color: var(--primary-start);
    background-color: rgba(79, 70, 229, 0.05);
}

.lang-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--card-color);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 8px 0;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.lang-dropdown:hover .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-menu li {
    margin: 0;
}

.lang-option {
    display: block;
    padding: 10px 16px;
    color: #555;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
}

.lang-option:hover {
    background-color: rgba(79, 70, 229, 0.05);
    color: var(--primary-start);
}

.lang-option.active {
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--primary-start);
    font-weight: 600;
}

/* --- Стили для "Гамбургера" (Скрыты на ПК) --- */
#nav-toggle {
    display: none; /* Скрываем сам чекбокс */
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.nav-toggle-label {
    display: none; /* Скрываем иконку на ПК */
    cursor: pointer;
    z-index: 101; /* Поверх всего */
    width: 30px;
    height: 25px;
    position: relative;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
    display: block;
    background-color: var(--heading-color);
    height: 3px;
    width: 100%;
    border-radius: 2px;
    position: absolute;
    transition: all 0.3s ease;
}

.nav-toggle-label span::before {
    content: '';
    top: -8px;
}

.nav-toggle-label span::after {
    content: '';
    top: 8px;
}

/* Анимация "крестика" при нажатии */
#nav-toggle:checked ~ .nav-toggle-label span {
    background-color: transparent; /* Средняя полоска исчезает */
}
#nav-toggle:checked ~ .nav-toggle-label span::before {
    transform: rotate(45deg);
    top: 0;
}
#nav-toggle:checked ~ .nav-toggle-label span::after {
    transform: rotate(-45deg);
    top: 0;
}


/* --- Кнопки (с градиентом) --- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    margin: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1em;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-grad);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(100, 70, 230, 0.35);
}
.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(100, 70, 230, 0.45);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-start);
    border: 2px solid var(--primary-start);
}
.btn-secondary:hover {
    background-color: var(--primary-start);
    color: #ffffff;
}

/* Специальный стиль для кнопки расширения */
#install-extension {
    padding: 10px 18px !important;
    white-space: nowrap;
    font-size: 0.85em !important;
    min-width: fit-content;
    font-weight: 600 !important;
    margin-right: 4px;
}

/* Стили для кнопок Регистрация и Авторизация - выделенные */
.btn-register {
    background: var(--primary-grad) !important;
    color: #ffffff !important;
    border: 2px solid transparent !important;
    box-shadow: 0 2px 12px rgba(79, 70, 229, 0.3) !important;
    font-weight: 600 !important;
    padding: 10px 20px !important;
    font-size: 0.9em !important;
    position: relative;
    overflow: hidden;
    margin-left: 4px;
}
.btn-register::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}
.btn-register:hover::before {
    left: 100%;
}
.btn-register:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4) !important;
    color: #ffffff !important;
}

.btn-login {
    background-color: transparent !important;
    color: var(--primary-start) !important;
    border: 1.5px solid var(--primary-start) !important;
    font-weight: 600 !important;
    padding: 10px 20px !important;
    font-size: 0.9em !important;
    box-shadow: none !important;
    position: relative;
}
.btn-login:hover {
    background: rgba(79, 70, 229, 0.1) !important;
    color: var(--primary-start) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2) !important;
    border-color: var(--primary-start) !important;
}

/* --- Карточка (для контента НИЖЕ hero) --- */
.card {
    background-color: var(--card-color);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.07);
    margin-top: 30px;
}

/* --- Главная страница: Hero (ПОЛНОЭКРАННЫЙ) --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    background-color: #f0f2f5;
    padding: 20px;
    box-sizing: border-box;
}

.hero-content {
    position: relative;
    z-index: 2; /* Контент поверх анимации */
    text-align: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
}

.hero h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: 800;
    background: var(--primary-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p.subtitle {
    font-size: 1.4em;
    color: #444;
    max-width: 700px;
    margin: 0 auto 30px auto;
    font-weight: 500;
}

/* --- Анимация "Летающих" элементов --- */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    list-style: none;
    padding: 0;
    margin: 0;
}

.floating-shapes li {
    position: absolute;
    display: block;
    color: rgba(79, 70, 229, 0.5); /* Полупрозрачный цвет */
    animation: fall-down linear infinite;
    top: -150px; /* Начинаем за экраном сверху */
    opacity: 0; /* Начинаем невидимыми */
}

/* Анимация (много элементов) */
.floating-shapes li:nth-child(1) { left: 25%; font-size: 4.5em; animation-delay: 0s; animation-duration: 25s; } /* 🛡️ */
.floating-shapes li:nth-child(2) { left: 10%; font-size: 2.5em; animation-delay: 2s; animation-duration: 18s; } /* $2.99/мес */
.floating-shapes li:nth-child(3) { left: 70%; font-size: 2.0em; animation-delay: 4s; animation-duration: 22s; } /* Анонимность */
.floating-shapes li:nth-child(4) { left: 40%; font-size: 4.0em; animation-delay: 0.5s; animation-duration: 20s; } /* 🛡️ */
.floating-shapes li:nth-child(5) { left: 65%; font-size: 1.8em; animation-delay: 6s; animation-duration: 15s; } /* $4.99/мес */
.floating-shapes li:nth-child(6) { left: 75%; font-size: 5.0em; animation-delay: 3s; animation-duration: 28s; } /* 🛡️ */
.floating-shapes li:nth-child(7) { left: 35%; font-size: 2.2em; animation-delay: 7s; animation-duration: 19s; } /* Безопасность */
.floating-shapes li:nth-child(8) { left: 50%; font-size: 2.0em; animation-delay: 1s; animation-duration: 23s; } /* $3.99/мес */
.floating-shapes li:nth-child(9) { left: 20%; font-size: 1.8em; animation-delay: 8s; animation-duration: 17s; } /* 🚫 Без логов */
.floating-shapes li:nth-child(10) { left: 85%; font-size: 4.0em; animation-delay: 5s; animation-duration: 26s; } /* 🛡️ */
.floating-shapes li:nth-child(11) { left: 5%; font-size: 3.0em; animation-delay: 10s; animation-duration: 20s; } /* ⚡️ Скорость */
.floating-shapes li:nth-child(12) { left: 90%; font-size: 2.5em; animation-delay: 1s; animation-duration: 16s; } /* 🌍 Глобально */
.floating-shapes li:nth-child(13) { left: 15%; font-size: 1.5em; animation-delay: 12s; animation-duration: 24s; } /* $2.99/мес */
.floating-shapes li:nth-child(14) { left: 55%; font-size: 3.5em; animation-delay: 7s; animation-duration: 18s; } /* 🛡️ */
.floating-shapes li:nth-child(15) { left: 30%; font-size: 2.8em; animation-delay: 0s; animation-duration: 30s; } /* Приватность */
.floating-shapes li:nth-child(16) { left: 80%; font-size: 1.7em; animation-delay: 14s; animation-duration: 14s; } /* $4.99/мес */
.floating-shapes li:nth-child(17) { left: 45%; font-size: 4.2em; animation-delay: 9s; animation-duration: 21s; } /* 🛡️ */
.floating-shapes li:nth-child(18) { left: 2%; font-size: 2.1em; animation-delay: 3s; animation-duration: 27s; } /* 💬 Поддержка */
.floating-shapes li:nth-child(19) { left: 60%; font-size: 3.8em; animation-delay: 11s; animation-duration: 20s; } /* 🛡️ */
.floating-shapes li:nth-child(20) { left: 95%; font-size: 1.9em; animation-delay: 6s; animation-duration: 16s; } /* $3.99/мес */


/* Ключевые кадры анимации: Падают сверху */
@keyframes fall-down {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(120vh) rotate(720deg); opacity: 0; }
}
/* --- Конец Анимации --- */


/* --- Главная страница: Преимущества --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}
.feature-item {
    background-color: var(--card-color);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-item:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); }
.feature-item .icon { font-size: 2.5em; margin-bottom: 15px; display: block; }

/* --- Главная страница: Тарифы --- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}
.pricing-card {
    background-color: var(--card-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.07);
    border: 2px solid transparent;
}
.pricing-card.recommended {
    border: 2px solid var(--primary-start);
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.2);
    transform: scale(1.03);
}
.pricing-card h3 { font-size: 1.6em; color: var(--primary-start); }
.pricing-card .price { font-size: 2.8em; font-weight: 700; color: var(--heading-color); margin: 15px 0; }
.pricing-card .price span { font-size: 0.6em; color: #555; font-weight: 400; }
.pricing-card ul { list-style: none; padding: 0; margin: 25px 0; text-align: left; }
.pricing-card li { margin-bottom: 12px; color: #333; font-size: 1.05em; }
.pricing-card li::before { content: '✔'; color: #28a745; margin-right: 12px; font-weight: 600; }

/* --- Стили для Загрузок и Инструкций --- */
.download-app {
    background-color: #fcfcff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.download-app .badge { background: var(--primary-grad); color: #fff; font-size: 0.8em; padding: 4px 10px; border-radius: 6px; margin-left: 10px; }
.download-app .buttons { margin-left: auto; }

details {
    background: var(--card-color);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    margin-bottom: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
summary { font-size: 1.3em; font-weight: 600; color: #333; cursor: pointer; outline: none; transition: color 0.3s ease; }
summary:hover { color: var(--primary-start); }
details[open] summary { margin-bottom: 20px; color: var(--primary-start); }
.step { margin-top: 20px; border-left: 3px solid var(--primary-start); padding-left: 20px; }

/* --- Подвал --- */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 40px 0;
    border-top: 1px solid #e9ecef;
    color: #888;
    background-color: var(--card-color);
}


/* --- ================================== --- */
/* --- === МОБИЛЬНАЯ АДАПТАЦИЯ (MEDIA) === --- */
/* --- ================================== --- */

@media (max-width: 992px) {
    /* На планшетах и телефонах */
    #nav-toggle {
        display: block !important; /* Показываем для работы, но визуально скрыт */
        position: absolute;
        opacity: 0;
        width: 30px;
        height: 30px;
        z-index: 1002;
        cursor: pointer;
        pointer-events: auto; /* Разрешаем клики */
    }
    
    .nav-toggle-label {
        display: block !important; /* Показываем "гамбургер" */
        position: relative;
        z-index: 1001; /* Поверх всего */
        cursor: pointer;
        -webkit-tap-highlight-color: transparent; /* Убираем подсветку при клике на мобильных */
        user-select: none; /* Запрещаем выделение текста */
    }

    nav ul.nav-menu {
        /* Скрываем меню за экраном */
        position: fixed; /* Используем fixed для правильного позиционирования */
        top: 75px; /* Сразу под шапкой, ниже логотипа (padding 15px*2 + высота логотипа ~45px) */
        left: 0;
        right: 0;
        width: 100vw; /* На всю ширину экрана */
        background-color: var(--card-color);
        z-index: 999; /* Ниже header (1000), но выше контента */
        margin: 0;
        
        /* Превращаем в вертикальный список */
        flex-direction: column;
        align-items: stretch; /* Растягиваем ссылки на всю ширину */
        
        /* Прячем по умолчанию */
        max-height: 0;
        overflow: hidden;
        padding: 0;
        opacity: 0;
        visibility: hidden;
        
        transition: max-height 0.3s ease-out, opacity 0.3s ease-out, visibility 0.3s ease-out;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
    }
    
    /* Когда чекбокс нажат - показываем меню */
    #nav-toggle:checked ~ ul.nav-menu,
    nav.container #nav-toggle:checked ~ ul.nav-menu {
        max-height: 100vh !important; /* Показываем (высота станет по контенту) */
        padding: 10px 0; /* Добавляем отступы при открытии */
        overflow: visible; /* Показываем содержимое */
        opacity: 1 !important;
        visibility: visible !important;
    }

    nav li {
        margin: 0;
    }
    
    /* Скрываем разделитель на мобильных */
    nav li.nav-divider {
        display: none;
    }
    
    nav a {
        display: block !important; /* Ссылка на всю ширину */
        width: 100% !important; /* На всю ширину */
        padding: 15px 20px !important; /* Удобно нажимать */
        border-bottom: 1px solid #f0f0f0;
        border-radius: 0;
        text-align: left !important; /* Выравнивание текста слева */
        box-sizing: border-box; /* Учитываем padding в ширине */
    }
    nav a.btn {
        margin: 10px 5%;
        text-align: center;
    }
    
    /* Адаптация кнопки расширения для мобильных */
    #install-extension {
        font-size: 0.9em;
        padding: 12px 20px;
    }
    
    /* Уменьшаем шрифты в hero для мобильных */
    .hero h1 {
        font-size: 2.5em;
    }
    .hero p.subtitle {
        font-size: 1.1em;
    }
    .hero-content {
        padding: 25px;
        /* Отключаем "стекло" на слабых телефонах, если нужно */
        /* backdrop-filter: none; */
        /* background: rgba(255, 255, 255, 0.9); */
    }
    
    /* Карточки в один столбец */
    .features-grid, .pricing-grid {
        grid-template-columns: 1fr;
    }
    .pricing-card.recommended {
        transform: scale(1); /* Убираем увеличение */
    }

    /* Адаптация блока с иконками платформ */
    div[style*="justify-content: space-around"] {
        flex-direction: column;
        gap: 30px;
    }

    /* Адаптация кнопок на странице загрузок */
    .download-app {
        flex-direction: column;
        align-items: flex-start;
    }
    .download-app .buttons {
        margin-left: 0;
        margin-top: 10px;
    }
}