body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: white;
    /*background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
    min-height: 100vh;
    display: flex;
    /*justify-content: center;*/
    align-items: center;
    padding: 20px;

    margin: 0;
    padding: 0;

    background-image: url('images/фон.png'); 
    background-size: cover; /* Масштабирует изображение так, чтобы оно полностью закрывало фон (часть может обрезаться) */
    background-position: center center; /* Центрирует изображение по горизонтали и вертикали */
    background-repeat: no-repeat; /* Запрещает повторение картинки (мозаикой) */

    background: rgb(59, 59, 59);

}

h1 {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-weight: normal;
}
p {
    margin-top: 1em !important;
    margin-bottom: 1em !important;
}
header {
        position: fixed; /* Фиксируем в углу */
        top: 0;
        left: 0;
        height: 200px;
        /*width: 100%; Занимает всю ширину экрана */
        /* box-shadow: 0 2px 5px rgba(0,0,0,0.1); Тень для красоты */
        /*padding: 50px 50px; /* Внутренние отступы */
        margin-left: 60px;
        display: flex; /* Используем flex для выравнивания */
        justify-content: center; /* Центрируем логотип по горизонтали */
        align-items: center; /* Вертикальное выравнивание по центру */
        z-index: 1000; /* Чтобы header был поверх контента */
    }
    #header_image {
        width:1000px;
        margin:0px auto;
        position:relative;
    }
    .logo-box {
        max-width: 250px; /* Ограничиваем максимальную ширину блока */
    }
    /* 3. Стили для ссылки (убираем синий подчеркнутый текст) */
    .logo-link {
        display: block; /* Делаем ссылку блочной, чтобы она занимала всю ширину .logo-box */
        text-decoration: none; /* Убираем подчеркивание */
    }
    .logo a{
    /*	position:fixed;*/
        
        height:120px;
        width:120px;
        left:10px;
        top:60px;
        background:url(images/logo.png) no-repeat;
        display:block;
        text-indent:-9999px;
            -moz-transition: all 1s ease-out;
            -o-transition: all 1s ease-out;
            -webkit-transition: all 1s ease-out;
            transition: all 1s ease-out;
    }
    .logo a:hover{
        -webkit-transform: scale(1.15);
        -moz-transform: scale(1.15);
        -o-transform: scale(1.15);
        transform: scale(1.15);
    }

.main {
        width: 60%;
        /*position: relative;*/
    }
    .menu-container {
        width: 100%;
        max-width: 350px;        
        padding: 50px;
        margin-left: 50px;
        margin-top: 30px;
        display: flex;
        flex-direction: column; /* задаёт вертикальное расположение */
        /*align-items: flex-start;  Прижимаем к левому краю */
        gap: 8px; /* отступ между кнопками */
    }

    .open-btn {
        background: rgb(10, 133, 51);
        font-size: 16px;
        box-shadow: 1px 1px 1px rgb(196, 196, 196);
        transition: box-shadow 0.2s;
        /* плавное изменение тени при наведении */
        color: #c3edc4;
        padding: 20px 20px;
        margin: 10px;
        cursor: pointer;
        border-radius: 20px;
        border: none;
        flex: 1;
        white-space: nowrap;
    }
    
    .title {
        padding-left: 50px;
    }
    .title-part1 {
        padding-left: 50px;
    }
    .title-part2 {
        padding-left: 150px;
    }
/*
    .modal {
        display: none;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        padding: 20px;
        box-shadow: 0 0 10px rgba(0,0,0,0.3);
        z-index: 1000;
        background: rgb(59, 59, 59);
        width: 400px;
        max-height: 300px;
        overflow: hidden;width: 400px;
        max-height: 300px;
    }
*/
    .modal {
        display: none;
        position: fixed;
        top: 200px;
        left: 38%;
        transform: translate(-50%, 0%);
        /*background: rgb(59, 59, 59);*/
        background: rgb(195, 237, 196);
        color: #333;
        border: 5px solid rgb(10, 133, 51);
        border-radius: 15px;
        /*box-shadow: 5px 5px 5px rgb(196, 196, 196);*/
        width: 600px;
        height: 75%;
        /* overflow: hidden; УБИРАЕМ ЭТУ СТРОЧКУ */
    }
    .modal.active {
        display: block; /* Показать при добавлении класса active */
    }
    .modal-content {
        max-height: 100%;
        overflow-y: auto;
        padding: 20px;
    }

    .close-btn {
        position: absolute;
        top: -12px;
        right: -12px;
        font-size: 20px;
        cursor: pointer;
        color: rgb(51, 51, 51);
        background-color: rgb(255, 255, 255);
        width: 30px;
        height: 30px;
        line-height: 30px;
        /* Это выравнивает текст по вертикали */
        text-align: center;
        /* Это выравнивает текст по горизонтали */
        box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 5px;
        border: 1px solid rgb(204, 204, 204);
        /* Сокращенная запись */
        border-radius: 50%;
        /* Ключевое исправление: */
        box-sizing: border-box;
        /* Граница теперь ВНУТРИ 30px */
        /* Дополнительно для идеального центрирования: */
        display: flex;
        /* или display: grid; */
        align-items: center;
        justify-content: center;
        padding: 0;
        /* На всякий случай обнуляем */
    }
    .close-btn_ {
        position: absolute;
        /* Позиционируем относительно .modal */
        top: -12px;
        right: -12px;
        font-size: 20px;
        cursor: pointer;
        color: #333;
        background-color: #fff;
        border: 1px solid #ccc;
        border-radius: 50%;
        width: 30px;
        height: 30px;
        line-height: 30px;
        /* Центрируем текст по вертикали */
        text-align: center;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }

.chat-container {
        width: 100%;
        max-width: 485px;
        background: white;
        border-radius: 20px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.3);
        
        overflow: hidden;
    }
    .chat-header {
        /*background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
        background: rgb(10, 133, 51);
        color: white;
        padding: 20px;
        text-align: center;
    }
    .chat-header h1 {
        font-size: 24px;
        margin-bottom: 5px;
    }
    .chat-header p {
        opacity: 0.9;
        font-size: 14px;
    }
    .chat-messages {
        height: 500px;
        overflow-y: auto;
        padding: 20px;
        background: #c3edc4;
        box-sizing: border-box;

        align-items: flex-start;
        display: flex;
        flex-direction: column;
        
    }
    .message {
        margin-bottom: 10px;
        /* display: flex; */
    }
    .user-message {
        justify-content: flex-end;
    }
    .bot-message {
        justify-content: flex-start;
    }
    .message-content {
        max-width: 100%;
        padding: 6px 16px;
        border-radius: 18px;
        word-wrap: break-word;
    }
    .user-message .message-content {
        background: #667eea;
        color: white;
        border-bottom-right-radius: 4px;
    }
    .bot-message .message-content {
        background: white;
        color: #333;
        border: 1px solid #e0e0e0;
        border-bottom-left-radius: 4px;
    }
    .quick-buttons {
        padding: 5px;
        background: white;
        border-top: 1px solid #e0e0e0;
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }
    .quick-btn {
        background: #f0f2f5;
        border: none;
        border-radius: 5px;
        padding: 10px 20px;
        font-size: 14px;
        color: rgb(94, 94, 94);
        cursor: pointer;
        transition: all 0.3s ease;
        white-space: nowrap;
        font-weight: bold;
        margin-right: 6px;
        width: 100%;
    }
    .quick-btn:hover {
        background: #e4e6eb;
        transform: translateY(-2px);
    }
    .quick-btn:active {
        transform: translateY(0);
    }
    .input-container {
        padding: 10px;
        background: white;
        border-top: 1px solid #e0e0e0;
        display: flex;
        gap: 10px;
    }
    #userInput {
        flex: 1;
        padding: 12px 16px;
        border: 1px solid #e0e0e0;
        border-radius: 24px;
        font-size: 16px;
        outline: none;
        transition: border-color 0.3s ease;
    }
    #userInput:focus {
        border-color: #667eea;
    }
    #sendButton {
        background: #a1e088;
        color: white;
        border: none;
        border-radius: 50%;
        width: 48px;
        height: 48px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }
    #sendButton:hover {
        background: #5a67d8;
        transform: scale(1.05);
    }
    .typing-indicator {
        display: none;
        padding: 0px 15px;
        color: #666;
        font-style: italic;

        font-family: monospace; /* Для эффекта печатной машинки */
        font-size: 16px;
    }
    .cursor {
        animation: blink 1s steps(5, start) infinite; /* Мигаем 5 раз в секунду */
        color: black; /* Цвет курсора */
    }
    @keyframes blink {
        from, to { visibility: hidden; }
        50% { visibility: visible; }
    }
    .typing-indicator.active {
        display: block;
    }
    .keyboard-row {
        gap: 5px;
        display: flex;
        flex-grow: 1;
/*             margin-bottom: 10px;
        margin-left: 10px;
*/        }
    .keyboard-row:last-child {
        margin-bottom: 0;
    }
    .inline-keyboard {
        display: flex;
        flex-shrink: 0; 
        flex-wrap: wrap;
        /*gap: 5px;  Задаем промежуток здесь */
        margin-top: 3px;
        margin-bottom: 3px;
    }
    .keyboard-row {
        display: flex;
        gap: 5px;
        margin-bottom: 2px;
    }
    /* Стили для кнопок клавиатуры */
    .inline-keyboard .inline-btn {
        /*flex: 1;  Занимает всё доступное пространство в ряду */
        padding: 8px 12px; /* Внутренние отступы */
        margin-bottom: 2px;
        color: white;
        background: rgb(10, 133, 51);
        opacity: 0.6;
        border: none; /* Убирает рамку */
        border-radius: 8px; /* Скругление углов */
        cursor: pointer; /* Меняет курсор на "руку" при наведении */
        font-size: 14px; /* Размер шрифта */
        transition: all 0.2s; /* Плавный переход для всех свойств */
        width: 100%;
        white-space: nowrap;
        /*overflow: hidden; /* скрываем всё, что выходит за границы */
        /*text-overflow: ellipsis; /* добавляем многоточие */
    }
    .inline-keyboard .keyboard-row.last-group .inline-btn {
        border-bottom-left-radius: 15px;
        border-bottom-right-radius: 15px;
    }
    /* Стили при наведении курсора (ховер) */
    .inline-btn:hover {
        background: rgb(84, 141, 103); /* Меняем цвет фона при наведении */
    }
