/* (根据需要添加样式) */
body {
    font-family: sans-serif;
}

.chat-container {
    width: 80%;
    max-width: 600px;
    margin: 50px auto;
    border: 1px solid #ddd;
    padding: 20px;
}

#chat-messages {
    min-height: 200px;
    margin-bottom: 20px;
    overflow-y: auto;
    border: 1px solid #eee;
    padding: 10px;
}

.message {
    margin-bottom: 10px;
}

.user-message {
    text-align: right;
}

.ai-message {
   /* 可以添加不同的样式 */
}

.input-area {
    display: flex;
}

#user-input {
    flex-grow: 1;
    padding: 10px;
    margin-right: 10px;
}

#send-button {
    padding: 10px 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
}
/* 代码块样式 */
.message pre {
    background-color: #282c34; /* 深色背景 */
    color: #abb2bf;          /* 浅色文本 */
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;       /* 水平滚动条 */
    font-family: 'Courier New', Courier, monospace; /* 等宽字体 */
    font-size: 0.9em;
    line-height: 1.4;
    white-space: pre-wrap;  /* 保留空白和换行，并允许自动换行 */
    border: 1px solid #555;
}

/* 行内代码样式 */
.message code:not(pre code) {
    background-color: #f0f0f0; /* 浅灰色背景 */
    padding: 2px 5px;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    border: 1px solid #ccc;
}

/* AI 消息的特定样式 */
.ai-message .message-content {
    background-color: #f5f5f5; /* 稍微不同的背景色 */
}

/* 消息发送者样式 */
.message-sender {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}
.user-message .message-sender{
    text-align: right;
}