body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f4f9;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

#chat-container {
    width: 100%;
    max-width: 800px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

#chat-header {
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    background-color: #f7f7f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chat-header h1 {
    font-size: 1.2em;
    margin: 0;
}

.controls label {
    font-size: 0.9em;
    margin-right: 5px;
}

#model-select {
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

#chat-box {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    line-height: 1.6;
}

.message {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
}

.user-message {
    background-color: #007bff;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.assistant-message {
    background-color: #e9e9eb;
    color: #333;
    margin-right: auto;
    border-bottom-left-radius: 5px;
}

.assistant-message p:last-child {
    margin-bottom: 0;
}

#chat-form {
    display: flex;
    padding: 20px;
    border-top: 1px solid #ddd;
    background-color: #f7f7f7;
}

#message-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    resize: none;
    font-size: 1em;
    height: 40px;
    margin-right: 10px;
}

#chat-form button {
    padding: 0 20px;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
}

#chat-form button:hover {
    background-color: #0056b3;
}

/* 密码模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-content input {
    width: 100%;
    padding: 10px;
    margin: 15px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.modal-content button {
    padding: 10px 20px;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}

.error-message {
    color: red;
    font-size: 0.9em;
    margin-top: 10px;
    height: 1em;
}