/* ========================================== */
/* КРАТКОЕ ОГЛАВЛЕНИЕ                         */
/* ========================================== */
/*
 * ФАЙЛ: ai-helper.css
 * НАЗНАЧЕНИЕ: Блок ИИ помощника с орбитальной анимацией популярных запросов
 *
 * СОДЕРЖАНИЕ:
 * 1. .ai-helper - Основной контейнер блока
 * 2. .ai-helper__header - Шапка с заголовком и кнопкой переключения
 * 3. .ai-helper__title - Заголовок блока с градиентом
 * 4. .ai-helper__toggle-btn - Кнопка показа/скрытия блока
 * 5. .ai-helper__search - Дублированное поле ИИ поиска
 * 6. .ai-helper__orbit - Контейнер с орбитальной анимацией
 * 7. .ai-helper__icon - Центральная иконка робота с пульсацией
 * 8. .ai-helper__button - Летающие кнопки с популярными запросами
 *
 * ОСОБЕННОСТИ:
 * - Анимации: aiHelperPulse (пульсация робота), orbitButton1-9 (орбитальное движение кнопок)
 * - Цвета: градиент заголовка (#1a6b6d → #7fc241), желтая подсветка при hover
 * - Адаптивность: есть @media (max-width: 480px) с уменьшением радиуса орбиты
 * - Скрытие: можно скрыть весь блок кнопкой toggle
 */
/* ========================================== */

/* ========================================== */
/* AI HELPER БЛОК №6                          */
/* Ваш помощник ИИ с популярными запросами    */
/* ========================================== */

/* Основной контейнер блока ИИ помощника */
.ai-helper {
    max-width: 1000px;
    margin: 50px auto 20px auto;
    padding: 0 20px;
    transition: max-height 0.5s ease, opacity 0.3s ease;
    overflow: hidden;
}

/* Скрытое состояние блока - полностью свернут */
.ai-helper.collapsed {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

/* Скрытие контента при свёрнутом блоке — tooltip'ы и абсолютно-позиционированные
   элементы "пробивают" overflow: hidden на мобильных и вызывают горизонтальный скролл */
.ai-helper.collapsed .ai-helper__orbit,
.ai-helper.collapsed .ai-helper__mode-switcher,
.ai-helper.collapsed .ai-helper__search,
.ai-helper.collapsed .ai-helper__topbar {
    display: none;
}

/* ИКОНКА-ПЕРЕКЛЮЧАТЕЛЬ БЛОКА №6 (между блоками) */
/* Центрированная кнопка между блоком №6 и блоком №7 */

.ai-helper__icon-toggle {
    display: block;
    margin: 30px auto;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #1a6b6d 0%, #7fc241 100%);
    border: 3px solid #ffffff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 28px;
    box-shadow: 0 4px 16px rgba(26, 107, 109, 0.4);
    z-index: 100;
    transition: all 0.3s ease;
    animation: aiIconPulse 3s ease-in-out infinite;
    position: relative;
}

/* Пульсация иконки */
@keyframes aiIconPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 16px rgba(26, 107, 109, 0.4);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 6px 24px rgba(127, 194, 65, 0.6);
    }
}

/* Hover эффект */
.ai-helper__icon-toggle:hover {
    transform: scale(1.15);
    box-shadow: 0 8px 32px rgba(127, 194, 65, 0.7);
    animation: none;
}

/* Активное состояние (при клике) */
.ai-helper__icon-toggle:active {
    transform: scale(0.95);
}

/* Скрыть иконку когда блок развернут */
.ai-helper__icon-toggle.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.5);
}

/* Подсказка для иконки - открывается сверху */
.ai-helper__icon-toggle::after {
    content: 'Открыть ИИ помощника';
    position: absolute;
    bottom: calc(100% + 8px); /* Над иконкой */
    left: 50%;
    transform: translateX(-50%); /* Центрирование по горизонтали */
    background: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 101;
}

.ai-helper__icon-toggle:hover::after {
    opacity: 1;
}

/* Старое скрытое состояние блока - больше не используется */
.ai-helper.hidden {
    max-height: 60px;
}

/* Скрытие заголовка в свернутом состоянии */
.ai-helper.hidden .ai-helper__title {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Скрытие орбиты в свернутом состоянии */
.ai-helper.hidden .ai-helper__orbit {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Шапка блока с заголовком и кнопкой */
.ai-helper__header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}

/* Заголовок блока с градиентным текстом */
.ai-helper__title {
    font-size: 24px;
    font-weight: 600;
    background: linear-gradient(135deg, #1a6b6d 0%, #7fc241 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin: 0;
}

/* Кнопка переключения видимости блока */
.ai-helper__toggle-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--orange-icon);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    opacity: 1;
    position: relative;
    z-index: 10;
}

/* Эффект наведения на кнопку переключения */
.ai-helper__toggle-btn:hover {
    transform: scale(1.1);
}

/* Неактивное состояние кнопки - серый цвет */
.ai-helper__toggle-btn.inactive {
    color: #cccccc;
    opacity: 1;
}

.ai-helper__toggle-btn svg {
    width: 24px;
    height: 24px;
}

/* Переопределение — ✕ вместо иконки глаза */
.ai-helper__toggle-btn--close {
    background: rgba(0, 0, 0, 0.06);
    border-radius: 50%;
    color: #888;
    font-size: 14px;
    width: 28px;
    height: 28px;
}
.ai-helper__toggle-btn--close:hover {
    background: rgba(0, 0, 0, 0.13);
    color: #444;
    transform: none;
}

/* Дублированное поле ИИ поиска - появляется при наведении на блок */
/* Контейнер подстраивается под контент (fit-content), центрируется через margin */
.ai-helper__search {
    display: flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    margin-inline: auto;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    visibility: hidden;
    position: relative;
}

/* Кнопка голосового ввода в строке поиска */
.ai-helper__search-voice-btn {
    position: relative;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #b0b0b0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.ai-helper__search-voice-btn:hover {
    border-color: #1a6b6d;
    background: linear-gradient(135deg, #ffffff 0%, #f0f8f0 100%);
    transform: scale(1.05);
}

.ai-helper__search-voice-btn.recording {
    background: #ff4444 !important;
    border-color: #ff4444 !important;
    animation: voiceBtnPulse 0.5s infinite;
}

/* Подсказка для кнопки голосового ввода */
.ai-helper__search-voice-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 100;
}

.ai-helper__search-voice-btn:hover::before {
    opacity: 1;
}

@keyframes voiceBtnPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 6px rgba(255, 68, 68, 0);
    }
}

/* Поле ввода в блоке №6 */
/* min-width: 400px — такая же как в Block #2 (.service-control__ai-input) */
.ai-helper__search-input {
    height: 34px;
    padding: 0 12px;
    background: #ffffff;
    border: 1px solid #b0b0b0;
    border-radius: 6px;
    color: #333333;
    font-size: 13px;
    font-family: Arial, sans-serif;
    transition: all 0.2s ease;
    min-width: 400px;
    max-width: 400px;
    flex: 1;
}

.ai-helper__search-input::placeholder {
    color: #999999;
}

.ai-helper__search-input:focus {
    outline: none;
    background: #ffffff;
    border-color: #1a6b6d;
    box-shadow: 0 0 0 2px rgba(26, 107, 109, 0.1);
}

/* Исправление для селектора модели в блоке №6 */
.ai-helper__search .ai-model-selector {
    position: relative;
    z-index: 1000;
}

/* Dropdown селектора модели в блоке №6 */
.ai-helper__search .ai-model-selector__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: #ffffff;
    border: 2px solid #1a6b6d;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* BUGFIX: не блокировать клики когда скрыт */
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

/* Показываем dropdown при наведении на контейнер селектора */
.ai-helper__search .ai-model-selector:hover .ai-model-selector__dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* Показ поля поиска при наведении на блок */
.ai-helper:hover .ai-helper__search {
    opacity: 1;
    max-height: 60px;
    margin-bottom: 30px;
    padding-top: 10px;
    padding-bottom: 10px;
    visibility: visible;
    overflow: visible;
}

/* Скрытие поля поиска в свернутом состоянии блока */
.ai-helper.hidden .ai-helper__search {
    opacity: 0;
    max-height: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    visibility: hidden;
}

/* Скрытие переключателя режимов в свернутом состоянии блока */
.ai-helper.hidden .ai-helper__mode-switcher {
    opacity: 0;
    max-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    visibility: hidden;
    overflow: hidden;
}

/* Контейнер с орбитальной анимацией - кнопки вращаются вокруг робота */
.ai-helper__orbit {
    position: relative;
    width: 100%;
    max-width: 720px;
    height: 490px;
    margin: 0 auto;
    overflow: visible;
}

/* Центральная иконка робота - в центре орбиты */
.ai-helper__icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    animation: aiHelperPulse 5s ease-in-out infinite;
    flex-direction: column;
}

/* Имя робота над иконкой */
.ai-helper__robot-name {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #1a6b6d 0%, #2d9596 100%);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(26, 107, 109, 0.3);
}

.ai-helper__robot-name.hidden {
    display: none;
}

/* Кнопка настроек робота */
.ai-helper__settings-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: #ffffff;
    border: 2px solid #1a6b6d;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 15;
}

.ai-helper__icon:hover .ai-helper__settings-btn {
    opacity: 1;
}

.ai-helper__settings-btn:hover {
    background: #1a6b6d;
    transform: scale(1.1) rotate(90deg);
}

/* Зрачки робота - анимация слежения */
.robot-pupil {
    transition: transform 0.1s ease-out;
}

/* SVG робота - поворот к курсору */
.ai-helper__robot {
    transition: transform 0.15s ease-out;
}

/* Статусный текст над роботом (при генерации запросов) */
.ai-helper__robot-status {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -150px);
    background: linear-gradient(135deg, #1a6b6d 0%, #7fc241 100%);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    z-index: 20;
    box-shadow: 0 4px 15px rgba(26, 107, 109, 0.4);
    animation: statusPulse 1.5s ease-in-out infinite;
    /* Убираем любые обводки текста/эмодзи */
    -webkit-text-stroke: 0;
    text-shadow: none;
    border: none;
    filter: none;
    -webkit-filter: none;
}

@keyframes statusPulse {
    0%, 100% {
        transform: translate(-50%, -150px) scale(1);
        box-shadow: 0 4px 15px rgba(26, 107, 109, 0.4);
    }
    50% {
        transform: translate(-50%, -150px) scale(1.05);
        box-shadow: 0 6px 20px rgba(127, 194, 65, 0.6);
    }
}

/* SVG иконка робота с тенью */
.ai-helper__robot {
    width: 100px;
    height: 100px;
    color: #1a6b6d;
    filter: drop-shadow(0 4px 12px rgba(26, 107, 109, 0.3));
    transition: all 0.3s ease;
}

/* Летящий робот - усиленное свечение во время анимации */
.ai-helper__icon--flying .ai-helper__robot {
    color: #7fc241;
    filter: drop-shadow(0 0 30px rgba(127, 194, 65, 1))
            drop-shadow(0 0 60px rgba(127, 194, 65, 0.6));
}

/* Активное состояние робота - светится и плавно покачивается влево-вправо */
.ai-helper__icon.active .ai-helper__robot {
    color: #7fc241;
    filter: drop-shadow(0 0 20px rgba(127, 194, 65, 0.8))
            drop-shadow(0 0 40px rgba(127, 194, 65, 0.4));
    animation: aiHelperActivePulse 1.5s ease-in-out infinite;
}

@keyframes aiHelperPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(0.97);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes aiHelperActivePulse {
    0%, 100% {
        transform: translateX(0);
        filter: drop-shadow(0 0 20px rgba(127, 194, 65, 0.8))
                drop-shadow(0 0 40px rgba(127, 194, 65, 0.4));
    }
    25% {
        transform: translateX(-8px);
        filter: drop-shadow(0 0 25px rgba(127, 194, 65, 0.9))
                drop-shadow(0 0 50px rgba(127, 194, 65, 0.5));
    }
    75% {
        transform: translateX(8px);
        filter: drop-shadow(0 0 25px rgba(127, 194, 65, 0.9))
                drop-shadow(0 0 50px rgba(127, 194, 65, 0.5));
    }
}

/* Анимация пульсации для кнопок (загрузка/запись) */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.7;
    }
}

/* Летающие кнопки с популярными запросами - вращаются по орбите */
.ai-helper__button {
    position: absolute;
    top: 50%;
    left: 50%;
    padding: 10px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    border: 1px solid #1a6b6d;
    border-radius: 20px;
    color: #222222;
    font-size: 13px;
    font-weight: 600;
    font-family: Arial, sans-serif;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 5;
    transform-origin: center;
}

/* Эффект наведения на кнопку - желтый фон и увеличение */
.ai-helper__button:hover {
    background: var(--yellow-btn);
    border-color: #1a6b6d;
    color: #222222;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(252, 233, 74, 0.6);
}

/* Цветовые категории кнопок */
.ai-helper__button[data-category="social"] {
    border-color: #4267B2;
}

.ai-helper__button[data-category="entertainment"] {
    border-color: #9333EA;
}

.ai-helper__button[data-category="shopping"] {
    border-color: #FF6B00;
}

.ai-helper__button[data-category="services"] {
    border-color: #0EA5E9;
}

.ai-helper__button[data-category="crypto"] {
    border-color: #F59E0B;
}

.ai-helper__button[data-category="tech"] {
    border-color: #10B981;
}

.ai-helper__button[data-category="news"] {
    border-color: #EF4444;
}

/* Кнопка "Выбрать наугад" - теперь в переключателе режимов */
.ai-helper__lucky-btn {
    position: relative;
    width: 44px;
    height: 44px;
    font-size: 22px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    border: 2px solid #1a6b6d;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ai-helper__lucky-btn:hover {
    background: var(--yellow-btn);
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 4px 12px rgba(26, 107, 109, 0.3);
}

/* Подсказка для кнопки "Выбрать наугад" */
.ai-helper__lucky-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.ai-helper__lucky-btn:hover::before {
    opacity: 1;
}

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

.ai-helper__mode-switcher {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
    margin-bottom: 25px;
    transition: all 0.4s ease;
}

.ai-helper__mode-toggle {
    position: relative;
    width: 44px;
    height: 44px;
    font-size: 22px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    border: 2px solid #1a6b6d;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ai-helper__mode-toggle:hover {
    background: var(--yellow-btn);
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 4px 12px rgba(26, 107, 109, 0.3);
}

/* Подсказка для кнопки переключателя режимов */
.ai-helper__mode-toggle::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.ai-helper__mode-toggle:hover::before {
    opacity: 1;
}

/* ========================================== */
/* КНОПКА AI-ГЕНЕРАЦИИ ЗАПРОСОВ               */
/* ========================================== */

.ai-helper__ai-gen-btn {
    position: relative;
    width: 55px;
    height: 55px;
    font-size: 28px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    border: 2px solid #1a6b6d;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-right: 6px; /* Маленький отступ до кнопки возврата */
}

/* Пульсация иконки внутри кнопки */
.ai-helper__ai-gen-btn .ai-gen-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: aiGenIconPulse 2s ease-in-out infinite;
}

@keyframes aiGenIconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

.ai-helper__ai-gen-btn:hover {
    background: var(--yellow-btn);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(26, 107, 109, 0.3);
}

/* Активное состояние - пульсация всей кнопки с бордером */
.ai-helper__ai-gen-btn.generating {
    animation: aiGenBtnPulse 0.8s ease-in-out infinite;
    border-color: #7fc241;
    box-shadow: 0 0 15px rgba(127, 194, 65, 0.5);
}

@keyframes aiGenBtnPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(127, 194, 65, 0.4);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 0 20px rgba(127, 194, 65, 0.7);
    }
}

/* Подсказка для кнопки AI-генерации */
.ai-helper__ai-gen-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.ai-helper__ai-gen-btn:hover::before {
    opacity: 1;
}

/* SVG иконки внутри кнопок управления */
.ai-helper__ai-gen-btn .ai-gen-icon svg {
    width: 28px;
    height: 28px;
    color: #1a6b6d;
}

.ai-helper__mode-toggle svg {
    width: 22px;
    height: 22px;
    color: #1a6b6d;
}

.ai-helper__lucky-btn svg {
    width: 22px;
    height: 22px;
    color: #1a6b6d;
}

/* ========================================== */
/* КНОПКА ВОЗВРАТА ЗАПРОСОВ                   */
/* ========================================== */

.ai-helper__reset-btn {
    position: relative;
    width: 32px;
    height: 32px;
    background: #333333;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 0;
    margin-right: 25px; /* Большой отступ до следующих кнопок */
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.ai-helper__reset-btn svg {
    width: 18px;
    height: 18px;
}

.ai-helper__reset-btn.hidden {
    display: none;
}

.ai-helper__reset-btn:hover {
    background: #1a6b6d;
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(26, 107, 109, 0.4);
}

/* Подсказка для кнопки возврата */
.ai-helper__reset-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.ai-helper__reset-btn:hover::before {
    opacity: 1;
}

/* ========================================== */
/* ========================================== */
/* РЕЖИМЫ ОТОБРАЖЕНИЯ КНОПОК                  */
/* ========================================== */

/* Режим списка */
.ai-helper[data-display-mode="list"] .ai-helper__orbit {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    height: auto;
    max-width: 500px;
    width: 100%;
    padding: 0;
    margin: 0 auto;
    padding-bottom: 20px;
}

.ai-helper[data-display-mode="list"] .ai-helper__icon {
    display: none;
}

.ai-helper[data-display-mode="list"] .ai-helper__button {
    position: static;
    top: auto;
    left: auto;
    animation: none;
    transform: none !important;
    width: 100%;
    max-width: none;
    margin: 0;
    text-align: center;
}

/* Контейнер для кнопок */
.ai-helper__orbit {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: flex-start;
    padding-bottom: 80px;
}

/* Позиционирование кнопок по кругу с анимацией */
.ai-helper__button[data-position="1"] {
    animation: orbitButton1 20s linear infinite;
}

.ai-helper__button[data-position="2"] {
    animation: orbitButton2 22s linear infinite;
}

.ai-helper__button[data-position="3"] {
    animation: orbitButton3 24s linear infinite;
}

.ai-helper__button[data-position="4"] {
    animation: orbitButton4 26s linear infinite;
}

.ai-helper__button[data-position="5"] {
    animation: orbitButton5 28s linear infinite;
}

.ai-helper__button[data-position="6"] {
    animation: orbitButton6 30s linear infinite;
}

.ai-helper__button[data-position="7"] {
    animation: orbitButton7 32s linear infinite;
}

.ai-helper__button[data-position="8"] {
    animation: orbitButton8 34s linear infinite;
}

.ai-helper__button[data-position="9"] {
    animation: orbitButton9 36s linear infinite;
}

/* Анимации орбитального движения для каждой кнопки */
@keyframes orbitButton1 {
    from {
        transform: translate(-50%, -50%) rotate(0deg) translateX(200px) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg) translateX(200px) rotate(-360deg);
    }
}

@keyframes orbitButton2 {
    from {
        transform: translate(-50%, -50%) rotate(40deg) translateX(220px) rotate(-40deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(400deg) translateX(220px) rotate(-400deg);
    }
}

@keyframes orbitButton3 {
    from {
        transform: translate(-50%, -50%) rotate(80deg) translateX(200px) rotate(-80deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(440deg) translateX(200px) rotate(-440deg);
    }
}

@keyframes orbitButton4 {
    from {
        transform: translate(-50%, -50%) rotate(120deg) translateX(220px) rotate(-120deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(480deg) translateX(220px) rotate(-480deg);
    }
}

@keyframes orbitButton5 {
    from {
        transform: translate(-50%, -50%) rotate(160deg) translateX(200px) rotate(-160deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(520deg) translateX(200px) rotate(-520deg);
    }
}

@keyframes orbitButton6 {
    from {
        transform: translate(-50%, -50%) rotate(200deg) translateX(220px) rotate(-200deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(560deg) translateX(220px) rotate(-560deg);
    }
}

@keyframes orbitButton7 {
    from {
        transform: translate(-50%, -50%) rotate(240deg) translateX(200px) rotate(-240deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(600deg) translateX(200px) rotate(-600deg);
    }
}

@keyframes orbitButton8 {
    from {
        transform: translate(-50%, -50%) rotate(280deg) translateX(220px) rotate(-280deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(640deg) translateX(220px) rotate(-640deg);
    }
}

@keyframes orbitButton9 {
    from {
        transform: translate(-50%, -50%) rotate(320deg) translateX(200px) rotate(-320deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(680deg) translateX(200px) rotate(-680deg);
    }
}

/* ========================================== */
/* МОДАЛЬНОЕ ОКНО НАСТРОЕК РОБОТА             */
/* ========================================== */

.robot-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* BUGFIX: не блокировать клики когда скрыт */
    transition: all 0.3s ease;
}

.robot-settings-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.robot-settings-modal__content {
    background: #ffffff;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.robot-settings-modal.active .robot-settings-modal__content {
    transform: scale(1);
}

.robot-settings-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.robot-settings-modal__header h3 {
    margin: 0;
    font-size: 18px;
    color: #1a6b6d;
}

.robot-settings-modal__close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.robot-settings-modal__close:hover {
    background: #e74c3c;
    color: white;
}

.robot-settings-modal__body {
    padding: 20px;
}

.robot-settings__field {
    margin-bottom: 20px;
}

.robot-settings__field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.robot-settings__field input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.robot-settings__field input[type="text"]:focus {
    outline: none;
    border-color: #1a6b6d;
}

/* Выбор модели (персонажа) */
.robot-settings__models {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.robot-settings__models .model-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 6px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.robot-settings__models .model-option:hover {
    border-color: #1a6b6d;
    background: #f0f8f8;
    transform: translateY(-2px);
}

.robot-settings__models .model-option.active {
    border-color: #1a6b6d;
    background: linear-gradient(135deg, #e6f7f7 0%, #d4f0d4 100%);
    box-shadow: 0 2px 8px rgba(26, 107, 109, 0.2);
}

.robot-settings__models .model-emoji {
    font-size: 28px;
    margin-bottom: 4px;
}

.robot-settings__models .model-name {
    font-size: 11px;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}

.robot-settings__models .model-option.active .model-name {
    color: #1a6b6d;
    font-weight: 600;
}

.robot-settings__colors {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.robot-settings__colors .color-option {
    width: 36px;
    height: 36px;
    border: 3px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.robot-settings__colors .color-option:hover {
    transform: scale(1.15);
}

.robot-settings__colors .color-option.active {
    border-color: #333;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #333;
}

.robot-settings__preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    margin-top: 10px;
}

.robot-settings__preview .preview-robot {
    font-size: 48px;
    transition: color 0.3s ease;
}

.robot-settings__preview .preview-name {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    background: linear-gradient(135deg, #1a6b6d 0%, #2d9596 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
}

.robot-settings-modal__footer {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid #e0e0e0;
}

.robot-settings__btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.robot-settings__btn--cancel {
    background: #f5f5f5;
    color: #666;
}

.robot-settings__btn--cancel:hover {
    background: #e0e0e0;
}

.robot-settings__btn--save {
    background: linear-gradient(135deg, #1a6b6d 0%, #7fc241 100%);
    color: white;
}

.robot-settings__btn--save:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 107, 109, 0.3);
}

/* ==========================================
   AI HELPER SUGGESTIONS DROPDOWN
   Выпадающий блок с подсказками для блока #6
   ========================================== */

/* Контейнер dropdown (появляется при фокусе) */
/* Смещен вправо, чтобы начинаться под полем ввода (после кнопки микрофона) */
.ai-helper-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 40px; /* Отступ от левого края (ширина кнопки микрофона) */
    width: calc(100% - 80px); /* Ширина = контейнер минус обе кнопки (40px слева + 40px справа) */
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 14px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

/* Показываем при фокусе на контейнере */
.ai-helper__search:focus-within .ai-helper-suggestions {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Держим dropdown видимым при загрузке/показе результатов */
.ai-helper-suggestions.loading-active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Скрываем dropdown когда пользователь нажал "Скрыть" */
.ai-helper-suggestions.user-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px) !important;
}

/* Не показываем dropdown при фокусе если он скрыт пользователем */
.ai-helper__search:focus-within .ai-helper-suggestions.user-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Скрываем если есть текст в поле */
.ai-helper__search.has-text .ai-helper-suggestions:not(.loading-active) {
    display: none;
}

/* Мини AI помощник внутри dropdown */
.ai-helper-suggestions__helper {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Мини иконка робота */
.ai-helper-suggestions__icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    color: #1a6b6d;
    transition: all 0.3s ease;
}

/* Свечение при загрузке */
.ai-helper-suggestions__icon.loading {
    color: #7fc241;
    filter: drop-shadow(0 0 6px rgba(127, 194, 65, 0.6));
    animation: helperIconPulse 1s ease-in-out infinite;
}

@keyframes helperIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Текст вопроса от помощника */
.ai-helper-suggestions__text {
    flex: 1;
    font-size: 13px;
    color: #555;
    line-height: 1.4;
}

/* Кнопка генерации запросов */
.ai-helper-suggestions__btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #7fc241 0%, #5ca030 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* Иконка внутри кнопки */
.ai-helper-suggestions__btn-icon {
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ai-helper-suggestions__btn-icon svg {
    width: 14px;
    height: 14px;
}

/* Анимация загрузки (точки) */
.ai-helper-suggestions__btn-icon--loading {
    animation: helperDotsLoading 1s infinite;
    font-weight: bold;
    letter-spacing: 1px;
}

@keyframes helperDotsLoading {
    0%, 20% { opacity: 0.3; }
    50% { opacity: 1; }
    80%, 100% { opacity: 0.3; }
}

/* Состояние "Обновить" - иконка вращается при наведении */
.ai-helper-suggestions__btn--refresh:hover .ai-helper-suggestions__btn-icon {
    animation: helperSpinRefresh 0.6s ease;
}

@keyframes helperSpinRefresh {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ai-helper-suggestions__btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(127, 194, 65, 0.4);
}

.ai-helper-suggestions__btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Список сгенерированных запросов */
.ai-helper-suggestions__list {
    margin-top: 10px;
    display: none;
    flex-direction: column;
    gap: 6px;
}

.ai-helper-suggestions__list.visible {
    display: flex;
}

/* Отдельный запрос - с зеленой вертикальной линией слева */
.ai-helper-suggestions__item {
    position: relative;
    padding: 10px 14px 10px 18px;
    background: #e8e8e8;
    border-radius: 8px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #ddd;
}

/* Зеленая вертикальная линия слева (50% высоты) */
.ai-helper-suggestions__item::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 25%;
    height: 50%;
    width: 3px;
    background: linear-gradient(180deg, #7fc241 0%, #1a6b6d 100%);
    border-radius: 2px;
    transition: all 0.2s ease;
}

.ai-helper-suggestions__item:hover {
    background: #d4edda;
    border-color: #7fc241;
    transform: translateX(4px);
}

.ai-helper-suggestions__item:hover::before {
    height: 70%;
    top: 15%;
    box-shadow: 0 0 6px rgba(127, 194, 65, 0.5);
}

/* Статус загрузки */
.ai-helper-suggestions__status {
    font-size: 12px;
    color: #7fc241;
    font-weight: 500;
    margin-top: 8px;
    display: none;
}

.ai-helper-suggestions__status.visible {
    display: block;
}

/* Кнопка-иконка робота для открытия dropdown (когда dropdown скрыт) */
/* Позиционируем слева под полем ввода (после кнопки микрофона), как в Блоке #2 */
.ai-helper-suggestions__toggle {
    position: absolute;
    top: calc(100% + 8px);
    left: 40px; /* Отступ от левого края (ширина кнопки микрофона) */
    width: 36px;
    height: 36px;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ai-helper-suggestions__toggle svg {
    width: 24px;
    height: 24px;
    color: #7fc241;
}

.ai-helper-suggestions__toggle:hover {
    transform: scale(1.1);
    border-color: #7fc241;
    box-shadow: 0 4px 12px rgba(127, 194, 65, 0.3);
}

/* Показываем кнопку-иконку ТОЛЬКО когда dropdown скрыт пользователем И поле в фокусе */
.ai-helper__search:focus-within .ai-helper-suggestions__toggle.visible {
    display: flex;
}

/* Кнопка "Скрыть" внизу dropdown */
.ai-helper-suggestions__hide-btn {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 12px;
    color: #888;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-helper-suggestions__hide-btn:hover {
    background: #f5f5f5;
    border-color: #bbb;
    color: #555;
}

/* ==========================================
   HOVER & FOCUS EFFECTS FOR BLOCK #6
   Интерактивные эффекты для поиска в блоке #6
   ========================================== */

/* Анимация "дыхания" для поля ввода */
@keyframes helperInputBreathing {
    0%, 100% {
        box-shadow: 0 0 0 2px rgba(127, 194, 65, 0.2);
    }
    50% {
        box-shadow: 0 0 8px 3px rgba(127, 194, 65, 0.35);
    }
}

/* AI индикатор (появляется при hover) - круглый */
/* Теперь контейнер fit-content (~480px), позиция такая же как в Block #2 */
/* Кнопка справа: 34px + gap 6px = 40px от края контейнера */
/* badge 12px от правого края input = 40 + 12 = 52px от края контейнера */
.ai-helper__search::after {
    content: 'AI';
    position: absolute;
    top: 50%;
    right: 52px;
    transform: translateY(-50%) scale(0.8);
    font-size: 10px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #7fc241 0%, #1a6b6d 100%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
    pointer-events: none;
    text-align: center;
    line-height: 18px;
}

/* При hover на контейнер поиска */
.ai-helper__search:hover::after {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

/* Поле ввода при hover на контейнер — дыхание и расширение */
.ai-helper__search:hover .ai-helper__search-input {
    animation: helperInputBreathing 2s ease-in-out infinite;
    border-color: #7fc241;
}

/* Кнопки уменьшаются при hover на контейнер */
.ai-helper__search:hover .ai-helper__search-voice-btn,
.ai-helper__search:hover .service-control__ai-btn {
    transform: scale(0.85);
    opacity: 0.7;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

/* Восстанавливаем кнопки при наведении на них самих */
.ai-helper__search:hover .ai-helper__search-voice-btn:hover,
.ai-helper__search:hover .service-control__ai-btn:hover {
    transform: scale(1.05);
    opacity: 1;
}

/* Фокус на поле — градиентный фон */
.ai-helper__search-input:focus {
    background: linear-gradient(135deg, #ffffff 0%, #e8f5e9 40%, #d4edda 100%) !important;
    border-color: #1a6b6d !important;
    box-shadow: 0 0 0 3px rgba(26, 107, 109, 0.2), 0 2px 12px rgba(127, 194, 65, 0.3) !important;
    animation: none;
}

/* Кнопки возвращаются при фокусе на поле */
.ai-helper__search:focus-within .ai-helper__search-voice-btn,
.ai-helper__search:focus-within .service-control__ai-btn {
    transform: scale(1);
    opacity: 1;
}

/* ==========================================
   АДАПТИВНОСТЬ
   ========================================== */

/* Первый диапазон: от 880px до 480px */
@media (max-width: 880px) {
    /* На мобильных/планшетах оставляем прежнюю компактную орбиту */
    .ai-helper__orbit {
        max-width: 490px;
        overflow: hidden;
    }

    /* Иконка-переключатель на планшетах - немного меньше */
    .ai-helper__icon-toggle {
        width: 38px;
        height: 38px;
        left: -65px; /* Чуть ближе к хранилищу на планшетах */
        font-size: 20px;
    }

    /* Подсказка на планшетах - короче */
    .ai-helper__icon-toggle::after {
        content: 'ИИ помощник';
    }

    /* Строка поиска - всегда видима на мобильных (не по hover) */
    .ai-helper__search {
        opacity: 1;
        max-height: 60px;
        margin-bottom: 20px;
        padding-top: 10px;
        padding-bottom: 10px;
        visibility: visible;
        overflow: visible;
        width: 90%;
        position: relative;
        height: 50px;
        gap: 0;
    }

    /* Поле ввода - на всю ширину с padding для кнопок */
    /* Бордер серый по умолчанию, зеленый при фокусе (как в блоке #2) */
    .ai-helper__search-input {
        width: 100%;
        min-width: 0 !important; /* Убираем min-width: 400px для мобильных */
        height: 50px;
        font-size: 15px;
        padding: 0 50px;
        border: 2px solid #b0b0b0; /* Серый по умолчанию */
        border-radius: 10px;
        box-sizing: border-box;
        max-width: 100%;
    }

    /* При фокусе - зеленый бордер */
    .ai-helper__search-input:focus {
        border-color: #1a6b6d;
    }

    /* Кнопка голосового ввода - слева внутри поля */
    /* Размер 34px × 34px, отступ 8px = (50px input - 34px btn) / 2 для равных отступов */
    .ai-helper__search-voice-btn {
        position: absolute;
        left: 8px; /* Одинаковый отступ слева, сверху и снизу */
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
        width: 34px;
        height: 34px;
    }

    /* ВАЖНО: сохраняем translateY(-50%) при hover/active чтобы кнопка не смещалась */
    .ai-helper__search-voice-btn:hover {
        transform: translateY(-50%) scale(1.05);
    }

    .ai-helper__search-voice-btn:active {
        transform: translateY(-50%) scale(0.95);
    }

    /* Подсказка для кнопки голосового ввода на мобильных - корректируем позиционирование */
    .ai-helper__search-voice-btn::before {
        left: 0 !important; /* Позиционируем относительно левой стороны кнопки */
        right: auto !important;
        transform: translateX(0) !important;
        top: auto !important;
        bottom: calc(100% + 8px) !important;
    }


    /* Кнопка отправки поиска - справа внутри поля */
    .ai-helper__search .service-control__ai-btn {
        position: absolute;
        right: 3px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
        width: 44px;
        height: 44px;
    }

    /* ВАЖНО: сохраняем translateY(-50%) при hover/active чтобы кнопка не смещалась */
    .ai-helper__search .service-control__ai-btn:hover {
        transform: translateY(-50%) scale(1.1);
    }

    .ai-helper__search .service-control__ai-btn:active {
        transform: translateY(-50%) scale(0.95);
    }

    /* Анимация записи на мобильных - сохраняем translateY(-50%) */
    .ai-helper__search-voice-btn.recording {
        animation: voiceBtnPulseMobileHelper 0.5s infinite;
    }

    @keyframes voiceBtnPulseMobileHelper {
        0%, 100% {
            transform: translateY(-50%) scale(1);
            box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.4);
        }
        50% {
            transform: translateY(-50%) scale(1.05);
            box-shadow: 0 0 0 6px rgba(255, 68, 68, 0);
        }
    }

    /* Отключаем hover-эффекты на планшетах (как в блоке #2) */
    .ai-helper:hover .ai-helper__search {
        margin-bottom: 20px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    /* Отключаем hover-эффекты на кнопках (без scale) */
    .ai-helper__search:hover .ai-helper__search-voice-btn,
    .ai-helper__search:hover .service-control__ai-btn {
        transform: translateY(-50%) !important;
        opacity: 1 !important;
    }

    /* Отключаем анимацию "дыхания" на input при hover */
    .ai-helper__search:hover .ai-helper__search-input {
        animation: none !important;
    }

    /* ВАЖНО: При фокусе на input сохраняем translateY(-50%) для кнопок */
    .ai-helper__search:focus-within .ai-helper__search-voice-btn,
    .ai-helper__search:focus-within .service-control__ai-btn {
        transform: translateY(-50%) !important;
        opacity: 1 !important;
    }

    /* Переключатель режимов - компактнее */
    .ai-helper__mode-switcher {
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 10px;
        margin-bottom: 15px;
    }

    /* AI индикатор и suggestions - скрываем на мобильных */
    .ai-helper__search::after {
        display: none;
    }

    .ai-helper-suggestions {
        display: none !important;
    }

    .ai-helper-suggestions__toggle {
        display: none !important;
    }
}

/* Второй диапазон: от 480px */
@media (max-width: 480px) {
    /* Иконка-переключатель на мобильных - компактнее */
    .ai-helper__icon-toggle {
        width: 36px;
        height: 36px;
        left: 0; /* Центрировано на мобильных */
        font-size: 18px;
        border-width: 2px;
    }

    /* Подсказка на мобильных - только эмодзи или вообще не показываем */
    .ai-helper__icon-toggle::after {
        display: none; /* Скрываем подсказку на маленьких экранах */
    }

    /* Контейнер - уменьшаем отступы */
    .ai-helper {
        margin: 40px auto 20px auto;
        padding: 0 15px;
    }

    .ai-helper.hidden {
        max-height: 50px;
    }

    /* Заголовок - уменьшаем размер */
    .ai-helper__title {
        font-size: 20px;
    }

    /* Кнопка переключения - увеличиваем для touch */
    .ai-helper__toggle-btn {
        width: 40px;
        height: 40px;
    }

    /* Строка поиска - компактный режим */
    .ai-helper__search {
        width: 100%;
        max-width: 100%;
        height: 46px;
        box-sizing: border-box;
        overflow: visible; /* НЕ hidden, чтобы кнопки были видны */
        margin-left: auto;
        margin-right: auto;
    }

    /* ВАЖНО: Сохраняем translateY(-50%) при hover/focus для absolute кнопок */
    .ai-helper__search:hover .ai-helper__search-voice-btn,
    .ai-helper__search:hover .service-control__ai-btn {
        transform: translateY(-50%) !important;
        opacity: 1 !important;
    }

    .ai-helper__search:focus-within .ai-helper__search-voice-btn,
    .ai-helper__search:focus-within .service-control__ai-btn {
        transform: translateY(-50%) !important;
        opacity: 1 !important;
    }

    /* Отключаем анимацию "дыхания" на маленьких экранах */
    .ai-helper__search:hover .ai-helper__search-input {
        animation: none !important;
    }

    /* Поле ввода - уменьшаем для маленьких экранов */
    .ai-helper__search-input {
        height: 46px;
        width: 100%;
        min-width: 0 !important; /* Убираем min-width: 400px для мобильных */
        max-width: 100% !important;
        font-size: 14px;
        padding: 0 46px;
        border-radius: 8px;
        box-sizing: border-box;
    }

    /* Отключаем градиентный фон при фокусе на маленьких экранах */
    /* Бордер зеленый при фокусе */
    .ai-helper__search-input:focus {
        background: #ffffff !important;
        border-color: #1a6b6d !important;
        box-shadow: 0 0 0 2px rgba(26, 107, 109, 0.1) !important;
    }

    /* Кнопка голосового ввода - компактный размер */
    /* Размер 34px × 34px, отступ 6px = (46px input - 34px btn) / 2 для равных отступов */
    .ai-helper__search-voice-btn {
        position: absolute;
        left: 6px; /* Одинаковый отступ слева, сверху и снизу */
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
        width: 34px;
        height: 34px;
    }

    /* ВАЖНО: сохраняем translateY(-50%) при hover/active чтобы кнопка не смещалась */
    .ai-helper__search-voice-btn:hover {
        transform: translateY(-50%) scale(1.05);
    }

    .ai-helper__search-voice-btn:active {
        transform: translateY(-50%) scale(0.95);
    }

    /* Подсказка для кнопки голосового ввода на мобильных (до 480px) - корректируем позиционирование */
    .ai-helper__search-voice-btn::before {
        left: 0 !important; /* Позиционируем относительно левой стороны кнопки */
        right: auto !important;
        transform: translateX(0) !important;
        top: auto !important;
        bottom: calc(100% + 8px) !important;
    }

    /* Кнопка отправки - компактный размер */
    .ai-helper__search .service-control__ai-btn {
        position: absolute;
        right: 3px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
        width: 40px;
        height: 40px;
    }

    /* ВАЖНО: сохраняем translateY(-50%) при hover/active чтобы кнопка не смещалась */
    .ai-helper__search .service-control__ai-btn:hover {
        transform: translateY(-50%) scale(1.1);
    }

    .ai-helper__search .service-control__ai-btn:active {
        transform: translateY(-50%) scale(0.95);
    }

    /* Анимация записи на мобильных - сохраняем translateY(-50%) */
    .ai-helper__search-voice-btn.recording {
        animation: voiceBtnPulseMobileHelper480 0.5s infinite;
    }

    @keyframes voiceBtnPulseMobileHelper480 {
        0%, 100% {
            transform: translateY(-50%) scale(1);
            box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.4);
        }
        50% {
            transform: translateY(-50%) scale(1.05);
            box-shadow: 0 0 0 6px rgba(255, 68, 68, 0);
        }
    }

    .ai-helper__orbit {
        height: 400px;
    }

    .ai-helper__icon {
        width: 70px;
        height: 70px;
    }

    .ai-helper__robot {
        width: 70px;
        height: 70px;
    }

    .ai-helper__robot-status {
        transform: translate(-50%, -100px);
        font-size: 12px;
        padding: 8px 16px;
    }

    @keyframes statusPulse {
        0%, 100% {
            transform: translate(-50%, -100px) scale(1);
        }
        50% {
            transform: translate(-50%, -100px) scale(1.05);
        }
    }

    .ai-helper__button {
        font-size: 12px;
        padding: 10px 16px;
        min-height: 44px;
    }

    .ai-helper__lucky-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .ai-helper__lucky-btn svg {
        width: 18px;
        height: 18px;
    }

    .ai-helper__mode-switcher {
        margin-top: 12px;
        margin-bottom: 20px;
    }

    .ai-helper__mode-toggle {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .ai-helper__mode-toggle svg {
        width: 18px;
        height: 18px;
    }

    .ai-helper__ai-gen-btn {
        width: 48px;
        height: 48px;
        font-size: 22px;
        margin-right: 5px;
    }

    .ai-helper__ai-gen-btn .ai-gen-icon svg {
        width: 24px;
        height: 24px;
    }

    .ai-helper__reset-btn {
        width: 26px;
        height: 26px;
        margin-left: 0;
        margin-right: 18px;
    }

    .ai-helper__reset-btn svg {
        width: 14px;
        height: 14px;
    }

    /* Уменьшаем радиус орбиты для мобильных - приближаем к центру */
    @keyframes orbitButton1 {
        from {
            transform: translate(-50%, -50%) rotate(0deg) translateX(100px) rotate(0deg);
        }
        to {
            transform: translate(-50%, -50%) rotate(360deg) translateX(100px) rotate(-360deg);
        }
    }

    @keyframes orbitButton2 {
        from {
            transform: translate(-50%, -50%) rotate(40deg) translateX(110px) rotate(-40deg);
        }
        to {
            transform: translate(-50%, -50%) rotate(400deg) translateX(110px) rotate(-400deg);
        }
    }

    @keyframes orbitButton3 {
        from {
            transform: translate(-50%, -50%) rotate(80deg) translateX(100px) rotate(-80deg);
        }
        to {
            transform: translate(-50%, -50%) rotate(440deg) translateX(100px) rotate(-440deg);
        }
    }

    @keyframes orbitButton4 {
        from {
            transform: translate(-50%, -50%) rotate(120deg) translateX(110px) rotate(-120deg);
        }
        to {
            transform: translate(-50%, -50%) rotate(480deg) translateX(110px) rotate(-480deg);
        }
    }

    @keyframes orbitButton5 {
        from {
            transform: translate(-50%, -50%) rotate(160deg) translateX(100px) rotate(-160deg);
        }
        to {
            transform: translate(-50%, -50%) rotate(520deg) translateX(100px) rotate(-520deg);
        }
    }

    @keyframes orbitButton6 {
        from {
            transform: translate(-50%, -50%) rotate(200deg) translateX(110px) rotate(-200deg);
        }
        to {
            transform: translate(-50%, -50%) rotate(560deg) translateX(110px) rotate(-560deg);
        }
    }

    @keyframes orbitButton7 {
        from {
            transform: translate(-50%, -50%) rotate(240deg) translateX(100px) rotate(-240deg);
        }
        to {
            transform: translate(-50%, -50%) rotate(600deg) translateX(100px) rotate(-600deg);
        }
    }

    @keyframes orbitButton8 {
        from {
            transform: translate(-50%, -50%) rotate(280deg) translateX(110px) rotate(-280deg);
        }
        to {
            transform: translate(-50%, -50%) rotate(640deg) translateX(110px) rotate(-640deg);
        }
    }

    @keyframes orbitButton9 {
        from {
            transform: translate(-50%, -50%) rotate(320deg) translateX(100px) rotate(-320deg);
        }
        to {
            transform: translate(-50%, -50%) rotate(680deg) translateX(100px) rotate(-680deg);
        }
    }

    /* Модальное окно настроек - адаптивность */
    .robot-settings-modal__content {
        width: 95%;
        max-height: 90vh;
    }

    .robot-settings__models {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .robot-settings__models .model-option {
        padding: 8px 4px;
    }

    .robot-settings__models .model-emoji {
        font-size: 22px;
    }

    .robot-settings__models .model-name {
        font-size: 9px;
    }

    .robot-settings__preview .preview-robot {
        font-size: 36px;
    }
}
