/* ========== 个人中心（统一首页卡片布局） ========== */

/* 用户信息区（替代首页搜索区） */
.profile-hero {
    text-align: center;
    padding: 40px 24px 32px;
    background: var(--bg-warm);
    border-bottom: 1px solid var(--border-light);
}
.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #1a1a1a;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}
.profile-name {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}
.profile-email {
    font-size: 13px;
    color: #999;
    margin-bottom: 16px;
}
.profile-vip-badge {
    display: inline-block;
    background: #b8956a;
    color: #fff;
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 4px;
    margin-bottom: 4px;
}
.profile-vip-date {
    font-size: 12px;
    color: #b8956a;
    margin-bottom: 12px;
}

/* 菜单栏（替代首页分类筛选） */
.profile-menu-bar {
    display: flex;
    gap: 8px;
    padding: 12px 24px;
    border-bottom: 1px solid var(--border-light);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.profile-menu-bar::-webkit-scrollbar { display: none; }
.profile-menu-btn {
    flex-shrink: 0;
    padding: 6px 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #fff;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    text-decoration: none;
}
.profile-menu-btn:hover {
    border-color: #b8956a;
    color: #b8956a;
}
.profile-menu-btn.active {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

/* 内容区 */
.profile-content {
    padding: 24px;
    min-height: 400px;
}

/* 标签页 */
.profile-tab { display: none; }
.profile-tab.active { display: block; }
.profile-title { font-size: 20px; font-weight: 600; color: #1a1a1a; margin-bottom: 20px; }

/* 表格 */
.profile-table-wrap { overflow-x: auto; }
.profile-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.profile-table th { text-align: left; padding: 10px 12px; border-bottom: 1px solid #eee; font-weight: 600; color: #666; white-space: nowrap; }
.profile-table td { padding: 12px; border-bottom: 1px solid #f0f0f0; color: #333; vertical-align: middle; }
.profile-table tr:hover td { background: #fafafa; }
.profile-table .profile-empty { text-align: center; color: #999; padding: 40px 12px; }
.profile-table a { color: #1a1a1a; text-decoration: none; font-weight: 500; }
.profile-table a:hover { text-decoration: underline; }

/* 状态标签 */
.profile-status { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.profile-status-paid { background: #e8f5e9; color: #2e7d32; }
.profile-status-pending { background: #fff3e0; color: #ef6c00; }

/* 收藏网格 */
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.profile-empty-block { text-align: center; color: #999; padding: 60px 20px; grid-column: 1 / -1; }

/* 收藏卡片 */
.profile-fav-card {
    position: relative;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow .2s;
    background: #fff;
}
.profile-fav-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.profile-fav-card .resource-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 2;
}
.profile-fav-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 2;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(0,0,0,.5);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.profile-fav-remove:hover { background: rgba(160,80,80,.8); }
.profile-fav-cover {
    display: block;
    aspect-ratio: 9/16;
    background: #f5f5f5;
    overflow: hidden;
}
.profile-fav-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.profile-fav-body { padding: 10px; }
.profile-fav-title {
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
}
.profile-fav-title:hover { color: #b8956a; }
.profile-fav-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}
.profile-fav-price { font-size: 12px; color: #b8956a; font-weight: 600; }
.profile-fav-free { font-size: 12px; color: #5a8a6e; }

/* 分页 */
.profile-pagination { display: flex; gap: 6px; justify-content: center; margin-top: 20px; }
.profile-pagination button { min-width: 32px; height: 32px; border: 1px solid #ddd; background: #fff; border-radius: 4px; cursor: pointer; font-size: 13px; color: #333; }
.profile-pagination button:hover { border-color: #1a1a1a; }
.profile-pagination button.active { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
.profile-pagination button:disabled { opacity: .4; cursor: not-allowed; }

/* 响应式 */
@media (max-width: 768px) {
    .profile-hero { padding: 30px 16px 24px; }
    .profile-avatar { width: 60px; height: 60px; font-size: 24px; }
    .profile-name { font-size: 18px; }
    .profile-menu-bar { padding: 10px 14px; gap: 6px; }
    .profile-menu-btn { padding: 5px 12px; font-size: 12px; }
    .profile-content { padding: 16px; }
    .profile-title { font-size: 16px; margin-bottom: 14px; }
    .profile-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .profile-table th, .profile-table td { padding: 8px; font-size: 12px; }
}