/* --- General Setup & Variables --- */
:root {
    --primary-purple: #6a44ff; /* Остается как базовый */
    
    /* НОВАЯ ГРАДИЕНТНАЯ ПАЛИТРА */
    --gradient-bg: linear-gradient(135deg, #5f43ff00 0%, #2525510a 100%);
    --surface-color: rgba(38, 30, 78, 0.7); /* Полупрозрачный темно-фиолетовый */
    --surface-border: rgba(189, 169, 255, 0.15);
    --surface-hover: rgba(58, 48, 125, 0.7);

    --accent-pink: #ff6a88;
    --accent-glow: rgba(255, 106, 136, 0.3);

    --text-light: #e6e6fa; /* Лавандовый белый для мягкости */
    --text-muted: rgba(230, 230, 250, 0.6);
    --dark-purple: #231249;
    --light-bg: #f3f2ff;
    --text-dark: #222;         
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background-color: #ffffff; /* Запасной цвет */
    color: #222;
    transition: background-color 0.3s ease;
}

/* Класс для блокировки скролла при открытом меню */
body.nav-open {
    overflow: hidden;
}

.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Применяем анимацию к основным блокам */
.page-title-section, .hero-text, .hero-images, .feature-item {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-purple);
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(106, 68, 255, 0.3);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(106, 68, 255, 0.4);
}
.btn-primary_2 {
    background-color: var(--primary-purple);
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(106, 68, 255, 0.3);
}

.btn-primary_2:hover {
    opacity: 0.9;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(106, 68, 255, 0.4);
}
/* --- Header & Mobile Navigation --- */
.site-header {
    background-color: #eceaf8;
    padding: 0px 0;
    position: relative;
    z-index: 1000; /* Ставим хедер выше всего */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px;
}

.logo img {
    height: 150px; /* Уменьшил лого для лучшего вида */
    transition: transform 0.3s ease;
}
.logo:hover img {
    transform: scale(1.05);
}

.main-nav {
    position: fixed; /* Делаем меню фиксированным на весь экран */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Анимация появления */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.main-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.main-nav a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 24px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.main-nav a:hover {
    color: var(--primary-purple);
    transform: scale(1.1);
}

/* Show nav when body has .nav-open class */
.nav-open .main-nav {
    padding-bottom: 300px;
    height: 100vh; /* <-- 100% высоты видимой части экрана (viewport height) */
    opacity: 1;
    visibility: visible;
    transform: translateY(0);

}

.header-cta { display: none; }

.nav-toggle {
    display: block;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    z-index: 1001; /* Выше чем .main-nav */
}

.hamburger {
    display: block;
    position: relative;
    background-color: var(--text-dark);
    height: 3px;
    width: 25px;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}
.hamburger::before, .hamburger::after {
    content: '';
    position: absolute;
    background-color: var(--text-dark);
    height: 3px;
    width: 25px;
    border-radius: 2px;
    left: 0;
    transition: all 0.3s ease-in-out;
}
.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }
.nav-open .hamburger { background: transparent; }
.nav-open .hamburger::before { transform: rotate(45deg) translate(5px, 6px); }
.nav-open .hamburger::after { transform: rotate(-45deg) translate(5px, -6px); }

/* --- Page Title --- */
.page-title-section {
    text-align: center;
    padding-top: 40px;
    padding-bottom: 20px;
}
.page-title-section .subtitle {
    color: #6c757d;
    font-weight: 500;
}
.page-title-section h1 {
    margin-top: 5px;
    font-size: 2.5rem;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    padding: 60px 0;
    text-align: center;
    overflow: hidden;
}
.hero-container { display: flex; flex-direction: column; }
.about-box {
    background-color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    padding: 25px 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    color: #333;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.about-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}
.about-box p { font-size: 1rem; line-height: 1.6; margin: 0; }

.hero-images {
    margin-top: 50px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    justify-items: center;
}
.hero-images img {
    max-width: 90%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}
.hero-images img:hover {
    transform: scale(1.03);
}
.img-laptop, .img-tablet, .img-mobile { display: none; }

/* --- Decorative Shapes --- */
.shape { position: absolute; transition: transform 0.4s ease-out; }
.shape-1 { display: block; width: 15px; height: 15px; border: 2px solid var(--primary-purple); border-radius: 50%; top: 15%; left: 5%;}
.shape-4 { display: block; width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 12px solid var(--primary-purple); top: 10%; right: 8%;}
.shape-2, .shape-3, .shape-5 { display: none; }

/* --- Features Section --- */
.features-section {
    background-color: var(--dark-purple);
    color: var(--text-light);
    padding: 60px 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.04) 1px, transparent 0);
    background-size: 20px 20px;
}
.features-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
    text-align: center;
}
.feature-item {
    padding: 20px;
    border-radius: 12px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.feature-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateY(-8px);
}
.feature-item .icon-wrapper { font-size: 28px; color: var(--primary-purple); margin-bottom: 20px; }
.feature-item h3 { font-size: 20px; font-weight: 600; margin-bottom: 10px; }
.feature-item p { color: var(--text-muted); font-size: 15px; }


/* ==================================
   TABLET STYLES (min-width: 768px)
   ================================== */
@media (min-width: 330px) {
    .container { width: 85%; }
    .page-title-section h1 { font-size: 3.5rem; }
    .hero-images { grid-template-columns: repeat(2, 1fr); }
    .img-laptop, .img-tablet, .img-mobile { display: block; }
    .img-desktop { grid-column: 1 / -1; 
    width: 90%;
    }
}

/* ==================================
   DESKTOP STYLES (min-width: 1024px)
   ================================== */
@media (min-width: 1024px) {
    .container { width: 100%; }

    /* --- Desktop Header --- */
    .nav-toggle { display: none; }
    .header-cta { display: inline-block; }
    .main-nav {
        display: flex;
        position: static;
        background: transparent;
        box-shadow: none;
        width: auto;
        height: auto;
        opacity: 1;
        visibility: visible;
        transform: none;
        backdrop-filter: none;
    }
    .main-nav ul { flex-direction: row; gap: 40px; }
    .main-nav a { padding: 0; border: 0; font-size: 16px; }
    .main-nav a:hover { color: var(--primary-purple); transform: none; }

    /* --- Desktop Hero --- */
    .hero-section { padding: 80px 0; text-align: left; }
    .hero-container { flex-direction: row; align-items: center; gap: 40px; }
    .hero-text { flex: 1; }
    .page-title-section { text-align: left; padding: 60px 0 0 0; }
    .hero-images { flex: 1.2; position: relative; height: 500px; margin-top: 0; display: block; }
    .hero-images img { position: absolute; max-width: 100%; }
    .img-desktop { width: 80%; top: 0; right: 0; z-index: 2; }
    .img-laptop { width: 65%; top: 220px; left: 0; z-index: 3; }
    .img-tablet { width: 25%; top: 360px; left: 45%; z-index: 4; }
    .img-mobile { width: 15%; top: 360px; left: 75%; z-index: 4; }
    
    /* --- Desktop Features --- */
    .features-container { grid-template-columns: repeat(3, 1fr); gap: 60px; }
    
    /* --- Restore Decorative Shapes --- */
    .shape-2 { display: block; width: 40px; height: 2px; background: var(--primary-purple); position: absolute; top: 16%; left: 9%; transform: rotate(-30deg); }
    .shape-3 { display: block; width: 80px; height: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 30'%3E%3Cpath d='M0 10 C 10 0, 20 20, 30 10 S 40 0, 50 10 S 60 20, 70 10 S 80 0, 80 10' stroke='%23333' fill='none' stroke-width='2'/%3E%3Cpath d='M0 15 C 10 5, 20 25, 30 15 S 40 5, 50 15 S 60 25, 70 15 S 80 5, 80 15' stroke='%23333' fill='none' stroke-width='2'/%3E%3Cpath d='M0 20 C 10 10, 20 30, 30 20 S 40 10, 50 20 S 60 30, 70 20 S 80 10, 80 20' stroke='%23333' fill='none' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; position: absolute; bottom: 25%; left: 5%; }
    .shape-5 { display: block; width: 60px; height: 60px; position: absolute; bottom: 20%; right: 5%; background: radial-gradient(circle, rgba(255, 183, 197, 0.4) 0%, rgba(255, 183, 197, 0) 70%), repeating-conic-gradient(var(--primary-purple) 0% 25%, transparent 0% 50%) 50% / 10px 10px; background-blend-mode: multiply; opacity: 0.6; }
}


/* static/css/style.css */

/* --- Teacher Assistant Page --- */
.assistant-container {
    max-width: 920px;
    margin: 40px auto;
    padding: 0 20px;
}

.step-card {
    background-color: #fff;
    border-radius: 16px;
    padding: 30px 40px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9e8f3;
}

/* Анимация появления карточки */
.fade-in {
    animation: fadeInUp 0.7s ease-out forwards;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.step-number {
    background-color: var(--primary-purple);
    color: white;
    font-weight: 700;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.step-header h2 {
    font-size: 24px;
    margin: 30px;
    color: var(--dark-purple);
}

.step-description {
    color: #6c757d;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(106, 68, 255, 0.2);
}

.btn-submit {
    width: 100%;
    padding-top: 15px;
    padding-bottom: 15px;
    font-size: 16px;
}

.btn-submit i {
    margin-right: 10px;
}

/* Стили для результатов */
.results-list ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

.topic-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background-color: #f9f8ff;
    border-radius: 10px;
    margin-bottom: 10px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.topic-item:hover {
    transform: translateY(-3px) scale(1.02);
    border-color: var(--primary-purple);
    background-color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07);
    color: var(--primary-purple);
}

.topic-item span {
    flex-grow: 1;
    margin-right: 15px;
}

.topic-item i {
    transition: transform 0.3s ease;
}

.topic-item:hover i {
    transform: translateX(5px);
}

.back-link {
    display: inline-block;
    margin-top: 30px;
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 600;
}

.back-link:hover {
    text-decoration: underline;
}

.back-link i {
    margin-right: 8px;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: .25rem;
}
.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* static/css/style.css */

/* ... (все ваши стили) ... */

/* Когда на форме появляется класс 'is-loading'... */
#dialog-form.is-loading {
    /* ... мы показываем спиннер (если он есть внутри) */
    & .htmx-indicator {
        display: block;
        opacity: 1;
        height: auto;
    }
}

/* Кнопка, по которой кликнули */
.option-button.is-submitting,
.custom-answer-submit.is-submitting {
    background: linear-gradient(135deg, #1fa2ff, #12d8fa) !important; /* Ярко-синий */
    color: white !important;
    border-color: #1fa2ff !important;
    cursor: wait; /* Курсор ожидания */
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(20, 180, 255, 0.3);
}

/* Все остальные, неактивные кнопки */
.option-button.is-disabled,
.custom-answer-submit.is-disabled {
    background: #3a3a5a !important; /* Серый, неактивный цвет */
    color: var(--text-muted) !important;
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none; /* Полностью отключаем клики */
}

/* ==================================
   ФИНАЛЬНЫЕ СТИЛИ ДЛЯ АНИМАЦИИ КНОПОК
   ================================== */

/* Когда на форме появляется класс 'is-loading' (добавляется JS)... */
form.is-loading {
    /* ...делаем ее полупрозрачной и некликабельной */
    opacity: 0.6;
    pointer-events: none;
    cursor: wait;
    transition: opacity 0.2s ease-in-out;
}

/* 
   Для кнопки, которая инициировала отправку (JS добавляет класс .is-submitting)...
*/
.btn.is-submitting {
    /* ...меняем ее фон, чтобы показать, что она активна */
    background: linear-gradient(135deg, #1fa2ff, #12d8fa) !important;
    color: white !important;
    border-color: #1fa2ff !important;
}

/* 
   И для иконки ВНУТРИ этой кнопки...
   ИСПОЛЬЗУЕМ ВАШ НАДЕЖНЫЙ СЕЛЕКТОР!
*/
.btn.is-submitting > i {
    /* ...применяем анимацию вращения */
    animation: spin 1s linear infinite;
}

/* 
   Убедимся, что сама анимация @keyframes spin определена где-то в вашем CSS
   (из ваших предыдущих логов она уже есть). Если нет, добавьте:
*/
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



/* --- Стили для статического списка тем --- */
.topic-item-static {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 20px; background-color: #f9f8ff; border-radius: 10px;
    margin-bottom: 10px; color: var(--text-dark); font-weight: 500;
}
.topic-item-static i { color: var(--primary-purple); }

/* --- Стили для Аккордеона --- */
.accordion { display: flex; flex-direction: column; gap: 10px; }
.accordion-item { border: 1px solid #e9e8f3; border-radius: 10px; overflow: hidden; }
.accordion-header {
    width: 100%;
    background: #f9f8ff;
    border: none;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-purple);
    font-family: 'Poppins', sans-serif;
}
.accordion-header i { transition: transform 0.3s ease; }
.accordion-header.active i { transform: rotate(180deg); }
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    background: #fff;
}
.lecture-text { padding: 20px; }
.lecture-text h2 { margin-top: 20px; margin-bottom: 10px; font-size: 20px; }
.lecture-text p { margin-bottom: 15px; }
.lecture-text ul { padding-left: 20px; margin-bottom: 15px; }


.topic-counter {
    width: 100px; /* или сколько нужно */
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
}


.divider { margin: 25px 0; border: 0; border-top: 1px solid #eee; }
.lesson-content-wrapper { padding: 20px; }
.lesson-content-wrapper h4 { font-size: 18px; color: var(--dark-purple); margin-bottom: 10px; }
.instruction { font-style: italic; color: #6c757d; font-size: 15px; margin-bottom: 15px; }
.task-list { margin-left: 20px; }
.task-list li { margin-bottom: 8px; }



.language-select {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    background-color: white;
}
.architect-background {
    position: relative; /* Нужно для позиционирования "светящихся" кругов */
    width: 100%;
    min-height: calc(100vh - 90px); /* 100% высоты экрана минус высота хедера */
    padding: 40px 0;
    display: flex;
    justify-content: center;
    background: var(--gradient-bg); /* Наш основной градиентный фон */
    overflow: hidden; /* Чтобы "светящиеся" круги не вылезали за пределы */
}

/* --- Декоративные "светящиеся" круги --- */
.glow-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(150px); /* Сильное размытие для эффекта свечения */
    opacity: 0.25; /* Делаем их полупрозрачными */
}
.circle-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-purple);
    top: -150px;
    left: -150px;
}
.circle-2 {
    width: 350px;
    height: 350px;
    background: var(--accent-pink);
    bottom: -100px;
    right: -100px;
}
.circle-3 {
    width: 250px;
    height: 250px;
    background: #44aaff; /* Добавим еще один цвет для разнообразия */
    bottom: 50px;
    left: 100px;
    opacity: 0.15;
}

/* --- Основной контейнер для контента --- */
/* Он нужен, чтобы контент не растягивался на всю ширину */
.architect-background .assistant-container {
    position: relative; /* Чтобы быть поверх "светящихся" кругов */
    z-index: 2;
}

/* --- ИЗМЕНЕННЫЙ СТИЛЬ ДЛЯ ОКНА ЧАТА --- */
/* Теперь он полупрозрачный */
.chat-wrapper {
    max-width: 800px;
    margin: 0 auto;
    /* Полупрозрачный фон с эффектом "матового стекла" */
    background: rgba(28, 25, 56, 0.6); 
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    
    border-radius: 16px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    height: 75vh;
    overflow: hidden;
    border: 1px solid var(--surface-border);
}

/* Все остальные стили для .chat-window, .chat-message, .chat-form, .project-card
   остаются такими же, как в предыдущем ответе. Они будут отлично
   смотреться на новом фоне. */

/* Копируем сюда стили для .project-card, чтобы они тоже работали */
.project-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
    place-items: center;

}

.project-card {
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5);
    width: 212px;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.03);
    background: var(--surface-hover);
    border-color: var(--accent-pink);
    box-shadow: 0 0 25px var(--accent-glow);
}

.project-card i {
    font-size: 36px;
    /* Градиентный цвет для иконок */
    background: linear-gradient(45deg, var(--accent-pink), var(--primary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

/* --- Стили для центрирования последней карточки --- */
.last-row-wrapper {
    /* Растягиваем этот элемент на все колонки грида */
    grid-column: 1 / -1; 
    
    /* Используем flexbox для центрирования содержимого (кнопки) */
    display: flex;
    justify-content: center;
}


/* ==================================
   СТИЛИ ДЛЯ ЗАГРУЗКИ ПРИ ВЫБОРЕ ПРОЕКТА
   ================================== */

/* Когда на всей сетке появляется класс 'is-loading'... */
.project-types-grid.is-loading {
    /* ...делаем все карточки внутри полупрозрачными и некликабельными */
    opacity: 0.7;
    pointer-events: none;
    cursor: wait;
    transition: opacity 0.3s ease;
}

/* Карточка, на которую нажали (получит класс 'is-submitting')... */
.project-card.is-submitting {
    /* ...становится ярче и получает тень */
    transform: translateY(-5px) scale(1.03);
    border-color: var(--accent-pink);
    box-shadow: 0 0 25px var(--accent-glow);
}

/* Иконка внутри нажатой карточки... */
.project-card.is-submitting i {
    /* ...превращается во вращающийся спиннер */
    /* Важно: нам нужно убрать градиент, чтобы анимация была видна */
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    color: var(--accent-pink); /* Задаем цвет напрямую */
    
}

/* Текст внутри нажатой карточки... */
.project-card.is-submitting span {
    /* ...можно немного приглушить */
    opacity: 0.8;
}




/* ==================================
   СТИЛИ ДЛЯ ДИАЛОГА НА "ИММЕРСИВНОМ" ФОНЕ
   ================================== */

/* 
   Это правило применится к ЛЮБОЙ карточке (.step-card) на странице,
   у которой есть наш анимированный фон.
*/
.immersive-background-page .step-card {
    background: rgba(30, 30, 47, 0.65); /* Полупрозрачный фон */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.4);
    
    /* Делаем весь текст внутри карточки светлым */
    color: var(--text-light);
}

/* 
   Нам нужно переопределить некоторые цвета текста внутри карточки,
   чтобы они были контрастными на темном "стеклянном" фоне.
*/
.immersive-background-page .step-card h2 {
    color: var(--text-light);
}

.immersive-background-page .step-card .step-description,
.immersive-background-page .custom-answer-wrapper p {
    color: var(--text-muted);
}

/* --- Стили для финального ТЗ на "стеклянном" фоне --- */
/* Убираем белый фон и темный текст, которые мы делали для светлой темы */
.immersive-background-page .final-spec-content {
    background-color: rgba(15, 12, 41, 0.7); /* Еще темнее для контраста */
    color: #e6e6fa;
    border-color: rgba(255, 255, 255, 0.15);
}

.immersive-background-page .final-spec-content h3 {
    color: #6a8eff;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.immersive-background-page .final-spec-content strong {
    color: #ffffff;
}

/* --- Стили для скроллбара внутри ТЗ --- */
.immersive-background-page .final-spec-content::-webkit-scrollbar-track {
    background: transparent;
}
.immersive-background-page .final-spec-content::-webkit-scrollbar-thumb {
    background-color: var(--accent-pink);
}

/* ==================================
   СТИЛИ ДЛЯ ПОЛЯ ВВОДА СВОЕГО ОТВЕТА
   ================================== */

.custom-answer-wrapper {
    margin-top: 20px;
    border-top: 1px solid var(--surface-border);
    padding-top: 20px;
}
.custom-answer-wrapper p {
    text-align: center;
    margin-bottom: 15px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

/* Контейнер для поля ввода и кнопки, используем стили от chat-form */
.custom-answer-wrapper .chat-form {
    display: flex;
    gap: 10px;
}

/* Поле ввода */
.custom-answer-input {
    flex-grow: 1;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--surface-border);
    border-radius: 8px;
    padding: 10px 15px;
    color: var(--text-light);
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    transition: all 0.3s ease;
}
.custom-answer-input::placeholder {
    color: var(--text-muted);
}
.custom-answer-input:focus {
    outline: none;
    border-color: var(--accent-pink);
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Кнопка отправки */
.custom-answer-submit {
    flex-shrink: 0;
    background: var(--accent-pink);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--accent-glow);
}
.custom-answer-submit:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.chat-window {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Стилизация скроллбара */
.chat-window::-webkit-scrollbar-thumb {
    background-color: var(--accent-pink);
    border-radius: 10px;
}
.chat-window::-webkit-scrollbar-track {
    background: transparent;
}

.chat-message {
    padding: 15px 20px;
    border-radius: 12px;
    max-width: 80%;
    line-height: 1.6;
    animation: fadeIn 0.5s ease-out;
    border: 1px solid var(--surface-border);
}

.bot-message {
    background: var(--surface-color);
    color: var(--text-light);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    text-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5);
}

.user-message {
    /* Градиент для сообщений пользователя */
    background: linear-gradient(135deg, var(--accent-pink), var(--primary-purple));
    color: white;
    align-self: flex-end;
    border: none;
    border-bottom-right-radius: 4px;

    text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.4);
}

.chat-form {
    display: flex;
    padding: 15px;
    border-top: 1px solid var(--surface-border);
    background: var(--surface-color);
    backdrop-filter: blur(10px);
}

.chat-form textarea {
    flex-grow: 1;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--surface-border);
    border-radius: 8px;
    padding: 10px 15px;
    color: var(--text-light);
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    resize: none;
    height: 50px;
    transition: all 0.3s ease;
}

.chat-form textarea:focus {
    outline: none;
    border-color: var(--accent-pink);
    box-shadow: 0 0 15px var(--accent-glow);
}

.chat-form button {
    background: #aa6aff;
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    margin-left: 10px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.chat-form button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.last-row-wrapper {
    /* Эта строка заставляет div занять все колонки в ряду */
    grid-column: 1 / -1;

    /* А эти три строки элегантно центрируют его содержимое */
    display: flex;
    justify-content: center;
    gap: 20px; /* Такое же расстояние, как и в основной сетке */
}


/* Стили для диалога с вариантами */
.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin: 30px 0;
}

.option-button {
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    color: var(--text-light);
    padding: 15px 20px;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    width: 100%;
}
.option-button:hover {
    background: var(--surface-hover);
    border-color: var(--accent-pink);
    transform: translateY(-3px);
}

.custom-answer-wrapper {
    margin-top: 20px;
    border-top: 1px solid var(--surface-border);
    padding-top: 20px;
}
.custom-answer-wrapper p {
    text-align: center;
    margin-bottom: 15px;
    color: rgb(47 47 47 / 60%);
}
.custom-answer-input { flex-grow: 1; }
.custom-answer-submit { flex-shrink: 0; }

/* Стили для финального ТЗ */
.final-spec-content {
    background-color: #16122d;
    color: #e6e6fa;
    padding: 20px;
    border-radius: 8px;
    white-space: pre-wrap; /* Сохраняет переносы строк и пробелы */
    word-wrap: break-word; /* Переносит длинные слова */
    font-family: 'Courier New', Courier, monospace;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--surface-border);
}
.final-actions {
    margin-top: 20px;
    text-align: center;
}

.option-button {
    position: relative; /* Нужно для позиционирования иконки */
}

.tooltip-icon {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
}
/* --- БАЗОВЫЕ СТИЛИ И СБРОС --- */


/* --- СТИЛИ ДЛЯ СТРАНИЦЫ ЧАТ-БОТА V3 --- */
/* Основной контейнер, который теперь будет занимать всю высоту минус хедер */
.chatbot-main-container {
    display: flex;
    align-items: center; /* Центрируем контент по вертикали */
    flex-grow: 1;
    width: 100%;
    max-width: 1400px; /* Немного увеличим для пространства */
    margin: 0 auto;
    padding: 0 40px;
    height: calc(100vh - 100px); /* Высота экрана минус высота хедера */
    min-height: 600px;
}

.chatbot-column {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Левая колонка (CTA) */
.chatbot-cta-column {
    flex: 1;
    text-align: left; /* Выравниваем текст по левому краю */
    padding-right: 50px; /* Добавляем отступ справа */
}

.cta-content-wrapper {
    max-width: 550px;
}

.cta-content-wrapper h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.cta-content-wrapper .hero-text {
    margin: 20px 0 40px 0;
    font-size: 1.1rem;
    color: #6c757d;
}

.cta-content-wrapper .cta-block {
    display: flex;
    justify-content: flex-start; /* Выравниваем по левому краю */
    align-items: center;
    gap: 40px;
}

.cta-content-wrapper .btn {
    padding: 18px 36px;
    font-size: 1rem;
}

.cta-content-wrapper .qr-code img {
    width: 160px;
    height: 160px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(106, 68, 255, 0.25);
}

.cta-content-wrapper .qr-text,
.cta-content-wrapper .qr-subtext {
    text-align: center; /* Центрируем текст под QR */
}

/* Правая колонка (Features) - теперь это красивая карточка */
.chatbot-features-column {
    flex: 0.8; /* Делаем колонку чуть уже */
    height: fit-content; /* Высота по содержимому */
    background-color: var(--dark-purple, #231249);
    color: var(--text-light, #fff);
    border-radius: 24px; /* Главное закругление! */
    padding: 40px;
    box-shadow: 0 20px 50px rgba(35, 18, 73, 0.3);
}

.features-section-inner {
    width: 100%;
}

.features-section-inner h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 30px;
}

.features-container-compact {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Уменьшим отступ */
}

.features-container-compact .feature-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    background-color: transparent; /* Убираем фон у карточек */
    border: none; /* Убираем рамку */
    border-radius: 12px;
    transition: background-color 0.3s;
}

.features-container-compact .feature-item:hover {
    background-color: rgba(255, 255, 255, 0.07);
}

.features-container-compact .icon-wrapper {
    flex-shrink: 0;
    font-size: 22px;
    width: 45px;
    height: 45px;
    background-color: rgba(106, 68, 255, 0.2);
    color: #c4b0ff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.features-container-compact h3 {
    margin: 0 0 4px 0;
    font-size: 1rem;
}

.features-container-compact p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted, rgba(255, 255, 255, 0.7));
    line-height: 1.4;
}


/* Адаптивность */
@media (max-width: 1024px) {
    .chatbot-main-container {
        flex-direction: column-reverse;
        height: auto;
        padding: 20px;
    }
    .chatbot-cta-column {
        text-align: center;
        padding: 40px 0;
    }
    .cta-content-wrapper .cta-block {
        justify-content: center;
    }
    .cta-content-wrapper h1 { font-size: 2.5rem; }
    }



    /* Стили для финального отрендеренного ТЗ */
.final-spec-content {
    background-color: rgba(22, 18, 45, 0.7); /* Немного светлее основного фона */
    color: var(--text-light);
    padding: 20px 25px;
    border-radius: 8px;
    border: 1px solid var(--surface-border);
    max-height: 50vh;
    overflow-y: auto;
    text-align: left;
    line-height: 1.7;
}

.final-spec-content h3 {
    font-size: 20px;
    color: var(--accent-pink);
    border-bottom: 1px solid var(--surface-border);
    padding-bottom: 8px;
    margin-top: 25px;
    margin-bottom: 15px;
}
.final-spec-content h3:first-child {
    margin-top: 0;
}

.final-spec-content h4 {
    font-size: 16px;
    color: var(--text-light);
    margin-top: 20px;
    margin-bottom: 10px;
}

.final-spec-content p {
    margin-bottom: 10px;
}

.final-spec-content strong {
    color: #f0f0f0;
    font-weight: 600;
}

.final-spec-content ul {
    list-style-type: disc;
    padding-left: 20px;
}
.final-spec-content li {
    margin-bottom: 8px;
}

.final-actions {
    margin-top: 20px;
    text-align: center;
}


.final-spec-content {
    /* --- ОСНОВНЫЕ СТИЛИ КОНТЕЙНЕРА --- */
    background-color: #ffffff; /* Светлый фон, как у документа */
    color: #333333; /* Темный, читаемый текст */
    padding: 30px 40px; /* Увеличим внутренние отступы */
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    max-height: 60vh; /* Увеличим максимальную высоту */
    overflow-y: auto;
    text-align: left;
    line-height: 1.7;
    font-family: 'Poppins', sans-serif; /* Используем основной шрифт сайта */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Стилизация скроллбара для светлой темы */
.final-spec-content::-webkit-scrollbar {
    width: 8px;
}
.final-spec-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.final-spec-content::-webkit-scrollbar-thumb {
    background-color: #cccccc;
    border-radius: 10px;
}
.final-spec-content::-webkit-scrollbar-thumb:hover {
    background-color: #aaaaaa;
}


/* --- СТИЛИ ДЛЯ ЗАГОЛОВКОВ И ТЕКСТА ВНУТРИ ТЗ --- */

/* Заголовки разделов (например, "1. Обзор и цели проекта") */
.final-spec-content h3 {
    font-size: 22px;
    color: #222; /* Убираем красный, делаем темно-серым */
    border-bottom: 2px solid var(--primary-purple); /* Фирменный акцент */
    padding-bottom: 8px;
    margin-top: 30px;
    margin-bottom: 0px;
}
.final-spec-content h3:first-child {
    margin-top: 0;
}

/* Подзаголовки */
.final-spec-content h4 {
    font-size: 18px;
    color: #444;
    margin-top: 25px;
    margin-bottom: -12px;
}

/* Обычные параграфы */
.final-spec-content p {
    margin-bottom: 2px;
}

/* Выделение жирным */
.final-spec-content strong {
    color: #000;
    font-weight: 600;
}

/* Списки */
.final-spec-content ul,
.final-spec-content ol {
    padding-left: 25px; /* Увеличим отступ для списков */
    margin-top: -50px;
}
.final-spec-content li {
    margin-bottom: -40px;
}

.final-actions {
    margin-top: 25px;
    text-align: center;
}

/* ==================================================
   ФИНАЛЬНАЯ МОБИЛЬНАЯ АДАПТАЦИЯ (САМЫЙ ПРОСТОЙ ПОДХОД)
   ================================================== */

@media (max-width: 768px) {

    /* --- 1. ОБЩИЕ УЛУЧШЕНИЯ --- */
    .architect-background .assistant-container {
        width: 90%;
    }
    .step-card {
        padding: 25px;
    }
    .intro-text-block {
        margin-bottom: 30px;
    }
    
    /* --- 2. СЕТКА ВЫБОРА ПРОЕКТА: ПРЕВРАЩАЕМ В ПРОСТОЙ СПИСОК --- */
    .project-types-grid {
        /* Отключаем Grid. Теперь элементы будут вести себя как обычные блоки. */
        display: block;
    }

    /* --- 3. АДАПТАЦИЯ САМИХ КАРТОЧЕК --- */
    .project-card {
        /* Заставляем каждую карточку занимать всю ширину */
        width: 100%;
        /* Добавляем отступ снизу между карточками */
        margin-bottom: 15px;
        
        /* Возвращаем вашу красивую вертикальную ориентацию */
        flex-direction: column;
        justify-content: center;
        gap: 15px;
        padding: 30px 25px;
    }

    /* Убедимся, что у последней карточки нет лишнего отступа снизу */
    .project-card:last-child {
        margin-bottom: 15px;
    }

    /* --- 4. АДАПТАЦИЯ ДИАЛОГОВОГО ОКНА (без изменений) --- */
    .chat-wrapper { height: 85vh; }
    .options-grid { grid-template-columns: 1fr; }
}

/* --- Стили для кнопки "Выйти" в навигации --- */

.logout-form {
    display: inline; /* Чтобы форма не занимала всю ширину */
    margin: 0;
    padding: 0;
}

.logout-button {
    /* Сбрасываем все стандартные стили кнопки */
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit; /* Наследуем шрифт от родителя (<li>) */
    color: inherit; /* Наследуем цвет текста */
    cursor: pointer;

    /* Копируем стили из вашего .main-nav a, чтобы выглядело одинаково */
    /* Эти значения могут отличаться в вашем файле */
    display: block;
    padding: 15px 20px; /* Пример, как в вашем меню */
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.logout-button:hover {
    /* Стиль при наведении, как у ваших ссылок */
    color: var(--primary-purple);
}

/* --- Стили для хедера --- */
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.main-nav { flex-grow: 1; } /* Заставляет основное меню занять место слева */

.user-nav {
    display: none; /* Скрываем на мобильных по умолчанию */
    align-items: center;
    gap: 15px; /* Отступ между кнопками */
}

/* Новый стиль для вторичной кнопки (например, "Регистрация") */
.btn-secondary {
    background: transparent;
    color: var(--text-dark);
    font-weight: 600;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}
.btn-secondary:hover {
    background-color: rgba(0,0,0,0.05);
}


/* --- Стили для страниц входа/регистрации --- */
.auth-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 450px;
    width: 100%;
    margin: 40px auto;
}
.auth-card h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    color: var(--dark-purple);
}

.auth-card .form-group {
    margin-bottom: 20px;
}
.auth-card label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}
.auth-card input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    transition: all 0.3s ease;
}
.auth-card input:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(106, 68, 255, 0.2);
}

.auth-card .btn-primary {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    margin-top: 10px;
}

.auth-switch-link {
    text-align: center;
    margin-top: 25px;
    color: #6c757d;
}
.auth-switch-link a {
    color: var(--primary-purple);
    font-weight: 600;
    text-decoration: none;
}
.auth-switch-link a:hover {
    text-decoration: underline;
}

/* Показываем user-nav на десктопах */
@media (min-width: 1024px) {
    .user-nav { display: flex; }
}

/* --- Общие стили --- */
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.main-nav { flex-grow: 1; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}
.user-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* --- МОБИЛЬНАЯ ВЕРСИЯ (по умолчанию) --- */
.desktop-only {
    display: none !important; /* Скрываем элементы только для десктопа */
}
.mobile-only {
    display: block; /* Показываем элементы только для мобильного меню */
}

/* На мобильных мы хотим видеть только имя пользователя, если он залогинен */
.user-nav .logout-form,
.user-nav .btn-secondary { /* Это скроет "Регистрация" и "Профиль" (имя останется) */
    display: none;
}
/* Но имя пользователя мы хотим видеть */
.user-nav .user-profile-link {
    display: block;
    color: var(--text-dark); /* Делаем его похожим на обычный текст */
    font-weight: 600;
}


/* --- ПЛАНШЕТЫ И ДЕСКТОПЫ (начиная с 1024px) --- */
@media (min-width: 1024px) {
    .desktop-only {
        display: inline-block !important; /* Показываем десктопные элементы */
    }
    .mobile-only {
        display: none !important; /* Скрываем мобильные */
    }
    
    /* Возвращаем все кнопки для пользователя */
    .user-nav .logout-form,
    .user-nav .btn-secondary {
        display: inline-block;
    }
    
    /* Стилизуем ссылку-имя, чтобы она выглядела как вторичная кнопка */
    .user-nav .user-profile-link {
        /* Применяем стили от .btn-secondary */
        background: transparent;
        color: var(--text-dark);
        text-decoration: none;
        padding: 10px 20px;
        border-radius: 8px;
        transition: all 0.3s ease;
    }
    .user-nav .user-profile-link:hover {
        background-color: rgba(0,0,0,0.05);
    }
}

/* --- Стили для баланса токенов --- */
.token-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    color: var(--text-light); /* Или var(--text-dark) в зависимости от темы хедера */
}
.token-balance i {
    color: #ffd700; /* Золотой цвет для иконки монетки */
}

/* --- Стили для блокировки интерфейса для анонимов --- */
.disabled-grid {
    opacity: 0.3;
    pointer-events: none; /* Отключаем клики */
    filter: blur(2px);
}

.auth-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(28, 25, 56, 0.5); /* Полупрозрачный фон */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 16px; /* Если у родителя есть */
}

.auth-overlay .btn-lg {
    padding: 15px 30px;
    font-size: 18px;
}

/* --- Стили для страницы профиля --- */
.profile-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    padding: 30px;
}
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 20px;
}
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-bg);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 600;
}
.profile-info h2 { margin: 0; font-size: 28px; }
.profile-info p { margin: 0; color: #6c757d; }
.profile-stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
}
.stat-value { font-size: 24px; font-weight: 700; display: block; }
.stat-label { font-size: 14px; color: #6c757d; }
.profile-actions { text-align: right; margin-top: 20px; }

/* --- Стили для хедера и профиля --- */

/* Ссылка на профиль в хедере */
.user-profile-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 20px;
    transition: background-color 0.3s ease;
}
.user-profile-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Новый, контрастный аватар в хедере */
.header-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-pink), var(--primary-purple)); /* Яркий градиент */
    color: white; /* Белый текст на градиенте */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    border: 2px solid rgba(255, 255, 255, 0.8); /* Светлая обводка */
}

.header-username {
    font-weight: 600;
    color: var(--text-light); /* Или var(--text-dark) в зависимости от темы хедера */
}

/* Аватар на странице профиля (у вас уже есть, можно просто проверить) */
.profile-avatar {
    /* ... */
    background: linear-gradient(135deg, var(--accent-pink), var(--primary-purple));
    color: white;
    border: 3px solid white;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
}


/* --- Главный контейнер виджета (теперь это ссылка <a>) --- */
.user-profile-widget {
    display: flex;
    align-items: center;
    background: var(--surface-color); /* Полупрозрачный фон */
    border: 1px solid var(--surface-border);
    border-radius: 50px; /* Полностью скругленные края */
    padding: 4px; /* Небольшой внутренний отступ */
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.user-profile-widget:hover {
    background: var(--surface-hover);
    border-color: var(--accent-pink);
    box-shadow: 0 0 15px var(--accent-glow);
    transform: translateY(-2px);
}

/* --- Баланс токенов --- */
.token-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    font-weight: 600;
    color: var(--text-light);
    font-size: 14px;
}

.token-balance i {
    color: #ffd700; /* Золотой цвет для иконки монетки */
}

/* --- Вертикальный разделитель --- */
.widget-divider {
    width: 1px;
    height: 24px;
    background-color: var(--surface-border);
    margin-left: 5px;
}

/* --- Блок с аватаром и именем --- */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px 0 6px;
}

.header-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-pink), var(--primary-purple));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0; /* Чтобы аватар не сжимался */
}

.header-username {
    font-weight: 600;
    color: var(--text-light);
    white-space: nowrap; /* Чтобы имя не переносилось на новую строку */
}

/* --- Кнопка "Выйти" --- */
.logout-btn-header {
    /* Сделаем ее менее навязчивой */
    background: transparent;
    border: 1px solid var(--accent-pink);
    color: var(--accent-pink);
    padding: 10px 20px;
}
.logout-btn-header:hover {
    background: var(--accent-pink);
    color: white;
}


/* --- АДАПТИВНОСТЬ --- */
/* На мобильных устройствах скрываем текст */
@media (max-width: 768px) {
    .header-username{
        display: none;
    }
    .widget-divider {
        margin: 0 4px;
    }
}


.progress-bar-container {
    width: 100%;
    background-color: #e0e0de;
    border-radius: 5px;
    margin: 20px 0;
}
.progress-bar {
    width: 0%;
    height: 10px;
    background-color: var(--primary-purple);
    border-radius: 5px;
    transition: width 0.5s ease-in-out;
}
/* ==================================
   НОВЫЕ СТИЛИ ДЛЯ СТРАНИЦЫ AI-ПРЕПОДАВАТЕЛЯ
   ================================== */

/* --- Общая структура страницы --- */
.teacher-assistant-page {
    display: flex;
    /* ИСПРАВЛЕНИЕ: Выравниваем по верху, а не по центру */
    align-items: flex-start; 
    gap: 60px;
    min-height: calc(100vh - 120px);
    width: 100%;
    max-width: 1300px;
    margin: 20px auto;
    padding: 40px; /* Добавляем отступы, чтобы контент не прилипал к краям */
}

/* --- Левая информационная колонка --- */
.info-panel-column {
    flex: 1; /* Занимает доступное пространство */
    padding-right: 40px;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-panel-title {
    font-size: 3rem; /* Крупный заголовок */
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark-purple, #231249);
    margin-bottom: 15px;
}

.info-panel-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 40px;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 25px; /* Отступ между фичами */
    background-color: var(--dark-purple, #231249);
    color: var(--text-light, #fff);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(35, 18, 73, 0.3);
}

.features-list .feature-item {
    display: flex;
    align-items: flex-start; /* Иконка и текст на одном уровне */
    gap: 20px;
    /* Анимация появления для каждого элемента списка */
    opacity: 0;
    transform: translateX(-20px);
    animation: slideIn 0.5s ease-out forwards;
    
}

/* Задержка анимации для каждого элемента, чтобы они появлялись по очереди */
.features-list .feature-item:nth-child(1) { animation-delay: 0.2s; }
.features-list .feature-item:nth-child(2) { animation-delay: 0.3s; }
.features-list .feature-item:nth-child(3) { animation-delay: 0.4s; }
.features-list .feature-item:nth-child(4) { animation-delay: 0.5s; }

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.features-list .icon-wrapper {
    flex-shrink: 0;
    font-size: 22px;
    width: 45px;
    height: 45px;
    background-color: rgba(106, 68, 255, 0.2);
    color: #c4b0ff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.features-list .feature-text h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    font-weight: 600;
}
.features-list .feature-text p {
    margin: 0;
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.5;
}

/* --- Правая колонка с формами --- */
.workflow-column {
    flex: 1.1; /* Делаем ее немного шире, т.к. там основной интерактив */
    min-width: 500px; /* Минимальная ширина, чтобы форма не сжималась */
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Адаптивность --- */
@media (max-width: 1024px) {
    .teacher-assistant-page {
        flex-direction: column; /* Колонки встают друг под другом */
        min-height: auto;
        gap: 30px;
        padding: 20px;
    }
    .info-panel-column {
        padding-right: 0;
        text-align: center;
    }
    .features-list .feature-item {
        text-align: left; /* Внутри карточки текст по левому краю */
    }
    .workflow-column {
        min-width: 100%;
        width: 100%;
    }
}
















/* ==================================
   АНИМАЦИЯ КОЛОНОК ДЛЯ AI-ПРЕПОДАВАТЕЛЯ
   ================================== */

/* --- Базовая настройка родительского контейнера --- */
.teacher-assistant-page {
    position: relative; /* Обязательно для абсолютного позиционирования дочерних элементов */
    display: flex;
    align-items: center;
    gap: 60px;
    /* ... (остальные ваши стили) ... */
}

/* --- Настройка обеих колонок --- */
.info-panel-column, .workflow-column {
    /* Плавный переход для всех свойств */
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1); /* Красивая кривая замедления */
}

/* --- Состояние, когда левая колонка СКРЫТА --- */
.info-panel-column.is-hidden {
    /* Уводим ее далеко влево и делаем некликабельной */
    pointer-events: none;
    max-width: 533px; /* Ограничиваем ширину, чтобы не занимала место */
    /* Делаем ее абсолютно спозиционированной, чтобы она вышла из потока */
    position: absolute;
    display:none; /* Скрываем элемент, чтобы не занимал место */
}

/* --- Состояние, когда правая колонка ЦЕНТРИРОВАНА --- */
.workflow-column.is-centered {
    /* 
       Этот трюк с transform центрирует элемент абсолютно,
       независимо от других элементов.
    */
    margin: 0 auto; /* Центрируем по горизонтали */
    width: 100%; /* Занимаем всю ширину родителя .assistant-container */
    max-width: 700px; /* Можно задать максимальную ширину для центрированного блока */
}


/* --- Адаптивность: на мобильных анимация не нужна --- */
@media (max-width: 1024px) {
    /* Просто скрываем левую панель, когда она не нужна */
    .info-panel-column.is-hidden {
        display: none;
    }
    /* Убираем абсолютное позиционирование для правой */
    .workflow-column.is-centered {
        position: static;
        left: auto;
        top: auto;
        transform: none;
        max-width: none; /* Возвращаем к 100% ширины */
    }
}




/* ==================================
   СТИЛИ ДЛЯ "ИММЕРСИВНОЙ" СТАРТОВОЙ СТРАНИЦЫ AI-АРХИТЕКТОРА
   ================================== */

/* --- Анимированный фон для всей страницы --- */
.immersive-background-page {
    background: linear-gradient(-45deg, #0f0c29, #302b63, #24243e, #ff6a88);
    background-size: 400% 400%;
    animation: gradient-animation 15s ease infinite;
    color: var(--text-light); /* Весь текст на этой странице по умолчанию будет светлым */
}

@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- Главный контейнер на всю высоту --- */
.immersive-container {
    display: flex;
    align-items: center; /* Центрируем колонки по вертикали */
    justify-content: center;
    min-height: calc(100vh - 85px); /* Высота экрана минус хедер */
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px;
    gap: 60px;
}

.immersive-column {
    flex: 1; /* Обе колонки занимают равное пространство */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* --- Левая информационная колонка --- */
.info-column {
    animation: fadeInUp 0.8s ease-out;
}

.immersive-title {
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 25px;
}
/* Анимация появления строк заголовка */
.immersive-title span {
    display: block;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.6s ease-out forwards;
}
.immersive-title span:nth-child(2) { animation-delay: 0.1s; }
.immersive-title span:nth-child(3) { animation-delay: 0.2s; }

@keyframes slideUp { to { opacity: 1; transform: translateY(0); } }


.immersive-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 500px;
}

.immersive-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.immersive-features .feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.5s ease-out forwards;
}
.immersive-features .feature-item:nth-child(1) { animation-delay: 0.4s; }
.immersive-features .feature-item:nth-child(2) { animation-delay: 0.5s; }
.immersive-features .feature-item:nth-child(3) { animation-delay: 0.6s; }

.feature-icon {
    font-size: 18px;
    color: var(--accent-pink);
}
.immersive-features p {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}


/* --- Правая колонка с карточками --- */
.workflow-column .step-card.glass-effect {
    background: rgba(30, 30, 47, 0.6); /* Полупрозрачный фон */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    animation: fadeInUp 0.8s ease-out 0.2s backwards; /* Появляется чуть позже */
}
.workflow-column .step-card.glass-effect h2,
.workflow-column .step-card.glass-effect .step-description {
    color: var(--text-light);
}

/* Стили для карточек выбора проекта остаются прежними, они отлично впишутся */

/* --- Адаптивность --- */
@media (max-width: 1024px) {
    .immersive-container {
        flex-direction: column;
        min-height: auto;
        padding: 20px;
        text-align: center;
    }
    .immersive-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    .immersive-features {
        align-items: center;
    }
    .immersive-features .feature-item {
        justify-content: center;
    }
}



/* --- Главный контейнер хедера --- */
.site-header {
    padding: 15px 0;
    position: sticky; /* Делаем хедер "липким" */
    top: 0;
    z-index: 1000;
    width: 100%;

    /* Эффект "матового стекла" */
    background: rgba(22, 18, 45, 0.6); /* Полупрозрачный темно-фиолетовый */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Тонкая светлая граница */
    transition: background-color 0.3s ease;
}

/* Добавляем тень при скролле (понадобится маленький JS) */
.site-header.scrolled {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.site-header .container {
    max-height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Логотип --- */
.logo img {
    margin-top: 8px;
    margin-left: 30px;
    height: 40px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.logo:hover img {
    transform: scale(1.05);
    opacity: 0.9;
}

/* --- Основная навигация --- */
.main-nav {
    flex-grow: 1;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 35px; /* Расстояние между пунктами */
    margin: 0;
    padding: 0;
}

.main-nav a {
    position: relative; /* Нужно для анимации подчеркивания */
    text-decoration: none;
    color: var(--text-muted, rgba(230, 230, 250, 0.7)); /* Приглушенный цвет */
    font-weight: 600;
    font-size: 16px;
    padding: 10px 5px;
    transition: color 0.3s ease;
}

/* Эффект при наведении */
.main-nav a:hover {
    color: var(--text-light, #e6e6fa); /* Становится ярче */
}

/* Анимация подчеркивания при наведении */
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-pink), var(--primary-purple));
    transform: scaleX(0); /* Изначально линия "сжата" */
    transform-origin: center;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1); /* Плавный эффект */
}

.main-nav a:hover::after {
    transform: scaleX(1); /* "Растягиваем" линию при наведении */
}






/* ==================================


/* --- Класс для стандартного фона --- */
.default-background-page {
    background-color: #F9F9FB;
    /* Текстура "цифрового шума" - тонкая, едва заметная */
    background-image: url('data:image/svg+xml,%3Csvg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noise"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="4" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%" height="100%" filter="url(%23noise)" opacity="0.02"/%3E%3C/svg%3E');
}

/* --- Обновляем "парящий" хедер для светлой темы --- */
.default-background-page .site-header {
    /* Делаем его полупрозрачным белым */
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
/* Меняем цвет текста в навигации на темный */
.default-background-page .main-nav a {
    color: #555;
}
.default-background-page .main-nav a:hover {
    color: #000;
}
/* Стили для виджета пользователя тоже нужно адаптировать */
.default-background-page .user-profile-widget {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}
.default-background-page .header-username {
    color: #333;
}
.default-background-page .token-balance {
    color: #333;
}


/* Обновляем цвета внутри карточки */
.default-background-page .step-card h2 {
    color: #111;
}
.default-background-page .step-card .step-description {
    color: #666;
}

/* --- Стили для главной страницы (core/home.html) --- */
.default-background-page .page-title-section {
    text-align: center;
}
.default-background-page .page-title-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-pink), var(--primary-purple));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.default-background-page .page-title-section .lead {
    font-size: 1.2rem;
    color: #555;
    max-width: 600px;
    margin: 20px auto 0 auto;
}

/* Карточки-фичи на главной */






/* ==================================
   ПОЛНЫЕ СТИЛИ ДЛЯ ПУБЛИЧНОГО ДАШБОРДА
   ================================== */

/* --- Заголовок страницы --- */
.page-header {
    text-align: center;
    margin-bottom: 50px;
    padding-top: 40px;
}

.page-header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.page-header .lead {
    font-size: 1.1rem;
    color: #6c757d;
    margin: 0 auto;
}

/* --- Сетка для виджетов --- */
.dashboard-grid {
    display: grid;
    /* Создаем 2 колонки одинаковой ширины */
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.dashboard-grid_for_admin {
    display: grid;
    /* Создаем 2 колонки одинаковой ширины */
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
}
.assistant-container_for_admin_dashboard {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}
/* --- Стиль для отдельного виджета --- */
.dashboard-widget {
    background: #ffffff;
    padding: 25px 30px;
    border-radius: 16px;
    /* Мягкая тень в стиле Apple */
    box-shadow: 0 4px 6px rgba(0,0,0,0.04), 0 10px 25px rgba(0,0,0,0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    min-height: 450px; /* Фиксированная высота для единообразия */

}

.dashboard-widget h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Контейнер для canvas, чтобы он занимал все доступное место */
.chart-container {
    position: relative;
    flex-grow: 1;
}

/* Виджет, который занимает всю ширину */
.full-width-widget {
    /* Растягиваем этот виджет на обе колонки */
    grid-column: 1 / -1;
}

/* --- Адаптивность для дашборда --- */
@media (max-width: 992px) {
    .dashboard-grid {
        /* На планшетах и мобильных - одна колонка */
        grid-template-columns: 1fr;
    }
}



.cta-banner {
    background: var(--gradient-bg, linear-gradient(135deg, #6a44ff, #ff6a88));
    padding: 30px 40px;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    box-shadow: 0 10px 30px rgba(106, 68, 255, 0.3);
}
.cta-banner h3 { margin: 0 0 5px 0; font-size: 22px; }
.cta-banner p { margin: 0; opacity: 0.9; color:(38, 30, 78, 0.7);}




/* --- Стили для Персонального Дашборда Студента --- */
.text-center { text-align: center; }

/* Мини-борд */
.mini-board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}
.mini-board-widget {
    background: #fff;
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.04);
}
.mini-board-widget h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #6c757d;
}
.stat-main {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-purple);
    line-height: 1;
}
.stat-sub {
    font-size: 14px;
    color: #888;
}

/* Списки предметов */
.subject-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.subject-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}
.subject-list li:last-child {
    border-bottom: none;
}
.subject-name {
    font-weight: 500;
}
.subject-grade {
    font-size: 18px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 8px;
}
.top-grade {
    background-color: #e6f9f1;
    color: #00b074;
}
.worst-grade {
    background-color: #fff0f0;
    color: #f44336;
}


.mini-board-grid-large {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}



/* --- Стили для переключателя графиков --- */
.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.widget-header h3 {
    margin: 0;
}
.chart-toggle {
    display: flex;
    background-color: #f0f0f0;
    border-radius: 8px;
    padding: 4px;
}
.toggle-btn {
    padding: 6px 12px;
    border: none;
    background-color: transparent;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}
.toggle-btn.active {
    background-color: #fff;
    color: var(--primary-purple);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}


/* --- Стили для дашборда студента --- */
.chart-subtitle {
    font-size: 14px;
    color: #6c757d;
    text-align: center;
    margin-top: -15px;
    margin-bottom: 15px;
}




.ai-insight-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.ai-insight-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}
.ai-insight-section p {
    margin: 0;
    color: #555;
}

/* --- Основной контейнер-виджет --- */
.ai-analysis-container {
    display: flex;
    flex-direction: column;
    /* Убедимся, что он может растягиваться, если нужно */
    min-height: 450px; /* Та же высота, что и у других виджетов */
}

.ai-analysis-container .widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0; /* Заголовок не должен сжиматься */
}
.ai-analysis-container h3 {
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0; /* Убираем лишние отступы */
}

/* --- Контейнер для контента (кнопки или текста) --- */
#ai-analysis-content {
    flex-grow: 1; /* Заставляет этот блок занять все доступное место */
    
    /* --- КЛЮЧЕВЫЕ СВОЙСТВА ДЛЯ АДАПТИВНОСТИ --- */
    
    /* 1. Устанавливаем максимальную высоту. 
       calc(100% - ...) не всегда надежен, лучше использовать flexbox. */
    overflow-y: auto; /* Добавляем вертикальную прокрутку, если контент не помещается */
    
    /* 2. Гарантируем, что длинные слова/ссылки будут переноситься */
    word-wrap: break-word;
    overflow-wrap: break-word;
    
    padding-right: 15px; /* Отступ справа, чтобы скроллбар не "прилипал" к тексту */
}

/* Стили для секций с текстом от AI */
.ai-insight-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}



/* --- Стили для вкладок --- */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
}
.auth-tab {
    padding: 10px 20px;
    text-decoration: none;
    color: #6c757d;
    font-weight: 600;
    border-bottom: 3px solid transparent;
}
.auth-tab.active {
    color: var(--primary-purple);
    border-bottom-color: var(--primary-purple);
}
.auth-tab.special {
    margin-left: auto; /* Прижимает вкладку "Я студент" вправо */
    color: #61ff2b
}
.auth-tab.special.active {
    border-bottom-color: #61ff2b;
}

/* --- Стили для поля email --- */
.email-input-group {
    display: flex;
    align-items: center;
}
.email-input-group input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}
.email-domain {
    padding: 12px 15px;
    background-color: #f9f9fb;
    border: 1px solid #ccc;
    border-left: none;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    font-weight: 600;
    color: #555;
}



/* ==================================
   СТИЛИ ДЛЯ ПЛАШКИ-ДИСКЛЕЙМЕРА
   ================================== */
.disclaimer-box {
    display: flex;
    align-items: flex-start; /* Выравниваем по верху, если текст многострочный */
    gap: 15px;
    
    /* Используем цвета, характерные для предупреждений */
    background-color: #fffbe6; /* Светло-желтый фон */
    color: #8a6d3b; /* Темно-желтый текст */
    border: 1px solid #ffeeba; /* Желтая рамка */
    
    padding: 15px 20px;
    border-radius: 12px; /* Скругление в стиле Apple */
    margin-bottom: 40px; /* Отступ от контента ниже */
}

.disclaimer-icon {
    font-size: 20px;
    margin-top: 2px; /* Небольшая коррекция для выравнивания с текстом */
}

.disclaimer-text {
    font-size: 15px;
    line-height: 1.6;
}

.disclaimer-text strong {
    color: #664d03; /* Еще более темный желтый для заголовка */
}


@media (max-width: 768px) {
    .mini-board-grid-large {
        /* Переключаем сетку на 2 колонки */
        grid-template-columns: repeat(2, 1fr);
        gap: 15px; /* Немного уменьшаем отступ */
    }

    /* Делаем шрифт в виджетах чуть меньше, чтобы все помещалось */
    .mini-board-widget h4 {
        font-size: 14px;
    }
    .stat-main {
        font-size: 2rem;
    }
    .stat-sub {
        font-size: 12px;
    }
}




.ai-insight-box {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}
.ai-insight-box p {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
    font-style: italic;
}
.spinner-inline {
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}






/* ==================================
   СТИЛИ ДЛЯ МОДАЛЬНОГО ОКНА AI-АНАЛИЗА
   ================================== */

.widget-footer {
    margin-top: auto; /* Прижимает кнопку к низу виджета */
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}


/* ==================================================
   СТИЛИ ДЛЯ СТАТИЧНОГО БЛОКА "НАШИ ПРОЕКТЫ"
   ================================================== */

.full-width-projects-section {
    padding: 80px 0;
    background-color: #f7f7ff; /* Светлый фон */
}

.full-width-projects-section .section-title {
    text-align: center;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-dark-primary);
    margin-bottom: 50px;
}

/* --- Адаптивная сетка карточек --- */
.projects-grid {
    display: grid;
    /* По умолчанию 5 колонок, если хватит места */
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.project-grid-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 30px 15px;
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 15px;
    
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.project-grid-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(122, 92, 255, 0.15);
}

.project-grid-card.active {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(122, 92, 255, 0.3);
    transform: translateY(-4px);
}

.project-grid-card i {
    font-size: 32px;
    color: var(--primary-purple);
}

.project-grid-card span {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark-primary);
    line-height: 1.4;
}

.project-grid-card i { font-size: 32px; color: var(--primary-purple); }
.project-grid-card span { font-size: 1.1rem; font-weight: 600; line-height: 1.4; }


/* --- Панель с описаниями --- */
.project-descriptions-panel {
    min-height: 100px;
    margin-top: 50px;
    text-align: center;
}

.project-description {
    display: none;
}
.project-description.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.project-description h3 {
    font-size: 1.6rem;
    margin-bottom: 10px;
    color: var(--text-dark-primary);
}
.project-description p {
    font-size: 1.1rem;
    color: #6c757d;
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto;
}


/* Для средних экранов (ноутбуки) - 4 колонки */
@media (max-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Для планшетов - 2 колонки */
@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Для мобильных - 1 колонка */
@media (max-width: 576px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .project-grid-card {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
    }
}

/* ==================================================
   РЕДИЗАЙН ЛЕНДИНГА "AI AVATAR" (v.Final)
   ================================================== */

/* --- 1. Секция HERO (Главный экран) - РЕДИЗАЙН --- */

.avatar-hero-section {
    padding: 100px 0;
    background-color: #f7f7ff;
}

.avatar-hero-container {
    display: flex;
    align-items: center;
    gap: 60px;
}

.hero-text-content {
    flex: 1.2; /* Даем текстовому блоку больше места */
    text-align: left;
}

.hero-text-content h1 {
    /* Делаем заголовок НАМНОГО крупнее */
    font-size: 4.5rem; /* было 3.5rem */
    font-weight: 800; /* делаем жирнее */
    line-height: 1.15;
    color: var(--text-dark-primary);
    margin-bottom: 25px;
}

.hero-text-content p {
    font-size: 1.2rem; /* Увеличиваем текст описания */
    color: #6c757d;
    margin-bottom: 40px;
    max-width: 550px;
}

.hero-text-content .btn-primary { padding: 18px 36px; font-size: 1.1rem; margin-right: 25px; }
.watch-video-btn { font-size: 1.1rem; }

.hero-image-content {
    flex: 1;
    text-align: right;
}
.hero-image-content img {
    max-width: 100%;
    height: auto;
}


/* --- 2. Секция FEATURES (Особенности курса) - без изменений --- */

.avatar-features-section {
    padding: 100px 0; /* Увеличиваем отступы */
    background-color: #ffffff; 
}

.avatar-features-section .section-title,
.avatar-course-section .section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 50px;
    color: var(--text-dark-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: left; /* Выравниваем текст по левому краю для аккуратности */
}

.feature-card {
    padding: 30px;
    border-radius: 16px;
    background-color: #f7f7ff; /* Фон карточек */
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(122, 92, 255, 0.1);
    border-color: var(--primary-purple);
}

.feature-card i {
    font-size: 28px; /* Уменьшаем иконки */
    color: var(--primary-purple);
    margin-bottom: 20px;
    /* Помещаем иконку в кружок */
    display: inline-flex;
    width: 60px;
    height: 60px;
    align-items: center;
    justify-content: center;
    background-color: #ede9ff;
    border-radius: 50%;
}
.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}
.feature-card p {
    color: #6c757d;
}


/* --- 3. Секция COURSE (Программа курса) - РЕДИЗАЙН --- */

.avatar-course-section {
    padding: 100px 0;
    background-color: var(--dark-purple, #231249);
    color: #ffffff;
    
    /* Добавляем декоративный элемент */
    position: relative;
    overflow: hidden;
}
.avatar-course-section::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(122, 92, 255, 0.15), transparent 70%);
}

.avatar-course-section .container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center; /* Центрируем все содержимое */
    text-align: center;
}

.avatar-course-section .section-title {
    color: #ffffff;
    font-size: 2.8rem;
}
.avatar-course-section .section-subtitle {
    max-width: 600px;
    margin-top: -30px;
    margin-bottom: 40px;
    color: var(--text-muted, rgba(255,255,255,0.7));
}

/* static/css/style.css */

.course-grid {
    width: 100%;
    max-width: 800px;
    min-height: 150px;
    background-color: rgba(0,0,0,0.15);
    border: 1px dashed var(--surface-border, rgba(189, 169, 255, 0.2)); /* Делаем рамку пунктирной */
    border-radius: 16px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Стили для текста-заглушки */
    color: var(--text-muted, rgba(255,255,255,0.5));
    font-style: italic;
}

/* Кнопка теперь идеально вписана */
.btn-large {
    padding: 18px 40px;
    font-size: 1.1rem;
}


/* --- МОБИЛЬНАЯ АДАПТАЦИЯ --- */
@media (max-width: 992px) {
    .avatar-hero-section { padding: 60px 0; }
    .avatar-hero-container { flex-direction: column-reverse; }
    .hero-text-content { text-align: center; }
    .hero-text-content h1 { font-size: 2.8rem; }
    
    .avatar-features-section { padding: 60px 0; }
    .features-grid { grid-template-columns: 1fr; }
    
    .avatar-course-section { padding: 60px 0; }
}

/* ==================================
   СТИЛИ ДЛЯ СТРАНИЦЫ КУРСА (AI AVATAR PLAYER)
   ================================== */

.course-player-container {
    display: flex;
    gap: 30px;
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 40px;
}

/* --- Левая колонка (список лекций) --- */
.lecture-list-sidebar {
    flex: 0 0 350px; /* Фиксированная ширина 350px */
    background-color: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.04);
    align-self: flex-start; /* "Прилипает" к верху */
}
.lecture-list-sidebar h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}
.video-responsive-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    
    /* Анимация появления */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    
    /* Анимация появления */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #f9f9fb; /* Чистый, светло-серый фон */
    border-radius: 16px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.2);
    width: 90%;
    /* Увеличиваем максимальную ширину для комфортного просмотра */
    max-width: 1200px; 
    height: 85vh; /* Занимает 85% высоты экрана */
    display: flex;
    flex-direction: column;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
.modal-backdrop.is-visible .modal-content {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
}
.modal-close-btn:hover { color: #333; }

.modal-content h2 {
    padding: 25px 30px;
    margin: 0;
    border-bottom: 1px solid #eee;
    font-size: 22px;
}

/* --- Шапка модального окна --- */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0; /* Шапка не будет сжиматься */
}
.modal-header h2 { margin: 0; font-size: 20px; }

.modal-body-split {
    display: flex;
    flex-grow: 1;
    overflow: hidden; /* Важно, чтобы дочерние скроллы работали */
}
.modal-chart-container {
    height: 400px;
}

/* Левая колонка (график) */
.modal-chart-container {
    flex: 1.5; /* Даем графику чуть больше места */
    padding: 20px;
    position: relative; /* Нужно для Chart.js */
}

/* Правая колонка (текст анализа) */
.modal-insight-container {
    flex: 1;
    border-left: 1px solid #e0e0e0;
    background-color: #ffffff; /* Чистый белый фон для текста */
    
    /* Ключевое свойство: включаем собственную прокрутку */
    overflow-y: auto; 
}

/* --- Стилизация отрендеренного Markdown-текста --- */
.ai-insight-text {
    padding: 25px 30px;
    font-size: 15px;
    line-height: 1.7;
    color: #333;
}
.ai-insight-text h3 {
    font-size: 18px;
    margin-top: 20px;
    margin-bottom: 10px;
}
.ai-insight-text p {
    margin-bottom: 15px;
}
.ai-insight-text strong, .ai-insight-text b {
    font-weight: 600;
    color: #000;
}
.ai-insight-text em, .ai-insight-text i {
    font-style: italic;
    color: #555;
}
.ai-insight-text ul, .ai-insight-text ol {
    padding-left: 25px;
    margin-bottom: 15px;
}
.ai-insight-text hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 25px 0;
}

/* --- Адаптивность для модального окна --- */
@media (max-width: 992px) {
    .modal-body-split {
        flex-direction: column; /* Колонки встают друг под другом */
    }
    .modal-chart-container {
        height: 350px; /* Фиксированная высота для графика на мобильных */
        flex-shrink: 0;
    }
    .modal-insight-container {
        border-left: none;
        border-top: 1px solid #e0e0e0;
    }
}



/* --- Стили для генератора отчетов --- */
.report-generator-widget {
    background: #fff;
    padding: 25px 30px;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.04), 0 10px 25px rgba(0,0,0,0.08);
    margin-bottom: 40px;
}
.report-generator-controls p {
    text-align: center;
    color: #555;
    margin-bottom: 20px;
}
.report-buttons-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}
.btn-success { background-color: #00b074; border-color: #00b074; color: #fff; }
.btn-danger { background-color: #f44336; border-color: #f44336; color: #fff; }

/* --- Стили для модального окна отчета --- */
.report-modal .modal-body-single {
    padding: 0; /* Убираем паддинги, так как они будут у текста */
    overflow-y: hidden; /* Скролл будет внутри .ai-insight-text */
}
.report-modal .ai-insight-text {
    height: 65vh; /* Занимает почти всю высоту окна */
    overflow-y: auto;
    padding: 25px 30px;
}
.modal-footer {
    padding: 15px 30px;
    border-top: 1px solid #eee;
    background-color: #f9f9fb;
    flex-shrink: 0;
    text-align: right;
}

.lecture-info-panel {
    padding: 30px 40px;
}
.lecture-info-panel h1 {
    font-size: 2rem;
    margin-bottom: 20px;
}

/* --- Правая колонка: Список лекций --- */
.lecture-list-column {
    width: 380px;
    flex-shrink: 0;
    background-color: #ffffff;
    border-left: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

.lecture-list-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}
.lecture-list-header h3 {
    margin: 0 0 5px 0;
}
.lecture-list-header p {
    margin: 0;
}
.progress-info {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 20px;
}

.lecture-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.lecture-item {
    margin-bottom: 5px;
}
.lecture-item a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: background-color 0.3s ease;
}
.lecture-item a:hover {
    background-color: #f7f7ff;
}
.lecture-order {
    font-size: 0.9rem;
    color: #fff;
    background-color: #ccc;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.lecture-title { flex-grow: 1; }
.status-icon {
    font-size: 1.1rem;
    color: #ccc;
}
.lecture-item.completed .lecture-order {
    background-color: var(--primary-purple);
}
.lecture-item.completed .status-icon {
    color: #28a745; /* Зеленый */
}
.lecture-item.locked {
    opacity: 0.6;
}
.lecture-item a.disabled-link {
    pointer-events: none;
    cursor: default;
}
.test-item i:first-child { font-size: 1rem; color: var(--primary-purple); }


/* --- Правая колонка (плеер) --- */
.lecture-content-main {
    flex-grow: 1;
}
.lecture-content-main h2 {
    font-size: 2rem;
    margin-bottom: 25px;
}
.video-player-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* Сохраняет пропорции 16:9 */
    background-color: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
#youtube-player {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}
.transcript-accordion {
    margin-top: 25px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}
.transcript-accordion .accordion-header {
    width: 100%;
    background: #f7f7ff;
    padding: 15px 20px;
    /* ... (стили как у аккордеона из AI-преподавателя) ... */
}
.transcript-accordion .accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}
.transcript-text { padding: 20px; }
.next-step-container { text-align: center; margin-top: 30px; }

.disabled-link {
    pointer-events: none;
    cursor: default;
}

/* --- Адаптивность --- */
@media (max-width: 1024px) {
    .course-player-container {
        flex-direction: column;
    }
    .lecture-list-sidebar {
        flex: 0 0 auto;
        width: 100%;
    }
}

/* --- Стили для блока с фидбэком --- */
.feedback-card {
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    border-left-width: 5px;
    border-left-style: solid;
}
.feedback-card.passed {
    background-color: #f0fff4; /* Светло-зеленый фон */
    border-left-color: #28a745; /* Зеленая полоса */
}
.feedback-card.failed {
    background-color: #fff5f5; /* Светло-красный фон */
    border-left-color: #dc3545; /* Красная полоса */
}
.feedback-card h4 {
    margin-top: 0;
}
.feedback-status { font-size: 1.1rem; }
.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}
.status-passed { background-color: #28a745; }
.status-failed { background-color: #dc3545; }
.feedback-text { margin-top: 10px; }

/* --- Стили для кнопки "Следующая лекция" --- */
.next-step-container {
    text-align: center;
    margin-top: 40px;
    height: 60px; /* Резервируем место, чтобы страница не "прыгала" */
}

/* Анимация плавного появления */
.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
}

/* ==================================
   СТИЛИ ДЛЯ ФОРМЫ ФИНАЛЬНОГО ЗАДАНИЯ
   ================================== */

/* Применяем стили к textarea, как к другим полям ввода */
#submission-textarea {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #ddd;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    transition: all 0.3s ease;
    min-height: 200px; /* Задаем минимальную высоту */
    resize: vertical; /* Позволяем изменять размер только по вертикали */
}

#submission-textarea:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 4px rgba(106, 68, 255, 0.15);
}

/* 
   Стилизуем кнопку "Отправить", используя уже существующий класс .btn-primary.
   Нам нужно просто убедиться, что она имеет правильные отступы и размер.
*/
#assignment-form-container {
    text-align: center; /* Центрируем кнопку */
}

#submit-assignment-btn {
    margin-top: 20px;
    /* Используем стили от .btn-large, чтобы кнопка была заметной */
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    width: auto; /* Ширина по контенту */
    min-width: 300px;
}   

/* ==================================
   ФИНАЛЬНЫЕ СТИЛИ ДЛЯ СЕРТИФИКАТА (v3 - Надежная верстка)
   ================================== */
/* static/css/style.css */

/* Находим или добавляем этот блок в секции стилей сертификата */

/* --- ИСПРАВЛЕННЫЕ СТИЛИ ДЛЯ ЛОГОТИПОВ --- */
.logos-container {
    display: flex;
    justify-content: center; /* Центрируем оба логотипа по горизонтали */
    align-items: center;     /* Выравниваем их по вертикальному центру друг относительно друга */
    gap: 40px;               /* Расстояние между логотипами */
    margin-bottom: 30px;     /* Отступ вниз до слова СЕРТИФИКАТ */
    width: 100%;
}

.certificate-logo {
    /* Жестко ограничиваем размеры, чтобы они не ломали верстку */
    max-height: 65px;  /* Главный ограничитель высоты */
    max-width: 250px;  /* Ограничитель ширины для очень длинных логотипов */
    width: auto;
    height: auto;
    object-fit: contain; /* Картинка будет вписываться в рамки без искажений */
}


.certificate-page-container {
    padding: 50px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.certificate-logo2{
    height: 60px;
    width: auto;
    margin-bottom: 30px;
}

.certificate-wrapper {
    width: 100%;
    max-width: 1000px;
    aspect-ratio: 1.412 / 1;
    background: white;
    box-shadow: 0 10px 50px rgba(0,0,0,0.1);
    padding: 20px;
}

.certificate-border {
    border: 13px solid #f3f2ff;
    width: 100%;
    height: 100%;
    padding: 40px 60px;
    text-align: center;
    /* УБИРАЕМ FLEXBOX ОТСЮДА */
}

/* --- Хедер сертификата --- */
.certificate-header {
    /* Ничего не меняем, он остается как есть */
}
.certificate-logo {
    height: 170px;
    width: auto;
    margin-bottom: 10px;
}
.certificate-main-title {
    font-size: 42px;
    font-weight: 800;
    color: var(--dark-purple);
    letter-spacing: 6px;
    margin: 0;
}
.certificate-subtitle {
    font-size: 18px;
    margin: 5px 0 0 0;
    color: #555;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* --- Тело сертификата (с отступами) --- */
.certificate-body { 
    /* Задаем большие отступы сверху и снизу, чтобы отодвинуть от хедера и футера */
    margin: 10px 0; 
}
.award-text { 
    font-size: 18px; 
    color: #6c757d; 
}
.student-name {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-purple);
    margin: 15px 0;
}
.divider-line { 
    width: 200px; 
    height: 1px; 
    background: #ddd; 
    margin: 8px auto; 
}
.course-text { 
    font-size: 18px; 
    color: #6c757d; 
}
.course-name { 
    font-size: 24px; 
    font-weight: 600; 
    color: var(--dark-purple); 
    margin-top: 5px; 
}

/* --- Футер сертификата (обновленная версия) --- */
.certificate-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    margin-top: auto; 
    padding-top: 40px; /* Добавим отступ сверху */
}
.footer-item { 
    text-align: center; 
    width: 45%; /* Немного изменим ширину для баланса */
}

/* Линия для подписи */
.signature-line { 
    border-bottom: 1px solid #333; 
    width: 220px; /* Сделаем линию чуть длиннее */
    margin: 0 auto 8px auto; /* Увеличим отступ снизу */
}

/* Заголовок "Председатель..." */
.signature-title { 
    font-size: 14px; 
    color: #333; /* Сделаем текст темнее и четче */
    font-weight: 600;
    margin: 0;
}

/* --- НОВЫЙ СТИЛЬ для ФИО --- */
.signature-name {
    font-size: 14px;
    color: #555;
    margin-top: 4px;
}

.date-issued, .certificate-id { 
    font-size: 14px; 
    color: #888; 
    text-align: right; /* Выравниваем дату и ID по правому краю */
}
/* Выравниваем ID под датой */
.footer-item.date-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}


/* --- Кнопки под сертификатом --- */
.certificate-actions { 
    text-align: center; 
    margin-top: 10px; 
}

/* Добавьте в style.css */
.assignment-layout {
    display: flex;
    gap: 40px;
}
.assignment-details { flex: 1; }
.assignment-submission { flex: 1; }

@media (max-width: 992px) {
    .assignment-layout { flex-direction: column; }
}

/* ==================================
   НОВЫЕ СТИЛИ ДЛЯ СТРАНИЦЫ ТЕСТА
   ================================== */

.test-card {
    background: #fff;
    border-radius: 20px;
    padding: 30px 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

/* --- Шапка теста --- */
.test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.test-header h2 { margin: 0; font-size: 1.8rem; }
.test-header p { margin: 5px 0 0 0; color: #6c757d; }

.test-progress-tracker {
    text-align: right;
    width: 150px;
}
#progress-text {
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
    display: block;
}
.test-progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}
.test-progress-bar {
    height: 100%;
    width: 0%; /* Начинаем с 0% */
    background: linear-gradient(90deg, var(--primary-purple), var(--accent-pink));
    border-radius: 4px;
    transition: width 0.4s ease-in-out;
}

/* --- Список вопросов --- */
.test-questions-list {
    list-style: none;
    padding: 0;
}
.test-question-item {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}
.question-text {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 20px;
}
.options-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.option-wrapper {
    position: relative;
}

/* --- Стиль для скрытых радио-кнопок и красивых лейблов --- */
.radio-input {
    /* Полностью скрываем стандартную радио-кнопку */
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: pointer;
}
.option-label {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.option-label:hover {
    background-color: #f7f7ff;
    border-color: #c4b0ff;
}

/* Стиль для ВЫБРАННОГО ответа */
.radio-input:checked + .option-label {
    background-color: #ede9ff;
    border-color: var(--primary-purple);
    box-shadow: 0 0 10px rgba(106, 68, 255, 0.2);
}
.radio-input:checked + .option-label .option-letter {
    background-color: var(--primary-purple);
    color: white;
}

.option-letter {
    font-weight: 700;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

/* --- Стили для блоков с кодом в заданиях --- */
.assignment-text pre {
    background-color: #f0f0f0; /* Светло-серый фон */
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    white-space: pre-wrap; /* Сохраняет переносы и пробелы */
    word-wrap: break-word;
    font-family: 'Courier New', Courier, monospace; /* Моноширинный шрифт */
    font-size: 14px;
    margin-top: 15px;
}

.assignment-text code {
    background-color: #e9e9e9;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}
/* ==================================
   ФИНАЛЬНЫЕ СТИЛИ ДЛЯ СТРАНИЦЫ ЗАВЕРШЕНИЯ (v6 - Полная версия)
   ================================== */

.completion-page-container {
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 85px); /* Занимаем почти весь экран */
    position: relative;
    overflow: hidden; /* Чтобы конфетти не вылезало */
}

#confetti-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Помещаем за контентом */
    pointer-events: none; /* Делаем некликабельным */
}

.completion-content-wrapper {
    position: relative;
    z-index: 2; /* Помещаем поверх конфетти */
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.completion-header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease-out;
}
.completion-header h1 {
    font-size: 2.8rem;
    font-weight: 700;
}
.completion-header .lead {
    font-size: 1.2rem;
    color: #555;
    max-width: 600px;
    margin: 15px auto 0 auto;
}

.certificate-preview-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.certificate-wrapper {
    width: 100%;
    max-width: 1000px; /* Уменьшенный, сбалансированный размер */
    aspect-ratio: 1.414 / 1;
    background: white;
    box-shadow: 0 15px 50px rgba(0,0,0,0.12);
    padding: 20px;
    border-radius: 4px;
}

.certificate-border {
    border: 12px solid #f3f2ff;
    width: 100%;
    height: 100%;
    padding: 30px 50px;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.certificate-header {
    flex-shrink: 0;
}

.certificate-logo {
    height: 90px;
    width: auto;
    margin-bottom: 30px;
    margin-right: 40px;
}

.certificate-main-title {
    font-size: 48px;
    font-weight: 700;
    color: var(--dark-purple);
    letter-spacing: 5px;
    margin: 0;
}

.certificate-subtitle {
    font-size: 16px;
    margin: 5px 0 0 0;
    color: #555;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.certificate-body { 
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 20px 0;
}

.award-text { 
    font-size: 18px; 
    color: #6c757d; 
}

.student-name {
    font-size: 38px;
    font-weight: 700;
    color: var(--primary-purple);
    margin: 15px 0;
}

.divider-line { 
    width: 200px; 
    height: 1px; 
    background: #ddd; 
    margin: 0px auto; 
}

.course-text { 
    font-size: 18px; 
    color: #6c757d; 
}

.course-name { 
    font-size: 24px; 
    font-weight: 600; 
    color: var(--dark-purple); 
    margin-top: 5px; 
}

.certificate-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    flex-shrink: 0;
}

.footer-item { 
    text-align: center; 
    width: 40%; 
}

.signature-title, .date-issued, .certificate-id { 
    font-size: 14px; 
    color: #888; 
}

.completion-actions { 
    text-align: center; 
    margin-top: 40px; 
    display: flex;
    gap: 20px;
    justify-content: center;
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

.completion-actions .btn {
    transition: all 0.3s ease;
}
.completion-actions .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.completion-actions .btn-secondary {
    background-color: #f0f0f0;
    border-color: #f0f0f0;
    color: #333;
}
.completion-actions .btn-secondary:hover {
    background-color: #e0e0e0;
}

.submission-container {
    margin-top: 30px;
    animation: fadeInUp 1.2s ease-out 0.6s backwards;
}

#toggle-submission {
    color: var(--primary-purple);
    font-weight: 600;
    text-decoration: none;
    font-size: 16px;
}
#toggle-submission:hover {
    text-decoration: underline;
}

.submission-details {
    max-width: 800px;
    margin: 20px auto;
    padding: 25px;
    background: #f7f7ff;
    border-radius: 12px;
    text-align: left;
    border: 1px solid #eee;
}

.submission-details h4 {
    margin-top: 0;
    margin-bottom: 15px;
}

.submission-details pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}




/* Стиль для кнопки в момент отправки */
.btn.is-loading {
    position: relative; /* Нужно для позиционирования спиннера */
    color: transparent !important; /* Прячем текст кнопки */
    pointer-events: none; /* Блокируем повторные нажатия */
    cursor: wait;
}

/* Спиннер, который появляется внутри кнопки */
.btn.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px; /* Размер спиннера */
    height: 20px;
    margin-top: -10px; /* Центрируем по вертикали */
    margin-left: -10px; /* Центрируем по горизонтали */
    
    border: 3px solid rgba(255, 255, 255, 0.5); /* Цвет фона спиннера */
    border-top-color: #ffffff; /* Цвет вращающейся части */
    border-radius: 50%;
    
    animation: spin 1s linear infinite;
}

/* Убедитесь, что анимация @keyframes spin у вас уже определена */



.next-step-container .btn-large {
/* ==== ИСПРАВЛЕНИЕ №2: ЦЕНТРИРОВАНИЕ ИКОНКИ ==== */
    display: inline-flex;  /* Обязательно для align-items */
    align-items: center;    /* Вертикально центрирует иконку и текст */
    gap: 10px;              /* Добавляет красивый отступ между текстом и иконкой */
}


/* ==================================
   СТИЛИ ДЛЯ ПОЛНОЭКРАННОГО ЗАГРУЗЧИКА (ИСПРАВЛЕННАЯ ВЕРСИЯ)
   ================================== */
.page-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    z-index: 9999;
    
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.page-loader-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* --- ИСПРАВЛЕНИЕ: Используем тот же самый стиль спиннера --- */
.page-loader-overlay .spinner {
    /* Копируем стили из вашего рабочего спиннера HTMX */
    width: 60px;
    height: 60px;
    border: 6px solid #e0e0e0;
    border-top: 6px solid var(--primary-purple); /* Используем цвет из палитры */
    border-radius: 50%;
    
    /* Добавляем анимацию вращения */
    animation: spin 1s linear infinite;
}
/* --- КОНЕЦ ИСПРАВЛЕНИЯ --- */


.page-loader-overlay p {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--dark-purple);
}

/* 
   Убедимся, что сама анимация @keyframes spin определена где-то в вашем CSS.
   Она у вас уже есть от спиннера HTMX.
*/
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.access-denied-icon {
    font-size: 4rem;
    color: var(--primary-purple);
    margin-bottom: 20px;
}

/* ==================================
   СТИЛИ ДЛЯ СЕРТИФИКАТОВ В ПРОФИЛЕ
   ================================== */
.certificate-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column; /* Элементы идут сверху вниз */
    gap: 20px; /* Идеальное расстояние между карточками! */
}

.certificate-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background-color: #f7f7ff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    margin: 0; 
}
.cert-icon {
    flex-shrink: 0;
    font-size: 24px;
    width: 60px;
    height: 60px;
    background-color: #ede9ff;
    color: var(--primary-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.cert-info {
    flex-grow: 1;
    text-align: left;
}
.cert-info h4 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
}
.cert-info p {
    margin: 0;
    color: #6c757d;
}
.cert-actions {
    flex-shrink: 0;
}

/* ==================================
   ИСПРАВЛЕНИЕ ДЛЯ МОБИЛЬНОГО МЕНЮ НА ИММЕРСИВНОМ ФОНЕ
   ================================== */

/* 
   Это правило сработает, только когда у body есть ОБА класса:
   .immersive-background-page (наша страница архитектора)
   И .nav-open (когда гамбургер-меню открыто)
*/
.immersive-background-page.nav-open .main-nav {
    /* 
     * Добавляем фон, который соответствует стилю "матового стекла",
     * но делаем его более плотным, чтобы контент не просвечивал.
     */
    background: rgba(30, 30, 47, 0.95); /* Более плотный полупрозрачный фон */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

/* 
   Дополнительно улучшим читаемость ссылок внутри открытого меню
   на темном фоне.
*/
.immersive-background-page.nav-open .main-nav a {
    color: var(--text-light, #e6e6fa); /* Делаем ссылки светлыми */
    font-size: 24px; /* Увеличим для удобства на мобильных */
    padding: 15px 20px;
}

/* И иконку гамбургера тоже сделаем светлой на темном фоне */
.immersive-background-page .hamburger,
.immersive-background-page .hamburger::before,
.immersive-background-page .hamburger::after {
    background-color: var(--text-light, #e6e6fa);
}

/* Когда меню открыто, "крестик" тоже будет светлым */
.immersive-background-page.nav-open .hamburger {
    background: transparent;
}
.immersive-background-page.nav-open .hamburger::before,
.immersive-background-page.nav-open .hamburger::after {
    background-color: var(--text-light, #e6e6fa);
}

/* templates/ai_avatar/certificate_pdf_template.html -> <style> */

.footer-table { width: 100%; margin-top: 60px; border-collapse: collapse; }
.footer-table td { width: 50%; font-size: 11pt; color: #555; vertical-align: bottom; }

.signature-line { border-bottom: 1px solid #333; width: 220px; margin-bottom: 8px; }
.signature-title { font-weight: bold; color: #333; }
.signature-name { color: #555; margin-top: 4px; }

.date-issued, .certificate-id { color: #888; }

/* ==================================
   СТИЛИ ДЛЯ ЛЕНДИНГА STARTUP LAUNCHPAD (ОПТИМИЗИРОВАННЫЕ)
   ================================== */

/* 1. Уменьшаем вертикальные отступы самой секции, чтобы не терять место */
.startup-hero {
    padding: 40px 0; /* Было 60px или 100px. Уменьшаем. */
    overflow: visible; /* Разрешаем элементам немного выходить за границы, если нужно */
}

.avatar-hero-container {
    display: flex;
    align-items: center; /* Центрируем по вертикали */
    justify-content: center; /* Центрируем контент в контейнере */
    gap: 40px; /* Уменьшаем расстояние между текстом и картинкой, чтобы они были ближе */
    min-height: 70vh; /* Секция занимает 70% высоты экрана (комфортный размер) */
}

/* 2. Текстовая часть - ДАЕМ БОЛЬШЕ МЕСТА */
.hero-text-content {
    flex: 1; /* Занимает 1 долю */
    max-width: none; /* УБИРАЕМ жесткое ограничение в 600px! */
    width: 45%; /* Занимает 45% ширины контейнера */
    padding-right: 20px;
    z-index: 2; /* Текст должен быть поверх всего */
    /* Сдвигаем текст вправо */
    padding-left: 80px; 
}

/* Увеличим заголовок для баланса с большой картинкой */
.hero-text-content h1 {
    font-size: 3.5rem; /* Если было меньше, увеличим */
    margin-bottom: 20px;
}

/* 3. Картинка - БАЛАНС И РАЗМЕР */
.hero-image-content {
    flex: 1.2; /* Картинке даем чуть больше места (1.2 доли) */
    width: 55%; /* Занимает 55% ширины */
    display: flex;
    justify-content: center; /* Центрируем картинку в её половине */
    align-items: center;
    position: relative;
}

.startup-logo-img {
    height: auto;
    
    /* 
       ВАЖНЫЙ МОМЕНТ: 
       Вместо max-height: 850px (что ломает верстку), ставим разумный предел,
       но используем scale, чтобы визуально увеличить объект, не ломая границы блока.
    */
    max-height: 550px; 
    
    /* Увеличиваем картинку визуально на 15%, не сдвигая текст */
    transform: scale(1.15); 
    
    /* Анимация парения */
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 20px 40px rgba(106, 68, 255, 0.25));
}

/* Анимация парения */
@keyframes float {
    0% { transform: scale(1.15) translateY(0px); }
    50% { transform: scale(1.15) translateY(-20px); }
    100% { transform: scale(1.15) translateY(0px); }
}


/* --- Адаптивность для мобильных --- */
@media (max-width: 992px) {
    .avatar-hero-container {
        flex-direction: column-reverse; /* Картинка сверху, текст снизу */
        text-align: center;
        gap: 20px;
        padding-top: 20px;
    }
    
    .hero-text-content,
    .hero-image-content {
        width: 100%;
        flex: auto;
        padding-right: 0;
    }

    .startup-logo-img {
        max-height: 350px; /* На мобилках уменьшаем */
        transform: scale(1); /* Убираем увеличение на мобилках */
        margin-bottom: 20px;
    }
}

/* ==================================
   СТИЛИ ДЛЯ "КОСМИЧЕСКОГО" ЛЕНДИНГА STARTUP
   ================================== */

.startup-landing-container {
    /* 1. Глубокий космический фон */
    background: linear-gradient(180deg, #090a0f 0%, #1b2735 100%);
    
    /* 2. Делаем весь текст светлым */
    color: #ffffff;
    
    /* 3. Убедимся, что фон на всю высоту */
    min-height: 100vh;
    position: relative;
    overflow: hidden; /* Чтобы звезды не вылезали */
}
/* Делаем секцию героя прозрачной, чтобы было видно звезды родительского контейнера */
.startup-hero {
    background-color: transparent !important; /* Убираем белый/серый цвет */
    background-image: none !important;        /* Убираем любые картинки, если были */
    box-shadow: none !important;              /* Убираем тени блока, если были */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Опционально: тонкая линия-разделитель */
}

/* --- ГЕНЕРАЦИЯ ЗВЕЗД (CSS-магия) --- */
/* Создаем псевдо-элемент для звезд, чтобы не засорять HTML */
.startup-landing-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Чтобы звезды не мешали кликать */
    
    /* Рисуем звезды с помощью радиальных градиентов */
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 40px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 50px 160px, #ddd, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 40px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 130px 80px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 160px 120px, #ddd, rgba(0,0,0,0));
    
    background-repeat: repeat;
    background-size: 200px 200px; /* Повторяем паттерн */
    opacity: 0.8;
}

/* --- Адаптация текста под темный фон --- */

/* Заголовок */
.startup-landing-container h1 {
    color: #ffffff;
    text-shadow: 0 0 20px rgba(106, 68, 255, 0.6); /* Неоновое свечение */
}

/* Описание */
.startup-landing-container p {
    color: #dbe1e8; /* Светло-серо-голубой для читаемости */
}

/* Бейдж (Курс-акселератор) */
.startup-landing-container .course-badge {
    background: rgba(255, 255, 255, 0.1); /* Полупрозрачный белый */
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
}

/* Карточки с преимуществами (внизу) тоже нужно адаптировать */
.startup-landing-container .feature-card {
    background: rgba(255, 255, 255, 0.05); /* Эффект стекла */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.startup-landing-container .feature-card h3 {
    color: white;
}

.startup-landing-container .feature-card p {
    color: #b0b8c4;
}

.startup-landing-container .section-title {
    color: white; /* Заголовок "Что внутри курса" */
}

/* Поднимаем контент над звездами */
.startup-hero .container, 
.startup-landing-container .features-grid {
    position: relative;
    z-index: 2;
}

/* ==================================
   АДАПТАЦИЯ ХЕДЕРА ПОД ТЕМНУЮ ТЕМУ (КОСМОС)
   ================================== */

/* 1. Фон хедера */
.dark-theme-page .site-header {
    /* Темный полупрозрачный фон, совпадающий с началом вашего градиента (#090a0f) */
    background: rgba(9, 10, 15, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Тонкая светлая линия */
}

/* 2. Ссылки меню */
.dark-theme-page .main-nav a {
    color: #d4d9dd; /* Светло-серый */
}
.dark-theme-page .main-nav a:hover {
    color: #ffffff; /* Белый при наведении */
}
/* Линия подчеркивания при наведении (делаем ее ярче) */
.dark-theme-page .main-nav a::after {
    background: linear-gradient(90deg, #6a44ff, #ff6a88);
}

/* 3. Виджет профиля (справа) */
.dark-theme-page .user-profile-widget {
    background: rgba(255, 255, 255, 0.1); /* Полупрозрачный белый */
    border-color: rgba(255, 255, 255, 0.2);
}
.dark-theme-page .user-profile-widget:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-purple);
}

.dark-theme-page .token-balance,
.dark-theme-page .header-username {
    color: #ffffff; /* Белый текст */
}
.dark-theme-page .widget-divider {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Кнопка "Выйти" в хедере */
.dark-theme-page .logout-btn-header {
    border-color: rgba(255, 255, 255, 0.3);
    color: #d4d9dd;
}
.dark-theme-page .logout-btn-header:hover {
    border-color: var(--primary-purple);
    background: var(--primary-purple);
    color: white;
}

/* Кнопки "Войти" и "Регистрация" (для незалогиненных) */
.dark-theme-page .btn-secondary {
    color: #d4d9dd;
}
.dark-theme-page .btn-secondary:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}
.dark-theme-page .btn-primary {
    background: var(--primary-purple);
    border-color: var(--primary-purple);
    color: white;
}
/* ==================================
   АДАПТАЦИЯ ХЕДЕРА ПОД ТЕМНУЮ ТЕМУ (КОСМОС)
   ================================== */

/* 1. Фон хедера */
.dark-theme-page .site-header {
    /* Темный полупрозрачный фон, совпадающий с началом вашего градиента (#090a0f) */
    background: rgba(9, 10, 15, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Тонкая светлая линия */
}

/* 2. Ссылки меню */
.dark-theme-page .main-nav a {
    color: #d4d9dd; /* Светло-серый */
}
.dark-theme-page .main-nav a:hover {
    color: #ffffff; /* Белый при наведении */
}
/* Линия подчеркивания при наведении (делаем ее ярче) */
.dark-theme-page .main-nav a::after {
    background: linear-gradient(90deg, #6a44ff, #ff6a88);
}

/* 3. Виджет профиля (справа) */
.dark-theme-page .user-profile-widget {
    background: rgba(255, 255, 255, 0.1); /* Полупрозрачный белый */
    border-color: rgba(255, 255, 255, 0.2);
}
.dark-theme-page .user-profile-widget:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-purple);
}

.dark-theme-page .token-balance,
.dark-theme-page .header-username {
    color: #ffffff; /* Белый текст */
}
.dark-theme-page .widget-divider {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Кнопка "Выйти" в хедере */
.dark-theme-page .logout-btn-header {
    border-color: rgba(255, 255, 255, 0.3);
    color: #d4d9dd;
}
.dark-theme-page .logout-btn-header:hover {
    border-color: var(--primary-purple);
    background: var(--primary-purple);
    color: white;
}

/* Кнопки "Войти" и "Регистрация" (для незалогиненных) */
.dark-theme-page .btn-secondary {
    color: #d4d9dd;
}
.dark-theme-page .btn-secondary:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}


/* ==================================
   ИЗМЕНЕНИЕ ЦВЕТА КНОПКИ "НАЧАТЬ ОБУЧЕНИЕ"
   ================================== */

.startup-hero .btn-primary {
    /* Меняем цвет текста на запрошенный */
    color: #d4d9dd !important; 
    font-weight: 700;
    
    /* Опционально: можно добавить легкое свечение тексту, чтобы он лучше читался на фиолетовом */
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* ==================================
    СТИЛИ ДЛЯ СТРАНИЦЫ СЕРТИФИКАТА
    ================================== */

    .cert-page-wrapper {
        padding: 40px;
        display: flex;
        flex-direction: column;
        align-items: center;
        background: #f8f9fa;
        min-height: 80vh;
    }

    /* Контейнер сертификата (A4 Landscape) */
    .certificate-container {
        width: 100%;
        max-width: 1000px;
        aspect-ratio: 1.414; 
        background-color: #fff;
        padding: 20px;
        box-shadow: 0 20px 50px rgba(0,0,0,0.15);
        position: relative;
        font-family: 'Montserrat', sans-serif;
    }

    .certificate-border {
        border: 4px solid #757575; /* Темно-серая рамка */
        height: 100%;
        width: 100%;
        padding: 40px 60px;
        display: flex;
        flex-direction: column;
        position: relative;
    }

    /* Хедер (Логотипы) */
    .header-logos {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 60px; /* Увеличили отступ */
        margin-bottom: 30px;
    }
    /* Общий стиль */
    .logo-img {
        width: auto;
        object-fit: contain;
    }

    /* Увеличенный AI Hub */
    .logo1-img {
        height: 45px; 
    }

    /* Стандартный Университет */
    .logo2-img {
        height: 40px;
    }

    /* Основной контент (2 колонки) */
    .main-content {
        display: flex;
        flex-grow: 1;
        align-items: center; /* Центрируем по вертикали */
    }

    .left-column {
        width: 55%;
        text-align: left;
        padding-right: 20px;
    }

    .right-column {
        width: 45%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        position: relative;
    }

    /* Типографика */
    .text-gradient {
        /* Сине-фиолетовый градиент */
        background: linear-gradient(90deg, #2c3f93 0%, #5369cc 60%, #6a6a6a 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        color: transparent;
    }

    h1.cert-title {
        font-size: 3.2rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 2px;
        margin-bottom: 20px;
        line-height: 1;
    }

    h2.student-name {
        font-size: 2.2rem;
        color: #555;
        font-weight: 700;
        margin-bottom: 20px;
    }

    p.completed-text {
        font-size: 1.1rem;
        color: #777;
        margin-bottom: 5px;
    }

    h4.course-name {
        font-size: 19px;
        font-weight: 600;
        line-height: 1.4;
    }

    /* Картинка курса */
    .course-logo-img {
        width: 350px;
        height: auto;
        position: relative;
        z-index: 2;
        /* Тень для объема */
        filter: drop-shadow(0 20px 30px rgba(44, 63, 147, 0.2));
    }

    .shadow-effect {
            position: absolute;
            bottom: 50px; /* Сдвигаем под картинку */
            left: 50%;
            transform: translateX(-50%);
            width: 240px;
            height: 30px;
            background: radial-gradient(ellipse at center, rgba(44, 63, 147, 0.4) 0%, rgba(255, 255, 255, 0) 70%);
            z-index: 1;
        }

    /* Футер */
    .cert-footer {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        margin-top: auto;
        padding-top: 30px;
    }

    .signature-block { width: 250px; text-align: left; }
    .signature-line {
        width: 100%; height: 1px; background-color: #888; margin-bottom: 8px;
    }
    .signer-role { font-size: 0.8rem; color: #777; }
    .signer-name { font-size: 0.95rem; color: #555; font-weight: 600; margin-top: 2px; }

    .meta-data {
        text-align: right;
        font-size: 0.9rem;
        color: #777;
        line-height: 1.5;
    }

    /* Кнопки */
    .cert-actions {
        margin-top: 40px;
        text-align: center;
        display: flex;
        gap: 20px;
        justify-content: center;
    }
    
    @media (max-width: 768px) {
        .certificate-container { aspect-ratio: unset; height: auto; }
        .main-content { flex-direction: column-reverse; text-align: center; }
        .left-column, .right-column { width: 100%; padding: 0; }
        .left-column { text-align: center; margin-top: 30px; }
        .cert-footer { flex-direction: column; align-items: center; gap: 20px; text-align: center; }
        .signature-block, .meta-data { text-align: center; width: 100%; }
        .course-logo-img { width: 180px; }
    }

    /* ==================================
   НОВЫЙ ГЛАВНЫЙ ЛЕНДИНГ (Dark Tech Style)
   ================================== */

.landing-page-body {
    background-color: #0b0c15; /* Глубокий темный фон */
    color: #ffffff;
}

.landing-container {
    overflow-x: hidden;
}

/* --- 1. HERO SECTION --- */
.landing-hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    padding: 0 20px;
}

/* Фон-сияние */
.hero-glow-bg {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw; height: 60vw;
    background: radial-gradient(circle, rgba(106,68,255,0.2) 0%, rgba(0,0,0,0) 70%);
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    animation: fadeInUp 1s ease-out;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    color: #c4b0ff;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(135deg, #fff 0%, #a58aff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #a0a0b0;
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn-glow {
    box-shadow: 0 0 20px rgba(106, 68, 255, 0.4);
}
.btn-glass {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}
.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ==================================
   2. ECOSYSTEM (BENTO GRID - КОМПАКТНЫЙ СТИЛЬ)
   ================================== */
.ecosystem-section {
    padding: 80px 20px;
    max-width: 1100px; /* Чуть уже для компактности */
    margin: 0 auto;
}

.bento-grid {
    display: grid;
    /* 3 колонки */
    grid-template-columns: repeat(3, 1fr);
    /* Высота рядов теперь меньше (было 300px) */
    grid-auto-rows: 220px; 
    gap: 15px; /* Уменьшили отступы между карточками */
}

/* --- Стили карточек --- */
.bento-card {
    opacity: 0;
    transform: translateY(40px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: rgba(23, 23, 35, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    padding: 25px;
    text-decoration: none;
    color: white;
    position: relative;
    overflow: hidden;
    /* Быстрый отзывчивый transition */
    transition:
        transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease;
    will-change: transform;
}

.bento-card.visible {
    opacity: 1;
    transform: translateY(0);
    /* Плавное появление при скролле — не конфликтует с hover */
    transition:
        opacity 0.5s ease-out,
        transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),
        box-shadow 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease;
}

/* Орбитальная линия вокруг границы при hover */
@property --border-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}
@keyframes border-orbit {
    to { --border-angle: 360deg; }
}

.bento-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 21px;
    background: conic-gradient(from var(--border-angle),
        transparent 0%,
        transparent 70%,
        rgba(106,68,255,0.4) 80%,
        rgba(180,140,255,1) 87%,
        rgba(106,68,255,0.4) 94%,
        transparent 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    padding: 1.5px;
    opacity: 0;
    z-index: 3;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.bento-card:hover::before {
    opacity: 1;
    animation: border-orbit 3s linear infinite;
}

/* Свечение курсора */
.card-bg-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(500px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(106,68,255,0.08), transparent 60%);
    opacity: 0;
    transition: opacity 0.12s ease;
    pointer-events: none;
    z-index: 0;
}

.card-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.icon-box {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 15px;
    color: #c4b0ff;
    transition:
        transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
        background 0.18s ease,
        color 0.18s ease;
}

.bento-card h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    font-weight: 700;
    transition: color 0.18s ease;
}

.bento-card p {
    color: #999;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

/* Стрелочка */
.card-arrow {
    position: absolute;
    bottom: 25px;
    right: 25px;
    opacity: 0;
    transform: translate(-6px, 6px);
    transition:
        opacity 0.15s ease,
        transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: var(--primary-purple);
}

/* --- HOVER --- */
.bento-card:hover {
    transform: scale(1.025) translateY(-3px);
    border-color: rgba(106, 68, 255, 0.45);
    background: rgba(28, 26, 46, 0.95);
    box-shadow: 0 16px 40px rgba(0,0,0,0.35), 0 0 0 1px rgba(106,68,255,0.15);
}

.bento-card:hover .card-bg-glow {
    opacity: 1;
}

.bento-card:hover .icon-box {
    transform: scale(1.18) rotate(-4deg);
    background: var(--primary-purple);
    color: white;
}

.bento-card:hover h3 {
    color: #e0d4ff;
}

.bento-card:hover .card-arrow {
    opacity: 1;
    transform: translate(0, 0);
}

/* --- СЕТКА (РАСКЛАДКА) --- */

/* Ряд 1 */
.card-teacher { grid-column: span 2; }
.card-architect { grid-column: span 1; grid-row: span 2; } /* Высокий блок справа */

/* Ряд 2 */
.card-avatar { grid-column: span 1; }
.card-insight { grid-column: span 1; }

/* Ряд 3 */
.card-hr { grid-column: span 2; }
.card-chat { grid-column: span 1; }


/* --- МОБИЛЬНАЯ ВЕРСИЯ --- */
@media (max-width: 992px) {
    .bento-grid {
        grid-template-columns: 1fr; /* Одна колонка */
        grid-auto-rows: auto;
    }
    .card-teacher, .card-architect, .card-hr, .card-chat {
        grid-column: auto;
        grid-row: auto;
        min-height: 200px;
    }
}

/* --- 3 & 4. ENTERPRISE SECTIONS --- */
.enterprise-section {
    padding: 120px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.enterprise-content {
    display: flex;
    align-items: center;
    gap: 80px;
    opacity: 0; /* Для анимации */
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}
.enterprise-content.visible {
    opacity: 1;
    transform: translateY(0);
}
.enterprise-content.reverse {
    flex-direction: row-reverse;
}

.tech-tag {
    display: inline-block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6a44ff;
    margin-bottom: 15px;
    font-weight: 700;
}
.tech-tag.security { color: #00ff88; }

.enterprise-text h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.lead-text {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 20px;
}

.enterprise-text p {
    color: #a0a0b0;
    margin-bottom: 30px;
}

.feature-list {
    list-style: none;
    padding: 0;
}
.feature-list li {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    color: #ccc;
}
.feature-list i { color: #6a44ff; margin-top: 5px; }

/* Архитектура Fixit */
.architecture-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.arch-step {
    display: flex;
    gap: 20px;
    background: rgba(255,255,255,0.03);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}
.arch-step.highlight {
    background: rgba(106, 68, 255, 0.1);
    border-color: #6a44ff;
}
.step-badge {
    width: 40px; height: 40px;
    background: #222;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
}
.step-info h4 { margin: 0; color: #fff; font-size: 1rem; }
.step-info p { margin: 5px 0 0; font-size: 0.85rem; color: #888; }

/* Визуализации (Дашборд и Щит) */
.enterprise-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

.glass-dashboard {
    width: 400px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    position: relative;
    padding: 20px;
}
.dashboard-header { display: flex; gap: 8px; margin-bottom: 30px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

.kpi-chart {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 150px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.bar {
    width: 40px;
    background: #333;
    border-radius: 4px 4px 0 0;
    position: relative;
}
.bar.active { background: linear-gradient(to top, #6a44ff, #a58aff); box-shadow: 0 0 15px rgba(106,68,255,0.5); }
.bar span {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #888;
}

.ai-insight-box {
    position: absolute;
    bottom: 20px; right: -20px;
    background: #1a1a2e;
    border: 1px solid #6a44ff;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    width: 250px;
}
.ai-insight-box i { color: #ffd700; }
.ai-insight-box p { font-size: 0.8rem; margin: 0; color: #fff; }

/* FIXIT Visual */
.shield-container {
    width: 300px; height: 300px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.main-shield {
    font-size: 150px;
    color: #00ff88;
    filter: drop-shadow(0 0 30px rgba(0, 255, 136, 0.4));
    z-index: 2;
}
.orbit-dot {
    position: absolute;
    width: 250px; height: 250px;
    border: 1px dashed rgba(255,255,255,0.2);
    border-radius: 50%;
    animation: rotate 10s linear infinite;
}
.orbit-dot::after {
    content: '';
    position: absolute;
    top: -5px; left: 50%;
    width: 10px; height: 10px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px #fff;
}
@keyframes rotate { 100% { transform: rotate(360deg); } }

.threat-alert {
    position: absolute;
    top: 50px; left: -50px;
    background: rgba(220, 53, 69, 0.9);
    padding: 10px 20px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    display: flex;
    gap: 10px;
    align-items: center;
    animation: float 3s ease-in-out infinite;
}

/* ====================================================
   NEW PROJECT SECTIONS — ErteDamu, OPM, Unidesk, GeoTrace, SafiSpace, Buddy
   ==================================================== */

/* --- MVP inline tag --- */
.mvp-tag-inline {
    display: inline-block;
    margin-top: 16px;
    font-size: .8rem;
    font-weight: 700;
    color: #f59e0b;
    background: rgba(245,158,11,.1);
    border: 1px solid rgba(245,158,11,.25);
    border-radius: 20px;
    padding: 4px 14px;
}

/* ---------- ERTEDAMU — Radar Chart ---------- */
.radar-container {
    position: relative;
    width: 260px;
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.radar-svg { width: 200px; height: 200px; }
.radar-ring {
    fill: none;
    stroke: rgba(52,211,153,.3);
    stroke-width: 1;
}
.radar-axis {
    stroke: rgba(52,211,153,.2);
    stroke-width: 1;
}
.radar-data {
    fill: rgba(52,211,153,.2);
    stroke: #34d399;
    stroke-width: 2;
    animation: radar-pulse 3s ease-in-out infinite;
}
@keyframes radar-pulse {
    0%,100% { fill: rgba(52,211,153,.15); stroke-width: 2; }
    50%      { fill: rgba(52,211,153,.3);  stroke-width: 2.5; }
}
.radar-dot {
    fill: #34d399;
    filter: drop-shadow(0 0 4px #34d399);
    animation: dot-blink 3s ease-in-out infinite;
}
@keyframes dot-blink {
    0%,100% { opacity: 1; r: 4; }
    50%      { opacity: .6; r: 5; }
}
.radar-label {
    position: absolute;
    font-size: .7rem;
    color: #94a3b8;
    white-space: nowrap;
    font-weight: 600;
}
.radar-l1 { top:  0;   left: 50%; transform: translateX(-50%); }
.radar-l2 { top: 50%;  right: -10px; transform: translateY(-50%); }
.radar-l3 { bottom: 4px; right: -10px; }
.radar-l4 { bottom: 0;  left: 50%; transform: translateX(-50%); }
.radar-l5 { bottom: 4px; left: -10px; }
.radar-l6 { top: 50%;  left: -10px; transform: translateY(-50%); }
.radar-score-badge {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    font-size: 1.6rem;
    font-weight: 900;
    color: #34d399;
    text-shadow: 0 0 16px rgba(52,211,153,.5);
    pointer-events: none;
}
.radar-score-badge span { font-size: .9rem; }

/* ---------- OPM SOLUTIONS — Pipeline ---------- */
.pipeline-container {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(251,191,36,.15);
    border-radius: 20px;
    padding: 24px 28px;
    width: 340px;
    position: relative;
}
.pipeline-label {
    font-size: .75rem;
    color: #fbbf24;
    font-weight: 600;
    margin-bottom: 10px;
}
.pipeline-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.pipeline-pipe {
    flex: 1;
    height: 32px;
    background: rgba(251,191,36,.08);
    border: 1px solid rgba(251,191,36,.25);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}
.pipe-flow {
    display: flex;
    gap: 18px;
    position: absolute;
    top: 50%; left: -30px;
    transform: translateY(-50%);
    animation: flow-slide 2.5s linear infinite;
}
.pipe-flow span {
    width: 18px; height: 8px;
    background: #fbbf24;
    border-radius: 4px;
    opacity: .7;
    filter: drop-shadow(0 0 4px #fbbf24);
}
@keyframes flow-slide {
    from { left: -30px; }
    to   { left: 110%; }
}
.pipe-sensor {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .8rem;
    flex-shrink: 0;
}
.sensor-ok   { background: rgba(34,197,94,.15); color: #22c55e; border: 1px solid rgba(34,197,94,.3); }
.sensor-warn { background: rgba(239,68,68,.15);  color: #ef4444; border: 1px solid rgba(239,68,68,.3);
               animation: sensor-flash 1.2s ease-in-out infinite; }
@keyframes sensor-flash {
    0%,100% { opacity: 1; box-shadow: none; }
    50%      { opacity: .6; box-shadow: 0 0 10px rgba(239,68,68,.5); }
}
.pipeline-alert {
    display: flex; gap: 8px; align-items: center;
    font-size: .82rem; color: #fbbf24;
    background: rgba(251,191,36,.08);
    border: 1px solid rgba(251,191,36,.2);
    border-radius: 10px; padding: 8px 12px;
    margin-bottom: 12px;
    animation: float 4s ease-in-out infinite;
}
.twin-badge {
    font-size: .75rem; color: #94a3b8;
    display: flex; gap: 6px; align-items: center;
}

/* ---------- UNIDESK — Kanban Board ---------- */
.kanban-container {
    display: flex;
    gap: 10px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(99,102,241,.15);
    border-radius: 18px;
    padding: 20px 16px;
    width: 360px;
    min-height: 220px;
}
.kanban-col {
    flex: 1;
    display: flex; flex-direction: column; gap: 8px;
}
.kanban-col-title {
    font-size: .7rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 4px;
}
.kanban-card {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: .78rem;
    color: #cbd5e1;
    opacity: 0;
    transform: translateY(-8px);
}
.kanban-card.active-card { border-color: rgba(99,102,241,.4); background: rgba(99,102,241,.1); }
.kanban-card.done-card   { opacity: .5; text-decoration: line-through; color: #475569; }
.kc-anim1 { animation: kc-drop 0.5s 0.1s ease-out forwards; }
.kc-anim2 { animation: kc-drop 0.5s 0.3s ease-out forwards; }
.kc-anim3 { animation: kc-drop 0.5s 0.5s ease-out forwards; }
.kc-anim4 { animation: kc-drop 0.5s 0.7s ease-out forwards; }
.kc-anim5 { animation: kc-drop 0.5s 0.2s ease-out forwards; opacity: .5; }
.kc-anim6 { animation: kc-drop 0.5s 0.4s ease-out forwards; opacity: .5; }
@keyframes kc-drop {
    to { opacity: 1; transform: translateY(0); }
}
/* Repeat kanban drop animation every 5s */
.kanban-container:hover .kanban-card { animation-iteration-count: infinite; }

/* ---------- GEOTRACE — Knowledge Graph ---------- */
.graph-container {
    position: relative;
    width: 300px;
    background: rgba(6,182,212,.04);
    border: 1px solid rgba(6,182,212,.15);
    border-radius: 18px;
    padding: 16px;
    overflow: hidden;
}
.graph-svg { width: 100%; height: 200px; }
.g-edge {
    stroke: rgba(34,211,238,.25);
    stroke-width: 1.5;
    stroke-dasharray: 5 3;
    animation: dash-flow 3s linear infinite;
}
@keyframes dash-flow {
    to { stroke-dashoffset: -40; }
}
.ge1,.ge3 { animation-duration: 2.8s; }
.ge2,.ge4 { animation-duration: 3.5s; }
.ge5,.ge6 { animation-duration: 4s; }
.g-node { fill: rgba(6,182,212,.15); stroke: #22d3ee; stroke-width: 1.5; }
.g-center { fill: rgba(6,182,212,.25); stroke-width: 2; }
.g-label {
    fill: #e2e8f0; font-size: 8px; font-weight: 700;
    text-anchor: middle; dominant-baseline: middle;
}
.g-small { fill: #94a3b8; font-size: 7px; }
.g-search-pulse {
    fill: none; stroke: #22d3ee; stroke-width: 2;
    animation: graph-ping 2.5s ease-out infinite;
    opacity: 0;
}
@keyframes graph-ping {
    0%   { r: 22; opacity: .8; }
    100% { r: 55; opacity: 0; }
}
.geo-query-box {
    background: rgba(0,0,0,.3);
    border: 1px solid rgba(34,211,238,.2);
    border-radius: 8px; padding: 6px 10px;
    font-size: .75rem; color: #67e8f9;
    margin-top: 8px; font-family: monospace;
    display: flex; gap: 4px; align-items: center;
}
.geo-cursor { animation: blink .7s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.geo-result-box {
    margin-top: 8px;
    background: rgba(6,182,212,.08);
    border: 1px solid rgba(6,182,212,.2);
    border-radius: 8px; padding: 8px 10px;
    font-size: .75rem; color: #a5f3fc;
    animation: float 4s ease-in-out infinite;
}

/* ---------- SAFISPACE — Social Feed ---------- */
.safi-feed {
    width: 300px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(244,114,182,.15);
    border-radius: 18px;
    overflow: hidden;
}
.safi-header {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px;
    background: rgba(244,114,182,.06);
    border-bottom: 1px solid rgba(244,114,182,.1);
}
.safi-dots { display: flex; gap: 4px; }
.safi-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.2); }
.safi-title { flex: 1; text-align: center; font-size: .8rem; font-weight: 700; color: #f9a8d4; }
.safi-notif { position: relative; color: #94a3b8; font-size: .9rem; }
.notif-count {
    position: absolute; top: -6px; right: -6px;
    background: #f472b6; color: #fff;
    font-size: .6rem; font-weight: 700;
    width: 14px; height: 14px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    animation: notif-bounce .6s ease-out infinite alternate;
}
@keyframes notif-bounce {
    to { transform: translateY(-2px); }
}
.safi-post {
    display: flex; gap: 10px; padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,.05);
    opacity: 0; transform: translateX(-10px);
}
.sp1 { animation: post-slide 0.5s 0.2s ease-out forwards; }
.sp2 { animation: post-slide 0.5s 0.7s ease-out forwards; }
@keyframes post-slide {
    to { opacity: 1; transform: translateX(0); }
}
.safi-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .8rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.safi-post-body { flex: 1; }
.safi-post-author { font-size: .7rem; font-weight: 700; color: #e2e8f0; margin-bottom: 2px; }
.safi-post-text { font-size: .75rem; color: #94a3b8; line-height: 1.4; margin-bottom: 4px; }
.safi-post-likes { font-size: .7rem; color: #f472b6; }
.safi-post-likes i { margin-right: 3px; }
.safi-chat-preview {
    display: flex; gap: 8px; padding: 10px 14px; align-items: flex-start;
    background: rgba(255,255,255,.03);
}
.safi-chat-preview > i { color: #f472b6; margin-top: 2px; font-size: .8rem; flex-shrink: 0; }
.safi-chat-lines { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.safi-msg {
    font-size: .73rem; color: #94a3b8;
    background: rgba(255,255,255,.05);
    border-radius: 8px; padding: 4px 8px;
    opacity: 0; animation-fill-mode: forwards;
}
.sm1 { animation: post-slide 0.4s 1.2s forwards; }
.sm2 { animation: post-slide 0.4s 1.8s forwards; }
.safi-typing { font-size: .7rem; color: #475569; }
.typing-dots { letter-spacing: 1px; animation: typing-blink 1s steps(3) infinite; }
@keyframes typing-blink {
    0%   { content: '.'; }
    33%  { content: '..'; }
    66%  { content: '...'; }
}

/* ---------- DIGITAL BUDDY — Onboarding UI ---------- */
.buddy-ui {
    width: 300px;
    background: rgba(124,58,237,.06);
    border: 1px solid rgba(124,58,237,.2);
    border-radius: 20px;
    padding: 20px;
}
.buddy-avatar-wrap {
    position: relative;
    width: 70px; height: 70px;
    margin: 0 auto 14px;
}
.buddy-avatar-ring {
    position: absolute; inset: -5px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #a78bfa;
    border-right-color: #a78bfa;
    animation: rotate 2s linear infinite;
}
.buddy-avatar {
    width: 70px; height: 70px; border-radius: 50%;
    background: rgba(124,58,237,.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
}
.buddy-lvl {
    position: absolute; bottom: -8px; left: 50%;
    transform: translateX(-50%);
    background: #7c3aed; color: #fff;
    font-size: .6rem; font-weight: 700;
    border-radius: 10px; padding: 2px 8px;
    white-space: nowrap;
}
.buddy-xp-row {
    display: flex; align-items: center; gap: 8px;
    font-size: .75rem; color: #a78bfa;
    margin-bottom: 14px;
}
.buddy-xp-bar {
    flex: 1; height: 8px;
    background: rgba(124,58,237,.15);
    border-radius: 4px; overflow: hidden;
}
.buddy-xp-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #7c3aed, #a78bfa);
    border-radius: 4px;
    animation: xp-grow 2s 0.5s ease-out forwards;
}
@keyframes xp-grow {
    to { width: 68%; }
}
.buddy-xp-num { font-size: .7rem; color: #64748b; }
.buddy-tasks { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.buddy-task {
    font-size: .76rem; color: #94a3b8;
    display: flex; gap: 8px; align-items: center;
}
.bt-done { color: #6b7280; }
.bt-done i { color: #22c55e; }
.bt-active { color: #e2e8f0; font-weight: 600; }
.bt-active i { color: #a78bfa; animation: dot-blink 1s ease-in-out infinite; }
.buddy-chat-bubble {
    display: flex; gap: 8px; align-items: flex-start;
    background: rgba(124,58,237,.12);
    border: 1px solid rgba(124,58,237,.2);
    border-radius: 12px; padding: 8px 10px;
    font-size: .76rem; color: #c4b5fd;
    animation: float 4s ease-in-out infinite;
}
.buddy-bot-icon { font-size: .9rem; flex-shrink: 0; }

/* ---------- BENTO CARD STYLES for new projects ---------- */
.card-ertedamu { background: linear-gradient(135deg, rgba(52,211,153,.1) 0%, rgba(16,185,129,.05) 100%); border-color: rgba(52,211,153,.2); }
.card-ertedamu:hover { border-color: rgba(52,211,153,.4) !important; box-shadow: 0 16px 40px rgba(0,0,0,.35), 0 0 20px rgba(52,211,153,.12) !important; }
.card-ertedamu::before { background: conic-gradient(from var(--border-angle), transparent 70%, rgba(52,211,153,.4) 80%, rgba(110,255,200,1) 87%, rgba(52,211,153,.4) 94%, transparent 100%); }

.card-opm { background: linear-gradient(135deg, rgba(251,191,36,.1) 0%, rgba(245,158,11,.05) 100%); border-color: rgba(251,191,36,.2); }
.card-opm:hover { border-color: rgba(251,191,36,.4) !important; box-shadow: 0 16px 40px rgba(0,0,0,.35), 0 0 20px rgba(251,191,36,.12) !important; }
.card-opm::before { background: conic-gradient(from var(--border-angle), transparent 70%, rgba(251,191,36,.4) 80%, rgba(255,220,80,1) 87%, rgba(251,191,36,.4) 94%, transparent 100%); }

.card-unidesk { background: linear-gradient(135deg, rgba(99,102,241,.1) 0%, rgba(79,70,229,.05) 100%); border-color: rgba(99,102,241,.2); }
.card-unidesk:hover { border-color: rgba(99,102,241,.4) !important; box-shadow: 0 16px 40px rgba(0,0,0,.35), 0 0 20px rgba(99,102,241,.12) !important; }
.card-unidesk::before { background: conic-gradient(from var(--border-angle), transparent 70%, rgba(99,102,241,.4) 80%, rgba(165,168,255,1) 87%, rgba(99,102,241,.4) 94%, transparent 100%); }

.card-geotrace { background: linear-gradient(135deg, rgba(6,182,212,.1) 0%, rgba(8,145,178,.05) 100%); border-color: rgba(6,182,212,.2); }
.card-geotrace:hover { border-color: rgba(6,182,212,.4) !important; box-shadow: 0 16px 40px rgba(0,0,0,.35), 0 0 20px rgba(6,182,212,.12) !important; }
.card-geotrace::before { background: conic-gradient(from var(--border-angle), transparent 70%, rgba(6,182,212,.4) 80%, rgba(100,230,255,1) 87%, rgba(6,182,212,.4) 94%, transparent 100%); }

.card-safispace { background: linear-gradient(135deg, rgba(244,114,182,.1) 0%, rgba(236,72,153,.05) 100%); border-color: rgba(244,114,182,.2); }
.card-safispace:hover { border-color: rgba(244,114,182,.4) !important; box-shadow: 0 16px 40px rgba(0,0,0,.35), 0 0 20px rgba(244,114,182,.12) !important; }
.card-safispace::before { background: conic-gradient(from var(--border-angle), transparent 70%, rgba(244,114,182,.4) 80%, rgba(255,180,220,1) 87%, rgba(244,114,182,.4) 94%, transparent 100%); }

.card-buddy { background: linear-gradient(135deg, rgba(124,58,237,.12) 0%, rgba(109,40,217,.06) 100%); border-color: rgba(124,58,237,.25); }
.card-buddy:hover { border-color: rgba(167,139,250,.4) !important; box-shadow: 0 16px 40px rgba(0,0,0,.35), 0 0 20px rgba(124,58,237,.15) !important; }
.card-buddy::before { background: conic-gradient(from var(--border-angle), transparent 70%, rgba(167,139,250,.4) 80%, rgba(210,190,255,1) 87%, rgba(167,139,250,.4) 94%, transparent 100%); }

.mvp-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: .8px;
    text-transform: uppercase;
    background: rgba(245,158,11,.15);
    color: #f59e0b;
    border: 1px solid rgba(245,158,11,.35);
    border-radius: 6px;
    padding: 3px 8px;
}

/* --- FOOTER CTA --- */
.footer-cta {
    text-align: center;
    padding: 100px 20px;
    background: linear-gradient(to top, #0b0c15, #141420);
}
.footer-cta h2 { font-size: 2.5rem; margin-bottom: 30px; }
.btn-xl { padding: 20px 50px; font-size: 1.2rem; }

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .bento-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
    .card-teacher, .card-architect { grid-column: span 1; grid-row: span 1; }
    
    .enterprise-content, .enterprise-content.reverse {
        flex-direction: column;
        gap: 40px;
    }
    .hero-title { font-size: 3rem; }
}

/* --- АДАПТИВНОСТЬ --- */
@media (max-width: 992px) {
    .bento-grid {
        display: flex;
        flex-direction: column;
    }
    /* Сбрасываем сетку на мобильных */
    .card-teacher, .card-architect, .card-avatar, .card-insight, .card-chat {
        grid-column: auto;
        grid-row: auto;
        min-height: 250px;
    }
    /* Возвращаем стандартный вид для чат-бота на мобильных */
    .card-chat {
        flex-direction: column;
        align-items: flex-start;
        padding: 30px;
    }
    .card-chat .card-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }
    .card-chat .icon-box { margin-bottom: 20px; }
}

/* ==================================
   ОБНОВЛЕННЫЙ HERO SECTION (Сплит-экран)
   ================================== */

.landing-hero {
    min-height: 100vh; /* На весь экран */
    display: flex;
    align-items: center;
    position: relative;
    padding: 100px 0; /* Отступы сверху и снизу */
    overflow: hidden;
}

.hero-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Две равные колонки */
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* --- ТЕКСТОВАЯ ЧАСТЬ --- */
.hero-text-side {
    text-align: left;
    animation: fadeInUp 0.8s ease-out;
}

.hero-title {
    font-size: 4.5rem; /* Крупный заголовок */
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 30px;
    letter-spacing: -2px;
}

.hero-description-box {
    padding: 25px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05); /* Полупрозрачный фон */
    border-left: 4px solid var(--primary-purple); /* Акцентная линия слева */
    backdrop-filter: blur(10px);
    margin-bottom: 40px;
}

.hero-description-box p {
    color: #e0e0e0;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 15px;
}
.hero-description-box p:last-child { margin-bottom: 0; }

.hero-buttons {
    display: flex;
    gap: 15px;
}


/* --- ВИЗУАЛЬНАЯ ЧАСТЬ (КАРТИНКИ) --- */
.hero-visual-side {
    position: relative;
    height: 500px; /* Высота области картинок */
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInUp 1s ease-out 0.2s backwards; /* Появляется чуть позже */
}

.image-composition {
    position: relative;
    width: 100%;
    height: 100%;
}

.composition-card {
    position: absolute;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.5s ease;
}

.composition-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Задняя картинка (Офис) */
.card-back {
    top: 0;
    right: 0;
    width: 75%; /* Занимает 75% ширины контейнера */
    height: 75%;
    z-index: 1;
    transform: rotate(3deg); /* Небольшой наклон */
    opacity: 0.6; /* Чуть темнее */
    filter: grayscale(30%); /* Немного обесцвечиваем, чтобы не отвлекала */
}

/* Передняя картинка (Команда) */
.card-front {
    bottom: 0;
    left: 0;
    width: 80%;
    height: 70%;
    z-index: 2;
    transform: rotate(-2deg); /* Наклон в другую сторону */
    box-shadow: -10px 10px 40px rgba(0, 0, 0, 0.6);
}

/* Эффект при наведении на блок картинок */
.image-composition:hover .card-back {
    transform: rotate(6deg) translate(20px, -20px);
    opacity: 0.8;
    filter: grayscale(0%);
}
.image-composition:hover .card-front {
    transform: rotate(-4deg) translate(-10px, 10px) scale(1.02);
}


/* Декоративные плашки */
.floating-badge {
    position: absolute;
    background: rgba(20, 20, 30, 0.8);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 30px;
    border: 1px solid rgba(106, 68, 255, 0.5);
    color: white;
    font-weight: 600;
    z-index: 3;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    animation: float 4s ease-in-out infinite;
}

.badge-top {
    top: 10%;
    left: -10%;
}
.badge-bottom {
    bottom: 15%;
    right: -5%;
    animation-delay: 2s;
}

/* --- МОБИЛЬНАЯ АДАПТАЦИЯ --- */
@media (max-width: 992px) {
    .hero-grid-container {
        grid-template-columns: 1fr; /* Одна колонка */
        text-align: center;
        gap: 40px;
    }
    
    .hero-text-side {
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-direction: column;
    }
    
    .hero-visual-side {
        height: 400px; /* Уменьшаем высоту для мобильных */
    }
    
    .card-back { width: 85%; right: 5%; top: 0; }
    .card-front { width: 90%; left: 5%; bottom: 0; }
    
    .floating-badge { display: none; /* Скрываем плашки на телефонах, чтобы не мешали */ }
}

/* ==================================
   СТИЛИ ДЛЯ СЕКЦИИ КОМАНДЫ
   ================================== */

.team-section {
    padding: 100px 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

/* --- Общие стили карточки --- */
.team-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px 20px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    
    /* Для анимации появления */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out, box-shadow 0.3s ease;
}

.team-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.team-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(106, 68, 255, 0.5);
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(106, 68, 255, 0.15);
}

/* --- Аватар --- */
.avatar-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px auto;
    border-radius: 50%;
    padding: 4px; /* Отступ для градиентной рамки */
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.avatar-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(20, 20, 30, 0.8); /* Внутренняя рамка */
}

/* При наведении рамка становится цветной */
.team-card:hover .avatar-wrapper {
    background: linear-gradient(135deg, var(--accent-pink), var(--primary-purple));
}

/* --- Текст --- */
.team-card h3 {
    font-size: 1.25rem;
    margin: 0 0 5px 0;
    color: #fff;
    font-weight: 700;
}

.team-card .role {
    font-size: 0.9rem;
    color: #6a44ff; /* Фирменный фиолетовый */
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}


/* --- РАСКЛАДКА (Leaders) --- */
.team-leaders-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 60px; /* Отступ от участников */
}

.leader-card {
    width: 300px; /* Лидеры чуть крупнее */
    padding: 40px 20px;
    background: linear-gradient(180deg, rgba(30, 30, 50, 0.6) 0%, rgba(20, 20, 30, 0.8) 100%);
    border: 1px solid rgba(106, 68, 255, 0.2);
}

.leader-card .avatar-wrapper {
    width: 150px; /* Аватары лидеров крупнее */
    height: 150px;
}
.leader-card h3 {
    font-size: 1.5rem;
}


/* --- РАСКЛАДКА (Members) - 5 в ряд --- */
.team-members-grid {
    display: grid;
    /* Указываем ровно 5 колонок равной ширины */
    grid-template-columns: repeat(5, 1fr);
    gap: 15px; /* Немного уменьшим отступ между ними, чтобы влезли */
    max-width: 1400px; /* Увеличим ширину контейнера, чтобы дать им место */
    margin: 0 auto;
    justify-content: center;
}

/* Карточка участника */
.member-card {
    width: 100%; /* Карточка занимает всю ширину своей колонки */
    min-width: 0; /* Важно для Grid: предотвращает вылезание контента */
    padding: 25px 15px; /* Чуть уменьшим боковые отступы внутри карточки */
}

/* Уменьшим аватарки участников, чтобы сохранить пропорции */
.member-card .avatar-wrapper {
    width: 100px;
    height: 100px;
}

/* Уменьшим шрифт имени, чтобы оно влезало в одну строку */
.member-card h3 {
    font-size: 1.1rem;
}

/* --- ВАЖНО: Адаптивность --- */
/* На экранах поменьше (ноутбуки) 5 в ряд будет слишком мелко, 
   поэтому перестроимся в 3, а потом в 1 */

@media (max-width: 1200px) {
    .team-members-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 в ряд */
        justify-items: center; /* Центрируем, если их станет меньше в ряду */
    }
    /* Последние два элемента будут центрированы */
    .team-members-grid .team-card:last-child:nth-child(3n - 1) {
        grid-column-end: -2;
    }
}

@media (max-width: 768px) {
    .team-members-grid {
        grid-template-columns: 1fr; /* 1 в ряд на телефонах */
    }
    .member-card {
        max-width: 300px; /* Ограничим ширину на телефоне */
        margin: 0 auto;
    }
}


/* --- МОБИЛЬНАЯ АДАПТАЦИЯ --- */
@media (max-width: 768px) {
    .team-leaders-container {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    .team-members-grid {
        justify-content: center;
    }
    .member-card, .leader-card {
        width: 100%;
        max-width: 300px;
    }
}

/* ======================================================
   ИСПРАВЛЕНИЕ МОБИЛЬНОГО МЕНЮ ДЛЯ ГЛАВНОЙ СТРАНИЦЫ (ТЕМНОЙ)
   ====================================================== */

/* 1. Сам хедер на мобильных (делаем его темным и прозрачным) */
@media (max-width: 1024px) {
    .landing-page-body .site-header {
        background: rgba(11, 12, 21, 0.85) !important; /* Темный фон */
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* 2. Иконка "Гамбургер" (делаем полоски белыми) */
    .landing-page-body .hamburger,
    .landing-page-body .hamburger::before,
    .landing-page-body .hamburger::after {
        background-color: #ffffff !important;
    }

    /* 3. Выпадающее/Полноэкранное меню на мобильном */
    /* Когда меню открыто, фон должен быть темным, а не белым */
    .landing-page-body .main-nav {
        background-color: #0b0c15 !important; /* Цвет фона главной страницы */
        /* Добавим немного прозрачности если нужно */
        background: rgba(11, 12, 21, 0.98) !important; 
    }

    /* 4. Ссылки внутри мобильного меню */
    .landing-page-body .main-nav a {
        color: #ffffff !important; /* Белый текст */
        border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Разделители */
    }

    .landing-page-body .main-nav a:hover {
        color: var(--primary-purple) !important;
        background: rgba(255, 255, 255, 0.05);
    }
    
    /* 5. Кнопки в мобильном меню (Вход/Регистрация) */
    .landing-page-body .mobile-only a {
        color: #fff !important;
    }
}

/* ======================================================
   ФИНАЛЬНОЕ ИСПРАВЛЕНИЕ МОБИЛЬНОЙ АДАПТАЦИИ КОМАНДЫ
   ====================================================== */

/* Применяем стили для экранов меньше 992px (планшеты и телефоны) */
@media screen and (max-width: 992px) {

    /* 1. Блок Руководителей */
    .team-leaders-container {
        display: flex !important;
        flex-direction: column !important; /* Строго вертикально */
        align-items: center !important;    /* Строго по центру */
        gap: 30px !important;
    }

    /* 2. Сетка участников */
    .team-members-grid {
        /* Отключаем Grid и включаем Flex-колонку. Это надежнее для списка. */
        display: flex !important; 
        flex-direction: column !important;
        align-items: center !important;
        gap: 20px !important;
        
        /* Сбрасываем старые grid-настройки на всякий случай */
        grid-template-columns: 1fr !important;
    }

    /* 3. Настройка размера ВСЕХ карточек (и лидеров, и участников) */
    .leader-card,
    .member-card {
        width: 100% !important;
        max-width: 320px !important; /* Оптимальная ширина для телефона */
        margin: 0 auto !important;   /* Центрирование */
        
        /* Возвращаем нормальные отступы, если они были сбиты */
        padding: 30px 20px !important;
    }
}

/* ==================================
   АДАПТАЦИЯ ПРОФИЛЯ ПОД МОБИЛЬНЫЕ
   ================================== */

@media (max-width: 768px) {
    /* Перестраиваем карточку сертификата в колонку */
    .certificate-item {
        flex-direction: column;
        text-align: center;
        padding: 25px 20px; /* Чуть больше воздуха */
        gap: 15px;
    }

    /* Иконка */
    .cert-icon {
        margin-bottom: 5px;
    }

    /* Текст */
    .cert-info h4 {
        font-size: 1.1rem;
        margin-bottom: 5px;
        line-height: 1.4; /* Чтобы длинные названия не слипались */
    }

    /* Кнопка на всю ширину */
    .cert-actions {
        width: 100%;
        margin-top: 10px;
    }
    
    .cert-actions .btn {
        display: block;
        width: 100%;
        padding: 12px 0; /* Делаем кнопку повыше для удобного нажатия пальцем */
    }
    
    /* Дополнительно: улучшим карточку самого профиля на телефоне */
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    .profile-info h2 {
        font-size: 24px;
    }
}
/* =========================================================
   ИЗОЛИРОВАННЫЕ СТИЛИ ДЛЯ AJAX АВТОРИЗАЦИИ (ajax-auth)
   ========================================================= */

/* Затемненный фон (оверлей) */
.ajax-auth-overlay {
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px); /* Эффект размытия фона */
    display: none; /* Скрыто по умолчанию */
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Поверх всего */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ajax-auth-overlay.is-visible {
    display: flex;
    opacity: 1;
}

/* Карточка модального окна */
.ajax-auth-card {
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    position: relative;
    transform: translateY(30px);
    transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    text-align: center;
}

.ajax-auth-overlay.is-visible .ajax-auth-card {
    transform: translateY(0);
}

/* Заголовок */
.ajax-auth-title {
    margin: 0 0 25px 0;
    font-size: 24px;
    font-weight: 700;
    color: #1d1d1f; /* Apple-style dark gray */
}

/* Кнопка закрытия (крестик) */
.ajax-auth-close {
    position: absolute;
    top: 15px; 
    right: 15px;
    background: none; 
    border: none;
    font-size: 24px; 
    color: #86868b;
    cursor: pointer;
    transition: color 0.2s;
}
.ajax-auth-close:hover {
    color: #1d1d1f;
}

/* Поля ввода */
.ajax-auth-input-group {
    margin-bottom: 15px;
    text-align: left;
}

.ajax-auth-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d2d2d7;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #fbfbfd;
}

.ajax-auth-input:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 4px rgba(106, 68, 255, 0.1);
    background-color: #fff;
}

/* Специальный стиль для поля ввода кода */
.ajax-auth-input-code {
    text-align: center;
    letter-spacing: 8px;
    font-size: 24px;
    font-weight: 600;
}

/* Чекбокс "Я студент" */
.ajax-auth-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}
.ajax-auth-checkbox {
    width: 18px; 
    height: 18px;
    cursor: pointer;
}
.ajax-auth-checkbox-label {
    font-size: 14px;
    color: #424245;
    cursor: pointer;
}

/* Кнопка действия */
.ajax-auth-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary-purple); /* Ваш фирменный цвет */
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.ajax-auth-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.ajax-auth-btn:active {
    transform: scale(0.98);
}

/* Ссылки переключения (Вход <-> Регистрация) */
.ajax-auth-footer {
    margin-top: 20px;
    font-size: 14px;
    color: #86868b;
}

.ajax-auth-link {
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}
.ajax-auth-link:hover {
    text-decoration: underline;
}

/* Блок ошибки */
.ajax-auth-error-msg {
    background-color: #ffe5e5;
    color: #d32f2f;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 15px;
    display: none; /* Скрыто, пока нет ошибки */
}


.ajax-auth-checkbox-wrapper {
    margin-top: 10px;
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
}

.custom-checkbox-container {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    position: relative;
    user-select: none; /* Запрещаем выделение текста при клике */
}

/* 1. Прячем уродливый стандартный чекбокс браузера */
.custom-checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* 2. Рисуем наш собственный квадратный чекбокс */
.custom-checkbox-container .checkmark {
    height: 24px;
    width: 24px;
    background-color: #fbfbfd;
    border: 2px solid #d2d2d7;
    border-radius: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 3. Эффект при наведении (легкое подсвечивание зеленым) */
.custom-checkbox-container:hover input ~ .checkmark {
    border-color: #34c759; /* Зеленый в стиле iOS */
}

/* 4. Когда чекбокс нажат (checked) - заливаем зеленым */
.custom-checkbox-container input:checked ~ .checkmark {
    background-color: #34c759;
    border-color: #34c759;
    transform: scale(1.05); /* Легкий "прыжок" при нажатии */
}

/* 5. Рисуем саму галочку (она прозрачная, пока чекбокс не нажат) */
.custom-checkbox-container .checkmark:after {
    content: "";
    display: none;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
    margin-bottom: 2px; /* Центрируем галочку визуально */
}

/* 6. Показываем галочку при нажатии */
.custom-checkbox-container input:checked ~ .checkmark:after {
    display: block;
    animation: checkmarkIn 0.2s ease-in-out forwards;
}

/* Анимация появления галочки */
@keyframes checkmarkIn {
    0% { opacity: 0; transform: rotate(45deg) scale(0.5); }
    100% { opacity: 1; transform: rotate(45deg) scale(1); }
}

/* Стили для текста рядом с чекбоксом */
.custom-checkbox-container .checkbox-text {
    font-size: 15px;
    color: #1d1d1f;
    font-weight: 500;
    transition: color 0.2s;
}

/* По желанию: текст тоже может становиться зеленым при клике */
.custom-checkbox-container input:checked ~ .checkbox-text {
    color: #34c759;
}

/* =========================================
   Theme: Oil & Gas Industry (Dark & Gold)
   ========================================= */

:root {
    /* Цветовая палитра */
    --oil-primary: #f0a500;       /* Золото/Янтарь (цвет сырой нефти на свету) */
    --oil-secondary: #cf7500;     /* Темное золото */
    --oil-dark: #0f1014;          /* Почти черный (цвет мазута/глубины) */
    --oil-surface: #1b1e24;       /* Темно-серый (цвет оборудования) */
    --oil-text-main: #ffffff;
    --oil-text-muted: #a0a4b0;
    
    /* Размеры и отступы */
    --oil-container-width: 1200px;
    --oil-border-radius: 8px;     /* Более строгие углы для индустриальной темы */
}

/* Базовые настройки для секций курса */
body {
    background-color: var(--oil-dark); /* Делаем фон страницы темным */
    font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif; /* Инженерный шрифт */
}

/* =========================================
   1. Hero Section (Главный экран)
   ========================================= */

.oil-hero {
    position: relative;
    height: 90vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    /* Фоновое изображение: Нефтяная платформа в море */
    background-image: url('https://images.unsplash.com/photo-1516937941344-00b4e0337589?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Эффект параллакса */
    color: var(--oil-text-main);
    overflow: hidden;
}

/* Темный градиент поверх фото, чтобы текст читался */
.oil-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        90deg, 
        rgba(15, 16, 20, 0.95) 0%, 
        rgba(15, 16, 20, 0.7) 50%, 
        rgba(15, 16, 20, 0.2) 100%
    );
    z-index: 1;
}

.oil-container {
    max-width: var(--oil-container-width);
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2; /* Поверх оверлея */
    width: 100%;
}

.oil-hero-content {
    max-width: 650px;
}

.oil-tag {
    display: inline-block;
    color: var(--oil-primary);
    border: 1px solid var(--oil-primary);
    padding: 6px 12px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    background: rgba(240, 165, 0, 0.1);
}

.oil-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 25px;
    /* Текстура металла на тексте (опционально) */
    background: linear-gradient(to right, #ffffff, #dcdcdc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.oil-subtitle {
    font-size: 1.25rem;
    color: var(--oil-text-muted);
    margin-bottom: 40px;
    line-height: 1.6;
    border-left: 3px solid var(--oil-primary);
    padding-left: 20px;
}

/* =========================================
   2. Buttons
   ========================================= */

.oil-buttons {
    display: flex;
    gap: 20px;
}

.oil-btn {
    padding: 15px 35px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--oil-border-radius);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.oil-btn-primary {
    background: linear-gradient(135deg, var(--oil-primary), var(--oil-secondary));
    color: #000; /* Черный текст на золотом фоне читается лучше */
    border: none;
    box-shadow: 0 4px 15px rgba(240, 165, 0, 0.3);
}

.oil-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(240, 165, 0, 0.5);
}

.oil-btn-outline {
    background: transparent;
    color: var(--oil-text-main);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.oil-btn-outline:hover {
    border-color: var(--oil-text-main);
    background: rgba(255, 255, 255, 0.05);
}

/* =========================================
   3. Stats Section
   ========================================= */

.oil-stats-section {
    background-color: #14161b;
    padding: 40px 0;
    border-bottom: 1px solid #2a2e35;
}

.oil-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: center;
}

.oil-stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--oil-primary);
}

.oil-stat-label {
    color: var(--oil-text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================================
   4. Curriculum Cards
   ========================================= */

.oil-curriculum-section {
    padding: 100px 0;
    background-color: var(--oil-dark);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: white;
    margin-bottom: 60px;
}

.oil-modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.oil-card {
    background-color: var(--oil-surface);
    padding: 30px;
    border-radius: var(--oil-border-radius);
    border: 1px solid #2a2e35;
    transition: transform 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Эффект свечения при наведении */
.oil-card:hover {
    transform: translateY(-5px);
    border-color: var(--oil-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Полоска сверху карточки */
.oil-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: var(--oil-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.oil-card:hover::before {
    transform: scaleX(1);
}

.oil-card-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--oil-text-main);
}

.oil-card h3 {
    color: var(--oil-text-main);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.oil-card p {
    color: var(--oil-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* =========================================
   5. CTA Section
   ========================================= */

.oil-cta-section {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(135deg, #1e2229 0%, #14161b 100%);
    border-top: 1px solid #2a2e35;
}

.oil-cta-section h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 15px;
}

.oil-cta-section p {
    color: var(--oil-text-muted);
    margin-bottom: 30px;
}

.oil-btn-large {
    padding: 18px 50px;
    font-size: 1.2rem;
    background-color: var(--oil-text-main);
    color: var(--oil-dark);
    font-weight: bold;
    text-decoration: none;
    border-radius: var(--oil-border-radius);
}

.oil-btn-large:hover {
    background-color: var(--oil-primary);
}

/* =========================================
   6. Mobile Responsiveness
   ========================================= */

@media (max-width: 768px) {
    .oil-title {
        font-size: 2.5rem;
    }
    .oil-stats-grid {
        grid-template-columns: 1fr; /* Статистика в столбик */
    }
    .oil-buttons {
        flex-direction: column;
        width: 100%;
    }
    .oil-btn {
        text-align: center;
    }
}

/* ==================================================
   БИБЛИОТЕКА КУРСОВ (PREMIUM DESIGN v3.0)
   ================================================== */

.library-container {
    padding: 60px 20px 100px 20px;
    max-width: 1300px;
    margin: 0 auto;
}

/* --- 1. ЗАГОЛОВОК СТРАНИЦЫ (Исправленные цвета для светлой темы) --- */
.library-header h1.hero-title {
    color: #1e293b !important; /* Глубокий темно-синий/сланцевый */
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 15px;
}

.library-header .gradient-text {
    background: linear-gradient(135deg, #6a44ff 0%, #ff6a88 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.library-header p.lead {
    color: #475569 !important; /* Приглушенный серый */
    font-weight: 400;
}

/* --- 2. Фильтры --- */
.library-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 10px 24px;
    border-radius: 30px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.filter-btn.active {
    background: #1e293b; /* Темная кнопка для контраста */
    color: white;
    border-color: #1e293b;
    box-shadow: 0 10px 20px rgba(30, 41, 59, 0.2);
}

/* --- 3. Сетка карточек --- */
.premium-course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 35px;
    align-items: stretch;
}

/* --- 4. НОВАЯ АНИМАЦИЯ КАРТОЧКИ (3D Lift) --- */
.premium-course-card {
    background: #ffffff;
    border-radius: 28px; /* Более мягкие углы */
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02), 0 10px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid #edf2f7;
    transition: all 0.5s cubic-bezier(0.2, 1, 0.3, 1); /* Очень плавно */
    position: relative;
    z-index: 1;
}

/* Эффект при наведении */
.premium-course-card:hover {
    transform: scale(1.03); /* Легкое увеличение */
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12); /* Глубокая мягкая тень */
    border-color: transparent;
    z-index: 2;
}

/* Внутреннее свечение (индустриальный эффект) */
.premium-course-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 28px;
    padding: 2px; 
    background: linear-gradient(135deg, rgba(255,255,255,0.5), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s;
}

.premium-course-card:hover::before {
    opacity: 1;
}

/* --- 5. Обложки курсов --- */
.card-cover {
    height: 200px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.5s ease;
}

.ai-cover { background: #6366f1; }
.startup-cover { background: #ec4899; }
.oil-cover { background: #1e293b; border-bottom: 3px solid #c5a059; }

.floating-icon {
    font-size: 80px;
    color: rgba(255, 255, 255, 0.95);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); /* Пружинистая анимация */
}

/* Иконка "выпрыгивает" при наведении */
.premium-course-card:hover .floating-icon {
    transform: scale(1.2) translateY(-10px) rotate(5deg);
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.3));
}

.oil-cover .floating-icon { color: #c5a059; }

/* --- 6. Текст и теги --- */
.card-body {
    padding: 30px 25px 20px 25px;
    flex-grow: 1;
}

.card-body h3 {
    font-size: 1.5rem;
    color: #0f172a;
    margin-bottom: 12px;
    font-weight: 800;
}

.tag {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    text-transform: uppercase;
}

/* --- 7. Футер (Мета) --- */
.card-footer {
    padding: 20px 25px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 20px;
}

.card-footer .meta {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-footer .meta i {
    color: #6366f1;
}

/* --- 8. Бейджи --- */
.card-badge {
    position: absolute;
    top: 20px;
    left: 20px; /* Переместили налево для баланса */
    padding: 5px 12px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: white;
    background: rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    z-index: 2;
}

.badge-popular { background: #f59e0b; }
.badge-new { background: #10b981; }
.badge-pro { background: #c5a059; }

/* Адаптивность */
@media (max-width: 768px) {
    .library-header h1.hero-title { font-size: 2.5rem !important; }
    .premium-course-grid { grid-template-columns: 1fr; }
}

/* ========================================= */
/* ENHANCED LANGUAGE SWITCHER (GLASSMORPHISM)*/
/* ========================================= */
.language-switcher {
    position: relative;
    display: inline-block;
    font-family: inherit;
    margin-right: 15px;
    z-index: 1000;
}

/* 1. АДАПТАЦИЯ КНОПКИ ПОД ТЕМНЫЕ И СЛОЖНЫЕ ФОНЫ */
/* УНИВЕРСАЛЬНАЯ ТЕМНАЯ КАПСУЛА (работает везде) */
.lang-toggle.glass-pill {
    background: rgba(30, 30, 35, 0.7); /* Темное полупрозрачное стекло */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff; /* Текст всегда белый и читаемый */
    
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.lang-toggle.glass-pill:hover {
    background: rgba(30, 30, 35, 0.9);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 195, 255, 0.3); /* Неоновое свечение */
}

/* Анимация стрелочки */
.lang-toggle .arrow-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
}
.language-switcher.open .arrow-icon {
    transform: rotate(180deg);
}

/* 2. ВЫПАДАЮЩЕЕ МЕНЮ */
.lang-menu.glass-menu {
    position: absolute;
    top: 130%;
    /* Открываем меню влево, чтобы оно не вылезло за край экрана */
    right: 0; 
    background: rgba(20, 20, 25, 0.85); /* Темное стекло */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 8px 0;
    list-style: none;
    margin: 0;
    min-width: 140px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.language-switcher.open .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Опции внутри меню */
.lang-option {
    background: transparent;
    border: none;
    color: #d1d1d1; /* Светло-серый текст */
    width: 100%;
    text-align: left;
    padding: 12px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding-left: 25px; /* Легкий сдвиг текста при наведении */
}

.lang-option.active {
    color: #00c3ff; 
    font-weight: 700;
}


/* ========================================= */
/* 3. АДАПТАЦИЯ ПОД СВЕТЛЫЕ СТРАНИЦЫ (БЕЛЫЙ ФОН) */
/* ========================================= */
/* Если у тебя есть страницы с белым фоном, добавь к тегу <body> 
   класс "light-theme" на этих страницах, и переключатель станет темным */
body.light-theme .lang-toggle.glass-pill {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #333333;
}
body.light-theme .lang-toggle.glass-pill:hover {
    background: rgba(0, 0, 0, 0.1);
}


/* ========================================= */
/* 4. МОБИЛЬНАЯ АДАПТАЦИЯ (ТЕЛЕФОНЫ И ПЛАНШЕТЫ) */
/* ========================================= */

/* Планшеты: компактная пилюля без стрелки */
@media (max-width: 768px) {
    .language-switcher {
        margin-right: 6px;
    }

    .lang-toggle.glass-pill {
        padding: 7px 11px;
        gap: 5px;
        font-size: 12px;
        font-weight: 700;
    }

    /* Убираем стрелку — экономим место */
    .lang-toggle .arrow-icon {
        display: none;
    }

    /* Дропдаун: всегда прижат к правому краю кнопки, не вылезает за экран */
    .lang-menu.glass-menu {
        right: 0;
        left: auto;
        min-width: 140px;
        top: calc(100% + 8px);
    }

    .lang-option {
        padding: 13px 16px;
        font-size: 14px;
    }
}

/* Телефоны: иконка-круг без текста */
@media (max-width: 480px) {
    .language-switcher {
        margin-right: 4px;
    }

    .lang-toggle.glass-pill {
        width: 36px;
        height: 36px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
        gap: 0;
    }

    /* На телефоне — только глобус, код языка скрыт */
    .lang-toggle .current-lang {
        display: none;
    }

    /* Глобус чуть крупнее для удобства нажатия */
    .lang-toggle .fa-globe {
        font-size: 15px;
    }

    /* Дропдаун фиксирован — не обрезается родителями */
    .lang-menu.glass-menu {
        position: fixed;
        top: 64px;   /* чуть ниже хедера */
        right: 8px;
        left: auto;
        min-width: 160px;
        border-radius: 16px;
    }

    .lang-option {
        padding: 15px 18px;
        font-size: 15px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    /* Активный язык — галочка слева */
    .lang-option.active::before {
        content: '✓';
        color: #00c3ff;
        font-weight: 700;
        min-width: 14px;
    }
    .lang-option:not(.active)::before {
        content: '';
        min-width: 14px;
    }
}

/* =========================================================
   FLOATING SUPPORT WIDGET  (sp- prefix)
   FAB: z-8000 | Panel: z-8001 | below auth modal (z-9999)
   ========================================================= */

/* --- FAB Button --- */
.sp-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 8000;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px 0 16px;
    height: 52px;
    border-radius: 26px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--accent-pink) 100%);
    color: #fff;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow:
        0 4px 18px rgba(106, 68, 255, 0.45),
        0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    outline: none;
}

.sp-fab:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow:
        0 10px 32px rgba(106, 68, 255, 0.6),
        0 4px 14px rgba(255, 106, 136, 0.35);
}

.sp-fab:active {
    transform: translateY(0) scale(0.97);
}

/* Ripple pulse ring */
.sp-fab::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 26px;
    background: linear-gradient(135deg, var(--primary-purple), var(--accent-pink));
    z-index: -1;
    animation: sp-pulse 2.8s ease-out infinite;
    opacity: 0;
}

@keyframes sp-pulse {
    0%   { transform: scale(1); opacity: 0.55; }
    100% { transform: scale(1.5); opacity: 0; }
}

.sp-fab-icon { font-size: 1.05rem; display: flex; align-items: center; }

/* --- Panel --- */
.sp-panel {
    position: fixed;
    bottom: 88px;
    right: 24px;
    z-index: 8001;
    width: 360px;
    max-height: 540px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;

    background: rgba(14, 10, 42, 0.94);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid var(--surface-border);
    box-shadow:
        0 32px 80px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(106, 68, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);

    /* Hidden state */
    opacity: 0;
    transform: translateY(18px) scale(0.96);
    pointer-events: none;
    transition:
        opacity 0.24s ease,
        transform 0.32s cubic-bezier(0.19, 1, 0.22, 1);
}

.sp-panel.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* --- Panel Header --- */
.sp-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 18px;
    background: linear-gradient(135deg,
        rgba(106, 68, 255, 0.22) 0%,
        rgba(255, 106, 136, 0.12) 100%);
    border-bottom: 1px solid var(--surface-border);
    flex-shrink: 0;
}

.sp-panel-title {
    display: flex;
    align-items: center;
    gap: 11px;
}

.sp-panel-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-purple), var(--accent-pink));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(106, 68, 255, 0.4);
}

.sp-panel-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-light);
    line-height: 1.2;
}

.sp-panel-status {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
}

.sp-online-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #48c774;
    box-shadow: 0 0 0 2px rgba(72, 199, 116, 0.25);
    animation: sp-blink 2.2s ease-in-out infinite;
}

@keyframes sp-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

.sp-close {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
    outline: none;
}

.sp-close:hover {
    background: rgba(255, 255, 255, 0.14);
    color: var(--text-light);
}

/* --- Panel Body (scrollable) --- */
.sp-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px 18px 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(106, 68, 255, 0.25) transparent;
}

.sp-panel-body::-webkit-scrollbar { width: 3px; }
.sp-panel-body::-webkit-scrollbar-track { background: transparent; }
.sp-panel-body::-webkit-scrollbar-thumb {
    background: rgba(106, 68, 255, 0.3);
    border-radius: 2px;
}

/* --- Widget Form --- */
.sp-form-intro {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0 0 14px;
    line-height: 1.55;
}

.sp-field { margin-bottom: 10px; }

.sp-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.sp-input,
.sp-select,
.sp-textarea {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(189, 169, 255, 0.14);
    border-radius: 10px;
    padding: 9px 11px;
    font-size: 0.83rem;
    color: var(--text-light);
    font-family: inherit;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.sp-input::placeholder,
.sp-textarea::placeholder { color: rgba(230, 230, 250, 0.3); }

.sp-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' stroke='rgba(189,169,255,0.45)' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    padding-right: 30px;
}

.sp-select option {
    background: #160f40;
    color: var(--text-light);
}

.sp-input:focus,
.sp-select:focus,
.sp-textarea:focus {
    border-color: rgba(106, 68, 255, 0.55);
    background: rgba(106, 68, 255, 0.07);
    box-shadow: 0 0 0 3px rgba(106, 68, 255, 0.12);
}

.sp-input.is-error,
.sp-select.is-error,
.sp-textarea.is-error {
    border-color: rgba(255, 107, 107, 0.5);
}

.sp-textarea {
    resize: none;
    height: 88px;
    line-height: 1.5;
}

.sp-field-error {
    display: block;
    font-size: 0.73rem;
    color: #ff6b6b;
    margin-top: 4px;
    padding-left: 2px;
}

/* --- Submit Button --- */
.sp-submit-btn {
    width: 100%;
    margin-top: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--accent-pink) 100%);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(106, 68, 255, 0.35);
    outline: none;
}

.sp-submit-btn:hover {
    opacity: 0.92;
    box-shadow: 0 6px 22px rgba(106, 68, 255, 0.5);
}
.sp-submit-btn:active { transform: scale(0.98); }

/* HTMX loading spinner replaces icon */
.sp-submit-btn.htmx-request {
    opacity: 0.75;
    pointer-events: none;
}
.sp-submit-btn.htmx-request i { display: none; }
.sp-submit-btn.htmx-request::after {
    content: '';
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: sp-spin 0.55s linear infinite;
}

@keyframes sp-spin { to { transform: rotate(360deg); } }

/* --- Success State --- */
.sp-success {
    text-align: center;
    padding: 24px 8px 16px;
}

.sp-success-icon {
    font-size: 3.2rem;
    color: #48c774;
    margin-bottom: 14px;
    animation: sp-pop 0.42s cubic-bezier(0.19, 1, 0.22, 1) both;
}

@keyframes sp-pop {
    0%   { transform: scale(0.4); opacity: 0; }
    60%  { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

.sp-success h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-light);
    margin: 0 0 8px;
}

.sp-success p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 18px;
}

.sp-success-again {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--surface-border);
    border-radius: 9px;
    padding: 8px 18px;
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    outline: none;
}

.sp-success-again:hover {
    background: rgba(106, 68, 255, 0.12);
    border-color: rgba(106, 68, 255, 0.3);
    color: var(--text-light);
}

/* --- Mobile --- */
@media (max-width: 480px) {
    .sp-fab {
        right: 14px;
        bottom: 16px;
        height: 48px;
        padding: 0 16px 0 13px;
        font-size: 0.82rem;
    }
    .sp-panel {
        width: calc(100vw - 20px);
        right: 10px;
        bottom: 76px;
        max-height: 72vh;
    }
    .sp-field-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* =========================================================
   ЯЗЫКОВОЙ ПЕРЕКЛЮЧАТЕЛЬ — МОБИЛЬНОЕ МЕНЮ
   ========================================================= */

/* Когда мобильное меню открыто — прячем глобус из хедера */
body.nav-open .language-switcher {
    opacity: 0;
    pointer-events: none;
}

/* Блок внутри мобильного меню */
.mobile-lang-switcher {
    display: none; /* виден только на мобильных — показывается ниже */
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.mobile-lang-pills {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.mobile-lang-btn {
    padding: 10px 22px;
    border-radius: 30px;
    border: 2px solid rgba(0, 0, 0, 0.12);
    background: transparent;
    color: var(--text-dark, #222);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.mobile-lang-btn:hover {
    background: rgba(106, 68, 255, 0.08);
    border-color: var(--primary-purple);
    color: var(--primary-purple);
}

.mobile-lang-btn.active {
    background: var(--primary-purple);
    border-color: var(--primary-purple);
    color: #fff;
    box-shadow: 0 4px 14px rgba(106, 68, 255, 0.35);
}

/* Показываем блок только на мобильных */
@media (max-width: 768px) {
    .mobile-lang-switcher {
        display: block;
    }
}

/* =========================================================
   MOBILE NAV — ПОЛНЫЙ РЕДИЗАЙН
   Логика z-index:
     header         : 1000
     nav (открыт)   : 1005  ← выше хедера, глобус больше не торчит
     nav-toggle     : 1010  ← всегда кликабелен
     auth modal     : 9999
   ========================================================= */
@media (max-width: 1023px) {

    /* Хедер: компактнее, язык скрыт */
    .site-header .container { height: 64px; }
    .logo img               { height: 52px; }
    .language-switcher      { display: none !important; }

    /* Оверлей: тёмный glass вместо белого */
    .main-nav {
        background: rgba(12, 8, 40, 0.97);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0;
    }

    /* Когда открыт — выше хедера */
    body.nav-open .main-nav {
        z-index: 1005;
        padding-bottom: 0;
        height: 100dvh;
    }

    /* Гамбургер всегда поверх оверлея */
    .nav-toggle { z-index: 1010 !important; }

    /* X-крестик белый на тёмном фоне */
    body.nav-open .hamburger::before,
    body.nav-open .hamburger::after {
        background-color: #e6e6fa;
    }

    /* Ссылки в меню */
    .main-nav ul  { gap: 2px; }

    .main-nav a {
        font-size: 19px;
        padding: 11px 28px;
        color: rgba(230, 230, 250, 0.82);
        border-radius: 12px;
    }
    .main-nav a:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.07);
        transform: none;
    }

    /* ── Футер мобильного меню ── */
    .nav-mobile-footer {
        margin-top: 28px;
        padding-top: 22px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 14px;
        width: 100%;
        max-width: 300px;
    }

    /* Языковые пилюли */
    .nav-lang-form { width: 100%; }
    .nav-lang-pills {
        display: flex;
        justify-content: center;
        gap: 8px;
    }
    .nav-lang-btn {
        padding: 9px 22px;
        border-radius: 24px;
        border: 1.5px solid rgba(255, 255, 255, 0.18);
        background: transparent;
        color: rgba(230, 230, 250, 0.6);
        font-family: inherit;
        font-size: 13px;
        font-weight: 700;
        cursor: pointer;
        letter-spacing: 0.06em;
        transition: all 0.2s;
    }
    .nav-lang-btn.active {
        background: var(--primary-purple);
        border-color: var(--primary-purple);
        color: #fff;
        box-shadow: 0 4px 14px rgba(106, 68, 255, 0.4);
    }
    .nav-lang-btn:hover:not(.active) {
        border-color: rgba(255, 255, 255, 0.35);
        color: rgba(230, 230, 250, 0.9);
    }

    /* Секция пользователя */
    .nav-user-section { text-align: center; }

    .nav-user-link {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        text-decoration: none;
        color: rgba(230, 230, 250, 0.65);
        font-size: 13px;
        font-weight: 500;
        padding: 8px 16px;
        border-radius: 20px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        transition: all 0.2s;
    }
    .nav-user-link:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.07);
        border-color: rgba(255, 255, 255, 0.2);
    }
    .nav-user-avatar {
        width: 26px;
        height: 26px;
        border-radius: 50%;
        background: var(--primary-purple);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 11px;
        font-weight: 700;
    }
    .nav-token-badge {
        background: rgba(255, 215, 0, 0.12);
        border: 1px solid rgba(255, 215, 0, 0.22);
        border-radius: 10px;
        padding: 2px 8px;
        font-size: 11px;
        color: rgba(255, 215, 0, 0.85);
    }
    .nav-login-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        text-decoration: none;
        color: #fff;
        font-size: 14px;
        font-weight: 600;
        padding: 10px 24px;
        border-radius: 24px;
        background: linear-gradient(135deg, var(--primary-purple), var(--accent-pink));
        box-shadow: 0 4px 14px rgba(106, 68, 255, 0.35);
        transition: opacity 0.2s;
    }
    .nav-login-btn:hover { opacity: 0.9; }
}

/* Футер скрыт на десктопе */
@media (min-width: 1024px) {
    .nav-mobile-footer { display: none; }
}
