        /* Стили виджета АКИ */
        .aki-widget {
            position: fixed;
            bottom: 20px;
            right: 20px;
            z-index: 9999;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            /* Скрыт до готовности JS — иначе виджет мигает при загрузке страницы */
            opacity: 0;
            transition: opacity 0.5s;
        }


        /* Контейнер персонажа — видео обрезается по скруглённым углам,
           границ прямоугольника видео не видно */
        .aki-character {
            width: 140px;
            height: 140px;
            cursor: pointer;
            position: relative;
            transition: transform 0.3s ease;
            overflow: hidden;
            border-radius: 200px 200px 200px 200px;
            border: 1px solid #FFCC00;
            background: transparent;
        }


        /* Видео-аватар в контейнере */
        #aki-video {
            width: 110%;
            height: 110%;
            object-fit: cover;
            display: block;
        }

        /* Бейдж уведомления */

        .aki-badge {
            position: absolute;
            top: 5px;
            right: 5px;
            width: 22px;
            height: 22px;
            background: #ff0000;
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            font-weight: bold;
            box-shadow: 0 2px 8px rgba(255,0,0,0.4);
            animation: badgePulse 1.5s ease-in-out infinite;
            z-index: 10;
        }

        @keyframes badgePulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.1); }
        }

        .aki-badge.hidden {
            display: none;
        }

        /* Меню виджета */
        .aki-menu {
            position: absolute;
            bottom: 140px;
            right: 0;
            width: 340px;
            background: white;
            border-radius: 16px;
            box-shadow: 0 8px 32px rgba(0,0,0,0.2);
            padding: 20px;
            opacity: 0;
            transform: translateY(20px) scale(0.95);
            transition: all 0.3s ease;
            pointer-events: none;
            max-height: 600px;
            overflow-y: auto;
            z-index: 10000;
        }

        .aki-menu.visible {
            opacity: 1;
            transform: translateY(0) scale(1);
            pointer-events: all;
        }

        .aki-menu-header {
            display: flex;
            align-items: center;
            margin-bottom: 16px;
            padding-bottom: 12px;
            border-bottom: 1px solid #eee;
        }

        .aki-menu-title {
            font-size: 18px;
            font-weight: 600;
            color: #333;
        }

        .aki-menu-subtitle {
            font-size: 13px;
            color: #666;
            margin-top: 2px;
        }

        .aki-menu-close {
            margin-left: auto;
            width: 28px;
            height: 28px;
            border: none;
            background: #f5f5f5;
            border-radius: 50%;
            cursor: pointer;
            font-size: 18px;
            color: #666;
            transition: all 0.2s;
        }

        .aki-menu-close:hover {
            background: #e0e0e0;
        }

        /* Кнопки меню */
        .aki-btn {
            width: 100%;
            padding: 14px 16px;
            margin-bottom: 8px;
            border: 2px solid #f0f0f0;
            border-radius: 10px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 12px;
            text-align: left;
            background: white;
        }

        .aki-btn:hover {
            transform: translateX(4px);
            border-color: #FF0000;
            background: #fff5f5;
        }

        .aki-btn i {
            color: #FF0000;
            font-size: 18px;
            width: 24px;
            text-align: center;
        }

        /* Блок мессенджеров */
        .aki-messengers {
            margin-top: 12px;
            padding-top: 12px;
            border-top: 1px solid #eee;
        }

        .aki-messengers-title {
            font-size: 12px;
            color: #666;
            margin-bottom: 10px;
            text-align: center;
        }

        .aki-messengers-list {
            display: flex;
            justify-content: center;
            gap: 12px;
        }

        .aki-messenger-btn {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
            border: 2px solid #e0e0e0;
            background: white;
            text-decoration: none;
        }

        .aki-messenger-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }

        .aki-messenger-btn.whatsapp {
            border-color: #25D366;
            color: #25D366;
        }

        .aki-messenger-btn.whatsapp:hover {
            background: #25D366;
            color: white;
        }

        .aki-messenger-btn.telegram {
            border-color: #0088cc;
            color: #0088cc;
        }

        .aki-messenger-btn.telegram:hover {
            background: #0088cc;
            color: white;
        }

        .aki-messenger-btn.max {
            border-color: #000;
            color: #000;
        }

        .aki-messenger-btn.max:hover {
            background: #0055ff;
            border-color: #0055ff;
            color: white;
        }

        .aki-messenger-btn i {
            font-size: 22px;
        }

        /* Чёрная иконка Max на прозрачном фоне (aki-widget/max-icon.svg) */
        .aki-messenger-btn.max img {
            width: 24px;
            height: 24px;
            object-fit: contain;
            transition: filter 0.2s;
        }

        /* На наведении фон синий — делаем иконку белой */
        .aki-messenger-btn.max:hover img {
            filter: invert(1);
        }



        /* Поле ввода сообщения */
        .aki-message-area {
            margin-top: 16px;
            padding-top: 16px;
            border-top: 1px solid #eee;
        }

        .aki-message-input-wrapper {
            display: flex;
            gap: 8px;
            align-items: flex-end;
        }

        .aki-message-input {
            flex: 1;
            padding: 12px 16px;
            border: 2px solid #e0e0e0;
            border-radius: 24px;
            font-size: 14px;
            resize: none;
            min-height: 44px;
            max-height: 120px;
            font-family: inherit;
            transition: border-color 0.2s;
        }

        .aki-message-input:focus {
            outline: none;
            border-color: #FF0000;
        }

        .aki-message-send {
            width: 44px;
            height: 44px;
            border: none;
            background: #FF0000;
            color: white;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            flex-shrink: 0;
        }

        .aki-message-send:hover {
            background: #cc0000;
            transform: scale(1.05);
        }

        .aki-message-send:active {
            transform: scale(0.95);
        }

        .aki-message-send i {
            font-size: 18px;
        }

        /* Модальные окна */
        .aki-modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.5);
            z-index: 10001;
            align-items: center;
            justify-content: center;
        }

        .aki-modal-overlay.visible {
            display: flex;
        }

        .aki-modal {
            background: white;
            padding: 30px;
            border-radius: 16px;
            width: 90%;
            max-width: 400px;
            box-shadow: 0 8px 32px rgba(0,0,0,0.3);
        }

        .aki-modal-title {
            font-size: 20px;
            font-weight: 600;
            margin-bottom: 20px;
            color: #333;
        }

        .aki-modal-input {
            width: 100%;
            padding: 12px 16px;
            margin-bottom: 16px;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            font-size: 14px;
            transition: border-color 0.2s;
        }

        .aki-modal-input:focus {
            outline: none;
            border-color: #FF0000;
        }

        .aki-modal-buttons {
            display: flex;
            gap: 12px;
            margin-top: 8px;
        }

        .aki-modal-btn {
            flex: 1;
            padding: 12px 24px;
            border: none;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        .aki-modal-btn-primary {
            background: #FF0000;
            color: white;
        }

        .aki-modal-btn-primary:hover {
            background: #cc0000;
        }

        .aki-modal-btn-secondary {
            background: #f5f5f5;
            color: #333;
        }

        .aki-modal-btn-secondary:hover {
            background: #e0e0e0;
        }

        /* Уведомление об успешной отправке заявки */
        .aki-success {
            position: fixed;
            bottom: 24px;
            left: 50%;
            transform: translate(-50%, 16px);
            z-index: 10002;
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 14px 22px;
            background: #fff;
            border: 2px solid #1ea952;
            border-radius: 12px;
            box-shadow: 0 8px 32px rgba(0,0,0,0.2);
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            font-size: 15px;
            font-weight: 600;
            color: #1b1b1b;
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
        }

        .aki-success.visible {
            opacity: 1;
            visibility: visible;
            transform: translate(-50%, 0);
        }

        .aki-success__icon {
            color: #1ea952;
            font-size: 20px;
        }

        /* Мобильная версия */
        @media (max-width: 768px) {
            .aki-character {
                width: 120px;
                height: 120px;
            }
            
            .aki-menu {
                width: calc(100vw - 40px);
                right: -10px;
                max-height: 70vh;
            }

            .aki-success {
                left: 20px;
                right: 20px;
                bottom: 20px;
                justify-content: center;
                transform: translateY(16px);
            }

            .aki-success.visible {
                transform: translateY(0);
            }
        }

