/* ==========================================================================
   Alijm AI Chatbot Toggle - Animated Robot Character v2
   نیازمندی پزشکی مدبوم - medboom.ir
   
   ویژگی‌ها:
   - موقعیت راست/چپ بر اساس تنظیمات
   - آنتن انعطاف‌پذیر (Wave و Tap)
   - حالت خواب با Zzz
   - حالت اسکرول (ربات ۵۰٪ کوچک، چشم‌ها ثابت)
   - کاراکتر پشت پنجره چت
   ========================================================================== */

/* ==========================================================================
   دکمه Toggle - Base
   ========================================================================== */
#alijm-ai-chatbot-toggle {
    position: relative;
    width: 90px;
    height: 100px;
    cursor: pointer;
    user-select: none;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0;
    box-shadow: none !important;
    border-radius: 0 !important;
    font-family: inherit;
    color: inherit;
    display: block;
    overflow: visible;
}

#alijm-ai-chatbot-toggle:hover {
    transform: none !important;
    background: transparent !important;
}

/* ==========================================================================
   بدنه ربات - انیمیشن شناور
   ========================================================================== */
#alijm-ai-chatbot-toggle .alijm-ai-robot {
    position: relative;
    width: 100%;
    height: 100%;
    animation: alijm-float 3s ease-in-out infinite;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes alijm-float {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50%      { transform: translateY(-8px) rotate(2deg); }
}

/* ==========================================================================
   📡 آنتن - Base
   ========================================================================== */
#alijm-ai-chatbot-toggle .alijm-ai-antenna {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-origin: bottom center;
    transition: transform 0.3s ease;
    z-index: 6;
}

#alijm-ai-chatbot-toggle .alijm-ai-antenna-line {
    width: 2px;
    height: 12px;
    background: linear-gradient(to bottom, #00d4ff, #0099cc);
    border-radius: 2px;
    transform-origin: bottom center;
    transition: all 0.3s ease;
}

#alijm-ai-chatbot-toggle .alijm-ai-antenna-ball {
    position: relative;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle at 30% 30%, #ff3b6b, #c81d4e);
    border-radius: 50%;
    box-shadow: 0 0 10px #ff3b6b, 0 0 20px rgba(255, 59, 107, 0.5);
    animation: alijm-pulse 1.5s ease-in-out infinite;
    margin-top: -2px;
    transform-origin: center center;
}

@keyframes alijm-pulse {
    0%, 100% { transform: scale(1);   box-shadow: 0 0 10px #ff3b6b, 0 0 20px rgba(255,59,107,0.5); }
    50%      { transform: scale(1.3); box-shadow: 0 0 15px #ff3b6b, 0 0 30px rgba(255,59,107,0.8); }
}

/* ==========================================================================
   موج سیگنال آنتن
   ========================================================================== */
#alijm-ai-chatbot-toggle .alijm-ai-signal {
    position: absolute;
    top: 50%; left: 50%;
    width: 100%; height: 100%;
    border: 2px solid #ff3b6b;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: alijm-signal 2s ease-out infinite;
    opacity: 0;
}
#alijm-ai-chatbot-toggle .alijm-ai-signal:nth-child(2) { animation-delay: 0.6s; }
#alijm-ai-chatbot-toggle .alijm-ai-signal:nth-child(3) { animation-delay: 1.2s; }

@keyframes alijm-signal {
    0%   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(3); opacity: 0; }
}

/* ==========================================================================
   سر ربات
   ========================================================================== */
#alijm-ai-chatbot-toggle .alijm-ai-head {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 60px;
    background: linear-gradient(145deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 20px;
    box-shadow:
        inset -5px -5px 15px rgba(0,0,0,0.15),
        inset 5px 5px 15px rgba(255,255,255,0.3),
        0 10px 25px rgba(79, 172, 254, 0.5),
        0 0 30px rgba(0, 242, 254, 0.3);
    animation: alijm-glow 2s ease-in-out infinite alternate;
}

@keyframes alijm-glow {
    from { box-shadow: inset -5px -5px 15px rgba(0,0,0,0.15), inset 5px 5px 15px rgba(255,255,255,0.3), 0 10px 25px rgba(79,172,254,0.5), 0 0 30px rgba(0,242,254,0.3); }
    to   { box-shadow: inset -5px -5px 15px rgba(0,0,0,0.15), inset 5px 5px 15px rgba(255,255,255,0.3), 0 10px 30px rgba(79,172,254,0.8), 0 0 50px rgba(0,242,254,0.6); }
}

/* ==========================================================================
   گوش‌های جانبی
   ========================================================================== */
#alijm-ai-chatbot-toggle .alijm-ai-ear {
    position: absolute;
    top: 20px;
    width: 8px;
    height: 20px;
    background: linear-gradient(145deg, #3d8bfd, #0099cc);
    border-radius: 4px;
    box-shadow: inset -2px 0 4px rgba(0,0,0,0.2);
}
#alijm-ai-chatbot-toggle .alijm-ai-ear.left  { left: -6px; }
#alijm-ai-chatbot-toggle .alijm-ai-ear.right { right: -6px; }

/* ==========================================================================
   صورت
   ========================================================================== */
#alijm-ai-chatbot-toggle .alijm-ai-face {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding-top: 8px;
}

/* ==========================================================================
   چشم‌ها
   ========================================================================== */
#alijm-ai-chatbot-toggle .alijm-ai-eye {
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
    animation: alijm-blink 4s infinite;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes alijm-blink {
    0%, 45%, 50%, 100% { transform: scaleY(1); }
    47%                { transform: scaleY(0.1); }
}

/* ==========================================================================
   مردمک چشم
   ========================================================================== */
#alijm-ai-chatbot-toggle .alijm-ai-pupil {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: radial-gradient(circle at 30% 30%, #333, #000);
    border-radius: 50%;
    animation: alijm-look 5s ease-in-out infinite;
}
#alijm-ai-chatbot-toggle .alijm-ai-pupil::after {
    content: '';
    position: absolute;
    top: 1px; left: 2px;
    width: 3px; height: 3px;
    background: #fff;
    border-radius: 50%;
}

@keyframes alijm-look {
    0%, 100% { transform: translate(-50%, -50%); }
    25%      { transform: translate(-80%, -50%); }
    50%      { transform: translate(-50%, -50%); }
    75%      { transform: translate(-20%, -50%); }
}

/* ==========================================================================
   دهان
   ========================================================================== */
#alijm-ai-chatbot-toggle .alijm-ai-mouth {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 8px;
    border: 2px solid #fff;
    border-top: none;
    border-radius: 0 0 20px 20px;
    animation: alijm-talk 2s ease-in-out infinite;
}

@keyframes alijm-talk {
    0%, 100% { height: 8px; width: 20px; }
    50%      { height: 4px; width: 15px; }
}

/* ==========================================================================
   سایه زیر ربات
   ========================================================================== */
#alijm-ai-chatbot-toggle .alijm-ai-shadow {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 8px;
    background: radial-gradient(ellipse, rgba(0,0,0,0.3), transparent);
    border-radius: 50%;
    animation: alijm-shadow-pulse 3s ease-in-out infinite;
}

@keyframes alijm-shadow-pulse {
    0%, 100% { transform: translateX(-50%) scale(1);   opacity: 0.5; }
    50%      { transform: translateX(-50%) scale(0.7); opacity: 0.3; }
}

/* ==========================================================================
   ذرات نورانی
   ========================================================================== */
#alijm-ai-chatbot-toggle .alijm-ai-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
#alijm-ai-chatbot-toggle .alijm-ai-particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #00f2fe;
    border-radius: 50%;
    box-shadow: 0 0 8px #00f2fe;
    opacity: 0;
    animation: alijm-particle 3s ease-out infinite;
}
#alijm-ai-chatbot-toggle .alijm-ai-particles span:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s;   }
#alijm-ai-chatbot-toggle .alijm-ai-particles span:nth-child(2) { top: 60%; left: 80%; animation-delay: 0.7s; }
#alijm-ai-chatbot-toggle .alijm-ai-particles span:nth-child(3) { top: 30%; left: 85%; animation-delay: 1.4s; }
#alijm-ai-chatbot-toggle .alijm-ai-particles span:nth-child(4) { top: 70%; left: 15%; animation-delay: 2.1s; }

@keyframes alijm-particle {
    0%   { transform: translateY(0)     scale(0); opacity: 0; }
    50%  { opacity: 1; }
    100% { transform: translateY(-30px) scale(1); opacity: 0; }
}

/* ==========================================================================
   حباب پیام - جهت بر اساس موقعیت کانتینر پدر
   ========================================================================== */
#alijm-ai-chatbot-toggle .alijm-ai-bubble {
    position: absolute;
    bottom: 75%;
    background: #fff;
    padding: 8px 14px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    white-space: nowrap;
    font-size: 12px;
    color: #333;
    opacity: 0;
    transition: all 0.4s ease;
    font-weight: 600;
    pointer-events: none;
    z-index: 10;
}

/* 💬 چت‌بات راست → حباب سمت چپ */
.alijm-ai-chatbot-right #alijm-ai-chatbot-toggle .alijm-ai-bubble {
    right: 100%;
    left: auto;
    margin-right: 10px;
    transform: translateX(-10px);
}
.alijm-ai-chatbot-right #alijm-ai-chatbot-toggle .alijm-ai-bubble::before {
    content: '';
    position: absolute;
    right: 15px;
    left: auto;
    bottom: -6px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: 3px 3px 5px rgba(0,0,0,0.05);
}

/* 💬 چت‌بات چپ → حباب سمت راست */
.alijm-ai-chatbot-left #alijm-ai-chatbot-toggle .alijm-ai-bubble {
    left: 100%;
    right: auto;
    margin-left: 10px;
    transform: translateX(10px);
}
.alijm-ai-chatbot-left #alijm-ai-chatbot-toggle .alijm-ai-bubble::before {
    content: '';
    position: absolute;
    left: 15px;
    right: auto;
    bottom: -6px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: 3px 3px 5px rgba(0,0,0,0.05);
}

/* ==========================================================================
   حالت‌های تعاملی
   ========================================================================== */
#alijm-ai-chatbot-toggle:hover .alijm-ai-robot {
    transform: scale(1.1);
    animation-duration: 1.5s;
}

.alijm-ai-chatbot-right #alijm-ai-chatbot-toggle:hover .alijm-ai-bubble,
.alijm-ai-chatbot-left  #alijm-ai-chatbot-toggle:hover .alijm-ai-bubble {
    opacity: 1;
    transform: translateX(0);
}

#alijm-ai-chatbot-toggle:hover .alijm-ai-mouth {
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
}

#alijm-ai-chatbot-toggle:active .alijm-ai-robot {
    transform: scale(0.95);
}

#alijm-ai-chatbot-toggle.active .alijm-ai-head {
    background: linear-gradient(145deg, #00f2fe 0%, #4facfe 100%);
}

/* ==========================================================================
   حباب معرفی اولیه
   ========================================================================== */
#alijm-ai-chatbot-toggle .alijm-ai-bubble.show-intro {
    opacity: 1;
    transform: translateX(0);
    animation: alijm-intro-bubble 5s ease forwards;
}

@keyframes alijm-intro-bubble {
    0%, 80% { opacity: 1; transform: translateX(0); }
    100%    { opacity: 0; }
}

/* ==========================================================================
   🌊 انیمیشن Wave آنتن (تکون خوردن مثل دست خداحافظی)
   ========================================================================== */
#alijm-ai-chatbot-toggle.is-waving .alijm-ai-antenna {
    animation: alijm-antenna-wave 0.7s ease-in-out 3;
}

@keyframes alijm-antenna-wave {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    20%      { transform: translateX(-50%) rotate(-35deg); }
    40%      { transform: translateX(-50%) rotate(30deg); }
    60%      { transform: translateX(-50%) rotate(-25deg); }
    80%      { transform: translateX(-50%) rotate(20deg); }
}

#alijm-ai-chatbot-toggle.is-waving .alijm-ai-antenna-ball {
    animation: alijm-antenna-ball-wave 0.7s ease-in-out 3;
}

@keyframes alijm-antenna-ball-wave {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.4); box-shadow: 0 0 20px #ff3b6b, 0 0 40px rgba(255, 59, 107, 0.8); }
}

/* ==========================================================================
   👆 انیمیشن Tap آنتن (ضربه به شیشه)
   ========================================================================== */
#alijm-ai-chatbot-toggle.is-tapping .alijm-ai-antenna {
    animation: alijm-antenna-tap 1.2s ease-in-out;
}

#alijm-ai-chatbot-toggle.is-tapping .alijm-ai-antenna-line {
    animation: alijm-antenna-line-tap 1.2s ease-in-out;
}

#alijm-ai-chatbot-toggle.is-tapping .alijm-ai-antenna-ball {
    animation: alijm-antenna-ball-tap 1.2s ease-in-out;
}

/* آنتن به سمت جلو خم میشه */
@keyframes alijm-antenna-tap {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    30%      { transform: translateX(-50%) rotate(-15deg) translateY(3px); }
    50%      { transform: translateX(-50%) rotate(-20deg) translateY(5px); }
    70%      { transform: translateX(-50%) rotate(-15deg) translateY(3px); }
}

/* میله آنتن کشیده میشه */
@keyframes alijm-antenna-line-tap {
    0%, 100% { transform: scaleY(1); }
    30%      { transform: scaleY(1.8); }
    50%      { transform: scaleY(2.2); }
    70%      { transform: scaleY(1.8); }
}

/* گلوله آنتن بزرگ میشه (مثل ضربه با انگشت) */
@keyframes alijm-antenna-ball-tap {
    0%, 100% { transform: scale(1); box-shadow: 0 0 10px #ff3b6b, 0 0 20px rgba(255,59,107,0.5); }
    30%      { transform: scale(2.5); box-shadow: 0 0 25px #ff3b6b, 0 0 50px rgba(255,59,107,0.9); }
    50%      { transform: scale(3);   box-shadow: 0 0 30px #ff3b6b, 0 0 60px rgba(255,59,107,1); }
    70%      { transform: scale(2.5); box-shadow: 0 0 25px #ff3b6b, 0 0 50px rgba(255,59,107,0.9); }
}

/* ==========================================================================
   💥 افکت ضربه به شیشه (Ripple)
   ========================================================================== */
#alijm-ai-chatbot-toggle .alijm-ai-tap-effect {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    pointer-events: none;
    opacity: 0;
    z-index: 3;
}

#alijm-ai-chatbot-toggle .alijm-ai-tap-effect span {
    position: absolute;
    top: 50%; left: 50%;
    width: 100%; height: 100%;
    border: 3px solid #ff3b6b;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
}

#alijm-ai-chatbot-toggle.is-tapping .alijm-ai-tap-effect {
    opacity: 1;
}

#alijm-ai-chatbot-toggle.is-tapping .alijm-ai-tap-effect span {
    animation: alijm-tap-ripple 0.8s ease-out;
    animation-delay: 0.3s;
}
#alijm-ai-chatbot-toggle.is-tapping .alijm-ai-tap-effect span:nth-child(2) { animation-delay: 0.45s; }
#alijm-ai-chatbot-toggle.is-tapping .alijm-ai-tap-effect span:nth-child(3) { animation-delay: 0.6s; }

@keyframes alijm-tap-ripple {
    0%   { transform: translate(-50%, -50%) scale(0.3); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(3);   opacity: 0; }
}

/* ==========================================================================
   😴 حالت خواب
   ========================================================================== */
#alijm-ai-chatbot-toggle.is-sleeping .alijm-ai-robot {
    animation: alijm-sleep-float 4s ease-in-out infinite;
}

@keyframes alijm-sleep-float {
    0%, 100% { transform: translateY(0) rotate(-8deg); }
    50%      { transform: translateY(-3px) rotate(-8deg); }
}

/* چشم‌های بسته */
#alijm-ai-chatbot-toggle.is-sleeping .alijm-ai-eye {
    animation: none;
    transform: scaleY(0.1);
}
#alijm-ai-chatbot-toggle.is-sleeping .alijm-ai-pupil {
    opacity: 0;
}

/* دهن خواب */
#alijm-ai-chatbot-toggle.is-sleeping .alijm-ai-mouth {
    animation: none;
    width: 10px;
    height: 6px;
    border-radius: 50%;
    border: 2px solid #fff;
    opacity: 0.7;
}

/* آنتن خم شده موقع خواب */
#alijm-ai-chatbot-toggle.is-sleeping .alijm-ai-antenna {
    animation: none;
    transform: translateX(-50%) rotate(25deg);
}

/* گلوله آنتن خاموش */
#alijm-ai-chatbot-toggle.is-sleeping .alijm-ai-antenna-ball {
    animation: none;
    opacity: 0.4;
    box-shadow: none;
    background: #666;
    transform: scale(0.8);
}
#alijm-ai-chatbot-toggle.is-sleeping .alijm-ai-signal {
    display: none;
}

/* ذرات نورانی خاموش موقع خواب */
#alijm-ai-chatbot-toggle.is-sleeping .alijm-ai-particles {
    opacity: 0.2;
}

/* ==========================================================================
   💤 حباب Zzz خواب
   ========================================================================== */
#alijm-ai-chatbot-toggle .alijm-ai-sleep {
    position: absolute;
    top: 5px;
    right: -5px;
    font-family: 'Comic Sans MS', cursive, sans-serif;
    font-weight: bold;
    opacity: 0;
    pointer-events: none;
    z-index: 4;
}

#alijm-ai-chatbot-toggle .alijm-ai-sleep span {
    display: inline-block;
    color: #4facfe;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    opacity: 0;
}

#alijm-ai-chatbot-toggle.is-sleeping .alijm-ai-sleep {
    opacity: 1;
}

#alijm-ai-chatbot-toggle.is-sleeping .alijm-ai-sleep span {
    animation: alijm-zzz 2s ease-in-out infinite;
}

#alijm-ai-chatbot-toggle.is-sleeping .alijm-ai-sleep span:nth-child(1) { font-size: 12px; animation-delay: 0s;   }
#alijm-ai-chatbot-toggle.is-sleeping .alijm-ai-sleep span:nth-child(2) { font-size: 16px; animation-delay: 0.7s; }
#alijm-ai-chatbot-toggle.is-sleeping .alijm-ai-sleep span:nth-child(3) { font-size: 20px; animation-delay: 1.4s; }

@keyframes alijm-zzz {
    0%   { opacity: 0; transform: translate(0, 0)      scale(0.5); }
    30%  { opacity: 1; }
    100% { opacity: 0; transform: translate(15px, -25px) scale(1.2); }
}

/* ==========================================================================
   🎯 حالت شگفت‌زده (Excited)
   ========================================================================== */
#alijm-ai-chatbot-toggle.is-excited .alijm-ai-robot {
    animation: alijm-excited 0.3s ease-in-out 3;
}

@keyframes alijm-excited {
    0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
    25%      { transform: translateY(-10px) rotate(-5deg) scale(1.1); }
    75%      { transform: translateY(-10px) rotate(5deg) scale(1.1); }
}

#alijm-ai-chatbot-toggle.is-excited .alijm-ai-mouth {
    height: 14px;
    width: 22px;
    border-radius: 50%;
    border: 2px solid #fff;
}

/* ==========================================================================
   👀 حالت بیدار شدن
   ========================================================================== */
#alijm-ai-chatbot-toggle.is-waking .alijm-ai-eye {
    animation: alijm-wake-up 0.6s ease-out;
}

@keyframes alijm-wake-up {
    0%   { transform: scaleY(0.1); }
    50%  { transform: scaleY(1.3); }
    100% { transform: scaleY(1); }
}

/* ==========================================================================
   📱 حالت اسکرول - کاراکتر ۵۰٪ کوچک، چشم‌ها ثابت
   ========================================================================== */
#alijm-ai-chatbot-toggle.is-scrolling .alijm-ai-robot {
    transform: scale(0.5);
    transform-origin: bottom center;
    animation-play-state: paused;
}

/* 👁️ چشم‌ها جبران کوچک‌شدن ربات میکنن (1/0.5 = 2) */
#alijm-ai-chatbot-toggle.is-scrolling .alijm-ai-eye {
    animation: alijm-blink-scroll 4s infinite;
    z-index: 10;
}

@keyframes alijm-blink-scroll {
    0%, 45%, 50%, 100% { transform: scale(2); }
    47%                { transform: scale(2, 0.2); }
}

/* حین اسکرول، آنتن هم آروم بگیره */
#alijm-ai-chatbot-toggle.is-scrolling .alijm-ai-antenna-ball {
    animation-duration: 3s;
    opacity: 0.7;
}

/* ==========================================================================
   🎭 حالت پنجره باز - کاراکتر پشت پنجره چت
   ========================================================================== */
#alijm-ai-chatbot.is-window-open #alijm-ai-chatbot-toggle {
    z-index: 1;
}

#alijm-ai-chatbot.is-window-open #alijm-ai-chatbot-window {
    z-index: 10;
}

#alijm-ai-chatbot.is-window-open #alijm-ai-chatbot-toggle .alijm-ai-robot {
    animation-duration: 4s;
    opacity: 0.85;
}

/* ==========================================================================
   📱 واکنش‌گرا (Responsive)
   ========================================================================== */
@media (max-width: 600px) {
    #alijm-ai-chatbot-toggle {
        width: 75px;
        height: 85px;
    }
}




/* ==========================================================================
   💋 افکت بوس - لب‌ها غنچه می‌شن و بوس به شیشه می‌چسبه
   ========================================================================== */

/* حالت غنچه شدن لب‌ها (قبل از فرستادن بوس) */
#alijm-ai-chatbot-toggle.is-kissing .alijm-ai-mouth {
    animation: alijm-kiss-mouth 2.5s ease-in-out;
}

@keyframes alijm-kiss-mouth {
    0%, 100% {
        width: 20px;
        height: 8px;
        border-radius: 0 0 20px 20px;
        border: 2px solid #fff;
        border-top: none;
        background: transparent;
    }
    20%, 60% {
        width: 14px;
        height: 14px;
        border-radius: 50%;
        border: 3px solid #ff3b6b;
        background: #ff3b6b;
        box-shadow: 0 0 15px #ff3b6b, 0 0 30px rgba(255, 59, 107, 0.6);
    }
    30% {
        width: 18px;
        height: 18px;
        border-radius: 50%;
        border: 3px solid #ff3b6b;
        background: #ff3b6b;
        transform: translateX(-50%) scale(1.2);
    }
}

/* چشم‌ها موقع بوس، حالت عاشقانه (بسته شبیه به قوس) */
#alijm-ai-chatbot-toggle.is-kissing .alijm-ai-eye {
    animation: alijm-kiss-eyes 2.5s ease-in-out;
}

@keyframes alijm-kiss-eyes {
    0%, 100% { transform: scaleY(1); }
    20%, 60% { transform: scaleY(0.3); }
}

#alijm-ai-chatbot-toggle.is-kissing .alijm-ai-pupil {
    animation: alijm-kiss-pupil 2.5s ease-in-out;
}

@keyframes alijm-kiss-pupil {
    0%, 100% { opacity: 1; }
    20%, 60% { opacity: 0; }
}

/* حرکت کوچیک به جلو موقع بوس دادن */
#alijm-ai-chatbot-toggle.is-kissing .alijm-ai-robot {
    animation: alijm-kiss-lean 2.5s ease-in-out;
}

@keyframes alijm-kiss-lean {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25%      { transform: translateY(-5px) rotate(-3deg) scale(1.05); }
    40%      { transform: translateY(-10px) rotate(0deg) scale(1.1); }
    55%      { transform: translateY(-5px) rotate(3deg) scale(1.05); }
}

/* ==========================================================================
   💋 خود بوس (ایموجی لب که به شیشه می‌چسبه)
   ========================================================================== */
#alijm-ai-chatbot-toggle .alijm-ai-kiss-mark {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    pointer-events: none;
    z-index: 15;
    opacity: 0;
    filter: drop-shadow(0 4px 15px rgba(255, 59, 107, 0.5));
}

#alijm-ai-chatbot-toggle .alijm-ai-kiss-emoji {
    font-size: 55px;
    line-height: 1;
    transform-origin: center center;
    transform: rotate(-15deg);
    text-shadow: 0 0 20px rgba(255, 59, 107, 0.8);
}

/* انیمیشن پرتاب و چسبیدن بوس */
#alijm-ai-chatbot-toggle.is-kissing .alijm-ai-kiss-mark {
    animation: alijm-kiss-fly 5s ease-out forwards;
}

@keyframes alijm-kiss-fly {
    /* شروع: از دهن ربات */
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.2) rotate(0deg);
        top: 45%;
    }
    /* پرتاب: بیرون میاد و بزرگ میشه */
    10% {
        opacity: 1;
        transform: translate(-50%, -70%) scale(0.6) rotate(-10deg);
        top: 30%;
    }
    /* اوج: خیلی بزرگ میشه و می‌چسبه به شیشه */
    25% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.5) rotate(-15deg);
        top: 25%;
    }
    /* چسبیده به شیشه (ثابت می‌مونه) */
    30%, 65% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.3) rotate(-15deg);
        top: 25%;
    }
    /* شروع محو شدن */
    80% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.4) rotate(-12deg);
        top: 25%;
    }
    /* محو کامل */
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.6) rotate(-10deg);
        top: 20%;
    }
}

/* ==========================================================================
   💕 قلب‌های اطراف بوس
   ========================================================================== */
#alijm-ai-chatbot-toggle .alijm-ai-kiss-hearts {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#alijm-ai-chatbot-toggle .alijm-ai-kiss-hearts span {
    position: absolute;
    top: 50%;
    left: 50%;
    font-size: 18px;
    opacity: 0;
    color: #ff3b6b;
    text-shadow: 0 0 10px rgba(255, 59, 107, 0.6);
}

#alijm-ai-chatbot-toggle.is-kissing .alijm-ai-kiss-hearts span {
    animation: alijm-heart-float 3s ease-out;
    animation-delay: 1s;
}

#alijm-ai-chatbot-toggle.is-kissing .alijm-ai-kiss-hearts span:nth-child(1) {
    animation-delay: 1.2s;
    --heart-x: -30px;
    --heart-y: -35px;
}
#alijm-ai-chatbot-toggle.is-kissing .alijm-ai-kiss-hearts span:nth-child(2) {
    animation-delay: 1.5s;
    --heart-x: 35px;
    --heart-y: -30px;
}
#alijm-ai-chatbot-toggle.is-kissing .alijm-ai-kiss-hearts span:nth-child(3) {
    animation-delay: 1.8s;
    --heart-x: -20px;
    --heart-y: -45px;
}

@keyframes alijm-heart-float {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3);
    }
    30% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(
            calc(-50% + var(--heart-x, 30px)), 
            calc(-50% + var(--heart-y, -30px))
        ) scale(1.5);
    }
}

/* ==========================================================================
   😍 گلوله آنتن قرمز‌تر و پرشورتر موقع بوس
   ========================================================================== */
#alijm-ai-chatbot-toggle.is-kissing .alijm-ai-antenna-ball {
    animation: alijm-antenna-kiss 2.5s ease-in-out;
}

@keyframes alijm-antenna-kiss {
    0%, 100% {
        transform: scale(1);
        background: radial-gradient(circle at 30% 30%, #ff3b6b, #c81d4e);
    }
    20%, 60% {
        transform: scale(1.5);
        background: radial-gradient(circle at 30% 30%, #ff69b4, #ff1493);
        box-shadow: 0 0 20px #ff1493, 0 0 40px rgba(255, 20, 147, 0.8);
    }
}