/* ═══════════════════════════════════════════════════════
   🎬 Bot Video Styling & Center Show (Bigger Size)
   ═══════════════════════════════════════════════════════ */

.gesture-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
    pointer-events: none;
    -webkit-media-controls: none;
    -webkit-media-controls-enclosure: none;
    -webkit-media-controls-panel: none;
}

/* ★ ลบพื้นหลังดำ (ถ้าวิดีโอเป็น MP4) */
.flying-bot.video-mode .gesture-video {
    mix-blend-mode: screen; 
}

/* ★ ขนาดปกติ (ตอนบิน) */
.flying-bot {
    width: 140px !important;
    height: 140px !important;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* ★★★ ตอนอยู่กลางจอ: ขยายใหญ่ 3.5 เท่า + เรืองแสง ★★★ */
.flying-bot.center-show {
    transform: translate(-50%, -50%) scale(3.5) !important;
    z-index: 99999 !important;
}

.flying-bot.center-show .gesture-video {
    filter: 
        drop-shadow(0 0 40px rgba(255, 235, 59, 1))
        drop-shadow(0 0 80px rgba(46, 204, 113, 0.8))
        drop-shadow(0 0 120px rgba(52, 152, 219, 0.6)) !important;
    animation: centerPulse 0.8s ease-in-out infinite alternate !important;
}

/* Animation หายใจเบาๆ ตอนตัวใหญ่ */
@keyframes centerPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

/* ★ Mobile Optimization */
@media (max-width: 768px) {
    .flying-bot {
        width: 100px !important;
        height: 100px !important;
    }
    .flying-bot.center-show {
        transform: translate(-50%, -50%) scale(2.8) !important; /* มือถือขยาย 2.8 เท่า */
    }
}

/* ═══════════════════════════════════════════════════════
   ★ Safari/iOS: GIF แทน Video (GIF มี alpha 100%)
   ═══════════════════════════════════════════════════════ */
.safari-bot-gif {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 16px rgba(255, 235, 59, 0.5));
    animation: botNoBgFloat 2.5s ease-in-out infinite;
}
body.safari-gif-mode video.gesture-video,
body.safari-gif-mode .flying-bot video.gesture-video {
    display: none !important;
}
body.safari-gif-mode .flying-bot .safari-bot-gif {
    display: block !important;
}
body.safari-gif-mode .flying-bot.center-show .safari-bot-gif {
    filter: drop-shadow(0 0 30px rgba(255, 235, 59, 0.9)) drop-shadow(0 0 60px rgba(46, 204, 113, 0.7)) drop-shadow(0 0 100px rgba(52, 152, 219, 0.5)) drop-shadow(0 8px 24px rgba(0, 0, 0, 0.4)) !important;
}
