/* 聊天窗口容器 */
.chat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    display: none;
    flex-direction: column;
    z-index: 1000;
}

/* 聊天按钮 */
.chat-button {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background-color: #333;
    color: #61dafb;
    padding: 15px 20px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1000;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.chat-button:hover {
    background-color: #444;
    color: #21a1f1;
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0,0,0,0.4);
}

/* 聊天窗口显示时 */
.chat-container.visible {
    display: flex;
}

/* 聊天头部 */
.chat-header {
    background: #007bff;
    color: white;
    padding: 15px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 关闭按钮 */
.chat-close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 20px;
}

/* 消息区域 */
.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f5f5f5;
}

/* 单条消息 */
.message {
    margin-bottom: 15px;
    max-width: 80%;
}

/* 用户消息 */
.message.user {
    margin-left: auto;
    background: #007bff;
    color: white;
    padding: 10px 15px;
    border-radius: 15px 15px 0 15px;
}

/* AI消息 */
.message.ai {
    background: white;
    color: black;  /* 修改为黑色文字 */
    padding: 10px 15px;
    border-radius: 15px 15px 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 输入区域 */
.chat-input-area {
    display: flex;
    padding: 10px;
    background: #fff;
    border-top: 1px solid #eee;
}

/* 输入框 */
.chat-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-right: 10px;
}

/* 发送按钮 */
.chat-send-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}

/* 加载指示器 */
.loading-indicator {
    display: none;
    text-align: center;
    padding: 10px;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .chat-container {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
}
