/* ========== 用户中心 - 修复版 CSS ========== */

/* 重置页面默认边距 */
.gj-user-center {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 24px 60px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #1E293B;
    box-sizing: border-box;
}

/* --- 未登录状态（用于短代码输出的wrapper） --- */
.gj-login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 40px 24px;
    background: #F5F7FA;
}
.gj-login-card {
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
    text-align: center;
}
.gj-login-header { margin-bottom: 24px; }
.gj-login-logo { font-size: 22px; font-weight: 700; color: #1E293B; margin-bottom: 8px; }
.gj-login-subtitle { font-size: 15px; color: #64748B; margin: 0; }

/* --- 个人信息卡片 --- */
.gj-uc-profile {
    display: flex;
    align-items: center;
    gap: 24px;
    background: #FFFFFF;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.gj-uc-avatar { flex-shrink: 0; }
.gj-uc-avatar-img {
    border-radius: 50%;
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 3px solid #E2E8F0;
}
.gj-uc-info { flex: 1; min-width: 200px; }
.gj-uc-name {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: #1E293B;
}
.gj-uc-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}
.gj-uc-badge.gj-level-free { background: #F1F5F9; color: #64748B; }
.gj-uc-badge.gj-level-silver { background: #E0E7FF; color: #4F46E5; }
.gj-uc-badge.gj-level-gold { background: #FEF3C7; color: #D97706; }

.gj-uc-email { color: #64748B; margin: 0 0 4px 0; font-size: 15px; }
.gj-uc-meta { color: #94A3B8; margin: 0; font-size: 13px; }
.gj-uc-expire-warn { color: #F59E0B; font-weight: 600; }
.gj-uc-expire-bad { color: #EF4444; font-weight: 600; }

.gj-uc-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

/* --- 按钮系统 --- */
.gj-uc-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    box-sizing: border-box;
}
.gj-uc-btn:hover { text-decoration: none; }
.gj-uc-btn-primary { background: #4A6CF7; color: #FFF; }
.gj-uc-btn-primary:hover { background: #3B5DE7; color: #FFF; }
.gj-uc-btn-outline { background: #FFF; color: #475569; border: 1px solid #E2E8F0; }
.gj-uc-btn-outline:hover { background: #F8FAFC; color: #1E293B; }
.gj-uc-btn-danger { color: #EF4444; border-color: #FECACA; }
.gj-uc-btn-danger:hover { background: #FEF2F2; }
.gj-uc-btn-silver { background: #6366F1; color: #FFF; }
.gj-uc-btn-silver:hover { background: #4F46E5; color: #FFF; }
.gj-uc-btn-gold { background: #F59E0B; color: #FFF; }
.gj-uc-btn-gold:hover { background: #D97706; color: #FFF; }

/* --- 数据卡片 --- */
.gj-uc-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.gj-uc-stat-card {
    background: #FFFFFF;
    border-radius: 14px;
    padding: 28px 16px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: transform 0.15s, box-shadow 0.15s;
}
.gj-uc-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.gj-uc-stat-icon { font-size: 28px; margin-bottom: 8px; }
.gj-uc-stat-value { font-size: 28px; font-weight: 800; color: #1E293B; line-height: 1.2; }
.gj-uc-stat-unit { font-size: 16px; font-weight: 400; color: #94A3B8; }
.gj-uc-stat-label { font-size: 13px; color: #94A3B8; margin-top: 4px; }

/* --- 会员状态条 --- */
.gj-uc-membership-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    border-radius: 14px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}
.gj-uc-membership-bar.gj-level-free { background: #F8FAFC; border: 1px solid #E2E8F0; }
.gj-uc-membership-bar.gj-level-silver { background: #EEF2FF; border: 1px solid #C7D2FE; }
.gj-uc-membership-bar.gj-level-gold { background: #FFFBEB; border: 1px solid #FDE68A; }
.gj-uc-membership-text { font-size: 15px; color: #475569; line-height: 1.6; }
.gj-uc-membership-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* --- 通用卡片 --- */
.gj-uc-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin-bottom: 24px;
}
.gj-uc-card-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #1E293B;
}

/* --- 空状态 --- */
.gj-uc-empty {
    text-align: center;
    padding: 40px 20px;
}
.gj-uc-empty-icon { font-size: 48px; margin-bottom: 12px; }
.gj-uc-empty p { font-size: 16px; color: #94A3B8; margin: 0 0 16px 0; }
.gj-uc-empty-text { color: #94A3B8; text-align: center; padding: 20px; margin: 0; }

/* --- EA列表 --- */
.gj-uc-ea-list { display: flex; flex-direction: column; gap: 10px; }
.gj-uc-ea-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #F1F5F9;
    transition: background 0.2s, border-color 0.2s;
}
.gj-uc-ea-item:hover { background: #F8FAFC; border-color: #E2E8F0; }
.gj-uc-ea-icon { font-size: 28px; flex-shrink: 0; }
.gj-uc-ea-info { flex: 1; min-width: 0; }
.gj-uc-ea-title {
    font-size: 15px;
    font-weight: 600;
    color: #1E293B;
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gj-uc-ea-title:hover { color: #4A6CF7; }
.gj-uc-ea-time { font-size: 12px; color: #94A3B8; }
.gj-uc-ea-link { font-size: 14px; color: #4A6CF7; text-decoration: none; white-space: nowrap; flex-shrink: 0; }
.gj-uc-ea-link:hover { text-decoration: underline; }

/* --- 下载记录表格 --- */
.gj-uc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.gj-uc-table thead th {
    background: #F8FAFC;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #64748B;
    font-size: 13px;
    border-bottom: 2px solid #E2E8F0;
}
.gj-uc-table tbody td {
    padding: 12px 16px;
    color: #475569;
    border-bottom: 1px solid #F1F5F9;
}
.gj-uc-table tbody tr:hover td { background: #FAFBFC; }

/* --- 修改密码表单 --- */
.gj-uc-password-form { margin-bottom: 24px; }
.gj-uc-form-row { margin-bottom: 16px; }
.gj-uc-form-row label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}
.gj-uc-form-row input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    font-size: 15px;
    color: #1E293B;
    background: #F8FAFC;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.gj-uc-form-row input:focus {
    outline: none;
    border-color: #4A6CF7;
    box-shadow: 0 0 0 3px rgba(74,108,247,0.1);
    background: #FFFFFF;
}
.gj-uc-msg {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin: 12px 0;
}
.gj-uc-msg-success { background: #ECFDF5; color: #059669; border: 1px solid #A7F3D0; }
.gj-uc-msg-error { background: #FEF2F2; color: #DC2626; border: 1px solid #FECACA; }

/* --- 响应式 --- */
@media (max-width: 768px) {
    .gj-uc-stats { grid-template-columns: repeat(2, 1fr); }
    .gj-uc-profile { padding: 20px; }
}
@media (max-width: 640px) {
    .gj-user-center { padding: 20px 12px 40px; }
    .gj-uc-profile { text-align: center; flex-direction: column; padding: 20px; }
    .gj-uc-name { justify-content: center; }
    .gj-uc-actions { flex-direction: row; width: 100%; justify-content: center; }
    .gj-uc-membership-bar { flex-direction: column; text-align: center; }
    .gj-uc-membership-actions { justify-content: center; }
    .gj-uc-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .gj-uc-stats { grid-template-columns: 1fr; }
    .gj-uc-table { font-size: 12px; }
    .gj-uc-table th, .gj-uc-table td { padding: 8px 10px; }
    .gj-uc-ea-item { flex-wrap: wrap; }
    .gj-uc-ea-link { width: 100%; text-align: right; }
}
