/* --- START OF FILE style.css --- */
:root {
    --brand-blue: #3A8DFF;
    --brand-green: #00FF7F; 
    --text-main: #222;
    /* ЕДИНЫЙ ГРАДИЕНТ ДЛЯ ВСЕГО */
    --main-gradient: linear-gradient(90deg, #3A8DFF 0%, #00FA4C 100%);
    --gray-bg: #f5f5f7;
    --input-bg: #f0f0f5;
}

body {
    margin: 0; padding: 0;
    background-color: white; 
    font-family: 'Montserrat', sans-serif;
    color: var(--text-main);
    overflow-y: auto; min-height: 100vh;
    display: flex; flex-direction: column;
    overflow-x: hidden;
}

#app-wrapper { display: flex; flex-direction: column; min-height: 100vh; position: relative; overflow-x: hidden; }
.hidden { display: none !important; }

/* --- ХОТБАР --- */
.top-hotbar {
    position: sticky; top: 0; 
    width: 100%; height: 80px;
    background: var(--main-gradient);
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    display: flex; align-items: center;
}

.header-content-layer {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 30px; box-sizing: border-box;
}

.hb-left { flex: 1; display: flex; align-items: center; }
.logo-mini { 
    height: 50px; width: auto; 
    cursor: pointer; transition: transform 0.2s; 
    filter: brightness(0) invert(1); 
}
.logo-mini:hover { transform: scale(1.05); }

.hb-center { flex: 2; text-align: center; min-width: 0; overflow: hidden; padding: 0 10px; }
#page-title-display {
    font-size: 1.4em; font-weight: 800; color: white; 
    text-transform: uppercase; letter-spacing: 1px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hb-right { flex: 1; display: flex; justify-content: flex-end; align-items: center; gap: 25px; }

.oleg-head-btn {
    width: 50px; height: 50px; 
    border-radius: 50%;
    overflow: hidden; border: none;
    cursor: pointer; background: black; flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}
.oleg-head-btn:hover { transform: scale(1.1); }
.oleg-vid-mini { width: 100%; height: 100%; object-fit: cover; }

.hamburger-btn {
    background: none; border: none; cursor: pointer;
    display: flex; flex-direction: column; gap: 7px;
    padding: 0; width: 35px;
}
.hamburger-btn span {
    display: block; width: 100%; height: 4px;
    background-color: white; border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* --- МЕНЮ --- */
.side-menu {
    position: fixed; top: 0; right: 0; width: 320px; height: 100%;
    background: white; z-index: 400; box-shadow: -10px 0 40px rgba(0,0,0,0.2);
    display: flex; flex-direction: column; transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.hidden-menu { transform: translateX(100%); }

.menu-header { 
    height: 80px; display: flex; align-items: center; padding: 0 30px; 
    background: var(--main-gradient);
    flex-shrink: 0;
}
.menu-header-content { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.menu-header h3 { margin: 0; color: white; font-weight: 800; font-size: 1.5em; letter-spacing: 1px; }
.close-menu-x { background: none; border: none; color: white; font-size: 32px; cursor: pointer; transition: transform 0.2s; }
.close-menu-x:hover { transform: rotate(90deg); }

.menu-items { padding: 30px; display: flex; flex-direction: column; gap: 15px; overflow-y: auto; height: 100%; }
.menu-link { 
    text-decoration: none; color: #333; font-weight: 700; 
    text-transform: uppercase; padding: 15px; border-radius: 12px; 
    transition: 0.2s; font-size: 1.1em;
}
.menu-link:hover { background: #f0f8ff; color: var(--brand-blue); padding-left: 20px; }
.menu-divider { border: 0; height: 1px; background: #eee; width: 100%; margin: 15px 0; }

.menu-action-row {
    display: flex; flex-direction: column; align-items: center;
    cursor: pointer; transition: 0.2s; text-align: center; width: 100%;
    padding: 15px; border-radius: 15px; border: 1px solid transparent;
    margin-top: auto; margin-bottom: 20px;
}
.menu-action-row:hover { background: #f9f9f9; border-color: #eee; transform: translateY(-2px); }
.support-icon-small { width: 60px; height: 60px; object-fit: contain; margin-bottom: 10px; }

/* --- КОНТЕНТ --- */
main {
    flex-grow: 1; width: 100%; max-width: 900px; margin: 0 auto; 
    padding: 50px 20px; box-sizing: border-box;
}
.content-section { margin-bottom: 50px; animation: fadeIn 0.4s; }
h1, h2, h3, p, li { word-wrap: break-word; overflow-wrap: break-word; hyphens: auto; }

h1 { color: #1d1d1f; text-align: center; margin-bottom: 25px; font-weight: 800; font-size: 2.2em; line-height: 1.2; }
h3 { color: var(--brand-blue); margin-top: 30px; border-bottom: 2px solid #f0f0f0; padding-bottom: 10px; font-size: 1.4em; }
.hero-text { font-size: 1.2em; text-align: center; color: #444; max-width: 750px; margin: 0 auto 35px; line-height: 1.6; }

/* АНИМИРОВАННЫЙ ЛОГОТИП (ФИЛЬТР) */
.anim-logo { 
    display: block; width: 220px; max-width: 80%; 
    margin: 0 auto 30px; 
    border-radius: 0; 
    box-shadow: none; 
    filter: contrast(110%) brightness(110%);
}

.lesson-content p, .lesson-content li { font-size: 1.15em; line-height: 1.7; color: #333; margin-bottom: 15px; }

/* --- СЕРТИФИКАТ --- */
.cert-form-step {
    max-width: 450px; margin: 0 auto; 
    background: #ffffff; padding: 40px; border-radius: 30px;
    text-align: center; box-shadow: 0 15px 50px rgba(0,0,0,0.08);
    border: 1px solid #eee;
}
.cert-label { display: block; margin-bottom: 10px; font-weight: 700; color: #555; text-align: left; margin-left: 5px; font-size: 0.95em; }
.success-text { color: #00c853; font-size: 0.95em; font-weight: 800; margin-top: 8px; margin-bottom: 20px; display: block; }

.modern-input {
    width: 100%; padding: 18px; border: 2px solid transparent;
    border-radius: 18px; background-color: var(--input-bg);
    font-size: 1.05em; font-family: inherit; box-sizing: border-box;
    transition: all 0.2s ease; margin-bottom: 20px; color: #333; font-weight: 500;
}
.modern-input:focus {
    background-color: #fff; border-color: var(--brand-blue);
    box-shadow: 0 0 0 5px rgba(58, 141, 255, 0.1); outline: none;
}

/* УРОВНИ */
.simple-level-block {
    padding: 30px; margin-bottom: 20px; border: 2px solid #f0f0f0; border-radius: 20px;
    cursor: pointer; transition: 0.2s; background: white; position: relative;
}
.simple-level-block:hover { border-color: var(--brand-blue); background: #fafdff; transform: translateY(-3px); box-shadow: 0 5px 20px rgba(0,0,0,0.05); }
.target-audience { font-size: 0.8em; color: white; background: var(--brand-blue); padding: 6px 14px; border-radius: 20px; font-weight: 800; text-transform: uppercase; display: inline-block; margin-bottom: 10px; letter-spacing: 0.5px; }

/* КНОПКИ */
.btn-start-big {
    background: var(--main-gradient); color: white; border: none;
    padding: 20px 50px; font-size: 1.2em; font-weight: 800; border-radius: 50px;
    cursor: pointer; display: block; margin: 0 auto; transition: 0.2s;
    box-shadow: 0 10px 25px rgba(58, 141, 255, 0.3);
    width: 100%; max-width: 350px;
}
.btn-start-big:hover { transform: scale(1.03); box-shadow: 0 15px 35px rgba(58, 141, 255, 0.4); }

.bottom-nav-container { display: flex; justify-content: space-between; gap: 20px; margin-top: 50px; }
.nav-btn {
    background: #f5f5f7; border: 1px solid #eee; color: #444;
    padding: 15px 30px; border-radius: 30px; font-weight: 700; cursor: pointer;
    transition: 0.2s; flex: 1; max-width: 180px; font-size: 1em;
}
.nav-btn:hover { background: #e0e0e0; color: #222; border-color: #ddd; }

/* --- ЧАТ ОЛЕГА --- */
#oleg-chat-window {
    position: fixed; bottom: 30px; right: 30px; 
    width: 380px; height: 600px;
    background: white; border-radius: 24px; 
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    display: flex; flex-direction: column; z-index: 900; 
    border: 1px solid #eee; overflow: hidden;
    transform-origin: bottom right;
    animation: scaleIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.chat-header { 
    background: var(--main-gradient); color: white; padding: 15px 20px; 
    display: flex; justify-content: space-between; align-items: center; flex-shrink: 0;
}
.chat-title-group { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1em; letter-spacing: 0.5px; }
.status-dot { width: 10px; height: 10px; background-color: #00FF7F; border-radius: 50%; box-shadow: 0 0 5px rgba(255,255,255,0.8); }
.chat-controls { display: flex; align-items: center; gap: 15px; }

/* --- КНОПКА ЗВУКА (ОБНОВЛЕННАЯ) --- */
#oleg-mute-btn {
    border: none; border-radius: 50%;
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; padding: 0; transition: all 0.2s ease;
    
    /* Состояние по умолчанию (если JS не сработает) */
    background: rgba(255, 255, 255, 0.2); 
}

/* Класс для ВКЛЮЧЕННОГО звука */
#oleg-mute-btn.sound-on {
    background: #00c853 !important; /* Зеленый */
    box-shadow: 0 0 10px rgba(0, 200, 83, 0.5);
    opacity: 1 !important;
}

/* Класс для ВЫКЛЮЧЕННОГО звука */
#oleg-mute-btn.sound-off {
    background: rgba(255, 0, 0, 0.2) !important; /* Бледно-красный */
    opacity: 0.6 !important;
}

#oleg-mute-btn img { 
    width: 16px; height: 16px; display: block; 
    filter: brightness(0) invert(1); 
}

.close-btn { background: none; border: none; color: white; font-size: 28px; cursor: pointer; padding: 0; line-height: 1; transition: transform 0.2s; }
.close-btn:hover { transform: scale(1.1); }

.chat-body { flex: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; background: #fff; }
.msg { padding: 12px 18px; border-radius: 18px; max-width: 85%; font-size: 0.95em; line-height: 1.5; word-wrap: break-word; }
.msg-oleg { background: #f0f2f5; color: #1d1d1f; align-self: flex-start; border-bottom-left-radius: 4px; }
.msg-user { background: var(--brand-blue); color: white; align-self: flex-end; border-bottom-right-radius: 4px; box-shadow: 0 2px 5px rgba(58, 141, 255, 0.2); }
.chat-body button {
    margin-top: 8px; padding: 12px 16px; background: white; border: 2px solid var(--brand-blue);
    color: var(--brand-blue); border-radius: 12px; cursor: pointer; font-size: 0.95em; 
    text-align: left; width: 100%; font-weight: 600; transition: 0.2s;
}
.chat-body button:hover { background: #f0f8ff; transform: translateY(-2px); }

.chat-footer { padding: 15px; border-top: 1px solid #eee; display: flex; gap: 10px; background: white; align-items: center; flex-shrink: 0; }
.chat-footer input { flex: 1; padding: 14px; border: 1px solid #ddd; border-radius: 25px; outline: none; font-size: 1em; background: #f9f9f9; }
.chat-footer input:focus { border-color: var(--brand-blue); background: white; }
.chat-footer button { border: none; background: var(--brand-blue); color: white; width: 45px; height: 45px; border-radius: 50%; cursor: pointer; font-size: 1.2em; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(58, 141, 255, 0.3); transition: 0.2s; }
.chat-footer button:hover { transform: scale(1.1); }

/* --- МОДАЛКА ПОДДЕРЖКИ (ОБНОВЛЕНО) --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 500; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(5px);
}
.modal-box { 
    background: white; width: 95%; max-width: 500px; border-radius: 24px; overflow: hidden; 
    box-shadow: 0 30px 80px rgba(0,0,0,0.3); border: none; display: flex; flex-direction: column;
}

/* ДЕЛАЕМ ОКНО ВЫШЕ */
.chat-style-modal { 
    height: 700px; /* Увеличили высоту */
    max-height: 85vh; /* Чтобы влезало на экраны ноутбуков */
}

.modal-header-strip { 
    background: var(--main-gradient); color: white;
    padding: 15px 25px; display: flex; justify-content: space-between; align-items: center; 
    flex-shrink: 0;
}
.modal-header-strip h2 { margin: 0; font-size: 1.3em; font-weight: 800; letter-spacing: 0.5px; }
.close-modal-x { background: none; border: none; color: white; font-size: 32px; cursor: pointer; padding: 0; line-height: 1; opacity: 0.9; }
.close-modal-x:hover { opacity: 1; transform: scale(1.1); }

.modal-tabs { display: flex; border-bottom: 1px solid #eee; background: #fff; flex-shrink: 0; padding: 0 10px; }
.tab-btn { flex: 1; padding: 18px; border: none; background: transparent; cursor: pointer; font-weight: 700; color: #888; font-size: 1em; border-bottom: 3px solid transparent; transition: 0.2s; }
.tab-btn.active { color: var(--brand-blue); border-bottom-color: var(--brand-blue); }

/* КОНТЕЙНЕР ТЕЛА МОДАЛКИ - ЗАНИМАЕТ ВСЕ ОСТАВШЕЕСЯ МЕСТО */
.modal-body-container {
    flex-grow: 1;
    display: flex; 
    flex-direction: column; 
    overflow: hidden; /* Скрываем скролл самого контейнера */
    position: relative;
}

/* ВКЛАДКИ */
#tab-create, #tab-check {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.hidden { display: none !important; }

/* ЧАТ ПОДДЕРЖКИ */
.support-chat-layout { 
    display: flex; 
    flex-direction: column; 
    height: 100%; 
}

/* ТЕЛО ЧАТА - РАСТЯГИВАЕТСЯ */
#support-chat-body {
    flex-grow: 1;
    background: #f4f8ff;
    overflow-y: auto; /* Скролл только у сообщений */
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* НИЖНЯЯ ПАНЕЛЬ - ПРИЖАТА К НИЗУ */
.chat-footer { 
    padding: 15px; 
    border-top: 1px solid #eee; 
    display: flex; 
    gap: 10px; 
    background: white; 
    align-items: center; 
    flex-shrink: 0; /* Не сжиматься */
}

/* ТЕСТЫ */
.quiz-item { margin-bottom: 30px; background: #fff; padding: 25px; border-radius: 20px; box-shadow: 0 5px 20px rgba(0,0,0,0.03); border: 2px solid #f5f5f7; }
.feedback-area { margin-top: 15px; padding: 15px; background: #fff5f5; border-radius: 12px; border: 1px solid #ffcdd2; color: #c62828; }
.btn-ask-mistake { 
    background: white; border: 2px solid #bbdefb; color: #1976d2; padding: 10px 20px; 
    border-radius: 25px; cursor: pointer; margin-top: 12px; font-weight: 700; font-size: 0.95em; 
    display: inline-flex; align-items: center; gap: 8px; transition: 0.2s;
}
.btn-ask-mistake:hover { background: #e3f2fd; }
.btn-ask-mistake::before { content: "🤖"; font-size: 1.2em; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }

/* --- МОБИЛЬНАЯ АДАПТАЦИЯ (PHONE) --- */
@media (max-width: 600px) {
    .top-hotbar { height: 60px; }
    .logo-mini { height: 35px; }
    .oleg-head-btn { width: 40px; height: 40px; }
    #page-title-display { font-size: 1.0em; padding: 0 5px; }

    main { padding: 30px 15px 80px 15px; width: 100%; box-sizing: border-box; }
    h1 { font-size: 1.6em; word-break: break-word; }
    
    .side-menu { width: 85%; max-width: 320px; }
    
    #oleg-chat-window {
        width: 85%; max-width: 350px;
        height: 55vh; 
        bottom: 15px; right: 15px; 
        border-radius: 20px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    }
    
    .btn-start-big { width: 100%; padding: 18px; }
    .nav-btn { padding: 14px; width: 100%; max-width: none; }
    .bottom-nav-container { flex-direction: row; gap: 10px; } 
    .modal-box { width: 95%; max-height: 80vh; }
    .chat-style-modal { height: 75vh; }
}

.stats-box {
    margin-top: 30px;
    background: #f8f9fa;
    border-radius: 20px;
    padding: 20px;
    border: 1px solid #eee;
}
.stats-title {
    font-size: 1.1em;
    font-weight: 800;
    color: #555;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.stats-grid {
    display: flex;
    justify-content: space-around;
    gap: 10px;
    flex-wrap: wrap;
}
.stat-item {
    text-align: center;
    min-width: 80px;
}
.stat-count {
    display: block;
    font-size: 1.8em;
    font-weight: 800;
    color: var(--brand-blue);
}
.stat-label {
    font-size: 0.85em;
    color: #777;
    font-weight: 600;
}