/* ==========================================================================
   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: 65px;
    line-height: 1;
    transform-origin: center center;
    transform: rotate(5deg);
    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);
    }
}



/* ==========================================================================
   🎬 حالت ورود اولیه - از پایین بالا میاد (بعد از لود صفحه)
   ========================================================================== */
#alijm-ai-chatbot-toggle.is-entering .alijm-ai-robot {
    animation: alijm-enter-from-bottom 2.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes alijm-enter-from-bottom {
    0% {
        transform: translateY(200px) scale(0.3) rotate(-15deg);
        opacity: 0;
    }
    50% {
        transform: translateY(50px) scale(0.7) rotate(-5deg);
        opacity: 0.6;
    }
    80% {
        transform: translateY(-10px) scale(1.05) rotate(2deg);
        opacity: 1;
    }
    100% {
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* آنتن و ذرات موقع ورود، آروم روشن می‌شن */
#alijm-ai-chatbot-toggle.is-entering .alijm-ai-antenna-ball {
    animation: alijm-antenna-fade-in 2.5s ease-out;
}
@keyframes alijm-antenna-fade-in {
    0%, 60% { opacity: 0; }
    100%    { opacity: 1; }
}

#alijm-ai-chatbot-toggle.is-entering .alijm-ai-particles {
    animation: alijm-particles-fade-in 3s ease-out;
}
@keyframes alijm-particles-fade-in {
    0%, 50% { opacity: 0; }
    100%    { opacity: 1; }
}

/* ==========================================================================
   💋 بوس - نیمه شفاف (بروز شده)
   ========================================================================== */
#alijm-ai-chatbot-toggle .alijm-ai-kiss-emoji {
    opacity: 1;  /* 👈 شفافیت اضافه شد */
    mix-blend-mode: multiply;
    filter: drop-shadow(0 2px 8px rgba(255, 59, 107, 0.6));
}

/* ==========================================================================
   😢 حالت گریه
   ========================================================================== */

/* لرزش خفیف بدن موقع گریه */
#alijm-ai-chatbot-toggle.is-crying .alijm-ai-robot {
    animation: alijm-cry-shake 0.3s ease-in-out infinite;
}

@keyframes alijm-cry-shake {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25%      { transform: translateY(-1px) rotate(-1deg); }
    50%      { transform: translateY(2px) rotate(0deg); }
    75%      { transform: translateY(-1px) rotate(1deg); }
}

/* چشم‌ها موقع گریه بزرگ و غمگین */
#alijm-ai-chatbot-toggle.is-crying .alijm-ai-eye {
    animation: alijm-cry-eyes 1s ease-in-out infinite;
    transform-origin: bottom center;
}

@keyframes alijm-cry-eyes {
    0%, 100% { transform: scaleY(0.7); }
    50%      { transform: scaleY(0.6); }
}

/* مردمک‌ها کوچک و پایین موقع گریه */
#alijm-ai-chatbot-toggle.is-crying .alijm-ai-pupil {
    animation: none;
    transform: translate(-50%, -20%) scale(0.7);
    background: radial-gradient(circle at 30% 30%, #4a90e2, #2c5f9e);
}

/* دهن غمگین */
#alijm-ai-chatbot-toggle.is-crying .alijm-ai-mouth {
    animation: alijm-cry-mouth 1.5s ease-in-out infinite;
    top: auto;
    bottom: 6px;
    border-radius: 20px 20px 0 0;
    border: 2px solid #fff;
    border-bottom: none;
    height: 8px;
    width: 18px;
}

@keyframes alijm-cry-mouth {
    0%, 100% { width: 18px; height: 8px; }
    50%      { width: 22px; height: 10px; }
}

/* اشک‌ها */
#alijm-ai-chatbot-toggle .alijm-ai-tears {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    z-index: 8;
}

#alijm-ai-chatbot-toggle .alijm-ai-tear {
    position: absolute;
    top: 0;
    width: 6px;
    height: 10px;
    background: linear-gradient(to bottom, rgba(100, 200, 255, 0.9), rgba(50, 150, 255, 0.7));
    border-radius: 50% 50% 40% 40% / 60% 60% 40% 40%;
    box-shadow: 0 0 6px rgba(100, 200, 255, 0.8), inset -1px 0 2px rgba(255,255,255,0.6);
}

#alijm-ai-chatbot-toggle .alijm-ai-tear.left  { left: 25%; }
#alijm-ai-chatbot-toggle .alijm-ai-tear.right { right: 25%; }

#alijm-ai-chatbot-toggle.is-crying .alijm-ai-tears {
    opacity: 1;
}

#alijm-ai-chatbot-toggle.is-crying .alijm-ai-tear {
    animation: alijm-tear-drop 1.2s ease-in infinite;
}

#alijm-ai-chatbot-toggle.is-crying .alijm-ai-tear.right {
    animation-delay: 0.3s;
}

@keyframes alijm-tear-drop {
    0% {
        transform: translateY(0) scale(0.3);
        opacity: 0;
    }
    20% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        transform: translateY(45px) scale(1.2);
        opacity: 0;
    }
}

/* آنتن آویزون موقع گریه */
#alijm-ai-chatbot-toggle.is-crying .alijm-ai-antenna {
    animation: alijm-cry-antenna 1.5s ease-in-out infinite;
    transform-origin: bottom center;
}

@keyframes alijm-cry-antenna {
    0%, 100% { transform: translateX(-50%) rotate(-15deg); }
    50%      { transform: translateX(-50%) rotate(-20deg); }
}

/* گلوله آنتن آبی و غمگین موقع گریه */
#alijm-ai-chatbot-toggle.is-crying .alijm-ai-antenna-ball {
    animation: none;
    background: radial-gradient(circle at 30% 30%, #4a90e2, #2c5f9e);
    box-shadow: 0 0 8px rgba(74, 144, 226, 0.5);
    opacity: 0.8;
}

/* ==========================================================================
   😡 حالت عصبانیت
   ========================================================================== */

/* لرزش شدید و سریع موقع عصبانیت */
#alijm-ai-chatbot-toggle.is-angry .alijm-ai-robot {
    animation: alijm-angry-shake 0.1s linear infinite;
}

@keyframes alijm-angry-shake {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    20%      { transform: translate(-3px, 1px) rotate(-2deg); }
    40%      { transform: translate(3px, -1px) rotate(2deg); }
    60%      { transform: translate(-2px, 2px) rotate(-1deg); }
    80%      { transform: translate(2px, 1px) rotate(1deg); }
}

/* سر قرمز و برافروخته */
#alijm-ai-chatbot-toggle.is-angry .alijm-ai-head {
    background: linear-gradient(145deg, #ff4444 0%, #cc0000 100%);
    animation: alijm-angry-head 0.5s ease-in-out infinite;
}

@keyframes alijm-angry-head {
    0%, 100% {
        box-shadow:
            inset -5px -5px 15px rgba(0,0,0,0.15),
            inset 5px 5px 15px rgba(255,255,255,0.3),
            0 0 30px rgba(255, 68, 68, 0.6);
    }
    50% {
        box-shadow:
            inset -5px -5px 15px rgba(0,0,0,0.2),
            inset 5px 5px 15px rgba(255,255,255,0.4),
            0 0 50px rgba(255, 0, 0, 0.9);
    }
}

/* چشم‌های عصبانی - قرمز و درخشان */
#alijm-ai-chatbot-toggle.is-angry .alijm-ai-eye {
    background: #ffeb3b;
    animation: alijm-angry-eyes 0.4s ease-in-out infinite;
    box-shadow: 0 0 8px #ff0000, inset 0 0 4px rgba(255,0,0,0.3);
}

@keyframes alijm-angry-eyes {
    0%, 100% { transform: scaleY(0.6); }
    50%      { transform: scaleY(0.8); }
}

/* مردمک قرمز */
#alijm-ai-chatbot-toggle.is-angry .alijm-ai-pupil {
    animation: none;
    background: radial-gradient(circle at 30% 30%, #ff0000, #8b0000);
    box-shadow: 0 0 4px #ff0000;
}

/* ابروهای عصبانی (V شکل) */
#alijm-ai-chatbot-toggle .alijm-ai-brows {
    position: absolute;
    top: -2px;
    left: 0;
    width: 100%;
    height: 20px;
    display: flex;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    z-index: 3;
    pointer-events: none;
}

#alijm-ai-chatbot-toggle .alijm-ai-brow {
    width: 20px;
    height: 5px;
    background: #333;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

#alijm-ai-chatbot-toggle.is-angry .alijm-ai-brows {
    opacity: 1;
    top: 12px;
}

#alijm-ai-chatbot-toggle.is-angry .alijm-ai-brow.left {
    transform: rotate(20deg);
}
#alijm-ai-chatbot-toggle.is-angry .alijm-ai-brow.right {
    transform: rotate(-20deg);
}

/* دهن دادِ عصبانی */
#alijm-ai-chatbot-toggle.is-angry .alijm-ai-mouth {
    animation: alijm-angry-mouth 0.25s ease-in-out infinite;
    background: #000;
    border: 2px solid #fff;
    border-radius: 20px 20px 8px 8px;
}

@keyframes alijm-angry-mouth {
    0%, 100% { width: 24px; height: 12px; }
    50%      { width: 28px; height: 16px; }
}

/* آنتن سیخ ایستاده موقع عصبانیت */
#alijm-ai-chatbot-toggle.is-angry .alijm-ai-antenna {
    animation: alijm-angry-antenna 0.2s ease-in-out infinite;
    transform-origin: bottom center;
}

@keyframes alijm-angry-antenna {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    25%      { transform: translateX(-50%) rotate(-8deg); }
    75%      { transform: translateX(-50%) rotate(8deg); }
}

/* گلوله آنتن قرمز و بزرگ موقع عصبانیت */
#alijm-ai-chatbot-toggle.is-angry .alijm-ai-antenna-ball {
    animation: alijm-angry-ball 0.3s ease-in-out infinite;
    background: radial-gradient(circle at 30% 30%, #ff0000, #8b0000);
    box-shadow: 0 0 15px #ff0000, 0 0 30px rgba(255, 0, 0, 0.7);
}

@keyframes alijm-angry-ball {
    0%, 100% { transform: scale(1.3); }
    50%      { transform: scale(1.6); }
}

/* بخار سر (steam) موقع عصبانیت */
#alijm-ai-chatbot-toggle.is-angry .alijm-ai-particles span {
    background: rgba(200, 200, 200, 0.9);
    box-shadow: 0 0 4px rgba(200, 200, 200, 0.6);
}

/* ==========================================================================
   💢 نمادهای فحش (#@!*)
   ========================================================================== */
#alijm-ai-chatbot-toggle .alijm-ai-swear {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 60px;
    pointer-events: none;
    z-index: 20;
    opacity: 0;
}

#alijm-ai-chatbot-toggle .alijm-ai-swear span {
    position: absolute;
    font-family: 'Comic Sans MS', 'Arial Black', sans-serif;
    font-weight: 900;
    font-size: 24px;
    opacity: 0;
    text-shadow: 2px 2px 0 #fff, -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff;
    animation: alijm-swear-pop 1.5s ease-out infinite;
}

#alijm-ai-chatbot-toggle .alijm-ai-swear span:nth-child(1) {
    top: 30%;
    left: 10%;
    color: #ff0000;
    animation-delay: 0s;
}
#alijm-ai-chatbot-toggle .alijm-ai-swear span:nth-child(2) {
    top: 15%;
    left: 40%;
    color: #ff9800;
    animation-delay: 0.2s;
}
#alijm-ai-chatbot-toggle .alijm-ai-swear span:nth-child(3) {
    top: 5%;
    left: 65%;
    color: #ff0000;
    animation-delay: 0.4s;
    font-size: 30px;
}
#alijm-ai-chatbot-toggle .alijm-ai-swear span:nth-child(4) {
    top: 40%;
    left: 75%;
    color: #ff4444;
    animation-delay: 0.6s;
}
#alijm-ai-chatbot-toggle .alijm-ai-swear span:nth-child(5) {
    top: 55%;
    left: 25%;
    color: #cc0000;
    animation-delay: 0.8s;
}
#alijm-ai-chatbot-toggle .alijm-ai-swear span:nth-child(6) {
    top: 25%;
    left: 55%;
    color: #ff6600;
    animation-delay: 1s;
}

#alijm-ai-chatbot-toggle.is-angry .alijm-ai-swear {
    opacity: 1;
}

@keyframes alijm-swear-pop {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.3) rotate(-15deg);
    }
    20% {
        opacity: 1;
        transform: translateY(0) scale(1.3) rotate(0deg);
    }
    40% {
        opacity: 1;
        transform: translateY(-5px) scale(1) rotate(10deg);
    }
    60% {
        opacity: 1;
        transform: translateY(-10px) scale(1.1) rotate(-5deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-25px) scale(0.5) rotate(15deg);
    }
}

/* ==========================================================================
   😐 پنهان کردن اشک‌ها و ابروها و فحش در حالت‌های عادی
   ========================================================================== */
#alijm-ai-chatbot-toggle:not(.is-crying) .alijm-ai-tears {
    opacity: 0;
}

#alijm-ai-chatbot-toggle:not(.is-angry) .alijm-ai-brows {
    opacity: 0;
}

#alijm-ai-chatbot-toggle:not(.is-angry) .alijm-ai-swear {
    opacity: 0;
}



/* ==========================================================================
   🎬 اصلاح ورود اولیه - کاراکتر ابتدا کاملاً مخفی
   ========================================================================== */

/* 🚫 حالت اولیه: کاراکتر کاملاً مخفی تا انیمیشن ورود شروع بشه */
#alijm-ai-chatbot-toggle .alijm-ai-robot {
    opacity: 0;
    transform: translateY(200px);
}

/* وقتی کلاس is-entering داره → انیمیشن ورود */
#alijm-ai-chatbot-toggle.is-entering .alijm-ai-robot {
    animation: alijm-enter-from-bottom 2.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* بعد از entering، کلاس has-entered می‌گیره و حالت عادی داره */
#alijm-ai-chatbot-toggle.has-entered .alijm-ai-robot {
    opacity: 1;
    transform: translateY(0);
    animation: alijm-float 3s ease-in-out infinite;
}

/* بازنویسی کیفریم ورود برای اطمینان از شروع کاملاً مخفی */
@keyframes alijm-enter-from-bottom {
    0% {
        transform: translateY(200px) scale(0.3) rotate(-15deg);
        opacity: 0;
    }
    30% {
        opacity: 0.4;
    }
    50% {
        transform: translateY(50px) scale(0.7) rotate(-5deg);
        opacity: 0.7;
    }
    80% {
        transform: translateY(-10px) scale(1.05) rotate(2deg);
        opacity: 1;
    }
    100% {
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* ==========================================================================
   📏 کوچک‌تر کردن ۲۰٪ - از 90x100 به 72x80
   ========================================================================== */
#alijm-ai-chatbot-toggle {
    width: 72px !important;
    height: 80px !important;
}

@media (max-width: 600px) {
    #alijm-ai-chatbot-toggle {
        width: 60px !important;
        height: 68px !important;
    }
}

/* تنظیم اندازه سر متناسب با ابعاد جدید */
#alijm-ai-chatbot-toggle .alijm-ai-head {
    width: 56px;
    height: 48px;
    top: 16px;
}

/* تنظیم چشم‌ها */
#alijm-ai-chatbot-toggle .alijm-ai-eye {
    width: 15px;
    height: 15px;
}

#alijm-ai-chatbot-toggle .alijm-ai-pupil {
    width: 8px;
    height: 8px;
}

/* تنظیم گوش‌ها */
#alijm-ai-chatbot-toggle .alijm-ai-ear {
    top: 16px;
    height: 16px;
}

/* تنظیم دهن */
#alijm-ai-chatbot-toggle .alijm-ai-mouth {
    width: 16px;
    height: 6px;
    bottom: 8px;
}

/* تنظیم سایه */
#alijm-ai-chatbot-toggle .alijm-ai-shadow {
    width: 48px;
}

/* تنظیم فاصله چشم‌ها */
#alijm-ai-chatbot-toggle .alijm-ai-face {
    gap: 8px;
    padding-top: 6px;
}

/* ==========================================================================
   🎨 رنگ خاکستری - جایگزین رنگ‌های آبی
   ========================================================================== */

/* سر خاکستری */
#alijm-ai-chatbot-toggle .alijm-ai-head {
    background: linear-gradient(145deg, #9e9e9e 0%, #757575 100%) !important;
    box-shadow:
        inset -5px -5px 15px rgba(0,0,0,0.2),
        inset 5px 5px 15px rgba(255,255,255,0.3),
        0 10px 25px rgba(120, 120, 120, 0.4),
        0 0 30px rgba(158, 158, 158, 0.3) !important;
}

/* بازنویسی انیمیشن glow با رنگ خاکستری */
#alijm-ai-chatbot-toggle:not(.is-angry):not(.is-crying) .alijm-ai-head {
    animation: alijm-glow-gray 2s ease-in-out infinite alternate;
}

@keyframes alijm-glow-gray {
    from {
        box-shadow:
            inset -5px -5px 15px rgba(0,0,0,0.2),
            inset 5px 5px 15px rgba(255,255,255,0.3),
            0 10px 25px rgba(120, 120, 120, 0.4),
            0 0 30px rgba(158, 158, 158, 0.3);
    }
    to {
        box-shadow:
            inset -5px -5px 15px rgba(0,0,0,0.2),
            inset 5px 5px 15px rgba(255,255,255,0.3),
            0 10px 30px rgba(120, 120, 120, 0.6),
            0 0 50px rgba(158, 158, 158, 0.5);
    }
}

/* گوش‌ها خاکستری تیره‌تر */
#alijm-ai-chatbot-toggle .alijm-ai-ear {
    background: linear-gradient(145deg, #616161, #424242) !important;
}

/* آنتن خاکستری */
#alijm-ai-chatbot-toggle .alijm-ai-antenna-line {
    background: linear-gradient(to bottom, #9e9e9e, #616161) !important;
}

/* گلوله آنتن نارنجی (تنها رنگ برای جلب توجه) */
#alijm-ai-chatbot-toggle:not(.is-angry):not(.is-crying):not(.is-sleeping) .alijm-ai-antenna-ball {
    background: radial-gradient(circle at 30% 30%, #ff9800, #e65100) !important;
    box-shadow: 0 0 8px #ff9800, 0 0 15px rgba(255, 152, 0, 0.5) !important;
}

/* موج سیگنال نارنجی */
#alijm-ai-chatbot-toggle:not(.is-angry) .alijm-ai-signal {
    border-color: #ff9800 !important;
}

/* ذرات نورانی سفید/خاکستری روشن */
#alijm-ai-chatbot-toggle .alijm-ai-particles span {
    background: #e0e0e0 !important;
    box-shadow: 0 0 6px #e0e0e0 !important;
}

/* حالت فعال (پنجره باز) */
#alijm-ai-chatbot-toggle.active .alijm-ai-head {
    background: linear-gradient(145deg, #757575 0%, #9e9e9e 100%) !important;
}

/* ==========================================================================
   😢 گریه طبیعی و بهبود یافته
   ========================================================================== */

/* لرزش نرم‌تر و طبیعی‌تر */
#alijm-ai-chatbot-toggle.is-crying .alijm-ai-robot {
    animation: alijm-cry-shake 0.8s ease-in-out infinite !important;
}

@keyframes alijm-cry-shake {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25%      { transform: translateY(1px) rotate(-1.5deg); }
    50%      { transform: translateY(-1px) rotate(0deg); }
    75%      { transform: translateY(1px) rotate(1.5deg); }
}

/* چشم‌های گریه: بسته و قوس رو به بالا (نه پایین) */
#alijm-ai-chatbot-toggle.is-crying .alijm-ai-eye {
    animation: none !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;
    position: relative;
}

/* چشم بسته: خط قوس مانند (^) */
#alijm-ai-chatbot-toggle.is-crying .alijm-ai-eye::before {
    content: '';
    position: absolute;
    top: 40%;
    left: 0;
    width: 100%;
    height: 8px;
    border-top: 2.5px solid #fff;
    border-radius: 100% 100% 0 0 / 100% 100% 0 0;
    animation: alijm-cry-blink 2s ease-in-out infinite;
}

@keyframes alijm-cry-blink {
    0%, 100% { transform: scaleY(1); }
    50%      { transform: scaleY(0.7); }
}

/* مخفی کردن مردمک موقع گریه */
#alijm-ai-chatbot-toggle.is-crying .alijm-ai-pupil {
    opacity: 0 !important;
    animation: none !important;
}

/* دهن گریه: قوس رو به پایین (☹) - طبیعی‌تر */
#alijm-ai-chatbot-toggle.is-crying .alijm-ai-mouth {
    animation: alijm-cry-mouth-natural 2s ease-in-out infinite !important;
    background: transparent !important;
    border: 2.5px solid #fff !important;
    border-bottom: none !important;
    border-radius: 100% 100% 0 0 / 100% 100% 0 0 !important;
    width: 16px !important;
    height: 8px !important;
    bottom: 10px !important;
    top: auto !important;
}

@keyframes alijm-cry-mouth-natural {
    0%, 100% {
        width: 14px;
        height: 7px;
    }
    50% {
        width: 18px;
        height: 10px;
    }
}

/* ==========================================================================
   😔 ابروهای گریه (ناراحتی) - شکل \‾/  با انحنا رو به داخل بالا
   ========================================================================== */
#alijm-ai-chatbot-toggle.is-crying .alijm-ai-brows {
    opacity: 1 !important;
    top: 6px !important;
    z-index: 5;
}

#alijm-ai-chatbot-toggle.is-crying .alijm-ai-brow {
    background: #424242 !important;
    width: 14px !important;
    height: 3px !important;
    border-radius: 3px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3) !important;
}

/* ابروی چپ: بالا میره از داخل (\) - علامت غم */
#alijm-ai-chatbot-toggle.is-crying .alijm-ai-brow.left {
    transform: rotate(-25deg) translateY(-1px) !important;
    animation: alijm-cry-brow-left 2s ease-in-out infinite;
}

/* ابروی راست: بالا میره از داخل (/) - علامت غم */
#alijm-ai-chatbot-toggle.is-crying .alijm-ai-brow.right {
    transform: rotate(25deg) translateY(-1px) !important;
    animation: alijm-cry-brow-right 2s ease-in-out infinite;
}

@keyframes alijm-cry-brow-left {
    0%, 100% { transform: rotate(-25deg) translateY(-1px); }
    50%      { transform: rotate(-30deg) translateY(-2px); }
}

@keyframes alijm-cry-brow-right {
    0%, 100% { transform: rotate(25deg) translateY(-1px); }
    50%      { transform: rotate(30deg) translateY(-2px); }
}

/* ==========================================================================
   💧 اشک‌های اصلاح شده - از پایین چشم‌ها بریزه
   ========================================================================== */
#alijm-ai-chatbot-toggle .alijm-ai-tears {
    top: 35% !important;
    z-index: 4;
}

#alijm-ai-chatbot-toggle .alijm-ai-tear {
    width: 5px !important;
    height: 8px !important;
    background: linear-gradient(to bottom, rgba(150, 220, 255, 0.95), rgba(70, 170, 255, 0.8)) !important;
    box-shadow: 0 0 4px rgba(120, 200, 255, 0.9), inset -1px 0 2px rgba(255,255,255,0.8) !important;
}

#alijm-ai-chatbot-toggle .alijm-ai-tear.left  { left: 22% !important; }
#alijm-ai-chatbot-toggle .alijm-ai-tear.right { right: 22% !important; }

#alijm-ai-chatbot-toggle.is-crying .alijm-ai-tear {
    animation: alijm-tear-drop-natural 1.8s ease-in infinite !important;
}

#alijm-ai-chatbot-toggle.is-crying .alijm-ai-tear.right {
    animation-delay: 0.6s !important;
}

@keyframes alijm-tear-drop-natural {
    0% {
        transform: translateY(0) scaleY(0.3);
        opacity: 0;
    }
    15% {
        opacity: 1;
        transform: translateY(0) scaleY(1);
    }
    50% {
        transform: translateY(20px) scaleY(1.3);
        opacity: 1;
    }
    100% {
        transform: translateY(50px) scaleY(1.5);
        opacity: 0;
    }
}

/* آنتن آویزون طبیعی موقع گریه */
#alijm-ai-chatbot-toggle.is-crying .alijm-ai-antenna {
    animation: alijm-cry-antenna-natural 2.5s ease-in-out infinite !important;
    transform-origin: bottom center;
}

@keyframes alijm-cry-antenna-natural {
    0%, 100% { transform: translateX(-50%) rotate(-18deg); }
    50%      { transform: translateX(-50%) rotate(-22deg); }
}

/* گلوله آنتن آبی و کوچک موقع گریه */
#alijm-ai-chatbot-toggle.is-crying .alijm-ai-antenna-ball {
    animation: none !important;
    background: radial-gradient(circle at 30% 30%, #64b5f6, #1976d2) !important;
    box-shadow: 0 0 6px rgba(100, 181, 246, 0.5) !important;
    opacity: 0.8;
    transform: scale(0.9);
}

/* ==========================================================================
   😡 ابروهای عصبانیت - اصلاح شده (V شکل کاملاً واضح)
   ========================================================================== */
#alijm-ai-chatbot-toggle.is-angry .alijm-ai-brows {
    opacity: 1 !important;
    top: 8px !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    display: flex !important;
    justify-content: center !important;
    gap: 6px !important;
    z-index: 6;
}

#alijm-ai-chatbot-toggle.is-angry .alijm-ai-brow {
    background: #1a1a1a !important;
    width: 16px !important;
    height: 4px !important;
    border-radius: 3px !important;
    box-shadow: 0 2px 3px rgba(0,0,0,0.6) !important;
}

/* ابروی چپ عصبانی: از بالا-چپ به پایین-وسط (\) */
#alijm-ai-chatbot-toggle.is-angry .alijm-ai-brow.left {
    transform: rotate(25deg) translateY(2px) !important;
    animation: alijm-angry-brow-shake-left 0.15s linear infinite;
}

/* ابروی راست عصبانی: از بالا-راست به پایین-وسط (/) */
#alijm-ai-chatbot-toggle.is-angry .alijm-ai-brow.right {
    transform: rotate(-25deg) translateY(2px) !important;
    animation: alijm-angry-brow-shake-right 0.15s linear infinite;
}

@keyframes alijm-angry-brow-shake-left {
    0%, 100% { transform: rotate(25deg) translateY(2px); }
    50%      { transform: rotate(28deg) translateY(3px); }
}

@keyframes alijm-angry-brow-shake-right {
    0%, 100% { transform: rotate(-25deg) translateY(2px); }
    50%      { transform: rotate(-28deg) translateY(3px); }
}

/* ==========================================================================
   😴 حالت خواب - رنگ‌ها هماهنگ با خاکستری
   ========================================================================== */
#alijm-ai-chatbot-toggle.is-sleeping .alijm-ai-antenna-ball {
    background: #616161 !important;
    box-shadow: none !important;
}

/* Zzz خاکستری */
#alijm-ai-chatbot-toggle.is-sleeping .alijm-ai-sleep span {
    color: #757575 !important;
}



/* ==========================================================================
   😢 گریه اصلاح شده - چشم‌ها کامل باز، اشک از زیر چشم
   ========================================================================== */

/* ✅ چشم‌ها کاملاً باز و طبیعی (بدون قوس بسته) */
#alijm-ai-chatbot-toggle.is-crying .alijm-ai-eye {
    animation: alijm-cry-eye-open 3s ease-in-out infinite !important;
    background: #fff !important;
    border: none !important;
    border-radius: 50% !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2) !important;
    overflow: visible !important;
    position: relative;
    transform: scale(1) !important;
}

/* حذف قوس چشم بسته (لغو کامل حالت قبلی) */
#alijm-ai-chatbot-toggle.is-crying .alijm-ai-eye::before {
    display: none !important;
    content: none !important;
}

/* پلک زدن ملایم و بغض‌آلود */
@keyframes alijm-cry-eye-open {
    0%, 90%, 100% { transform: scaleY(1); }
    95%           { transform: scaleY(0.3); }
}

/* مردمک باز و غمگین */
#alijm-ai-chatbot-toggle.is-crying .alijm-ai-pupil {
    opacity: 1 !important;
    animation: alijm-cry-pupil-look 3s ease-in-out infinite !important;
    background: radial-gradient(circle at 30% 30%, #4a5568, #1a202c) !important;
    transform: translate(-50%, -20%) !important; /* نگاه رو به پایین (غمگین) */
}

@keyframes alijm-cry-pupil-look {
    0%, 100% { transform: translate(-50%, -20%); }
    50%      { transform: translate(-50%, -10%); }
}

/* برق اشک روی چشم */
#alijm-ai-chatbot-toggle.is-crying .alijm-ai-pupil::after {
    background: rgba(150, 220, 255, 0.9) !important;
    box-shadow: 0 0 3px rgba(150, 220, 255, 0.8);
}

/* ==========================================================================
   💧 اشک‌ها - از زیر چشم بریزن (نه از وسط)
   ========================================================================== */
#alijm-ai-chatbot-toggle .alijm-ai-tears {
    position: absolute !important;
    top: 45% !important;         /* دقیقاً زیر چشم‌ها */
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 100% !important;
    height: auto !important;
    pointer-events: none;
    opacity: 0;
    z-index: 4;
}

#alijm-ai-chatbot-toggle .alijm-ai-tear {
    position: absolute !important;
    top: 0 !important;
    width: 5px !important;
    height: 9px !important;
    background: linear-gradient(to bottom, 
        rgba(180, 230, 255, 0.95) 0%, 
        rgba(100, 190, 255, 0.9) 50%, 
        rgba(50, 150, 255, 0.85) 100%) !important;
    border-radius: 50% 50% 45% 45% / 60% 60% 40% 40% !important;
    box-shadow: 
        0 0 4px rgba(150, 220, 255, 0.9), 
        inset -1.5px 0 2px rgba(255,255,255,0.9),
        inset 1px 1px 1.5px rgba(255,255,255,0.7) !important;
}

/* موقعیت دقیق اشک‌ها - زیر هر چشم */
#alijm-ai-chatbot-toggle .alijm-ai-tear.left  { 
    left: 30% !important;
    right: auto !important;
}
#alijm-ai-chatbot-toggle .alijm-ai-tear.right { 
    right: 30% !important;
    left: auto !important;
}

#alijm-ai-chatbot-toggle.is-crying .alijm-ai-tears {
    opacity: 1;
}

#alijm-ai-chatbot-toggle.is-crying .alijm-ai-tear {
    animation: alijm-tear-fall 1.6s ease-in infinite !important;
}

#alijm-ai-chatbot-toggle.is-crying .alijm-ai-tear.right {
    animation-delay: 0.5s !important;
}

@keyframes alijm-tear-fall {
    0% {
        transform: translateY(0) scale(0.4);
        opacity: 0;
    }
    15% {
        opacity: 1;
        transform: translateY(2px) scale(1);
    }
    40% {
        transform: translateY(15px) scale(1.1);
        opacity: 1;
    }
    70% {
        transform: translateY(30px) scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: translateY(45px) scale(1.3);
        opacity: 0;
    }
}

/* ==========================================================================
   😡 عصبانیت اصلاح شده - جهت ابروها برعکس + رنگ طوسی-قرمز
   ========================================================================== */

/* 🎨 رنگ سر: طوسی متمایل به قرمز */
#alijm-ai-chatbot-toggle.is-angry .alijm-ai-head {
    background: linear-gradient(145deg, #a55a5a 0%, #7a3a3a 100%) !important;
    animation: alijm-angry-head-red-gray 0.5s ease-in-out infinite !important;
}

@keyframes alijm-angry-head-red-gray {
    0%, 100% {
        background: linear-gradient(145deg, #a55a5a 0%, #7a3a3a 100%);
        box-shadow:
            inset -5px -5px 15px rgba(0,0,0,0.25),
            inset 5px 5px 15px rgba(255,255,255,0.15),
            0 0 30px rgba(165, 90, 90, 0.6);
    }
    50% {
        background: linear-gradient(145deg, #b56060 0%, #8a3a3a 100%);
        box-shadow:
            inset -5px -5px 15px rgba(0,0,0,0.3),
            inset 5px 5px 15px rgba(255,255,255,0.2),
            0 0 50px rgba(180, 60, 60, 0.85);
    }
}

/* گوش‌ها هم طوسی متمایل به قرمز */
#alijm-ai-chatbot-toggle.is-angry .alijm-ai-ear {
    background: linear-gradient(145deg, #7a4040, #5a2828) !important;
}

/* ==========================================================================
   😠 ابروهای عصبانی - جهت برعکس (V وارونه یا فرم خشم واقعی)
   شکل: /‾\ (چپ بالا میره، راست بالا میره از بیرون)
   یعنی: چپ = مثبت 25، راست = منفی 25 برعکس بشه
   حالا: چپ = منفی 25 (پایین داخل)، راست = مثبت 25 (پایین داخل)
   ========================================================================== */

/* ابروی چپ عصبانی: (/) - بالا از بیرون، پایین از داخل */
#alijm-ai-chatbot-toggle.is-angry .alijm-ai-brow.left {
    transform: rotate(-25deg) translateY(2px) !important;
    animation: alijm-angry-brow-left-reversed 0.15s linear infinite !important;
}

/* ابروی راست عصبانی: (\) - بالا از بیرون، پایین از داخل */
#alijm-ai-chatbot-toggle.is-angry .alijm-ai-brow.right {
    transform: rotate(25deg) translateY(2px) !important;
    animation: alijm-angry-brow-right-reversed 0.15s linear infinite !important;
}

@keyframes alijm-angry-brow-left-reversed {
    0%, 100% { transform: rotate(-25deg) translateY(2px); }
    50%      { transform: rotate(-28deg) translateY(3px); }
}

@keyframes alijm-angry-brow-right-reversed {
    0%, 100% { transform: rotate(25deg) translateY(2px); }
    50%      { transform: rotate(28deg) translateY(3px); }
}

/* ==========================================================================
   😴 خواب اصلاح شده - رنگ روشن‌تر + Zهای متنوع
   ========================================================================== */

/* 🎨 رنگ روشن‌تر موقع خواب */
#alijm-ai-chatbot-toggle.is-sleeping .alijm-ai-head {
    background: linear-gradient(145deg, #d0d0d0 0%, #b0b0b0 100%) !important;
    animation: alijm-sleep-glow 3s ease-in-out infinite alternate !important;
    box-shadow:
        inset -5px -5px 15px rgba(0,0,0,0.1),
        inset 5px 5px 15px rgba(255,255,255,0.5),
        0 5px 20px rgba(200, 200, 200, 0.3) !important;
}

@keyframes alijm-sleep-glow {
    from {
        box-shadow:
            inset -5px -5px 15px rgba(0,0,0,0.1),
            inset 5px 5px 15px rgba(255,255,255,0.5),
            0 5px 20px rgba(200, 200, 200, 0.3);
    }
    to {
        box-shadow:
            inset -5px -5px 15px rgba(0,0,0,0.1),
            inset 5px 5px 15px rgba(255,255,255,0.6),
            0 5px 25px rgba(220, 220, 220, 0.5);
    }
}

/* گوش‌های روشن‌تر موقع خواب */
#alijm-ai-chatbot-toggle.is-sleeping .alijm-ai-ear {
    background: linear-gradient(145deg, #a0a0a0, #808080) !important;
}

/* ==========================================================================
   💤 Zهای خواب - اندازه‌های متنوع و بزرگ‌تر
   ========================================================================== */
#alijm-ai-chatbot-toggle .alijm-ai-sleep {
    position: absolute !important;
    top: -8px !important;
    right: -12px !important;
    width: 60px;
    height: 50px;
    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 {
    position: absolute !important;
    display: inline-block;
    color: #4a90e2 !important;
    text-shadow: 
        0 2px 5px rgba(0,0,0,0.15),
        1px 1px 0 #fff,
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff !important;
    opacity: 0;
    font-weight: 900;
}

/* Z اول - کوچک */
#alijm-ai-chatbot-toggle.is-sleeping .alijm-ai-sleep span:nth-child(1) {
    font-size: 14px !important;
    left: 0;
    top: 30px;
    animation: alijm-zzz-small 2.5s ease-in-out infinite !important;
    animation-delay: 0s !important;
}

/* Z دوم - متوسط */
#alijm-ai-chatbot-toggle.is-sleeping .alijm-ai-sleep span:nth-child(2) {
    font-size: 22px !important;
    left: 8px;
    top: 15px;
    animation: alijm-zzz-medium 2.5s ease-in-out infinite !important;
    animation-delay: 0.8s !important;
}

/* Z سوم - خیلی بزرگ */
#alijm-ai-chatbot-toggle.is-sleeping .alijm-ai-sleep span:nth-child(3) {
    font-size: 32px !important;
    left: 18px;
    top: 0;
    animation: alijm-zzz-large 2.5s ease-in-out infinite !important;
    animation-delay: 1.6s !important;
    color: #64b5f6 !important;
}

/* انیمیشن Z کوچک */
@keyframes alijm-zzz-small {
    0%   { opacity: 0; transform: translate(0, 0) scale(0.5) rotate(-10deg); }
    30%  { opacity: 1; transform: translate(5px, -5px) scale(1) rotate(0deg); }
    100% { opacity: 0; transform: translate(15px, -20px) scale(1.2) rotate(15deg); }
}

/* انیمیشن Z متوسط */
@keyframes alijm-zzz-medium {
    0%   { opacity: 0; transform: translate(0, 0) scale(0.5) rotate(-15deg); }
    30%  { opacity: 1; transform: translate(8px, -8px) scale(1.1) rotate(-5deg); }
    100% { opacity: 0; transform: translate(20px, -25px) scale(1.4) rotate(20deg); }
}

/* انیمیشن Z بزرگ (چشمگیرتر) */
@keyframes alijm-zzz-large {
    0%   { opacity: 0; transform: translate(0, 0) scale(0.6) rotate(-20deg); }
    30%  { opacity: 1; transform: translate(10px, -10px) scale(1.3) rotate(-8deg); }
    70%  { opacity: 1; transform: translate(20px, -22px) scale(1.5) rotate(10deg); }
    100% { opacity: 0; transform: translate(30px, -35px) scale(1.7) rotate(25deg); }
}



/* ==========================================================================
   📡 اصلاح موقعیت گلوله آنتن - در نوک بالاترین قسمت
   ========================================================================== */

/* تنظیم مجدد ساختار آنتن */
#alijm-ai-chatbot-toggle .alijm-ai-antenna {
    display: flex !important;
    flex-direction: column-reverse !important;  /* 🔄 معکوس: خط پایین، گلوله بالا */
    align-items: center !important;
    top: -10px !important;
}

/* میله آنتن (پایین) */
#alijm-ai-chatbot-toggle .alijm-ai-antenna-line {
    width: 2px !important;
    height: 14px !important;
    margin-top: 0 !important;
    margin-bottom: -1px !important;
    order: 2;  /* پایین قرار می‌گیره */
}

/* گلوله آنتن (بالا - نوک) */
#alijm-ai-chatbot-toggle .alijm-ai-antenna-ball {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    order: 1;  /* بالا قرار می‌گیره */
    position: relative;
    z-index: 2;
}

/* ==========================================================================
   😢 اصلاح جهت ابروی گریه - برعکس (فرم غم واقعی)
   ابرو داخل بالا، بیرون پایین → \‾/ به‌جای /‾\
   ========================================================================== */

/* ابروی چپ گریه: (\ ) - داخل بالا، بیرون پایین */
#alijm-ai-chatbot-toggle.is-crying .alijm-ai-brow.left {
    transform: rotate(25deg) translateY(-1px) !important;
    animation: alijm-cry-brow-left-reversed 2s ease-in-out infinite !important;
}

/* ابروی راست گریه: ( /) - داخل بالا، بیرون پایین */
#alijm-ai-chatbot-toggle.is-crying .alijm-ai-brow.right {
    transform: rotate(-25deg) translateY(-1px) !important;
    animation: alijm-cry-brow-right-reversed 2s ease-in-out infinite !important;
}

@keyframes alijm-cry-brow-left-reversed {
    0%, 100% { transform: rotate(25deg) translateY(-1px); }
    50%      { transform: rotate(30deg) translateY(-2px); }
}

@keyframes alijm-cry-brow-right-reversed {
    0%, 100% { transform: rotate(-25deg) translateY(-1px); }
    50%      { transform: rotate(-30deg) translateY(-2px); }
}

/* ==========================================================================
   💔 قلب‌های شکسته اطراف کاراکتر (موقع گریه)
   ========================================================================== */
#alijm-ai-chatbot-toggle .alijm-ai-broken-hearts {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 15;
    opacity: 0;
}

#alijm-ai-chatbot-toggle .alijm-ai-broken-hearts span {
    position: absolute;
    font-size: 18px;
    opacity: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* موقعیت هر قلب */
#alijm-ai-chatbot-toggle .alijm-ai-broken-hearts span:nth-child(1) {
    top: 15%;
    left: -15%;
}
#alijm-ai-chatbot-toggle .alijm-ai-broken-hearts span:nth-child(2) {
    top: 20%;
    right: -15%;
}
#alijm-ai-chatbot-toggle .alijm-ai-broken-hearts span:nth-child(3) {
    top: -5%;
    left: 30%;
    font-size: 22px !important;  /* یکی بزرگ‌تر */
}
#alijm-ai-chatbot-toggle .alijm-ai-broken-hearts span:nth-child(4) {
    top: 45%;
    left: -20%;
    font-size: 14px !important;  /* یکی کوچک‌تر */
}

/* نمایش قلب‌ها موقع گریه */
#alijm-ai-chatbot-toggle.is-crying .alijm-ai-broken-hearts {
    opacity: 1;
}

#alijm-ai-chatbot-toggle.is-crying .alijm-ai-broken-hearts span {
    animation: alijm-broken-heart-float 3s ease-out infinite;
}

/* تاخیر انیمیشن هر قلب */
#alijm-ai-chatbot-toggle.is-crying .alijm-ai-broken-hearts span:nth-child(1) {
    animation-delay: 0s;
}
#alijm-ai-chatbot-toggle.is-crying .alijm-ai-broken-hearts span:nth-child(2) {
    animation-delay: 0.8s;
}
#alijm-ai-chatbot-toggle.is-crying .alijm-ai-broken-hearts span:nth-child(3) {
    animation-delay: 1.5s;
}
#alijm-ai-chatbot-toggle.is-crying .alijm-ai-broken-hearts span:nth-child(4) {
    animation-delay: 2.2s;
}

/* انیمیشن شناور و محو شدن قلب‌ها */
@keyframes alijm-broken-heart-float {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.3) rotate(-15deg);
    }
    15% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(-5deg);
    }
    30% {
        opacity: 1;
        transform: translateY(-8px) scale(1.1) rotate(5deg);
    }
    60% {
        opacity: 0.7;
        transform: translateY(-20px) scale(1.05) rotate(-8deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-35px) scale(0.8) rotate(10deg);
    }
}

/* ==========================================================================
   😢 مخفی کردن قلب‌ها در حالت‌های دیگر
   ========================================================================== */
#alijm-ai-chatbot-toggle:not(.is-crying) .alijm-ai-broken-hearts {
    opacity: 0;
    pointer-events: none;
}

#alijm-ai-chatbot-toggle:not(.is-crying) .alijm-ai-broken-hearts span {
    animation: none;
    opacity: 0;
}




/* ==========================================================================
   🚶 حرکت کاراکتر به سمت مقابل موقع باز شدن پنجره چت
   ========================================================================== */

/* transition نرم برای جابه‌جایی */
#alijm-ai-chatbot-toggle {
    transition: transform 1.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                z-index 0s 0s;
}

/* در موبایل toggle دیده بشه (برای مشاهده حرکت) */
@media (max-width: 768px) {
    #alijm-ai-chatbot.open #alijm-ai-chatbot-toggle {
        display: block !important;
        z-index: 1000000 !important; /* بالاتر از پنجره چت */
    }
}

/* حالت حرکت کرده - z-index بالاتر تا از پنجره چت رد بشه */
#alijm-ai-chatbot-toggle.is-moved-opposite {
    z-index: 1000000 !important;
}



/* ==========================================================================
   📱 اصلاح موقعیت کاراکتر در موبایل هنگام باز بودن پنجره چت
   ========================================================================== */
@media (max-width: 768px) {
    /* وقتی پنجره چت بازه، کاراکتر باید مستقل از کانتینر باشه */
    #alijm-ai-chatbot.open #alijm-ai-chatbot-toggle {
        position: fixed !important;
        bottom: 15px !important;
        top: auto !important;
        z-index: 1000000 !important;
        transition: transform 1.5s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    }

    /* پیش‌فرض: راست پایین (وقتی چت‌بات راست است) */
    #alijm-ai-chatbot.alijm-ai-chatbot-right.open #alijm-ai-chatbot-toggle {
        right: 20px !important;
        left: auto !important;
    }

    /* پیش‌فرض: چپ پایین (وقتی چت‌بات چپ است) */
    #alijm-ai-chatbot.alijm-ai-chatbot-left.open #alijm-ai-chatbot-toggle {
        left: 20px !important;
        right: auto !important;
    }
}



/* ==========================================================================
   🔧 رفع مشکل :hover در موبایل که مانع حرکت کاراکتر می‌شد
   ========================================================================== */

/* 
 * روی موبایل، :hover پس از تپ همچنان فعال می‌مونه و 
 * transform: none !important قبلی رو trigger می‌کنه.
 * راه‌حل: hover رو فقط برای دستگاه‌های hover واقعی فعال کنیم.
 */

/* بازنویسی هاور با media query hover */
@media (hover: hover) and (pointer: fine) {
    /* هاور فقط روی دسکتاپ‌ها و ماوس‌ها فعال باشه */
}

/* در دستگاه‌های لمسی هاور رو غیرفعال کن */
@media (hover: none) or (pointer: coarse) {
    #alijm-ai-chatbot-toggle:hover {
        transform: none !important; /* remove this rule effect */
    }
    
    #alijm-ai-chatbot-toggle:hover .alijm-ai-robot {
        transform: none;
        animation-duration: 3s;
    }
    
    #alijm-ai-chatbot-toggle:hover .alijm-ai-bubble {
        opacity: 0;
    }
}

/* ==========================================================================
   🎯 حالت حرکت‌کرده - همیشه transform حفظ بشه (حتی موقع hover)
   ========================================================================== */

/* استفاده از CSS variable برای حفظ transform */
#alijm-ai-chatbot-toggle.is-moved-opposite,
#alijm-ai-chatbot-toggle.is-moved-opposite:hover,
#alijm-ai-chatbot-toggle.is-moved-opposite:active,
#alijm-ai-chatbot-toggle.is-moved-opposite:focus {
    transform: translateX(var(--alijm-move-x, 0)) !important;
    transition: transform 1.5s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* حالت هاور روی حالت حرکت‌کرده - فقط ربات کوچک بزرگ بشه */
#alijm-ai-chatbot-toggle.is-moved-opposite:hover .alijm-ai-robot {
    transform: scale(1.05);
}


/* ==========================================================================
   ⌨️ حالت کیبورد باز - کاراکتر بالاتر از کیبورد قرار می‌گیرد
   ========================================================================== */

/* transition نرم برای bottom */
@media (max-width: 768px) {
    #alijm-ai-chatbot.open #alijm-ai-chatbot-toggle {
        transition: 
            transform 1.5s cubic-bezier(0.34, 1.56, 0.64, 1),
            bottom 0.3s ease !important;
    }
}

/* وقتی کیبورد بازه، کاراکتر بالای کیبورد میره */
#alijm-ai-chatbot.open.is-keyboard-open #alijm-ai-chatbot-toggle {
    bottom: var(--alijm-keyboard-offset, 15px) !important;
}