/* 莫奈取色风格 */
:root {
    --primary-1: #a8dadc; /* 浅蓝绿 */
    --primary-2: #457b9d; /* 深蓝 */
    --accent-1: #f1faee;  /* 米白 */
    --accent-2: #e63946;  /* 珊瑚红 */
    --neutral-1: #f8f9fa; /* 浅灰 */
    --neutral-2: #293241; /* 深灰蓝 */
    --shadow: rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--neutral-1);
    color: var(--neutral-2);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 800px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow);
    overflow: hidden;
}

.section {
    padding: 30px;
}

.hidden {
    display: none;
}

/* 登录/注册样式 */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--primary-1);
    margin-bottom: 20px;
}

.tab {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: bold;
    color: var(--primary-2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab.active {
    background-color: var(--primary-1);
    color: white;
}

.form {
    display: none;
}

.form.active {
    display: block;
}

input[type="text"],
input[type="password"],
input[type="url"] {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid var(--primary-1);
    border-radius: 8px;
    font-size: 16px;
}

button {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #3a6a8a; /* 比primary-2稍深 */
}

.error-message {
    color: var(--accent-2);
    text-align: center;
    margin-top: 10px;
    min-height: 20px;
}

/* 聊天区域样式 */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--primary-1);
    margin-bottom: 20px;
}

#logout-btn {
    width: auto;
    padding: 8px 15px;
    background-color: var(--accent-2);
}

#logout-btn:hover {
    background-color: #c12938; /* 比accent-2稍深 */
}

#messages-container {
    height: 400px;
    overflow-y: auto;
    padding: 10px;
    background-color: var(--neutral-1);
    border-radius: 8px;
    margin-bottom: 20px;
}

.message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.message .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
}

.message .content {
    background-color: var(--primary-1);
    padding: 10px;
    border-radius: 12px;
    max-width: 70%;
}

.message.own .content {
    background-color: var(--primary-2);
    color: white;
    margin-left: auto;
}

.message .info {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.input-area {
    display: flex;
    gap: 10px;
}

#message-input {
    flex: 1;
}

#send-btn {
    width: auto;
    padding: 0 20px;
}

/* 管理员面板样式 */
#admin-panel h3, #admin-panel h4 {
    color: var(--primary-2);
    margin-bottom: 15px;
}

#admin-panel select, #admin-panel button {
    margin: 5px;
}

#user-list {
    list-style: none;
    padding: 0;
}

#user-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.user-actions button {
    padding: 5px 10px;
    font-size: 14px;
    margin-left: 5px;
}