/* ========== 机器人按钮 ========== */
#chatbot-bubble {
    position: fixed;
    top: 80px;
    left: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4af37, #c4a030);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
    cursor: pointer;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: chatbot-pulse 2s infinite;
}
#chatbot-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(212, 175, 55, 0.6);
}
#chatbot-bubble {
    background: url("/plugins/chatbot/bot-icon.png") center/cover;
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
    animation: chatbot-pulse 2s infinite;
}
#chatbot-bubble .bot-face { display: none;
    width: 36px;
    height: 36px;
    position: relative;
}
/* 机器人头部 */
#chatbot-bubble .bot-head {
    width: 36px;
    height: 28px;
    background: #fff;
    border-radius: 8px 8px 4px 4px;
    position: relative;
}
/* 天线 */
#chatbot-bubble .bot-antenna {
    position: absolute;
    top: -4px;
    left: 14px;
    width: 4px;
    height: 6px;
    background: #fff;
    border-radius: 2px;
    transform: rotate(-10deg);
}
#chatbot-bubble .bot-antenna::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -1px;
    width: 6px;
    height: 6px;
    background: #ff6b6b;
    border-radius: 50%;
    animation: bot-blink 2s infinite;
}
/* 眼睛 */
#chatbot-bubble .bot-eyes {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding-top: 8px;
}
#chatbot-bubble .bot-eye {
    width: 5px;
    height: 5px;
    background: #333;
    border-radius: 50%;
}
/* 嘴巴 */
#chatbot-bubble .bot-mouth {
    width: 12px;
    height: 3px;
    background: #999;
    border-radius: 0 0 4px 4px;
    margin: 4px auto 0;
}
@keyframes bot-blink {
    0%, 95%, 100% { opacity: 1; }
    96% { opacity: 0; }
}
@keyframes chatbot-pulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4); }
    50% { box-shadow: 0 4px 24px rgba(212, 175, 55, 0.7); }
}

/* ========== 对话窗口 ========== */
#chatbot-window {
    position: fixed;
    top: 160px;
    left: 24px;
    width: 380px;
    max-height: 520px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    z-index: 99999;
    display: none;
    flex-direction: column;
    overflow: hidden;
}
#chatbot-window.open { display: flex; }
/* 头部 */
.chatbot-header {
    background: linear-gradient(135deg, #0f4c81, #16476e);
    color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.chatbot-header .mini-bot {
    width: 32px;
    height: 32px;
    background: #d4af37;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
.chatbot-header .header-text h4 {
    margin: 0;
    font-size: 15px;
}
.chatbot-header .header-text p {
    margin: 2px 0 0;
    font-size: 11px;
    opacity: 0.8;
}
.chatbot-close {
    margin-left: auto;
    cursor: pointer;
    font-size: 20px;
    opacity: 0.8;
}
/* 消息区 */
.chatbot-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    max-height: 340px;
    background: #f8f9fa;
}
.chatbot-msg {
    margin-bottom: 12px;
    display: flex;
    gap: 8px;
    animation: msg-in 0.3s ease;
}
@keyframes msg-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.chatbot-msg.user { flex-direction: row-reverse; }
.chatbot-msg .msg-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.5;
}
.chatbot-msg.bot .msg-bubble {
    background: #fff;
    border: 1px solid #e0e0e0;
}
.chatbot-msg.user .msg-bubble {
    background: #d4af37;
    color: #fff;
}
.chatbot-msg .msg-time {
    font-size: 10px;
    color: #999;
    margin-top: 4px;
}
/* 快捷问题 */
.chatbot-quick {
    padding: 8px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-top: 1px solid #f0f0f0;
}
.chatbot-quick button {
    padding: 6px 12px;
    border: 1px solid #d4af37;
    background: #fff;
    color: #d4af37;
    border-radius: 14px;
    cursor: pointer;
    font-size: 11px;
    white-space: nowrap;
}
.chatbot-quick button:hover {
    background: #d4af37;
    color: #fff;
}
/* 输入区 */
.chatbot-input {
    display: flex;
    padding: 12px 16px;
    border-top: 1px solid #f0f0f0;
    gap: 8px;
}
.chatbot-input input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 13px;
    outline: none;
}
.chatbot-input input:focus {
    border-color: #d4af37;
}
.chatbot-input button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #d4af37;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 18px;
}
