/* 浮动小球样式 */
#deepseek-chatbot-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #007bff; /* 蓝色，可自定义 */
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 60px;
    font-size: 30px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    /* 默认由JS控制显示，这里确保初始是隐藏的 */
    /* display: none; */ 
}

/* 聊天容器样式 */
#deepseek-chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px; /* 聊天框宽度 */
    height: 500px; /* 聊天框高度 */
    background-color: #f8f9fa; /* 浅灰色背景 */
    border: 1px solid #ced4da; /* 边框 */
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    z-index: 9998;
    font-family: 'Microsoft YaHei', sans-serif;
}

/* 聊天头部 */
#deepseek-chatbot-header {
    background-color: #007bff; /* 蓝色头部 */
    color: white;
    padding: 10px 15px;
    font-size: 1.1em;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab; /* 允许拖动 */
}

/* 最小化按钮 */
#deepseek-chatbot-minimize {
    font-size: 1.5em;
    cursor: pointer;
    line-height: 1;
    margin-left: auto; /* 推到右边 */
    padding: 0 5px;
    user-select: none; /* 禁止选择文本 */
}

/* 消息区域 */
#deepseek-chatbot-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    border-bottom: 1px solid #e9ecef;
    background-color: white;
}

/* 滚动条美化 (Webkit browsers) */
#deepseek-chatbot-messages::-webkit-scrollbar {
    width: 8px;
}

#deepseek-chatbot-messages::-webkit-scrollbar-thumb {
    background-color: #adb5bd;
    border-radius: 4px;
}

#deepseek-chatbot-messages::-webkit-scrollbar-track {
    background-color: #f1f1f1;
}

/* 消息气泡 */
.message {
    padding: 8px 12px;
    margin-bottom: 10px;
    border-radius: 15px;
    max-width: 80%;
    word-wrap: break-word; /* 确保长文本换行 */
}

.message.user {
    background-color: #e2e6ea; /* 用户消息颜色 */
    color: #343a40;
    margin-left: auto; /* 靠右 */
    border-bottom-right-radius: 3px;
}

.message.bot {
    background-color: #d1ecf1; /* AI消息颜色 */
    color: #0c5460;
    margin-right: auto; /* 靠左 */
    border-bottom-left-radius: 3px;
}
.message.bot.error {
    background-color: #f8d7da; /* 错误消息颜色 */
    color: #721c24;
}

/* 输入区域 */
#deepseek-chatbot-input {
    display: flex;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

#deepseek-chatbot-textarea {
    flex-grow: 1;
    border: 1px solid #ced4da;
    border-radius: 5px;
    padding: 8px;
    font-size: 0.95em;
    resize: none; /* 禁止用户调整大小 */
    min-height: 40px; /* 最小高度 */
    max-height: 120px; /* 最大高度 */
    overflow-y: auto;
}

#deepseek-chatbot-send {
    background-color: #28a745; /* 发送按钮颜色 */
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    margin-left: 10px;
    cursor: pointer;
    font-size: 0.95em;
    transition: background-color 0.2s;
}

#deepseek-chatbot-send:hover {
    background-color: #218838;
}

#deepseek-chatbot-send:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}