/**
 * 会员中心样式 - 清新素颜风格
 * 与博客和软件应用保持一致的简洁设计
 */

/* ==================== 基础变量 ==================== */
:root {
    /* 主题色 - 与博客/软件一致 */
    --primary-color: #3B82F6;
    --primary-hover: #2563eb;
    --secondary-color: #10B981;

    /* 中性色 */
    --neutral-50: #F9FAFB;
    --neutral-100: #F3F4F6;
    --neutral-200: #E5E7EB;
    --neutral-300: #D1D5DB;
    --neutral-400: #9CA3AF;
    --neutral-500: #6B7280;
    --neutral-600: #4B5563;
    --neutral-700: #374151;
    --neutral-800: #1F2937;
    --neutral-900: #111827;

    /* 文字色 */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;

    /* 背景色 */
    --bg-page: #F9FAFB;
    --bg-card: #ffffff;
    --bg-input: #f9fafb;
    --bg-hover: #f3f4f6;

    /* 边框 */
    --border-color: #e5e7eb;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;

    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);

    /* 过渡 */
    --transition: all 0.2s ease;
}

/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', -apple-system, sans-serif;
    background: var(--bg-page);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

/* ==================== 登录/注册页面 ==================== */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
}

.auth-wrapper {
    display: flex;
    gap: 0;
    max-width: 900px;
    width: 100%;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* 欢迎卡片 */
.welcome-card {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 48px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
}



.welcome-card h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

.welcome-card p {
    opacity: 0.9;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 28px;
}

.welcome-btn {
    display: inline-block;
    padding: 12px 28px;
    background: white;
    color: var(--primary-color);
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 15px;
}

.welcome-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    color: var(--primary-color);
}

/* 登录表单卡片 */
.auth-card {
    flex: 1;
    background: white;
    padding: 48px 40px;
}

.auth-card h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 28px;
    text-align: center;
}

/* 浮动装饰图标 */
.floating-icon {
    display: none;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper .icon,
.input-wrapper>i.fa {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--text-muted);
    z-index: 1;
}

.form-control {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    background: var(--bg-input);
    transition: var(--transition);
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: white;
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* 密码切换按钮 */
.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-muted);
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--text-secondary);
}

/* 记住我和忘记密码 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.forgot-link {
    color: var(--primary-color);
    font-weight: 500;
}

/* 提交按钮 */
.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 20px;
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 分隔线 */
.divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* 社交登录按钮 */
.social-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.social-btn {
    flex: 1;
    min-width: 90px;
    padding: 10px 14px;
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-secondary);
}

.social-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.social-btn.google {
    background: #ea4335;
    color: white;
    border-color: #ea4335;
}

.social-btn.github {
    background: #24292e;
    color: white;
    border-color: #24292e;
}

.social-btn.gitee {
    background: #c71d23;
    color: white;
    border-color: #c71d23;
}

.social-btn.google:hover,
.social-btn.github:hover,
.social-btn.gitee:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* 底部链接 */
.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-footer a {
    font-weight: 600;
}

/* ==================== 会员中心布局 ==================== */
.member-container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 260px;
    background: white;
    padding: 24px 20px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.user-profile {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--neutral-200);
    margin-bottom: 12px;
}

.profile-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.profile-email {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.vip-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
}

/* 导航菜单 */
.nav-menu {
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 4px;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--primary-color);
}

.nav-item.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

.nav-item .icon {
    font-size: 18px;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--border-radius-sm);
    color: #ef4444;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* 主内容区 */
.main-content {
    flex: 1;
    padding: 32px 40px;
    background: var(--bg-page);
    overflow-y: auto;
}

.page-header {
    margin-bottom: 28px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 6px;
}

/* 内容卡片 */
.content-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* VIP卡片 */
.vip-status-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--border-radius);
    padding: 24px;
    color: white;
    margin-bottom: 20px;
}

.vip-status-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 6px;
}

.vip-status-card p {
    opacity: 0.9;
    font-size: 14px;
}

/* VIP套餐网格 */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.plan-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 24px 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
}

.plan-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.plan-card.popular {
    border-color: var(--primary-color);
    border-width: 2px;
}

.plan-card.popular::before {
    content: '推荐';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 2px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.plan-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.plan-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

.plan-price span {
    font-size: 14px;
    font-weight: 500;
}

.plan-original {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-top: 4px;
}

.plan-features {
    list-style: none;
    margin: 20px 0;
    text-align: left;
}

.plan-features li {
    padding: 6px 0;
    color: var(--text-secondary);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-features li::before {
    content: '✓';
    color: var(--secondary-color);
    font-weight: bold;
}

.plan-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.plan-btn:hover {
    background: var(--primary-hover);
}

/* 表单页面 */
.form-card {
    max-width: 560px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* 头像上传 */
.avatar-upload {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--neutral-200);
}

.avatar-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-outline {
    padding: 10px 18px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: white;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 绑定列表 */
.bind-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bind-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--bg-input);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

.bind-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bind-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.bind-icon.github {
    background: #24292e;
}

.bind-icon.gitee {
    background: #c71d23;
}

.bind-icon.google {
    background: #ea4335;
}

.bind-details h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.bind-details p {
    font-size: 13px;
    color: var(--text-secondary);
}

.bind-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.bound {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary-color);
}

.status-badge.unbound {
    background: var(--neutral-100);
    color: var(--text-muted);
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    .auth-wrapper {
        flex-direction: column;
    }

    .welcome-card {
        padding: 32px 24px;
    }

    .auth-card {
        padding: 32px 24px;
    }

    .member-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .user-profile {
        display: flex;
        align-items: center;
        gap: 16px;
        text-align: left;
    }

    .profile-avatar {
        width: 60px;
        height: 60px;
        margin-bottom: 0;
    }

    .nav-menu {
        display: flex;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 10px;
    }

    .nav-item {
        flex-shrink: 0;
        margin-bottom: 0;
    }

    .logout-btn {
        display: none;
    }

    .main-content {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ==================== Toast 消息提示 ==================== */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 20px;
    background: var(--bg-card);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    animation: slideIn 0.3s ease;
    border-left: 4px solid var(--primary-color);
    max-width: 360px;
}

.toast.success {
    border-left-color: #10B981;
}

.toast.error {
    border-left-color: #EF4444;
}

.toast.warning {
    border-left-color: #F59E0B;
}

.toast.info {
    border-left-color: #3B82F6;
}

.toast-close {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 16px;
    margin-left: 8px;
}

.toast-close:hover {
    color: var(--text-primary);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ==================== VIP 头像特效 ==================== */
/* 谷歌风格光环 */
.header-vip-halo {
    border: none !important;
    box-shadow: none !important;
    padding: 2px;
    background: conic-gradient(from 45deg, #EA4335 0deg 90deg, #4285F4 90deg 180deg, #34A853 180deg 270deg, #FBBC05 270deg 360deg);
    border-radius: 50%;
    /* 保持圆形 */
    aspect-ratio: 1/1;
}

/* 移动端 VIP 光环 */
.mobile-vip-halo {
    border: none !important;
    box-shadow: none !important;
    padding: 2px;
    background: conic-gradient(from 45deg, #EA4335 0deg 90deg, #4285F4 90deg 180deg, #34A853 180deg 270deg, #FBBC05 270deg 360deg);
    border-radius: 50%;
}

/* 皇冠角标 (Google黄色) */
.vip-badge-icon {
    position: absolute;
    bottom: -2px;
    right: -4px;
    width: 14px;
    height: 14px;
    background: #FBBC05;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    border: 1px solid #fff;
    z-index: 20;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.vip-badge-icon i {
    transform: scale(0.8);
}

/* 个人资料页大头像光环 */
.profile-vip-halo {
    border: none !important;
    box-shadow: none !important;
    padding: 4px;
    background: conic-gradient(from 45deg, #EA4335 0deg 90deg, #4285F4 90deg 180deg, #34A853 180deg 270deg, #FBBC05 270deg 360deg);
    border-radius: 50%;
}

/* 侧边栏头像光环 */
.sidebar-vip-halo {
    border: none !important;
    box-shadow: none !important;
    padding: 3px;
    background: conic-gradient(from 45deg, #EA4335 0deg 90deg, #4285F4 90deg 180deg, #34A853 180deg 270deg, #FBBC05 270deg 360deg);
    border-radius: 50%;
}