/* styles.css */
body {
    font-family: Arial, sans-serif;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

#chatBox {
    margin-top: 20px;
}

#chatMessages {
    height: 300px;
    overflow-y: auto;
    border: 1px solid #ccc;
    padding: 10px;
    margin-bottom: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

#userInput {
    width: calc(100% - 90px);
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

#sendMessage {
    width: 80px;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#sendMessage:hover {
    background-color: #0056b3;
}

/* 聊天消息样式 */
.message {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 10px;
    max-width: 80%;
    word-wrap: break-word;
    position: relative;
}

/* 用户消息样式 */
.message.user {
    background-color: #007bff; /* 蓝色背景 */
    color: white;
    margin-left: auto; /* 靠右对齐 */
    border-bottom-right-radius: 0; /* 标签风格 */
}

/* AI 消息样式 */
.message.ai {
    background-color: #e1e1e1; /* 灰色背景 */
    color: #333;
    margin-right: auto; /* 靠左对齐 */
    border-bottom-left-radius: 0; /* 标签风格 */
}

/* 标签风格的小三角 */
.message.user::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 0;
    border-width: 10px 0 10px 10px;
    border-style: solid;
    border-color: transparent transparent transparent #007bff;
}

.message.ai::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 0;
    border-width: 10px 10px 10px 0;
    border-style: solid;
    border-color: transparent #e1e1e1 transparent transparent;
}