.floating-robot {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 100px;
    height: 100px;
    z-index: 19999;
    cursor: pointer;
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
    border-radius: 50%;
    overflow: visible;
    user-select: none;
    -webkit-user-drag: none;
    touch-action: none;
    background: url('/static/images/icon_10.gif') center/cover no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
}

.robot-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: visible;
}

/* 隐藏原有的机器人脸部元素，保留容器结构以支持现有动画 */
.robot-face {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    opacity: 0;
    pointer-events: none;
}

.robot-eyes {
    width: 60%;
    height: 30%;
    display: flex;
    justify-content: space-around;
    position: relative;
    margin-bottom: 10px;
    margin-top: 5px;
    opacity: 0;
}

.robot-eye {
    width: 8px;
    height: 8px;
    background-color: #ffffff;
    border-radius: 50%;
    position: relative;
    opacity: 0;
}

.robot-mouth-svg {
    position: relative;
    margin-top: -8px;
    z-index: 5;
    opacity: 0;
}

.water-ripple-container {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 35px;
    z-index: 2;
    overflow: visible;
    pointer-events: none;
}

.water-ripple, .water-ripple-2, .water-ripple-3 {
    position: absolute;
    border-radius: 50%;
    background: transparent;
    border: 3px solid rgba(66, 165, 245, 0.8);
    bottom: 10px;
    left: 50%;
    width: 30px;
    height: 30px;
    margin-left: -15px;
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
    transform-origin: center;
}

/* 水波动画效果 - 修改为更自然的扁平椭圆形扩散 */
@keyframes ripple {
    0% { 
        transform: scale(0.3, 0.1); 
        opacity: 0.9;
    }
    50% { 
        opacity: 0.5;
    }
    100% { 
        transform: scale(2.0, 0.5);
        opacity: 0;
        border-width: 1px;
    }
}

@keyframes ripple2 {
    0% { 
        transform: scale(0.2, 0.1); 
        opacity: 0.8;
    }
    60% { 
        opacity: 0.4;
    }
    100% { 
        transform: scale(1.8, 0.4);
        opacity: 0;
    }
}

@keyframes ripple3 {
    0% { 
        transform: scale(0.1, 0.1); 
        opacity: 0.7;
    }
    70% { 
        opacity: 0.3;
    }
    100% { 
        transform: scale(1.5, 0.3);
        opacity: 0;
    }
}

/* 眨眼动画 */
@keyframes blink {
    0%, 45%, 55%, 100% {
        transform: scaleY(1);
    }
    50% {
        transform: scaleY(0.1);
    }
}

@keyframes lookAround {
    0% { transform: translateX(0); }
    15% { transform: translateX(30%); }
    30% { transform: translateX(0); }
    45% { transform: translateX(-30%); }
    60% { transform: translateX(0); }
    100% { transform: translateX(0); }
}

/* 左眼特殊动画 */
@keyframes leftEyeLook {
    0% { transform: translateX(0); }
    15% { transform: translateX(25%); }
    30% { transform: translateX(0); }
    45% { transform: translateX(-25%); }
    60% { transform: translateX(0); }
    100% { transform: translateX(0); }
}

/* 右眼特殊动画 */
@keyframes rightEyeLook {
    0% { transform: translateX(0); }
    15% { transform: translateX(35%); }
    30% { transform: translateX(0); }
    45% { transform: translateX(-35%); }
    60% { transform: translateX(0); }
    100% { transform: translateX(0); }
}

/* 应用动画到眼睛 */
.robot-eye {
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    position: relative;
    animation: blink 5s infinite, lookAround 8s infinite;
}

/* 为左右眼提供稍微不同的动画 */
.left-eye {
    animation: blink 5s infinite, leftEyeLook 8s infinite;
}

.right-eye {
    animation: blink 5s infinite, rightEyeLook 8s infinite;
}

/* 添加鼠标互动效果 */
.robot-container:hover .robot-eye {
    animation: blink 3s infinite;
    transform: scale(1.2);
    transition: transform 0.3s ease;
}

/* 嘴巴动画 */
@keyframes mouthMove {
    0% { width: 10px; }
    50% { width: 14px; }
    100% { width: 10px; }
}

.robot-mouth {
    width: 10px;
    height: 3px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 3px;
    margin-top: 6px;
    position: relative;
    transition: all 0.3s ease;
}

/* 当悬浮时嘴巴变化 */
.floating-robot:hover .robot-mouth {
    animation: mouthMove 1.5s ease-in-out infinite;
}

/* 持续悬停跳动效果（只向上不向下） */
@keyframes continuousBounce {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-6px); }
    50% { transform: translateY(-4px); }
    75% { transform: translateY(-5px); }
    90% { transform: translateY(-2px); }
}

/* 悬浮机器人基本样式 - 已在前面定义，避免重复 */

/* 悬浮时的效果 */
.floating-robot:hover {
    transform: translateY(-5px);
    animation: continuousBounce 1.5s ease-out infinite, enhancedPulse 2s infinite;
    filter: drop-shadow(0 6px 16px rgba(66, 165, 245, 0.4));
}

/* 持续上下浮动的动画 */
@keyframes continuousBounce {
    0%, 100% { transform: translateY(-5px); }
    50% { transform: translateY(-10px); }
}

/* 增强的脉冲动画 */
@keyframes enhancedPulse {
    0% { filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25)); }
    50% { filter: drop-shadow(0 6px 20px rgba(66, 165, 245, 0.6)); }
    100% { filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25)); }
}

/* 悬停时水波效果 - 与浮动动画同步 */
.floating-robot:hover .water-ripple {
    animation: ripple 1.5s ease-out infinite;
}

.floating-robot:hover .water-ripple-2 {
    animation: ripple2 1.5s ease-out infinite 0.5s;
}

.floating-robot:hover .water-ripple-3 {
    animation: ripple3 1.5s ease-out infinite 1s;
}

/* 鼠标离开时停止动画 */
.floating-robot:not(:hover) .water-ripple,
.floating-robot:not(:hover) .water-ripple-2,
.floating-robot:not(:hover) .water-ripple-3 {
    animation: none;
    opacity: 0;
}

/* 单次跳动动画（用于点击时） */
@keyframes bounce {
    0% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
    80% { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}

/* 聊天气泡 */
.robot-speech-bubble {
    position: absolute;
    top: -60px;
    right: -50px;
    transform: translateY(15px) scale(0.8);
    background: #ffffff;
    border-radius: 20px;
    padding: 12px 16px;
    font-size: 13px;
    color: #333;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.08);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    max-width: 160px;
    min-width: 120px;
    text-align: left;
    z-index: 20000;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.4;
}

/* 气泡小尾巴 */
.robot-speech-bubble:after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 35px;
    width: 16px;
    height: 16px;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
    box-shadow: 2px 2px 6px rgba(0,0,0,0.1);
    z-index: -1;
}

/* 显示气泡样式 */
.robot-speech-bubble.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* 取消点击动画，防止拖动误触 */
.floating-robot:active {
    transform: scale(1.05);
}

/* 拖动时样式 */
.floating-robot.dragging {
    opacity: 0.9;
    transform: scale(1.1);
    transition: none; /* 拖动时禁用过渡效果，使拖动更流畅 */
    cursor: grabbing;
}

/* 聊天框中机器人样式 - 与悬浮机器人统一风格 */
.chat-robot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: url('/static/images/icon_10.gif') center/cover no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.chat-robot-container {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
}

.chat-robot-face {
    opacity: 0;
}

.chat-robot-eyes {
    opacity: 0;
}

.chat-robot-eye {
    opacity: 0;
}

.chat-robot-mouth {
    opacity: 0;
} 