:root {
    --bg-dark: #0b0e14;
    --card-bg: #161b22;
    --accent: #3498db;
    --accent-hover: #2980b9;
    --text-gray: #8b949e;
}
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    scroll-behavior: smooth;
}

/* Навигация */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 10%;
    background: rgba(11, 14, 20, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo { font-size: 24px; font-weight: bold; }
.logo span { color: var(--accent); }

.menu a {
    color: white;
    text-decoration: none;
    margin-left: 25px;
    font-size: 14px;
    transition: 0.3s;
}

.menu a:hover { color: var(--accent); }

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 100px 10%;
    min-height: 60vh;
}

.hero-content { max-width: 620px; text-align: left; }

h1 { font-size: 3.5rem; line-height: 1.1; margin-bottom: 20px; }
h1 span { color: var(--accent); }

.hero-content p { color: var(--text-gray); font-size: 1.1rem; margin-bottom: 30px; }

/* Кнопки общие */
.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
    box-sizing: border-box;
}

.btn-primary {
    background: var(--accent);
    color: white;
    padding: 15px 30px;
	width: 230px; /* Кнопка будет по размеру текста */
    display: inline-flex; /* Позволяет центрировать текст и сохранять размер */
    margin: 0 auto; /* Центрирует кнопку, если она внутри flex-контейнера */
}

.btn-primary:hover { 
    background: var(--accent-hover); 
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.4); 
}

/* Карточки возможностей */
.features { padding: 100px 10%; text-align: center; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 50px; align-items: stretch; }

.f-card {
    background: var(--card-bg);
    padding: 40px 20px;
    border-radius: 15px;
    border: 1px solid #30363d;
    transition: 0.3s;
}

.f-card:hover { transform: translateY(-10px); border-color: var(--accent); }
.f-card .icon { font-size: 40px; margin-bottom: 20px; }

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.mockup {
    position: relative;
    border: 8px solid #1f242d;
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 20px rgba(52, 152, 219, 0.2);
    overflow: hidden;
    transition: transform 0.5s ease;
}

.mockup:hover {
    transform: scale(1.02) rotate(-1deg);
}

.mockup img {
    max-width: 500px;
    display: block;
    height: auto;
}

/* Pricing Section */
.pricing { padding: 80px 10%; text-align: center; }
.pricing h2 { font-size: 2.5rem; margin-bottom: 50px; }

.pricing-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.p-card {
    background: var(--card-bg);
    padding: 40px 30px;
    border-radius: 20px;
    border: 1px solid #30363d;
    width: 280px;
    transition: 0.3s;
    position: relative;
}

.p-card.featured {
    border: 2px solid var(--accent);
    transform: scale(1.05);
    background: #1c2128;
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.2);
}

.badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.p-card h3 { font-size: 1.5rem; margin-bottom: 20px; }
.price { font-size: 2.5rem; font-weight: bold; margin-bottom: 30px; }
.price span { font-size: 1rem; color: var(--text-gray); }

.p-card ul { list-style: none; padding: 0; margin-bottom: 40px; text-align: left; }
.p-card ul li { margin-bottom: 12px; font-size: 0.95rem; }
.p-card ul li.off { color: #484f58; text-decoration: line-through; }

.p-card .btn-secondary {
    display: inline-block;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 10px 25px;
}

.p-card .btn-secondary:hover {
    background: var(--accent);
    color: white;
}

/* Блок Описания работы */
.how-it-works {
    padding: 100px 10%;
    background: #0d1117;
    text-align: center;
}

.section-subtitle {
    color: var(--text-gray);
    margin-bottom: 60px;
    font-size: 1.1rem;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.step-card {
    background: var(--card-bg);
    padding: 40px 30px;
    border-radius: 20px;
    border: 1px solid #30363d;
    text-align: left;
    position: relative;
    transition: 0.3s;
}

.step-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.step-num {
    font-size: 3rem;
    font-weight: bold;
    color: rgba(52, 152, 219, 0.1); /* Прозрачный номер на фоне */
    position: absolute;
    top: 10px;
    right: 20px;
}

.step-card h3 {
    color: var(--accent);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.step-card p {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.6;
}
/* Описание программы */
.about-software {
    padding: 100px 10%;
    background: var(--bg-dark);
	text-align: center;
}

.about-content {
    max-width: 900px;
    margin: 40px auto 0;
    text-align: left;
    line-height: 1.8;
    color: var(--text-gray);
    font-size: 1.1rem;
}

.about-content b {
    color: white;
}

/* Секция Поддержка */
.support-section {
    padding: 80px 10%;
    background: #0d1117;
    border-top: 1px solid #30363d;
}

.support-container {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}
.support-container .btn-primary {
    width: auto;             /* Убираем растягивание во всю ширину */
    min-width: 240px;        /* Задаем комфортную минимальную ширину */
    max-width: 300px;        /* Ограничиваем максимальный размер */
    padding: 12px 25px;      /* Делаем отступы компактнее */
    margin: 0 auto;          /* Центрируем кнопку в контейнере */
    display: inline-flex;    /* Чтобы иконка и текст были в ряд и кнопка не "раздувалась" */
    font-size: 15px;         /* Оптимальный размер шрифта */
}

/* Фикс для иконки внутри этой кнопки */
.support-container .btn-primary img {
    width: 30px;             /* Уменьшаем иконку Телеграм */
    height: 30px;
    margin-right: 10px;
}

.support-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.support-section h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.support-section p {
    color: var(--text-gray);
    margin-bottom: 35px;
    font-size: 1.1rem;
}
/* Кнопка "Скачать" в шапке */
.btn-download {
    background: var(--accent);
    color: white !important;
    padding: 8px 20px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
    transition: 0.3s;
    border: 1px solid transparent;
    margin-left: 20px;
}

.btn-download:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.4);
    transform: translateY(-1px);
}
/* Новые кнопки в меню */
.btn-login, .btn-register {
    padding: 8px 16px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
    transition: 0.3s;
    margin-left: 10px;
    display: inline-block;
}

.btn-login {
    border: 1px solid var(--accent);
    color: var(--accent) !important;
}

.btn-login:hover {
    background: var(--accent);
    color: white !important;
}

.btn-register {
    background: #28a745;
    color: white !important;
}

.btn-register:hover {
    background: #218838;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.4);
}

/* Стили модальных окон */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--card-bg);
    margin: auto;
    padding: 30px;
    border: 1px solid #30363d;
    width: 90%;
    max-width: 400px;
    border-radius: 15px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-gray);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close-btn:hover {
    color: white;
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.8rem;
    color: white;
    text-align: center;
}

/* Стили форм */
.auth-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-gray);
}

.auth-form input {
    width: 100%;
    padding: 12px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    box-sizing: border-box;
    transition: 0.3s;
}

.auth-form input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.2);
}

/* АДАПТАЦИЯ ПОД МОБИЛЬНЫЕ */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        padding: 15px;
		flex-wrap: wrap;
		justify-content: space-between;
    }
	.logo {
        font-size: 20px;
    }
    .menu {
        margin-top: 15px;
        display: flex;
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .menu a { margin-left: 0; font-size: 14px; }

    .hero {
        flex-direction: column;
        padding: 20px 20px;
        text-align: center;
    }
    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    .hero-content {
        margin-bottom: 40px;
    }
    
    .hero-btns {
        display: flex;
        flex-direction: row;
		flex-wrap: wrap;
		justify-content: center;
		align-items: center;
        gap: 15px;               /* Уменьшим немного зазор для мобилок */
        margin-top: 40px;
        width: 100%;
    }
	.feature-grid {
        /* Новые блоки встанут один под другим */
        grid-template-columns: 1fr !important; 
        gap: 20px; /* Немного уменьшаем зазор для узких экранов */
    }
	.features, .pricing, .how-it-works, .about-software {
        padding: 40px 5% !important; 
    }

    /* 2. Убираем лишний верхний отступ у заголовка цен */
    .pricing h2 {
        margin-top: 0;
        margin-bottom: 30px;
    }

    /* 3. Уменьшаем отступ сверху у сетки функций */
    .feature-grid {
        margin-top: 20px !important;
    }
    .f-card {
        padding: 30px 15px; /* Делаем карточки компактнее на мобиле */
    }

    /* Исправляем центрирование текста во всех кнопках */
    .btn-primary, .btn-secondary {
        width: fit-content; /* Убираем растягивание на весь экран */
        min-width: 200px; /* Но делаем достаточно крупной для пальца */
        max-width: 280px;
        padding: 12px 25px; /* Уменьшаем внутренние отступы */
    }

    .mockup img {
        max-width: 100%;
        border-width: 4px;
    }

    .pricing-grid {
        flex-direction: column;
        gap: 30px;
    }

    .p-card {
        width: 90%;
        max-width: 320px;
        padding: 25px 15px !important;
    }

    .p-card.featured {
        transform: scale(1);
        margin: 10px 0;
    }

    /* Кнопки внутри тарифов */
    .p-card .btn-secondary, .p-card .btn-primary {
        margin-top: 20px;
        min-height: 45px;
    }

    .p-card .btn-secondary {
        background: transparent;
        border: 1px solid var(--accent) !important;
        color: var(--accent) !important;
    }

    .p-card .btn-primary {
        background: var(--accent) !important;
        color: white !important;
        border: none;
    }
	
	.steps-container {
        grid-template-columns: 1fr; /* Один шаг на строку на мобиле */
        gap: 20px;
    }
    .how-it-works h2 {
        font-size: 1.8rem;
    }
    .about-content {
        font-size: 1rem;
        text-align: center;
    }
    .support-section h2 {
        font-size: 1.8rem;
    }
	.btn-download {
        margin-left: 10px;
        margin-top: -10px; /* Убираем отступ сверху, чтобы была в ряд */
        padding: 10px 20px;
        font-size: 12px;
		display: inline-flex;
        min-width: 0; /* Убираем ограничение ширины */
        width: fit-content;
    }
	nav {
        flex-direction: column; /* Выстраиваем логотип и меню друг под другом */
        align-items: center;
        padding: 15px 10px;
        gap: 15px;
    }

    nav .logo {
        font-size: 1.2rem; /* Немного уменьшаем логотип, чтобы влезал в строку */
        text-align: center;
    }

    nav .menu {
        display: flex;
        flex-wrap: wrap; /* Разрешаем кнопкам переноситься на новую строку */
        justify-content: center;
        align-items: center;
        gap: 8px; /* Небольшой аккуратный отступ между всеми кнопками */
        width: 100%;
    }

    /* Делаем ссылки и кнопки более компактными на мобилках */
    nav .menu a {
        font-size: 12px;
        padding: 6px 10px;
        margin: 0 !important; /* Сбрасываем лишние боковые отступы */
    }

    /* Кнопки действий делаем чуть заметнее на маленьком экране */
    .btn-download, .btn-login, .btn-register {
        display: inline-block;
        text-align: center;
    }
}