@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@800;900&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    --bg-color: #000000;
    --accent-color: #00e5ff;
    --text-muted: #888888;
}

body {
    background-color: var(--bg-color);
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    overflow-x: hidden;
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.section-padding { padding: 100px 0; }
.border-top-dark { border-top: 1px solid rgba(255,255,255,0.05); }

/* Typography */
.title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(32px, 7vw, 90px);
    line-height: 1;
    font-weight: 900;
    text-transform: uppercase;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: clamp(24px, 4vw, 42px);
    text-transform: uppercase;
}

.subtitle {
    font-size: clamp(16px, 2vw, 24px);
    color: var(--text-muted);
}

/* Blocks */
.offer-box-main {
    max-width: 850px;
    padding: 30px;
    border: 1px solid var(--accent-color);
    background: rgba(0, 229, 255, 0.03);
    font-size: 18px;
}

.benefit-card {
    background: rgba(255,255,255,0.01);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 30px;
    height: 100%;
    transition: 0.3s;
}

.benefit-card:hover {
    border-color: var(--accent-color);
    background: rgba(0, 229, 255, 0.02);
}

.benefit-card h4 { color: var(--accent-color); font-size: 18px; margin-bottom: 20px; }

/* Buttons */
.btn-demo {
    display: inline-block;
    padding: 20px 50px;
    background: #0088cc;
    color: #fff;
    border-radius: 50px;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    transition: 0.3s;
}

.btn-final-call {
    width: 100%;
    padding: 25px;
    background: #fff;
    color: #000;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    letter-spacing: 2px;
}

/* Form */
.tech-input {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.2) !important;
    color: #fff !important;
    border-radius: 0 !important;
    padding: 15px 0 !important;
}

.form-label-tech { color: var(--accent-color); font-size: 12px; letter-spacing: 2px; }

/* Misc */
.accent-line { width: 80px; height: 2px; background: var(--accent-color); }
.bold-white { color: #fff; font-weight: 700; }
.tech-note { font-size: 12px; color: #444; }

.bg-black-grid {
    background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 30px 30px;
}

.data-layers {
    background: #000;
    position: relative;
}

.avatar-container {
    position: relative;
    width: 320px;
    margin: 0 auto;
}

/* Статус-бар над фото */
.avatar-status {
    font-size: 10px;
    color: var(--accent-color);
    letter-spacing: 3px;
    margin-bottom: 8px;
    text-align: left;
    padding-left: 20px;
    opacity: 0.7;
}

.glitch-wrapper {
    position: relative;
    clip-path: polygon(30% 15%, 35% 0%, 80% 15%, 100% 35%, 85% 100%, 10% 80%);
    background: linear-gradient(135deg, rgba(0,229,255,0.2) 0%, rgba(0,0,0,0) 50%);
    padding: 0px; 
}

.custom-avatar {
    display: block;
    width: 100%;
    height: auto;
    filter: contrast(1.1) brightness(0.9) grayscale(0.3);
    clip-path: polygon(0% 15%, 15% 0%, 100% 0%, 100% 85%, 85% 100%, 0% 100%);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Эффект сканирующей линии */
.glitch-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(to bottom, transparent, var(--accent-color), transparent);
    opacity: 0.3;
    z-index: 3;
    animation: scan 3s linear infinite;
    pointer-events: none;
}

.glitch-base {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: radial-gradient(circle at center, rgba(0,229,255,0.15) 0%, transparent 70%);
    z-index: -1;
}

.avatar-container:hover .custom-avatar {
    filter: grayscale(0%) brightness(1);
    transform: scale(1.03);
}

.avatar-container:hover .glitch-scanline {
    opacity: 0.6;
    animation-duration: 1.5s;
}

@keyframes scan {
    0% { top: -10%; }
    100% { top: 110%; }
}

.list-unstyled li {
    position: relative;
    padding-left: 20px;
    border-left: 1px solid var(--accent-color);
    margin-bottom: 15px;
}

.benefit-card h4 {
    letter-spacing: 1px;
}

[style*="border-style: dashed"] {
    border-color: rgba(255,255,255,0.1) !important;
}

/* Стилизация и анимация иконок */
.benefit-card svg {
    display: block;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 0 2px rgba(0, 229, 255, 0.2));
}

.benefit-card:hover svg {
    transform: translateY(-5px) scale(1.1);
    filter: drop-shadow(0 0 10px var(--accent-color));
}

/* Улучшение читаемости списков в блоках */
.benefit-card ul li strong {
    color: var(--accent-color);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}


/* =========================================
   ПЕРЕКЛЮЧАТЕЛЬ ТЕМЫ И СВЕТЛАЯ ТЕМА
   ========================================= */
.theme-switch-wrapper {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.btn-theme {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 10px 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    backdrop-filter: blur(5px);
}

.btn-theme:hover {
    background: var(--accent-color);
    color: #000;
}

body.light-mode {
    --bg-color: #f4f5f7; 
    --accent-color: #005bb5; 
    --text-muted: #555555;
    color: #111111;
}

body.light-mode #particles-js { filter: invert(1); }
body.light-mode .benefit-card { background: rgba(0, 0, 0, 0.02); border-color: rgba(0, 0, 0, 0.1); }
body.light-mode .benefit-card:hover { background: rgba(0, 91, 181, 0.05); border-color: var(--accent-color); }
body.light-mode .offer-box-main { background: rgba(0, 91, 181, 0.05); }
body.light-mode .border-top-dark { border-top-color: rgba(0, 0, 0, 0.1); }
body.light-mode .bg-black-grid { background-image: radial-gradient(circle, rgba(0,0,0,0.1) 1px, transparent 1px); }
body.light-mode .bold-white { color: #000; }
body.light-mode .tech-input { border-bottom-color: rgba(0,0,0,0.2) !important; color: #000 !important; }
body.light-mode .tech-input::placeholder { color: #888 !important; }

/* Для светлой темы делаем полоску меню чуть темнее */
body.light-mode .sticky-menu { border-bottom: 1px solid rgba(0, 0, 0, 0.05); }


/* =========================================
   СТИЛИ ДЛЯ ШКОЛЫ И ПРИКЛЕЕННОГО МЕНЮ
   ========================================= */
.module-title { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 1.8rem; text-transform: uppercase; margin-top: 60px; margin-bottom: 30px; border-bottom: 1px solid rgba(0, 229, 255, 0.2); padding-bottom: 15px; }
.lesson-format { font-size: 10px; letter-spacing: 2px; color: var(--accent-color); margin-bottom: 15px; display: inline-block; padding: 3px 8px; border: 1px solid rgba(0, 229, 255, 0.3); background: rgba(0, 229, 255, 0.05); }
.dz-block { margin-top: 15px; padding-top: 15px; border-top: 1px dashed rgba(255,255,255,0.1); color: var(--accent-color); }
.nav-back { position: absolute; top: 20px; left: 20px; color: #fff; text-decoration: none; font-family: 'JetBrains Mono', monospace; font-size: 12px; z-index: 1003; opacity: 0.7; transition: 0.3s; }
.nav-back:hover { opacity: 1; color: var(--accent-color); }

/* Приклеенное меню (ПРОЗРАЧНОЕ + Центровка на ПК) */
.sticky-menu { 
    position: sticky; 
    top: 0; 
    background: transparent; 
    backdrop-filter: blur(10px); 
    z-index: 998; 
    min-height: 50px; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); 
    display: flex;
    align-items: center;
    justify-content: center; 
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.sticky-menu a { 
    color: #666; 
    font-family: 'JetBrains Mono', monospace; 
    font-size: 12px; 
    margin: 0 15px; 
    text-decoration: none; 
    font-weight: 700; 
    pointer-events: none; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    white-space: nowrap;
}


/* =========================================
   МОБИЛЬНАЯ АДАПТИВНОСТЬ
   ========================================= */
@media (max-width: 768px) {
    /* Создаем из кнопок плотную верхнюю панель (Шапку) */
    .theme-switch-wrapper {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        padding: 12px 15px;
        display: flex;
        justify-content: flex-end;
        gap: 8px;
        z-index: 1002; 
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        box-sizing: border-box;
    }

    body.light-mode .theme-switch-wrapper {
        background: rgba(244, 245, 247, 0.98);
    }

    .btn-theme { padding: 8px 12px; font-size: 10px; }
    .nav-back { top: 18px; left: 15px; }

    /* Сдвигаем контент на главной, чтобы шапка его не закрывала */
    .hero > .container { margin-top: 90px !important; }
    .hero { padding-top: 80px; padding-bottom: 40px; }

    /* Уменьшаем шрифты на главной */
    .title { font-size: 32px; margin-top: 20px; }
    .subtitle { font-size: 14px; }
    .offer-box-main { padding: 20px 15px; font-size: 14px; }
    .btn-demo { width: 100%; padding: 15px 20px; font-size: 14px; }
    .section-padding { padding: 60px 0; }
    .avatar-container { width: 280px; }

    /* Меню уроков СТРОГО ПОД верхней панелью + Рабочий свайп */
    .sticky-menu { 
        top: 55px; 
        justify-content: flex-start; 
        overflow-x: auto; 
        -webkit-overflow-scrolling: touch; 
        padding: 0 15px;
        flex-wrap: nowrap; 
    }
    
    .sticky-menu::-webkit-scrollbar { display: none; }
    
    .sticky-menu a {
        flex: 0 0 auto; /* Жесткий запрет на сжатие, включает скролл */
        margin: 0 20px 0 0;
    }

    .sticky-menu::after { content: ''; flex: 0 0 10px; }
    .module-title { font-size: 1.3rem; margin-top: 40px; }
}