/* 基础样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

input, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

textarea {
    resize: vertical;
}

/* 按钮样式 */
.btn-primary {
    display: inline-block;
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #45a049;
}

.btn-secondary {
    display: inline-block;
    background-color: #2196F3;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn-secondary:hover {
    background-color: #0b7dda;
}

.btn-logout {
    display: inline-block;
    background-color: #f44336;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn-logout:hover {
    background-color: #d32f2f;
}

/* 认证卡片样式 */
.auth-card {
    background-color: white;
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.form-actions {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forgot-password {
    color: #2196F3;
    text-decoration: none;
    font-size: 14px;
}

.forgot-password:hover {
    text-decoration: underline;
}

.auth-links {
    margin-top: 20px;
    text-align: center;
}

.auth-links a {
    color: #2196F3;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* 消息提示样式 */
.error-messages, .success-message, .warning-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.error-messages {
    background-color: #ffebee;
    border: 1px solid #ef9a9a;
    color: #b71c1c;
}

.success-message, .success-messages {
    background-color: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #2e7d32;
}

.warning-message {
    background-color: #fff8e1;
    border: 1px solid #ffcc80;
    color: #ef6c00;
}

.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    text-align: center;
}

.message.success {
    background-color: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #2e7d32;
}

.message.error {
    background-color: #ffebee;
    border: 1px solid #ef9a9a;
    color: #b71c1c;
}

/* 首页样式 */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 40px;
    border-bottom: 1px solid #ddd;
}

.main-nav a {
    margin-left: 20px;
    color: #333;
    text-decoration: none;
    font-weight: bold;
}

.main-nav a:hover {
    color: #2196F3;
}

.home-content {
    text-align: center;
    padding: 50px 0;
}

.home-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.home-content p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 40px;
}

.auth-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* 仪表盘样式 */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 40px;
    border-bottom: 1px solid #ddd;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dashboard-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 768px) {
    .dashboard-content {
        grid-template-columns: 1fr 1fr;
    }
}

.profile-section, .password-section {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.profile-section h2, .password-section h2 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (min-width: 768px) {
    .profile-info {
        flex-direction: row;
    }
}

.avatar-container {
    flex: 0 0 250px;
}

.avatar-preview {
    width: 200px;
    height: 200px;
    margin-bottom: 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid #f0f0f0;
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.default-avatar {
    width: 100%;
    height: 100%;
    background-color: #2196F3;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    font-weight: bold;
}

.avatar-upload-form .form-group {
    margin-bottom: 15px;
}

.profile-details {
    flex: 1;
}

.profile-form .form-group, .password-form .form-group {
    margin-bottom: 15px;
}

small {
    color: #777;
    font-size: 12px;
}

.user-greeting {
    margin-top: 30px;
}

.user-greeting p {
    margin-bottom: 20px;
}
