/* Telegram Popup Styles */
        .tg-popup-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(8px);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 10000;
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transition: opacity 0.4s ease;
        }

        .tg-popup-overlay.active {
            display: flex;
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }

        .tg-popup-content {
            background: linear-gradient(135deg, rgba(30, 30, 50, 0.95), rgba(20, 20, 40, 0.98));
            border: 1px solid rgba(99, 102, 241, 0.3);
            border-radius: 24px;
            padding: 40px 32px;
            max-width: 400px;
            width: 90%;
            text-align: center;
            position: relative;
            transform: translateY(30px) scale(0.95);
            transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            box-shadow: 0 25px 80px rgba(99, 102, 241, 0.3);
        }

        .tg-popup-overlay.active .tg-popup-content {
            transform: translateY(0) scale(1);
        }

        .tg-popup-close {
            position: absolute;
            top: 16px;
            right: 16px;
            background: rgba(255, 255, 255, 0.1);
            border: none;
            color: white;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            font-size: 24px;
            cursor: pointer;
            transition: all 0.3s ease;
            line-height: 1;
        }

        .tg-popup-close:hover {
            background: rgba(239, 68, 68, 0.8);
            transform: rotate(90deg);
        }

        .tg-popup-icon {
            font-size: 4rem;
            margin-bottom: 16px;
            animation: pulse 2s infinite;
        }

        @keyframes pulse {

            0%,
            100% {
                transform: scale(1);
            }

            50% {
                transform: scale(1.1);
            }
        }

        .tg-popup-content h3 {
            font-size: 1.5rem;
            color: white;
            margin-bottom: 12px;
            background: linear-gradient(135deg, #6366f1, #a855f7);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .tg-popup-content p {
            color: rgba(255, 255, 255, 0.7);
            font-size: 0.95rem;
            line-height: 1.6;
            margin-bottom: 24px;
        }

        .tg-popup-btn {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            background: linear-gradient(135deg, #0088cc, #00aaee);
            color: white;
            padding: 14px 28px;
            border-radius: 50px;
            font-weight: 600;
            font-size: 1rem;
            text-decoration: none;
            transition: all 0.3s ease;
            box-shadow: 0 8px 25px rgba(0, 136, 204, 0.4);
        }

        .tg-popup-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 12px 35px rgba(0, 136, 204, 0.5);
        }

        .tg-icon {
            font-size: 1.2rem;
        }

        .tg-popup-later {
            display: block;
            width: 100%;
            background: transparent;
            border: none;
            color: rgba(255, 255, 255, 0.5);
            padding: 12px;
            margin-top: 16px;
            cursor: pointer;
            font-size: 0.9rem;
            transition: color 0.3s ease;
        }

        .tg-popup-later:hover {
            color: rgba(255, 255, 255, 0.8);
        }

        @media (max-width: 480px) {
            .tg-popup-content {
                padding: 32px 20px;
            }

            .tg-popup-icon {
                font-size: 3rem;
            }

            .tg-popup-content h3 {
                font-size: 1.3rem;
            }
        }

                /* ========== AI CHATBOT WIDGET ========== */
        .chatbot-toggle {
            position: fixed;
            bottom: 90px;
            right: 24px;
            width: 60px;
            height: 60px;
            background: var(--gradient-main);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
            z-index: 1000;
            transition: transform 0.3s, box-shadow 0.3s;
            border: none;
        }

        .chatbot-toggle:hover {
            transform: scale(1.1);
            box-shadow: 0 12px 40px rgba(99, 102, 241, 0.6);
        }

        .chatbot-toggle span {
            font-size: 1.8rem;
        }

        .chatbot-window {
            position: fixed;
            bottom: 160px;
            right: 24px;
            width: 380px;
            max-width: calc(100vw - 48px);
            height: min(500px, calc(100dvh - 200px));
            max-height: calc(100dvh - 200px);
            min-height: 320px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            display: none;
            flex-direction: column;
            z-index: 1001;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
            overflow: hidden;
        }

        .chatbot-window.active {
            display: flex;
            animation: slideUp 0.3s ease;
        }

        .chatbot-header {
            background: var(--gradient-main);
            padding: 16px 20px;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .chatbot-header-icon {
            font-size: 1.5rem;
        }

        .chatbot-header-info {
            flex: 1;
        }

        .chatbot-header-info h4 {
            color: white;
            font-size: 1rem;
            font-weight: 700;
            margin: 0;
        }

        .chatbot-header-info span {
            color: rgba(255, 255, 255, 0.8);
            font-size: 0.8rem;
        }

        .chatbot-close {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: white;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 1.2rem;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .chatbot-messages {
            flex: 1;
            min-height: 0;
            padding: 16px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .chat-message {
            max-width: 85%;
            padding: 12px 16px;
            border-radius: var(--radius-md);
            font-size: 0.9rem;
            line-height: 1.5;
        }

        .chat-message.bot {
            background: var(--bg-elevated);
            color: var(--text-primary);
            align-self: flex-start;
            border-bottom-left-radius: 4px;
        }

        .chat-message.user {
            background: var(--gradient-main);
            color: white;
            align-self: flex-end;
            border-bottom-right-radius: 4px;
        }

        .chat-message.typing {
            display: flex;
            gap: 4px;
            padding: 16px 20px;
        }

        .typing-dot {
            width: 8px;
            height: 8px;
            background: var(--text-muted);
            border-radius: 50%;
            animation: typing 1.4s infinite ease-in-out;
        }

        .typing-dot:nth-child(2) {
            animation-delay: 0.2s;
        }

        .typing-dot:nth-child(3) {
            animation-delay: 0.4s;
        }

        @keyframes typing {

            0%,
            80%,
            100% {
                transform: scale(0.8);
                opacity: 0.5;
            }

            40% {
                transform: scale(1);
                opacity: 1;
            }
        }

        .chatbot-input {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto auto;
            align-items: center;
            padding: 16px;
            gap: 12px;
            border-top: 1px solid var(--border);
            background: var(--bg-elevated);
        }

        .chatbot-input input {
            width: 100%;
            min-width: 0;
            padding: 12px 16px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: var(--radius-md);
            color: var(--text-primary);
            font-size: 0.9rem;
            font-family: inherit;
        }

        .chatbot-input input:focus {
            outline: none;
            border-color: var(--primary);
        }

        .chatbot-input button {
            min-height: 48px;
            padding: 12px 20px;
            background: var(--gradient-main);
            border: none;
            border-radius: var(--radius-md);
            color: white;
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.2s;
        }

        .chatbot-input button:hover {
            transform: scale(1.05);
        }

        .chatbot-input button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .chatbot-mic {
            min-width: 48px;
            padding: 12px 14px !important;
            background: var(--bg-elevated) !important;
            border: 1px solid var(--border) !important;
            font-size: 1.2rem;
        }

        .chatbot-mic:hover {
            background: var(--primary) !important;
            border-color: var(--primary) !important;
        }

        .chatbot-mic.recording {
            background: #ef4444 !important;
            border-color: #ef4444 !important;
            animation: pulse-red 1s infinite;
        }

        @keyframes pulse-red {

            0%,
            100% {
                box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
            }

            50% {
                box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
            }
        }

        /* ========== LIVE CALL OVERLAY STYLES ========== */
        .chatbot-call-start-btn {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            color: white;
            border: none;
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
            transition: all 0.2s ease;
        }

        .chatbot-call-start-btn:hover {
            transform: scale(1.05);
            box-shadow: 0 6px 16px rgba(16, 185, 129, 0.5);
        }

        .chatbot-call-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(180deg, #0f172a 0%, #1e1b4b 100%);
            z-index: 10;
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: space-between;
            padding: 30px 20px 40px 20px;
            box-sizing: border-box;
            animation: fadeIn 0.3s ease;
        }

        .chatbot-call-overlay.active {
            display: flex;
        }

        .call-avatar-container {
            position: relative;
            margin-top: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .call-avatar {
            width: 100px;
            height: 100px;
            border-radius: 50%;
            background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 3rem;
            box-shadow: 0 0 30px rgba(168, 85, 247, 0.4);
            z-index: 2;
        }

        .call-pulse-ring {
            position: absolute;
            width: 120px;
            height: 120px;
            border-radius: 50%;
            border: 2px solid rgba(168, 85, 247, 0.6);
            animation: pulseRing 2s infinite ease-out;
            z-index: 1;
        }

        @keyframes pulseRing {
            0% { transform: scale(0.9); opacity: 0.8; }
            100% { transform: scale(1.6); opacity: 0; }
        }

        .call-info {
            text-align: center;
            margin-top: 15px;
        }

        .call-title {
            color: #ffffff;
            font-size: 1.2rem;
            font-weight: 700;
            margin-bottom: 4px;
        }

        .call-subtitle {
            color: #a78bfa;
            font-size: 0.85rem;
        }

        .call-status-badge {
            margin-top: 12px;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.15);
            padding: 6px 16px;
            border-radius: 20px;
            color: #e2e8f0;
            font-size: 0.85rem;
            font-weight: 500;
        }

        .voice-wave {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            height: 36px;
            margin: 15px 0;
        }

        .voice-wave-bar {
            width: 5px;
            height: 10px;
            background: #a855f7;
            border-radius: 4px;
            animation: waveBar 1.2s infinite ease-in-out;
        }

        .voice-wave.speaking .voice-wave-bar {
            background: #10b981;
        }

        .voice-wave-bar:nth-child(1) { animation-delay: 0.0s; }
        .voice-wave-bar:nth-child(2) { animation-delay: 0.2s; }
        .voice-wave-bar:nth-child(3) { animation-delay: 0.4s; }
        .voice-wave-bar:nth-child(4) { animation-delay: 0.2s; }
        .voice-wave-bar:nth-child(5) { animation-delay: 0.0s; }

        @keyframes waveBar {
            0%, 100% { height: 8px; }
            50% { height: 32px; }
        }

        .call-controls {
            display: flex;
            align-items: center;
            gap: 24px;
            margin-bottom: 10px;
        }

        .call-btn {
            width: 56px;
            height: 56px;
            border-radius: 50%;
            border: none;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.4rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .call-btn-mute {
            background: rgba(255, 255, 255, 0.15);
            color: white;
        }

        .call-btn-mute.muted {
            background: #ef4444;
            color: white;
        }

        .call-btn-end {
            background: #ef4444;
            color: white;
            box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
        }

        .call-btn-end:hover {
            transform: scale(1.1);
            background: #dc2626;
        }

        @media (max-width: 768px) {
            body.chatbot-open {
                overflow: hidden;
            }

            .chatbot-window {
                left: 12px;
                right: 12px;
                bottom: calc(12px + env(safe-area-inset-bottom));
                width: auto;
                max-width: none;
                height: min(78dvh, 620px);
                max-height: calc(100dvh - 24px - env(safe-area-inset-bottom));
                border-radius: 24px;
            }

            .chatbot-header {
                padding: 14px 16px;
            }

            .chatbot-header-info h4 {
                font-size: 0.98rem;
            }

            .chatbot-header-info span {
                font-size: 0.78rem;
            }

            .chatbot-messages {
                padding: 14px;
                gap: 10px;
            }

            .chat-message {
                font-size: 0.94rem;
                padding: 12px 14px;
                max-width: 92%;
            }

            .chatbot-input {
                grid-template-columns: minmax(0, 1fr) 48px 88px;
                padding: 12px;
                padding-bottom: calc(12px + env(safe-area-inset-bottom));
                gap: 8px;
                background: var(--bg-card);
            }

            .chatbot-input input {
                padding: 14px 16px;
                font-size: 16px;
            }

            .chatbot-input button#chatbotSend {
                min-width: 88px;
                padding: 12px 14px;
                font-size: 0.9rem;
                font-weight: 700;
                white-space: nowrap;
            }

            .chatbot-mic {
                min-width: 48px;
                padding: 0 !important;
                border-radius: var(--radius-md) !important;
            }

            .chatbot-toggle {
                bottom: calc(20px + env(safe-area-inset-bottom));
                right: 16px;
                width: 56px;
                height: 56px;
            }

            .chatbot-toggle span {
                font-size: 1.6rem;
            }

            .chatbot-close {
                width: 34px;
                height: 34px;
                font-size: 1.1rem;
            }
        }

        @media (max-width: 420px) {
            .chatbot-window {
                left: 0;
                right: 0;
                bottom: 0;
                height: 100dvh;
                max-height: 100dvh;
                border-radius: 0;
                border-left: none;
                border-right: none;
                border-bottom: none;
            }

            .chatbot-input {
                grid-template-columns: minmax(0, 1fr) 46px 82px;
            }

            .chatbot-input button#chatbotSend {
                min-width: 82px;
                padding-inline: 10px;
            }
        }
