.app-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
    box-sizing: border-box;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.app-title {
    margin: 0;
    font-size: 22px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.header-username {
    color: #555;
}

.header-logout {
    color: #ff4d4f;
    text-decoration: none;
}

.app-main {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 16px;
    min-height: 500px;
}

.flash-messages {
    margin-bottom: 8px;
}

.flash-message {
    background-color: #e6f7ff;
    border: 1px solid #91d5ff;
    color: #0050b3;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
}

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.auth-card {
    width: 320px;
}

.auth-title {
    text-align: center;
    margin-bottom: 16px;
}

.auth-form .form-group {
    margin-bottom: 12px;
}

.auth-form label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.auth-form input {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #d9d9d9;
    box-sizing: border-box;
}

.btn-primary, .btn-secondary {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background-color: #07c160;
    color: #fff;
}

.btn-secondary {
    background-color: #fff;
    color: #333;
    border: 1px solid #d9d9d9;
    font-size: 12px;
}

.form-error {
    margin-top: 8px;
    color: #ff4d4f;
    font-size: 12px;
}

.auth-switch {
    text-align: center;
    margin-top: 12px;
    font-size: 13px;
}

.chat-layout {
    display: flex;
    height: 600px;
}

.conversation-list {
    width: 260px;
    border-right: 1px solid #f0f0f0;
    padding-right: 8px;
    box-sizing: border-box;
}

.conversation-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}

.conversation-items {
    list-style: none;
    margin: 0;
    padding: 0;
    height: calc(100% - 32px);
    overflow-y: auto;
}

.conversation-item {
    padding: 8px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 4px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.conversation-item:hover {
    background-color: #f5f5f5;
}

.conversation-item.active {
    background-color: #e6f7ff;
}

.chat-panel {
    flex: 1;
    padding-left: 8px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    background-color: #f5f5f5;
    border-radius: 6px;
    padding: 8px;
    overflow-y: auto;
}

.chat-input-area {
    display: flex;
    margin-top: 8px;
    gap: 8px;
}

.chat-input-area textarea {
    flex: 1;
    resize: none;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #d9d9d9;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
}

.message-item {
    display: flex;
    margin-bottom: 8px;
}

.message-user {
    justify-content: flex-end;
}

.message-assistant {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 70%;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
}

.message-user .message-bubble {
    background-color: #95ec69;
}

.message-assistant .message-bubble {
    background-color: #ffffff;
}

/* 设置弹窗 */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    width: 420px;
    max-width: 90%;
    padding: 16px 18px 14px;
}

.modal-header {
    margin-bottom: 12px;
}

.modal-title {
    margin: 0;
    font-size: 16px;
}

.modal-body {
    max-height: 320px;
    overflow-y: auto;
}

.modal-footer {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

@media (max-width: 768px) {
    .chat-layout {
        flex-direction: column;
        height: auto;
    }
    .conversation-list {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
        margin-bottom: 8px;
        padding-right: 0;
        padding-bottom: 8px;
    }
}

