/* 在文件开头添加以下样式 */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #1a1a1a;
    color: #f0f0f0;
    display: flex;
    flex-direction: column;
}

.page-container {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

/* 修改 .chat-container 样式 */
.chat-container {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    background-color: #2a2a2a;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

/* 修改 .chat-footer 样式 */
.chat-footer {
    flex-shrink: 0;
    background-color: #1a1a1a;
    color: #888;
    text-align: center;
    padding: 10px 0;
    font-size: 12px;
    width: 100%;
}

.chat-footer p {
    margin: 0;
    line-height: 1.5;
}

/* 修改 .password-screen 样式 */
.password-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* 其他样式保持不变 */

.chat-header {
    background-color: #333;
    color: #f0f0f0;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-messages-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.chat-messages {
    flex-grow: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.message {
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 5px;
    max-width: 80%;
    word-wrap: break-word;
}

.user-message {
    background-color: #3a3a3a;
    align-self: flex-end;
}

.bot-message {
    background-color: #444;
    align-self: flex-start;
}

.chat-input {
    display: flex;
    padding: 10px;
    background-color: #333;
}

#userInput {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #555;
    border-radius: 5px;
    resize: none;
    background-color: #2a2a2a;
    color: #f0f0f0;
    min-height: 40px;
    max-height: 120px;
    overflow-y: auto;
}

#sendButton {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    margin-left: 10px;
    cursor: pointer;
}

#sendButton:hover {
    background-color: #45a049;
}

/* 添加滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #2a2a2a;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

#modelSelect {
    padding: 5px;
    font-size: 14px;
    background-color: #444;
    color: #f0f0f0;
    border: 1px solid #555;
    border-radius: 5px;
}

#modelSelect:focus {
    outline: none;
    border-color: #4CAF50;
}

/* 在文件末尾添加以下代码 */

.chat-footer {
    flex-shrink: 0;
    background-color: #1a1a1a;
    color: #888;
    text-align: center;
    padding: 10px 0;
    font-size: 12px;
    width: 100%;
}

.chat-footer p {
    margin: 0;
    line-height: 1.5;
}

/* 在现有的样式后添加以下内容 */

.header-controls {
    display: flex;
    align-items: center;
}

/* 更新清空按钮的样式 */
#clearButton {
    margin-left: 10px;
    padding: 5px 10px;
    background-color: #333;
    color: #f0f0f0;
    border: 1px solid #555;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

#clearButton:hover {
    background-color: #444;
    color: #fff;
}

/* 响应式设计 */
@media (min-width: 768px) {
    .chat-container {
        max-width: 800px;
        height: calc(100vh - 40px);
        margin: 20px auto;
        border-radius: 10px;
    }
}

/* 在文件末尾添加以下样式 */

.password-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.password-container {
    background-color: #2a2a2a;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90%;
    width: 300px;
}

.password-container h2 {
    margin-bottom: 20px;
    color: #f0f0f0;
}

#passwordInput {
    padding: 10px;
    margin-bottom: 20px;
    width: 100%;
    background-color: #333;
    border: 1px solid #555;
    color: #f0f0f0;
    border-radius: 5px;
}

#submitPassword {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
}

#submitPassword:hover {
    background-color: #45a049;
}

/* 在文件末尾添加以下样式 */

.loading-indicator {
    text-align: center;
    padding: 10px;
    font-style: italic;
    color: #888;
    background-color: #2a2a2a;
    border-radius: 5px;
    margin: 10px 20px;
}

/* 添加新的样式用于长文本 */
.long-text {
    white-space: pre-wrap;
    overflow-wrap: break-word;
}
