/* Сброс и базовые настройки */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #0b0e12;
    background-image:
        radial-gradient(circle at 15% 25%, rgba(30, 100, 220, 0.18) 0%, transparent 35%),
        radial-gradient(circle at 85% 75%, rgba(180, 210, 255, 0.1) 0%, transparent 40%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #edf2f9;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    padding-top: 100px; /* Отступ для закрепленной шапки */
}

/* Фоновые объекты */
.ambient-glow {
    position: fixed;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(45, 110, 250, 0.15);
    filter: blur(85px);
    z-index: 0;
    pointer-events: none;
}

.glow-1 {
    top: -60px;
    left: 5%;
    width: 400px;
    height: 400px;
    background: rgba(25, 100, 210, 0.18);
}

.glow-2 {
    bottom: 0px;
    right: 0px;
    width: 450px;
    height: 450px;
    background: rgba(120, 160, 255, 0.12);
    filter: blur(100px);
}

.glow-3 {
    top: 40%;
    left: 70%;
    width: 280px;
    height: 280px;
    background: rgba(70, 130, 240, 0.12);
    filter: blur(70px);
}

/* Обёртка контента */
.page {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 3;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
    padding: 0 40px;
}

/* ---------- ЗАКРЕПЛЕННАЯ ШАПКА ---------- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 32px; /* Уменьшил паддинг для лучшего размещения логотипа */
    background: rgba(18, 22, 30, 0.6);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 50px;
    box-shadow: 0 15px 35px -20px rgba(0, 0, 0, 0.9);
    width: calc(100% - 80px);
    max-width: 1220px;
    margin: 0 auto 40px;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    transition: 0.2s;
}

.navbar:hover {
    background: rgba(22, 28, 38, 0.7);
    border-color: rgba(255, 255, 255, 0.08);
}

/* Стили для логотипа-картинки */
.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 80px; /* Высота логотипа */
    width: auto;  /* Автоматическая ширина для сохранения пропорций */
    max-width: 180px; /* Максимальная ширина для больших логотипов */
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(75, 130, 255, 0.3));
    transition: 0.2s;
}

.logo img:hover {
    filter: drop-shadow(0 4px 12px rgba(75, 130, 255, 0.6));
    transform: scale(1.02);
}

.nav-links {
    display: flex;
    gap: 48px;
    list-style: none;
    margin: 0 20px;
}

.nav-links a {
    text-decoration: none;
    font-weight: 500;
    font-size: 20px;
    color: #dae2ed;
    padding: 5px 0;
    border-bottom: 1.5px solid transparent;
    transition: 0.2s;
    letter-spacing: 0.3px;
    opacity: 0.85;
    text-transform: uppercase;
}

.nav-links a:hover {
    opacity: 1;
    color: white;
    border-bottom-color: #4d8eff;
}

.nav-links .active a {
    color: white;
    border-bottom: 2px solid #558cff;
    opacity: 1;
    font-weight: 600;
}

.user-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-action {
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 32px;
    font-weight: 550;
    font-size: 16px;
    transition: all 0.2s ease;
    background: rgba(245, 245, 255, 0.02);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e1ebff;
}

.btn-action.outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-action.gradient-hover {
    background: rgba(35, 90, 200, 0.55);
    border: 1px solid rgba(100, 160, 255, 0.7);
    color: white;
    box-shadow: 0 6px 14px rgba(0, 40, 120, 0.4);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-action.gradient-hover::before {
    content: '';
    position: absolute;
    top: var(--y, 50%);
    left: var(--x, 50%);
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.8), rgba(100, 160, 255, 0.4));
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: -1;
}

.btn-action.gradient-hover:hover::before {
    width: 300px;
    height: 300px;
}

.btn-action.gradient-hover:hover {
    background: rgba(40, 100, 230, 0.8);
    border-color: #8ab6ff;
    transform: scale(1.02);
}

/* Основной контент */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: calc(100vh - 300px);
    padding: 20px 0 40px;
    margin-top: 20px;
}

/* Футер */
.footer {
    display: flex;
    justify-content: space-between;
    padding: 30px 20px 40px;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 13px;
    color: #93a5c0;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 40px 40px 0 0;
}

.footer-nav a {
    text-decoration: none;
    color: #a5b7d0;
    margin-left: 35px;
    transition: 0.2s;
}

.footer-nav a:hover {
    color: white;
}

/* Адаптивность */

/* Определение ключевых кадров для плавного движения */
@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(10vw, 5vh) scale(1.1);
    }
    66% {
        transform: translate(-5vw, 15vh) scale(0.9);
    }
    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* Применяем анимацию к каждому кругу с разной скоростью и задержкой */
.glow-1 {
    top: -60px;
    left: 5%;
    width: 400px;
    height: 400px;
    background: rgba(25, 100, 210, 0.18);
    animation: float 25s ease-in-out infinite; /* Медленно: 25 секунд */
}

.glow-2 {
    bottom: 10%;
    right: 5%;
    width: 450px;
    height: 450px;
    background: rgba(120, 160, 255, 0.12);
    filter: blur(100px);
    animation: float 35s ease-in-out infinite reverse; /* В другую сторону: 35 секунд */
    animation-delay: -5s;
}

.glow-3 {
    top: 40%;
    left: 60%;
    width: 280px;
    height: 280px;
    background: rgba(70, 130, 240, 0.12);
    filter: blur(70px);
    animation: float 30s ease-in-out infinite; /* 30 секунд */
    animation-delay: -2s;
}
/* ==================== АДАПТИВНОСТЬ (МОБИЛЬНАЯ ВЕРСИЯ) ==================== */

@media (max-width: 800px) {
    body {
        /* Увеличили отступ сверху, так как элементы шапки стали крупнее */
        padding-top: 130px; 
    }

    .navbar {
        flex-wrap: wrap; 
        gap: 12px; /* Небольшой аккуратный зазор между логотипом и кнопкой */
        width: calc(100% - 30px);
        padding: 14px 20px;
        border-radius: 24px;
        align-items: center; /* Идеальное выравнивание по вертикали */
    }

    .logo {
        order: 1;
        flex: 0 0 auto; 
    }

    .logo img {
        height: 50px; 
        width: auto;
    }

    .user-actions {
        order: 2;
        flex: 0 0 auto;
    }

    .btn-action {
        padding: 10px 20px; 
        font-size: 15px;    
    }

    /* 2-я строка: Навигация на всю ширину */
    .nav-links {
        order: 3;
        width: 100%; 
        justify-content: center; 
        margin: 8px 0 0 0;
        padding-top: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.06); 
        gap: 20px;
    }

    .nav-links a {
        font-size: 14px;
        padding: 4px 0;
    }

    /* Футер */
    .footer {
        flex-direction: column;
        gap: 15px;
        align-items: center;
        text-align: center;
    }

    .footer-nav a {
        margin: 0 15px;
    }
}

/* Дополнительная адаптация для очень узких экранов */
@media (max-width: 600px) {
    .nav-links {
        gap: 12px; /* Еще чуть меньше расстояние между ссылками */
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links a {
        font-size: 13px;
    }

    .page {
        padding: 0 15px;
    }

    .logo img {
        height: 50px;
    }
    
    .btn-action {
        padding: 7px 12px;
        font-size: 13px;
    }
}
/* ========== КНОПКА "ЕСТЬ ВОПРОС?" ========== */
.help-contact-section {
    display: flex;
    justify-content: center;
    margin: 40px 0 30px;
}

.help-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.9), rgba(109, 40, 217, 0.9));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 60px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.2);
}

.help-contact-btn:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, rgba(139, 92, 246, 1), rgba(109, 40, 217, 1));
    box-shadow: 0 12px 28px rgba(139, 92, 246, 0.3);
}

.help-contact-btn svg {
    width: 20px;
    height: 20px;
}

/* ========== МОДАЛЬНЫЕ ОКНА ========== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop.hidden {
    display: none !important;
}

.modal-content {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    width: 100%;
    max-width: 480px;
    padding: 32px;
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.5);
    animation: modalPopIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPopIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-head h3 {
    color: #fff;
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 8px;
    transition: 0.2s;
    border-radius: 10px;
}

.modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

/* Contact Modal */
.contact-desc {
    color: #94a3b8;
    font-size: 14px;
    text-align: center;
    margin-bottom: 24px;
}

.contact-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.contact-card:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateX(5px);
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
}

.email-icon {
    color: #60a5fa;
}

.telegram-icon {
    color: #3b82f6;
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.contact-address {
    font-size: 16px;
    color: #94a3b8;
}

.contact-arrow {
    color: #475569;
    transition: transform 0.2s ease;
}

.contact-card:hover .contact-arrow {
    transform: translateX(3px);
    color: #a78bfa;
}

.contact-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    color: #64748b;
    font-size: 12px;
    text-align: center;
}

.contact-note svg {
    flex-shrink: 0;
    color: #60a5fa;
}

/* Адаптивность */
@media (max-width: 768px) {
    .help-contact-section {
        margin: 30px 0 20px;
    }

    .help-contact-btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    .help-contact-btn svg {
        width: 18px;
        height: 18px;
    }

    .modal-content {
        margin: 20px;
        padding: 24px;
    }

    .modal-head h3 {
        font-size: 18px;
    }

    .contact-card {
        padding: 12px 16px;
    }

    .contact-icon {
        width: 40px;
        height: 40px;
    }

    .contact-icon svg {
        width: 22px;
        height: 22px;
    }
}
/* Блокировка скролла, пока идет прогрузка */
body.preloader-active {
    overflow: hidden;
}

/* Главный экран прелоадера (в точности как твой фон сайта) */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #0b0e12;
    background-image:
        radial-gradient(circle at 15% 25%, rgba(30, 100, 220, 0.18) 0%, transparent 35%),
        radial-gradient(circle at 85% 75%, rgba(180, 210, 255, 0.1) 0%, transparent 40%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: transform 1s cubic-bezier(0.85, 0, 0.15, 1); 
}

/* Моментальное скрытие прелоадера, если анимация не нужна */
#preloader.no-animation {
    display: none !important;
}

/* Класс запуска анимации уезда вверх */
#preloader.loaded {
    transform: translateY(-100%);
}

/* Контейнер для центрирования кадров логотипа */
.logo-container {
    position: relative;
    width: 180px;  
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Стили для кадров: убрали visibility, оставили чистый opacity */
.preloader-frame {
    position: absolute;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 0;
    filter: drop-shadow(0 4px 15px rgba(75, 130, 255, 0.5));
    /* 0.4s — идеальное время для взаимного растворения картинок */
    transition: opacity 0.4s ease-in-out;
}

/* Активный кадр плавно проявляется */
.preloader-frame.active {
    opacity: 1;
}

/* Контент страницы */
.page-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.page-wrapper.page-visible {
    opacity: 1;
}

.page-wrapper.page-fade-out {
    opacity: 0;
}
.article-preview,
.article-preview:visited,
.article-preview h1,
.article-preview h2,
.article-preview h3,
.article-preview * {
    color: inherit;
    text-decoration: none;
}