/* 全局样式 */
body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    box-sizing: border-box;
}

#chat-container {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 400px; /* 适当增宽聊天框 */
    max-height: 600px; /* 限制最大高度 */
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 消息显示区 */
#chat-box {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    max-height: 400px;
    box-sizing: border-box;
    font-size: 14px;
}

/* 每条消息的样式 */
.message {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    padding: 8px;
    background-color: #f9f9f9;
    border-radius: 8px;
    word-wrap: break-word;
    box-sizing: border-box;
}

/* 消息内容和时间的样式 */
.message-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* 用户名样式 */
.message-content strong {
    font-size: 14px;
    color: #333;
}

/* 时间样式 */
.timestamp {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

/* 撤回按钮样式 */
.revoke-btn {
    background-color: #ff6347;
    color: white;
    border: none;
    padding: 5px 8px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 12px;
}

.revoke-btn:hover {
    background-color: #e53e3e;
}

/* 消息输入区域样式 */
#message-form {
    padding: 10px 15px;
    border-top: 1px solid #eaeaea;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}


/* 输入框样式 */
#message-form textarea {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
    resize: vertical;  /* 允许用户调整输入框高度 */
    min-height: 70px;   /* 最小高度为70px */
    box-sizing: border-box;
}


/* 发送按钮 */
#message-form button {
    padding: 8px 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

#message-form button:hover {
    background-color: #0056b3;
}

/* 消息控制按钮 */
#message-controls {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    border-top: 1px solid #eaeaea;
    background-color: #f7f7f7;
}

#message-controls button {
    padding: 5px 10px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
}

#message-controls button:hover {
    background-color: #218838;
}
