/* 1. 悬浮按钮（核心修改：蓝色边框+hover动画） */
#chatbot-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;          
    height: 50px;
    border-radius: 50%;   
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    /* 蓝色边框：主色调 #165DFF，2px宽度 */
    border: 2px solid #165DFF;
    z-index: 99999;
    /* 动画过渡：所有属性变化都有0.3s顺滑效果 */
    transition: all 0.3s ease-in-out;
    background-color: #ffffff; 
}

/* 机器人状态：显示自定义图片 */
#chatbot-toggle-btn.bot-icon {
    background: url('../images/logo/chatbot.png') center center / cover no-repeat #ffffff;
}

/* 关闭状态：红色背景+叉号 */
#chatbot-toggle-btn.close-icon {
    background-color: #FF5252; 
    color: white;              
    font-size: 20px;           
    /* 关闭状态边框换成浅红，保持风格统一 */
    border-color: #FF6B6B;
}

/* 鼠标悬浮动画：核心效果 */
#chatbot-toggle-btn:hover {
    transform: scale(1.1); /* 放大10% */
    box-shadow: 0 6px 20px rgba(22, 93, 255, 0.3); /* 蓝色阴影强化 */
    border-color: #0F4CD1; /* 边框加深一级蓝色 */
    /* 可选：加轻微旋转，更生动 */
    /* transform: scale(1.1) rotate(5deg); */
}

/* 关闭状态悬浮：单独调整颜色 */
#chatbot-toggle-btn.close-icon:hover {
    border-color: #E03131; /* 关闭状态边框加深红色 */
    box-shadow: 0 6px 20px rgba(255, 91, 91, 0.3); /* 红色阴影 */
}

/* 以下样式保持不变 */
#chatbot-window {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 300px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    z-index: 99998;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.chatbot-header {
    background: linear-gradient(135deg, #00B4E6 0%, #00D9A5 100%);
    color: white;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.chatbot-header .avatar-title {
    display: flex;
    align-items: center;
    gap: 8px;
}
.chatbot-header .avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chatbot-header .avatar i {
    color: #00B4E6;
    font-size: 14px;
}
.chatbot-header .title-info h3 {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}
.chatbot-header .more-btn {
    font-size: 12px;
    color: rgba(255,255,255,0.9);
    cursor: pointer;
}

.chatbot-messages {
    padding: 12px 15px;
    height: 220px;
    overflow-y: auto;
    background-color: #f8fafc;
}

.bot-message {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 8px;
}
.bot-message .avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #00B4E6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}
.bot-message .avatar i {
    color: white;
    font-size: 10px;
}
.bot-message .content {
    background-color: white;
    padding: 6px 10px;
    border-radius: 6px 6px 6px 2px;
    max-width: 80%;
    font-size: 13px;
    color: #333;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.user-message {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 8px;
    justify-content: flex-end;
}
.user-message .content {
    background-color: #00B4E6;
    padding: 6px 10px;
    border-radius: 6px 6px 2px 6px;
    max-width: 80%;
    font-size: 13px;
    color: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.user-message .avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}
.user-message .avatar i {
    color: #666;
    font-size: 10px;
}

.chatbot-quick-replies {
    padding: 8px 15px 10px;
    background-color: #f8fafc;
}
.chatbot-quick-replies .title {
    font-size: 12px;
    color: #999;
    margin-bottom: 6px;
}
.quick-reply-btn {
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 4px 8px;
    margin-right: 5px;
    margin-bottom: 5px;
    font-size: 12px;
    color: #333;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.quick-reply-btn:hover {
    background-color: #00B4E6;
    color: white;
    border-color: #00B4E6;
}

.chatbot-input-area {
    padding: 8px 15px;
    border-top: 1px solid #e2e8f0;
    background-color: white;
    display: flex;
    align-items: center;
    gap: 6px;
}
.chatbot-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    outline: none;
    font-size: 13px;
}
.chatbot-input:focus {
    border-color: #00B4E6;
}
.chatbot-send-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #00B4E6;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.chatbot-footer {
    padding: 5px 15px;
    font-size: 10px;
    color: #999;
    text-align: right;
    border-top: 1px solid #f0f0f0;
}

.typing-indicator {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 8px;
}
.typing-indicator .avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #00B4E6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}
.typing-indicator .avatar i {
    color: white;
    font-size: 10px;
}
.typing-indicator .content {
    background-color: white;
    padding: 6px 10px;
    border-radius: 6px 6px 6px 2px;
    font-size: 13px;
}
.typing-dots {
    display: flex;
    gap: 2px;
}
.typing-dots span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #666;
    animation: typing 1.4s infinite ease-in-out;
}
.typing-dots span:nth-child(1) { animation-delay: 0s; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}