/* 用户认证相关样式 */

/* 顶部栏样式 */
.top-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 8px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eaecef;
}

.auth-buttons-top {
    display: flex;
    gap: 15px;
}

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

/* 导航栏用户操作区域 */
.user-actions {
    display: flex;
    align-items: center;
    margin-left: 30px;
    gap: 15px;
}

.auth-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.login-btn {
    background-color: white;
    border: 2px solid #3f51b5;
    color: #3f51b5;
}

.login-btn:hover {
    background-color: #f0f2ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.register-btn {
    background-color: #3f51b5;
    color: white;
    position: relative;
    overflow: hidden;
}

.register-btn:hover {
    background-color: #303f9f;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(63,81,181,0.3);
}

.logout-btn {
    background-color: #f0f0f0;
    color: #666;
    text-decoration: none;
}

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

.welcome-text {
    margin-right: 15px;
    color: #444;
    font-size: 14px;
}

.user-profile-link {
    color: #3f51b5;
    text-decoration: none;
    margin-right: 15px;
    font-size: 14px;
}

.user-profile-link:hover {
    text-decoration: underline;
}

/* 认证模态框 */
.auth-modal {
    max-width: 400px;
    width: 100%;
}

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

.remember-me {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
}

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

.forgot-password:hover {
    text-decoration: underline;
    color: #3f51b5;
}

.form-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}

/* 消息提示弹窗 */
.message-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    font-size: 14px;
    max-width: 300px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
}

.message-popup.show {
    transform: translateX(0);
    opacity: 1;
}

/* 消息类型样式 */
.message-popup.success {
    background-color: #4caf50;
    color: white;
    border-left: 4px solid #388e3c;
}

.message-popup.error {
    background-color: #f44336;
    color: white;
    border-left: 4px solid #d32f2f;
}

.message-popup.info {
    background-color: #2196f3;
    color: white;
    border-left: 4px solid #1976d2;
}

.message-popup.warning {
    background-color: #ff9800;
    color: white;
    border-left: 4px solid #f57c00;
}

.form-footer a {
    color: #3f51b5;
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* 个人中心模态框 */
.profile-modal {
    max-width: 700px;
    width: 90%;
}

.user-info {
    display: flex;
    margin-bottom: 30px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.user-avatar {
    margin-right: 20px;
}

.avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #999;
}

.avatar-placeholder span::first-letter {
    text-transform: uppercase;
}

.user-details {
    flex: 1;
}

.user-details h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.user-details p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

/* 用户中心标签页 */
.user-tabs {
    margin-top: 20px;
}

.tab-header {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.tab-button {
    background: none;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    position: relative;
    transition: all 0.3s ease;
}

.tab-button:hover {
    color: #3f51b5;
}

.tab-button.active {
    color: #3f51b5;
    font-weight: 500;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #3f51b5;
}

.tab-content {
    display: none;
    padding: 10px 0;
}

.tab-content.active {
    display: block;
}

.no-data-message {
    text-align: center;
    padding: 30px 0;
    color: #999;
    font-style: italic;
}

/* 表单验证提示 */
.form-group .error-message {
    color: #f44336;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.form-group.error input {
    border-color: #f44336;
}

.form-group.error .error-message {
    display: block;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .user-actions {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .auth-modal {
        width: 90%;
    }
    
    .user-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .user-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .tab-button {
        padding: 10px 15px;
        font-size: 14px;
    }
}
