/* /css/creatorprofile.css */

/* ── Loading / error ─────────────────────────────────── */
.cp-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60vh;
}

.cp-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #1f1f2e;
    border-top-color: #ff9800;
    border-radius: 50%;
    animation: cp-spin 0.8s linear infinite;
}

@keyframes cp-spin { to { transform: rotate(360deg); } }

.cp-not-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60vh;
    gap: 12px;
    text-align: center;
    color: #888;
}

.cp-not-found h2 { color: #ccc; margin: 0; }

/* ── Header ──────────────────────────────────────────── */
.cp-header {
    background: linear-gradient(180deg, #16161f 0%, #0d0d10 100%);
    border-bottom: 1px solid #1f1f2e;
    padding: 36px 32px 28px;
}

.cp-header-inner {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    max-width: 1100px;
    margin: 0 auto;
}

.cp-avatar {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #2a2a3a;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.cp-identity {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cp-display-name {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 800;
    color: #f0f0f0;
    line-height: 1.1;
}

.cp-handle {
    font-size: 0.9rem;
    color: #ff9800;
    font-weight: 500;
}

.cp-bio {
    margin: 4px 0 0;
    color: #888;
    font-size: 0.92rem;
    line-height: 1.55;
    max-width: 560px;
}

.cp-stats {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 10px;
}

.cp-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
}

.cp-stat:first-child { padding-left: 0; }

.cp-stat-val {
    font-size: 1.25rem;
    font-weight: 700;
    color: #eee;
}

.cp-stat-lbl {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cp-stat-sep {
    width: 1px;
    height: 32px;
    background: #2a2a3a;
}

/* ── Action buttons ──────────────────────────────────── */
.cp-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
    align-items: stretch;
    min-width: 140px;
}

.btn-subscribe {
    padding: 10px 20px;
    background: linear-gradient(135deg, #ff9800, #ff6f00);
    color: #0d0d10;
    border: none;
    border-radius: 22px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
    text-align: center;
}

.btn-subscribe:hover { opacity: 0.88; }

.btn-follow {
    padding: 9px 20px;
    background: #ff9800;
    color: #0d0d10;
    border: none;
    border-radius: 22px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.2s;
    text-align: center;
}

.btn-follow:hover { background: #ffb733; }

.btn-follow.following {
    background: transparent;
    border: 1px solid #333;
    color: #888;
}

.btn-follow.following:hover { border-color: #e53935; color: #e53935; }

.btn-message {
    padding: 9px;
    background: transparent;
    border: 1px solid #2a2a3a;
    color: #888;
    border-radius: 22px;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    text-align: center;
}

.btn-message:hover { border-color: #ff9800; color: #ff9800; }

.btn-edit {
    padding: 9px 18px;
    background: transparent;
    border: 1px solid #2a2a3a;
    color: #aaa;
    border-radius: 22px;
    font-size: 0.88rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: border-color 0.2s, color 0.2s;
    display: block;
}

.btn-edit:hover { border-color: #ff9800; color: #ff9800; }

/* ── Tabs ─────────────────────────────────────────────── */
.cp-tabs {
    display: flex;
    border-bottom: 1px solid #1f1f2e;
    background: #0d0d10;
    padding: 0 32px;
    gap: 4px;
    overflow-x: auto;
}

.cp-tab {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 14px 18px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s;
    margin-bottom: -1px;
}

.cp-tab:hover { color: #aaa; }

.cp-tab.active {
    color: #ff9800;
    border-bottom-color: #ff9800;
    font-weight: 700;
}

.cp-tab-count {
    background: #1f1f2e;
    color: #888;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
}

.cp-tab.active .cp-tab-count {
    background: rgba(255,152,0,0.2);
    color: #ff9800;
}

/* ── Body / grid ─────────────────────────────────────── */
.cp-body {
    padding: 28px 32px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.cp-empty {
    text-align: center;
    color: #555;
    padding: 60px 20px;
    font-size: 0.95rem;
}

.cp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

/* ── Cards ───────────────────────────────────────────── */
.cp-card {
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    background: #13131a;
    border: 1px solid #1f1f2e;
    transition: transform 0.18s, border-color 0.18s;
    display: flex;
    flex-direction: column;
}

.cp-card:hover {
    transform: translateY(-3px);
    border-color: #2a2a3a;
}

.cp-thumb-wrap {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #0d0d10;
}

.cp-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.cp-card:hover .cp-thumb { transform: scale(1.04); }

.cp-thumb.blurred {
    filter: blur(16px) brightness(0.35);
    transform: scale(1.06);
}

.cp-card-title {
    padding: 10px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

.locked-title { color: #666; }

/* ── Badges on thumbs ────────────────────────────────── */
.cp-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.08);
}

.cp-badge-video { background: rgba(0,0,0,0.65); color: #eee; }
.cp-badge-nsfw  { background: rgba(244,67,54,0.75); color: #fff; }

/* ── NSFW overlay ────────────────────────────────────── */
.cp-nsfw-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    z-index: 2;
}

.cp-nsfw-overlay span {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
}

.cp-nsfw-overlay small {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.6);
}

/* ── Lock overlay ────────────────────────────────────── */
.cp-lock-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 2;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(2px);
}

.cp-lock-icon { font-size: 1.8rem; }

.cp-lock-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #ddd;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cp-lock-btn {
    padding: 6px 16px;
    background: #ff9800;
    color: #0d0d10;
    border: none;
    border-radius: 16px;
    font-weight: 700;
    font-size: 0.78rem;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 4px;
}

.cp-lock-btn:hover { background: #ffb733; }

/* ── Overflow card ───────────────────────────────────── */
.cp-overflow-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    background: rgba(0,0,0,0.5);
}

.cp-overflow-overlay span {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
}

/* ── NSFW modal ──────────────────────────────────────── */
.cp-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.cp-modal {
    background: #16161f;
    border: 1px solid #2a2a3a;
    border-radius: 18px;
    padding: 36px 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7);
}

.cp-modal-icon { font-size: 3rem; }

.cp-modal h2 {
    margin: 0;
    font-size: 1.3rem;
    color: #eee;
}

.cp-modal p {
    margin: 0;
    color: #999;
    font-size: 0.92rem;
    line-height: 1.55;
}

.cp-modal strong { color: #fff; }

.cp-modal-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

.btn-main {
    padding: 12px 28px;
    background: #ff9800;
    color: #0d0d10;
    border: none;
    border-radius: 22px;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}

.btn-main:hover { background: #ffb733; }

.btn-ghost {
    padding: 10px 28px;
    background: transparent;
    border: 1px solid #2a2a3a;
    color: #888;
    border-radius: 22px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s;
}

.btn-ghost:hover { border-color: #555; color: #aaa; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 720px) {
    .cp-header { padding: 24px 16px; }
    .cp-header-inner { flex-wrap: wrap; }
    .cp-avatar { width: 80px; height: 80px; }
    .cp-display-name { font-size: 1.4rem; }
    .cp-actions { flex-direction: row; flex-wrap: wrap; min-width: unset; }
    .cp-tabs { padding: 0 16px; }
    .cp-body { padding: 20px 16px; }
    .cp-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
}
