/* creator-profile.css — Custom styles for public creator pages */

:root {
    --cp-bg: #0f1117;
    --cp-surface: #1a1d24;
    --cp-surface-hover: #22262e;
    --cp-border: #2a2e38;
    --cp-text: #e5e7eb;
    --cp-text-muted: #9ca3af;
    --cp-text-dim: #6b7280;
    --cp-accent: #6366f1;
    --cp-accent-hover: #818cf8;
    --cp-accent-soft: rgba(99, 102, 241, 0.12);
    --cp-heart: #ef4444;
    --cp-success: #22c55e;
    --cp-warning: #f59e0b;
    --cp-radius: 1rem;
    --cp-radius-sm: 0.5rem;
}

/* ── Layout ─────────────────────────────────────────── */
.cp-page {
    background: var(--cp-bg);
    min-height: 100vh;
    color: var(--cp-text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.cp-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ── Cover ──────────────────────────────────────────── */
.cp-cover {
    width: 100%;
    height: 280px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e1b4b 100%);
}

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

.cp-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(15, 17, 23, 0.85) 100%);
}

/* ── Profile Header ─────────────────────────────────── */
.cp-header {
    position: relative;
    margin-top: -4rem;
    padding-bottom: 1.5rem;
}

.cp-header-top {
    display: flex;
    align-items: flex-end;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.cp-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--cp-bg);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    object-fit: cover;
    background: var(--cp-surface);
    flex-shrink: 0;
}

.cp-identity {
    flex: 1;
    min-width: 200px;
    padding-bottom: 0.5rem;
}

.cp-display-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}

.cp-username {
    font-size: 1rem;
    color: var(--cp-text-muted);
    margin-top: 0.15rem;
}

.cp-bio {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: var(--cp-text);
    line-height: 1.6;
    max-width: 640px;
    white-space: pre-line;
}

/* ── Follow button ──────────────────────────────────── */
.cp-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-shrink: 0;
    padding-bottom: 0.5rem;
}

.cp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--cp-radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
    text-decoration: none;
}

.cp-btn-primary {
    background: var(--cp-accent);
    color: #fff;
}
.cp-btn-primary:hover {
    background: var(--cp-accent-hover);
    color: #fff;
}

.cp-btn-outline {
    background: transparent;
    color: var(--cp-text);
    border: 1px solid var(--cp-border);
}
.cp-btn-outline:hover {
    background: var(--cp-surface-hover);
    border-color: var(--cp-text-muted);
}

.cp-btn-following {
    background: var(--cp-accent-soft);
    color: var(--cp-accent-hover);
    border: 1px solid transparent;
}
.cp-btn-following:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}
.cp-btn-following:hover .cp-btn-label { display: none; }
.cp-btn-following:hover .cp-btn-label-hover { display: inline; }
.cp-btn-following .cp-btn-label-hover { display: none; }

/* ── Stats row ──────────────────────────────────────── */
.cp-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.cp-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--cp-text-muted);
    font-size: 0.9rem;
}

.cp-stat-value {
    font-weight: 700;
    color: var(--cp-text);
}

/* ── Social links ───────────────────────────────────── */
.cp-socials {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.cp-social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--cp-radius-sm);
    background: var(--cp-surface);
    color: var(--cp-text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.15s ease;
    border: 1px solid var(--cp-border);
}
.cp-social-link:hover {
    background: var(--cp-surface-hover);
    color: var(--cp-text);
    border-color: var(--cp-text-muted);
}

/* ── Announcement ───────────────────────────────────── */
.cp-announcement {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--cp-accent-soft);
    border-left: 3px solid var(--cp-accent);
    border-radius: var(--cp-radius-sm);
    color: var(--cp-text);
    font-size: 0.92rem;
    line-height: 1.6;
}

/* ── Sponsor link ───────────────────────────────────── */
.cp-sponsor {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    border-radius: var(--cp-radius-sm);
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.12), rgba(168, 85, 247, 0.12));
    border: 1px solid rgba(168, 85, 247, 0.25);
    color: #c084fc;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.15s ease;
}
.cp-sponsor:hover {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(168, 85, 247, 0.2));
    color: #d8b4fe;
}

/* ── Tabs ───────────────────────────────────────────── */
.cp-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--cp-border);
    margin-top: 2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.cp-tab {
    padding: 0.85rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cp-text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    cursor: pointer;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.cp-tab:hover {
    color: var(--cp-text);
}
.cp-tab.active {
    color: var(--cp-accent-hover);
    border-bottom-color: var(--cp-accent);
}

/* ── Model grid ─────────────────────────────────────── */
.cp-models {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
    padding: 1.5rem 0 3rem;
}

.cp-model-card {
    background: var(--cp-surface);
    border-radius: var(--cp-radius);
    overflow: hidden;
    border: 1px solid var(--cp-border);
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.cp-model-card:hover {
    transform: translateY(-2px);
    border-color: var(--cp-text-dim);
}

.cp-model-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    background: #111318;
    overflow: hidden;
}
.cp-model-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cp-model-fav-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.65);
    color: var(--cp-heart);
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.cp-model-body {
    padding: 0.85rem 1rem;
}

.cp-model-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--cp-text);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}
.cp-model-title:hover {
    color: #fff;
}

.cp-model-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--cp-text-dim);
}

/* ── Empty state ────────────────────────────────────── */
.cp-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--cp-text-muted);
}
.cp-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.4;
}

/* ── 404 page ───────────────────────────────────────── */
.cp-notfound {
    text-align: center;
    padding: 6rem 1rem;
}
.cp-notfound h1 {
    font-size: 4rem;
    font-weight: 800;
    color: var(--cp-text-dim);
}
.cp-notfound p {
    color: var(--cp-text-muted);
    margin-top: 0.5rem;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
    .cp-cover { height: 180px; }
    .cp-avatar { width: 88px; height: 88px; }
    .cp-display-name { font-size: 1.35rem; }
    .cp-header-top { gap: 1rem; }
    .cp-models {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.75rem;
    }
    .cp-stats { gap: 1.25rem; }
}

@media (max-width: 480px) {
    .cp-header-top {
        flex-direction: column;
        align-items: flex-start;
    }
    .cp-actions {
        width: 100%;
    }
    .cp-btn {
        flex: 1;
        justify-content: center;
    }
}
