/* ── CSS Reset & Variables ───────────────────────────── */
:root {
    --bg:            #0d0d0f;
    --sidebar-bg:    #111113;
    --sidebar-w:     210px;
    --topbar-h:      56px;

    --card-bg:       rgba(22, 22, 26, 0.7);
    --card-border:   rgba(255,255,255,0.07);
    --card-border-h: rgba(139,92,246,0.4);

    --text-1:  #f4f4f5;
    --text-2:  #a1a1aa;
    --text-3:  #52525b;

    --accent:       #8b5cf6;
    --accent-glow:  rgba(139,92,246,0.18);
    --accent-grad:  linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);

    --font:  'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mono:  'JetBrains Mono', monospace;

    --r-lg: 14px;
    --r-md: 10px;
    --r-sm:  7px;

    --ease: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text-1);
    font-family: var(--font);
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; }
img, video { display: block; }

/* ── Background orbs ─────────────────────────────────── */
.glass-bg {
    position: fixed; inset: 0; z-index: -3;
    background: radial-gradient(circle at 70% 20%, rgba(139,92,246,0.06) 0%, transparent 60%),
                radial-gradient(circle at 20% 80%, rgba(99,102,241,0.05) 0%, transparent 60%),
                #0d0d0f;
}
.glow-orb {
    position: fixed; border-radius: 50%;
    filter: blur(120px); z-index: -2; opacity: 0.18; pointer-events: none;
}
.orb-1 { width:500px; height:500px; background:#6366f1; top:-200px; right:-100px; animation: orb 20s infinite alternate; }
.orb-2 { width:400px; height:400px; background:#7c3aed; bottom:-150px; left:-100px; animation: orb 25s infinite alternate-reverse; }
@keyframes orb { 0%{transform:translate(0,0) scale(1);} 100%{transform:translate(80px,40px) scale(1.1);} }

/* ── Sidebar ──────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    z-index: 200;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s ease;
}

.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 199;
    backdrop-filter: blur(4px);
}

/* Logo */
.sidebar-logo {
    display: flex; align-items: center; gap: 0.55rem;
    padding: 1.2rem 1.25rem 1rem;
    border-bottom: 1px solid var(--card-border);
    flex-shrink: 0;
}
.sidebar-lock-icon { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.sidebar-brand {
    font-size: 1rem; font-weight: 800;
    letter-spacing: -0.03em; color: var(--text-1);
    text-transform: lowercase;
}
.sidebar-brand span { color: var(--accent); }

/* Sidebar sections */
.sidebar-section { padding: 1.25rem 0.75rem 0.5rem; flex-shrink: 0; }
.sidebar-section-label {
    font-size: 0.65rem; font-weight: 700;
    color: var(--text-3); letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0 0.5rem; margin-bottom: 0.5rem;
}

/* Nav links */
.sidebar-nav-link {
    display: flex; align-items: center; gap: 0.65rem;
    padding: 0.6rem 0.75rem; border-radius: var(--r-sm);
    font-size: 0.9rem; font-weight: 600; color: var(--text-2);
    transition: var(--ease); margin-bottom: 2px;
}
.sidebar-nav-link:hover { color: var(--text-1); background: rgba(255,255,255,0.05); }
.sidebar-nav-link.active { color: var(--text-1); background: rgba(139,92,246,0.12); border-left: 3px solid var(--accent); padding-left: calc(0.75rem - 3px); }
.sidebar-nav-link svg { flex-shrink: 0; opacity: 0.7; }
.sidebar-nav-link.active svg { opacity: 1; color: var(--accent); }

.sidebar-social-link { color: var(--text-2); }

.sidebar-spacer { flex: 1; min-height: 1rem; }

/* Auth buttons */
.sidebar-auth-section {
    padding: 0.75rem;
    border-top: 1px solid var(--card-border);
    display: flex; flex-direction: column; gap: 0.5rem;
    flex-shrink: 0;
}
.sidebar-auth-btn {
    display: flex; align-items: center; justify-content: center; gap: 0.4rem;
    padding: 0.55rem 1rem; border-radius: var(--r-sm);
    font-size: 0.85rem; font-weight: 600;
    transition: var(--ease); border: none; text-align: center;
}
.sidebar-login-btn { background: rgba(255,255,255,0.05); color: var(--text-2); border: 1px solid var(--card-border); }
.sidebar-login-btn:hover { background: rgba(255,255,255,0.09); color: var(--text-1); }
.sidebar-signup-btn { background: var(--accent-grad); color: #fff; box-shadow: 0 2px 10px rgba(139,92,246,0.3); }
.sidebar-signup-btn:hover { box-shadow: 0 4px 16px rgba(139,92,246,0.45); transform: translateY(-1px); }
.sidebar-premium-btn { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; box-shadow: 0 2px 10px rgba(245,158,11,0.25); }
.sidebar-premium-btn:hover { box-shadow: 0 4px 16px rgba(245,158,11,0.4); transform: translateY(-1px); }

.sidebar-footer { padding: 0.75rem 1.25rem; flex-shrink: 0; }
.sidebar-footer p { font-size: 0.7rem; color: var(--text-3); }

/* ── Main Panel ───────────────────────────────────────── */
.main-panel {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex; flex-direction: column;
}

/* ── Top Bar ──────────────────────────────────────────── */
.top-bar {
    position: sticky; top: 0; z-index: 100;
    height: var(--topbar-h);
    background: rgba(13,13,15,0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--card-border);
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0 1.25rem;
}

.hamburger-btn {
    display: none;
    background: transparent; border: none;
    color: var(--text-2); padding: 0.3rem;
    border-radius: var(--r-sm); flex-shrink: 0;
    transition: var(--ease);
}
.hamburger-btn:hover { color: var(--text-1); background: rgba(255,255,255,0.06); }

/* ── Unified Search Bar (LeaksHaven-style) ──────────────── */
.unified-search-bar {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    border-radius: 999px;
    padding: 0.25rem;
    gap: 0.25rem;
    transition: var(--ease);
    width: 100%;
    max-width: 680px;
    box-sizing: border-box;
}
.unified-search-bar:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: rgba(139, 92, 246, 0.04);
}

.search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 0.75rem;
    min-width: 0;
}
.search-icon {
    flex-shrink: 0;
    color: var(--text-3);
}
.unified-search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-1);
    font-family: var(--font);
    font-size: 0.88rem;
    min-width: 0;
}
.unified-search-bar input::placeholder {
    color: var(--text-3);
}

.clear-search-btn {
    background: transparent;
    border: none;
    color: var(--text-3);
    display: flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0 0.4rem;
    transition: var(--ease);
}
.clear-search-btn:hover {
    color: var(--text-1);
}


/* Dropdown Sort Pill inside Search Bar */
.search-sort-wrap {
    position: relative;
    flex-shrink: 0;
}
.search-sort-pill {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-2);
    font-size: 0.73rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    font-family: var(--font);
    transition: var(--ease);
    letter-spacing: 0.04em;
}
.search-sort-pill:hover,
.search-sort-pill.open {
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text-1);
    background: rgba(255, 255, 255, 0.07);
}
.search-sort-pill svg.clock-icon {
    opacity: 0.7;
}
.search-sort-pill svg.chevron-icon {
    transition: transform 0.2s ease;
}
.search-sort-pill.open svg.chevron-icon {
    transform: rotate(180deg);
}

.search-sort-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 0;
    background: rgba(16, 16, 20, 0.99);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--r-md);
    padding: 0.4rem;
    min-width: 155px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65);
    z-index: 300;
    flex-direction: column;
    gap: 0.05rem;
}
.search-sort-dropdown.open {
    display: flex;
}
.sort-opt-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.7rem;
    border-radius: var(--r-sm);
    background: transparent;
    border: none;
    color: var(--text-2);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    font-family: var(--font);
    transition: var(--ease);
    width: 100%;
}
.sort-opt-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-1);
}
.sort-opt-btn.active {
    background: rgba(139, 92, 246, 0.12);
    color: #c4b5fd;
}

/* Dynamically injected search stats */
.search-results-stats {
    font-size: 0.85rem;
    color: var(--text-2);
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.topbar-models-btn {
    display: flex; align-items: center; gap: 0.4rem;
    padding: 0.45rem 0.9rem; border-radius: var(--r-md);
    background: rgba(255,255,255,0.05); border: 1px solid var(--card-border);
    font-size: 0.85rem; font-weight: 600; color: var(--text-2);
    transition: var(--ease); flex-shrink: 0; white-space: nowrap;
}
.topbar-models-btn:hover { color: var(--text-1); background: rgba(255,255,255,0.09); border-color: rgba(255,255,255,0.12); }

/* ── Sort Bar ─────────────────────────────────────────── */
.sort-bar {
    display: flex; align-items: center; gap: 1rem;
    padding: 0.6rem 1.25rem;
    border-bottom: 1px solid var(--card-border);
    background: rgba(13,13,15,0.6);
    overflow-x: auto; flex-shrink: 0;
    scrollbar-width: none;
}
.sort-bar::-webkit-scrollbar { display: none; }
.sort-bar.hidden { display: none; }

.sort-options-row {
    display: flex; align-items: center; gap: 0.25rem; flex-shrink: 0;
}

.sort-btn {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.4rem 0.8rem; border-radius: 999px;
    background: transparent; border: 1px solid transparent;
    color: var(--text-3); font-size: 0.8rem; font-weight: 600;
    transition: var(--ease); white-space: nowrap;
}
.sort-btn:hover { color: var(--text-1); background: rgba(255,255,255,0.04); }
.sort-btn.active { background: rgba(139,92,246,0.12); border-color: rgba(139,92,246,0.3); color: #c4b5fd; }
.sort-btn svg { opacity: 0.6; }
.sort-btn.active svg { opacity: 1; }

.sort-bar-count {
    margin-left: auto; flex-shrink: 0;
    font-size: 0.78rem; color: var(--text-3); font-weight: 500; white-space: nowrap;
}

/* ── Content Area ─────────────────────────────────────── */
.content-area {
    flex: 1; padding: 1.5rem 1.25rem 6rem;
}

/* ── Card Grid ────────────────────────────────────────── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

/* ── Mobile Topbar: HIDDEN on desktop, shown on ≤480px via media query ── */
.mobile-topbar { display: none; }

/* ── Gallery Card ─────────────────────────────────────── */
.gallery-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--r-lg);
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: var(--ease);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    cursor: pointer;
}
.gallery-card:hover {
    transform: translateY(-4px);
    border-color: var(--card-border-h, rgba(139,92,246,0.4));
    box-shadow: 0 8px 24px -8px rgba(124,58,237,0.3);
}

/* Card media */
.card-media {
    position: relative; width: 100%; aspect-ratio: 3/4;
    background: #09090b; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.media-blur-bg {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: cover;
    filter: blur(16px) brightness(0.4);
    transform: scale(1.15); z-index: 1; pointer-events: none;
    transition: var(--ease);
}
.media-fg {
    position: relative; z-index: 2;
    max-width: 100%; max-height: 100%;
    width: auto; height: auto; object-fit: contain;
    transition: var(--ease);
}
.gallery-card:hover .media-blur-bg { transform: scale(1.25); }
.gallery-card:hover .media-fg { transform: scale(1.04); }

/* Gradient placeholder */
.gradient-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; font-weight: 800; color: rgba(255,255,255,0.8);
    letter-spacing: -0.04em; font-family: var(--mono);
}

/* Status badge */
.status-badge {
    position: absolute; top: 0.6rem; left: 0.6rem; z-index: 10;
    padding: 0.28rem 0.65rem; border-radius: 999px;
    font-size: 0.7rem; font-weight: 700;
    letter-spacing: 0.04em; text-transform: uppercase;
    pointer-events: none; border: 1px solid transparent;
    backdrop-filter: blur(8px);
}
.badge-new      { background: rgba(59,130,246,0.18); border-color: rgba(59,130,246,0.35); color: #93c5fd; }
.badge-hot      { background: rgba(239,68,68,0.18);  border-color: rgba(239,68,68,0.35);  color: #fca5a5; }
.badge-trending { background: rgba(245,158,11,0.18); border-color: rgba(245,158,11,0.35); color: #fcd34d; }

/* Card Body */
.card-body { padding: 0.9rem; display: flex; flex-direction: column; gap: 0.75rem; flex: 1; }
.card-header-info { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.card-title {
    font-size: 0.95rem; font-weight: 700; color: var(--text-1);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1;
}
.link-count-badge {
    flex-shrink: 0; padding: 0.22rem 0.6rem; border-radius: 999px;
    background: rgba(139,92,246,0.16); border: 1px solid rgba(139,92,246,0.4);
    font-size: 0.7rem; font-weight: 700; color: #fff; white-space: nowrap;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}
.link-count-badge span {
    font-family: var(--mono);
    color: #c4b5fd;
    text-shadow: 0 0 6px rgba(196, 181, 253, 0.85);
}

/* Card actions stacked vertically */
.card-actions { display: flex; flex-direction: column; gap: 0.55rem; width: 100%; margin-top: 0.2rem; }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.65rem 1rem; border-radius: var(--r-sm);
    font-size: 0.82rem; font-weight: 700; border: none;
    transition: var(--ease); white-space: nowrap; width: 100%;
    box-sizing: border-box;
}
.btn-primary { background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff; box-shadow: 0 2px 8px rgba(239,68,68,0.25); }
.btn-primary:hover { box-shadow: 0 4px 14px rgba(239,68,68,0.4); transform: translateY(-1px); }

@keyframes premiumPulse {
    0% { box-shadow: 0 0 12px rgba(124, 58, 237, 0.45); }
    50% { box-shadow: 0 0 25px rgba(139, 92, 246, 0.8), 0 0 40px rgba(139, 92, 246, 0.4); }
    100% { box-shadow: 0 0 12px rgba(124, 58, 237, 0.45); }
}

/* Premium button with neon purple/blue glow */
.btn-premium {
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
    border: 1px solid rgba(124, 58, 237, 0.4);
    color: #fff;
    box-shadow: 0 0 12px rgba(124, 58, 237, 0.45);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    animation: premiumPulse 2s infinite ease-in-out;
}
.btn-premium:hover {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 0 18px rgba(139, 92, 246, 0.7);
    transform: translateY(-1px);
}
.btn-icon-img { width: 14px; height: 14px; object-fit: contain; }
.btn-premium-icon { width: 13px; height: 13px; color: #fff; }

/* ── Models Grid ──────────────────────────────────────── */
.models-header {
    margin-bottom: 1.5rem;
}
.models-header-label {
    font-size: 0.7rem; font-weight: 700; color: var(--text-3);
    text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.35rem;
}
.models-header h2 { font-size: 2rem; font-weight: 800; letter-spacing: -0.04em; color: var(--text-1); }

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

.model-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--r-lg);
    overflow: hidden; cursor: pointer;
    transition: var(--ease);
    display: flex; flex-direction: column;
}
.model-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139,92,246,0.35);
    box-shadow: 0 8px 24px -8px rgba(124,58,237,0.3);
}
.model-card-media {
    position: relative; aspect-ratio: 3/4;
    overflow: hidden; background: #09090b;
}
.model-card-media img,
.model-card-media video {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.4s ease;
}
.model-card:hover .model-card-media img,
.model-card:hover .model-card-media video { transform: scale(1.06); }
.model-card-gradient-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; font-weight: 800; color: rgba(255,255,255,0.7);
}
.model-card-info {
    padding: 0.85rem 0.85rem 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
}
.model-card-name { font-size: 0.95rem; font-weight: 700; color: var(--text-1); }
.model-card-sub  { font-size: 0.75rem; color: var(--text-3); margin-top: 0.2rem; font-family: var(--mono); }

/* ── Model Profile View ───────────────────────────────── */
.profile-layout { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; align-items: start; }

.profile-sidebar { position: sticky; top: calc(var(--topbar-h) + 1rem); }

.profile-cover {
    width: 100%; aspect-ratio: 3/4; border-radius: var(--r-lg);
    overflow: hidden; background: #09090b; margin-bottom: 1.25rem;
}
.profile-cover img,
.profile-cover video {
    width: 100%; height: 100%; object-fit: cover;
}
.profile-cover-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 4rem; font-weight: 800; color: rgba(255,255,255,0.5);
}

.profile-name { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0.3rem; }
.profile-meta { font-size: 0.8rem; color: var(--text-3); margin-bottom: 1.25rem; }

.profile-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.profile-action-btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.5rem 0.85rem; border-radius: var(--r-sm);
    font-size: 0.82rem; font-weight: 600; color: var(--text-2);
    background: rgba(255,255,255,0.05); border: 1px solid var(--card-border);
    transition: var(--ease);
}
.profile-action-btn:hover { background: rgba(255,255,255,0.09); color: var(--text-1); }

.profile-section-label {
    font-size: 0.65rem; font-weight: 700; color: var(--text-3);
    text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.75rem;
}

/* Tags */
.profile-tags { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1.5rem; }
.profile-tag {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.45rem 0.75rem; border-radius: var(--r-sm);
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
    font-size: 0.82rem; color: var(--text-2); transition: var(--ease);
}
.profile-tag:hover { background: rgba(139,92,246,0.08); border-color: rgba(139,92,246,0.2); color: var(--text-1); }
.tag-hash { color: var(--accent); font-weight: 700; margin-right: 0.25rem; }
.tag-arrow { font-size: 0.65rem; color: var(--text-3); }

/* Meta table */
.profile-meta-table { width: 100%; border-collapse: collapse; }
.profile-meta-table tr { border-bottom: 1px solid rgba(255,255,255,0.04); }
.profile-meta-table td { padding: 0.5rem 0; font-size: 0.78rem; vertical-align: top; }
.profile-meta-table td:first-child { color: var(--text-3); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.65rem; padding-right: 0.75rem; white-space: nowrap; }
.profile-meta-table td:last-child { color: var(--text-2); }

/* Profile content area */
.profile-content {}
.profile-content-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 1.25rem; color: var(--text-1); }

/* Back button */
.back-btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.4rem 0.75rem 0.4rem 0.5rem; border-radius: var(--r-sm);
    background: rgba(255,255,255,0.05); border: 1px solid var(--card-border);
    font-size: 0.82rem; font-weight: 600; color: var(--text-2);
    margin-bottom: 1.5rem; transition: var(--ease); cursor: pointer;
}
.back-btn:hover { background: rgba(255,255,255,0.09); color: var(--text-1); }

/* ── Empty / Loading States ───────────────────────────── */
.loading-state {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 6rem 2rem; gap: 1rem; color: var(--text-3);
}
.spinner {
    width: 36px; height: 36px;
    border: 3px solid rgba(255,255,255,0.06);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
    display: flex; flex-direction: column; align-items: center;
    padding: 5rem 2rem; gap: 1rem; color: var(--text-3); text-align: center;
}
.empty-icon-svg { width: 48px; height: 48px; opacity: 0.3; }
.empty-state h3 { font-size: 1.1rem; font-weight: 700; color: var(--text-2); }
.empty-state p  { font-size: 0.88rem; max-width: 360px; }
.empty-state code { font-family: var(--mono); font-size: 0.82rem; background: rgba(255,255,255,0.06); padding: 0.1rem 0.4rem; border-radius: 4px; }

/* ── Premium Modal ────────────────────────────────────── */
.modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 500;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
    align-items: center; justify-content: center; padding: 1rem;
}
.modal-overlay.active { display: flex; }
.modal-box {
    background: rgba(18,18,22,0.98);
    border: 1px solid var(--card-border);
    border-radius: var(--r-lg); padding: 2.5rem 2rem;
    max-width: 420px; width: 100%;
    position: relative; text-align: center;
}
.modal-close {
    position: absolute; top: 1rem; right: 1rem;
    background: transparent; border: none;
    color: var(--text-3); font-size: 1.5rem; line-height: 1;
    transition: var(--ease);
}
.modal-close:hover { color: var(--text-1); }
.modal-crown { font-size: 2.5rem; margin-bottom: 0.75rem; }
.modal-title { font-size: 1.6rem; font-weight: 800; margin-bottom: 0.5rem; letter-spacing: -0.03em; }
.modal-title span { color: var(--accent); }
.modal-subtitle { font-size: 0.9rem; color: var(--text-2); margin-bottom: 1.5rem; }
.modal-features { list-style: none; margin-bottom: 2rem; display: flex; flex-direction: column; gap: 0.75rem; text-align: left; }
.modal-features li { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 0.88rem; color: var(--text-2); }
.feature-check { background: rgba(139,92,246,0.12); border: 1px solid rgba(139,92,246,0.25); color: var(--accent); border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; flex-shrink: 0; }
.modal-cta { display: block; background: var(--accent-grad); color: #fff; font-size: 1rem; font-weight: 700; padding: 0.85rem; border-radius: var(--r-md); margin-bottom: 0.75rem; transition: var(--ease); }
.modal-cta:hover { box-shadow: 0 6px 20px rgba(139,92,246,0.4); transform: translateY(-1px); }
.modal-legal { font-size: 0.75rem; color: var(--text-3); }

/* ── Mobile Bottom Tabs ───────────────────────────────── */
.mobile-tabs { display: none; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 1024px) {
    .profile-layout { grid-template-columns: 220px 1fr; gap: 1.5rem; }
}

@media (max-width: 768px) {
    :root { --sidebar-w: 220px; }

    /* Sidebar slides in from left on mobile */
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); box-shadow: 4px 0 30px rgba(0,0,0,0.5); }
    .sidebar-overlay.open { display: block; }

    /* Main panel goes full width */
    .main-panel { margin-left: 0; }

    .hamburger-btn { display: flex; }
    .topbar-models-btn { display: none; }

    /* Bottom tab bar */
    .mobile-tabs {
        display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 150;
        background: rgba(10,10,12,0.98);
        border-top: 1px solid rgba(255,255,255,0.06);
        backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
        padding: 0.25rem 0.5rem;
        padding-bottom: max(0.25rem, env(safe-area-inset-bottom));
        gap: 0.25rem;
    }
    .mobile-tab {
        flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
        gap: 0.25rem; padding: 0.5rem 0.25rem;
        font-size: 0.68rem; font-weight: 600; color: var(--text-3);
        transition: var(--ease); border-radius: var(--r-md);
        position: relative;
    }
    .mobile-tab.active {
        color: var(--accent);
        background: rgba(139,92,246,0.1);
    }
    .mobile-tab svg { opacity: 0.5; transition: var(--ease); }
    .mobile-tab.active svg { opacity: 1; color: var(--accent); }

    /* Content padding for tab bar */
    .content-area { padding-bottom: 5.5rem; }

    /* Profile collapses */
    .profile-layout { grid-template-columns: 1fr; }
    .profile-sidebar { position: relative; top: 0; }
    .profile-cover { aspect-ratio: 16/9; }

    /* Tablet grid */
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .models-grid  { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
}

/* ── Mobile Phone: Full-width card + new header ── */
@media (max-width: 480px) {

    /* ── Hide desktop elements on mobile ── */
    .top-bar  { display: none !important; }
    .sort-bar { display: none !important; }

    /* ── Show mobile-only topbar ── */
    .mobile-topbar {
        display: flex;
        flex-direction: column;
        gap: 0.6rem;
        position: sticky;
        top: 0; z-index: 100;
        background: rgba(10,10,12,0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(255,255,255,0.06);
        padding: 0.75rem 0.75rem 0.65rem;
    }

    .mob-row {
        display: flex; align-items: center; gap: 0.5rem;
    }

    /* Row 1 */
    .mob-logo-group {
        display: flex; align-items: center; gap: 0.55rem; flex: 1;
    }
    .mob-logo-icon-box {
        width: 34px; height: 34px;
        background: rgba(139,92,246,0.12);
        border: 1px solid rgba(139,92,246,0.22);
        border-radius: 9px;
        display: flex; align-items: center; justify-content: center;
        flex-shrink: 0;
    }
    .mob-lock-icon { width: 15px; height: 15px; color: var(--accent); }
    .mob-brand {
        font-size: 1.05rem; font-weight: 800;
        letter-spacing: -0.03em; color: var(--text-1);
        text-transform: lowercase;
    }
    .mob-brand-accent { color: var(--accent); }

    .mob-header-actions { display: flex; align-items: center; gap: 0.4rem; }
    .mob-premium-pill {
        display: flex; align-items: center; gap: 0.3rem;
        padding: 0.4rem 0.7rem; border-radius: 999px;
        background: linear-gradient(135deg, #f59e0b, #d97706);
        border: none; color: #fff; font-size: 0.75rem; font-weight: 700;
        cursor: pointer; white-space: nowrap; font-family: var(--font);
        box-shadow: 0 2px 10px rgba(245,158,11,0.3);
    }

    /* Row 2: Search pill + Sort pill */
    .mob-row-2 { align-items: center; }

    .mob-search-pill {
        flex: 1; display: flex; align-items: center; gap: 0.45rem;
        background: rgba(255,255,255,0.05);
        border: 1px solid rgba(255,255,255,0.08);
        border-radius: 999px;
        padding: 0.55rem 0.9rem;
        transition: var(--ease); min-width: 0;
    }
    .mob-search-pill:focus-within {
        border-color: var(--accent);
        background: rgba(139,92,246,0.06);
        box-shadow: 0 0 0 3px rgba(139,92,246,0.12);
    }
    .mob-search-icon { flex-shrink: 0; color: var(--text-3); }
    #mobile-search-input {
        flex: 1; background: transparent; border: none; outline: none;
        color: var(--text-1); font-family: var(--font); font-size: 0.875rem;
        min-width: 0;
    }
    #mobile-search-input::placeholder { color: var(--text-3); }
    .mob-clear-btn {
        background: transparent; border: none; color: var(--text-3);
        display: flex; align-items: center; cursor: pointer; flex-shrink: 0;
        transition: var(--ease); padding: 0;
    }
    .mob-clear-btn:hover { color: var(--text-1); }

    /* Sort pill */
    .mob-sort-wrap {
        position: relative; flex-shrink: 0;
    }
    .mob-sort-pill {
        display: flex; align-items: center; gap: 0.35rem;
        padding: 0.55rem 0.8rem; border-radius: 999px;
        background: rgba(255,255,255,0.05);
        border: 1px solid rgba(255,255,255,0.08);
        color: var(--text-2); font-size: 0.75rem; font-weight: 700;
        cursor: pointer; white-space: nowrap; font-family: var(--font);
        transition: var(--ease); letter-spacing: 0.04em;
    }
    .mob-sort-pill:hover,
    .mob-sort-pill.open {
        border-color: rgba(255,255,255,0.16); color: var(--text-1);
    }
    .mob-clock-icon { opacity: 0.7; }
    .mob-chevron-icon { transition: transform 0.2s ease; }
    .mob-sort-pill.open .mob-chevron-icon { transform: rotate(180deg); }

    /* Sort dropdown */
    .mob-sort-dropdown {
        display: none;
        position: absolute; top: calc(100% + 0.45rem); right: 0;
        background: rgba(16,16,20,0.99);
        border: 1px solid rgba(255,255,255,0.1);
        border-radius: var(--r-md);
        padding: 0.4rem;
        min-width: 155px;
        box-shadow: 0 12px 36px rgba(0,0,0,0.7);
        z-index: 300;
        flex-direction: column; gap: 0.05rem;
    }
    .mob-sort-dropdown.open { display: flex; }

    .mob-sort-opt {
        display: flex; align-items: center; gap: 0.5rem;
        padding: 0.55rem 0.75rem; border-radius: var(--r-sm);
        background: transparent; border: none;
        color: var(--text-2); font-size: 0.82rem; font-weight: 600;
        cursor: pointer; text-align: left; font-family: var(--font);
        transition: var(--ease); width: 100%;
    }
    .mob-sort-opt:hover { background: rgba(255,255,255,0.05); color: var(--text-1); }
    .mob-sort-opt.active { background: rgba(139,92,246,0.12); color: #c4b5fd; }

    /* ── Content adjustments ── */
    .content-area {
        padding: 0.65rem 0.65rem 5.5rem;
    }
    .models-header h2 { font-size: 1.4rem; }
    .models-header { margin-bottom: 1rem; }

    /* Single column, full-width cards */
    .gallery-grid { grid-template-columns: 1fr; gap: 0.75rem; }
    /* Models: 2 columns on phone */
    .models-grid  { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }

    /* ── Poster card: text overlays the image ── */
    .gallery-card {
        position: relative;
        display: block;
    }
    .card-media { aspect-ratio: 3/4; width: 100%; }
    .card-body {
        position: absolute;
        bottom: 0; left: 0; right: 0;
        background: linear-gradient(
            to top,
            rgba(0,0,0,0.95) 0%,
            rgba(0,0,0,0.7) 45%,
            transparent 100%
        );
        padding: 3.5rem 0.85rem 0.85rem;
        z-index: 5; gap: 0.55rem;
    }
    .card-header-info { flex-direction: column; align-items: flex-start; gap: 0.1rem; }
    .card-title {
        font-size: 1.05rem; font-weight: 700; color: #fff;
        text-shadow: 0 1px 4px rgba(0,0,0,0.6);
    }
    .link-count-badge {
        background: rgba(255,255,255,0.1);
        border-color: rgba(255,255,255,0.15);
        color: rgba(255,255,255,0.7);
        font-size: 0.68rem;
    }
    .card-actions { display: flex; flex-direction: column; gap: 0.45rem; width: 100%; }
    .btn { padding: 0.65rem 0.85rem; font-size: 0.8rem; width: 100%; }
    .btn-primary { box-shadow: 0 2px 12px rgba(239,68,68,0.4); }

    /* Profile on mobile */
    .profile-cover { aspect-ratio: 1/1; }
    .profile-name  { font-size: 1.25rem; }
    .back-btn      { padding: 0.35rem 0.65rem; }
}


/* ── Age Gate ────────────────────────────────────────── */
.age-gate-overlay {
    display: none;
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    align-items: center; justify-content: center;
    padding: 1rem;
}
.age-gate-overlay.active { display: flex; }

.age-gate-box {
    background: rgba(16,16,20,0.98);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    max-width: 400px; width: 100%;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0,0,0,0.8), 0 0 0 1px rgba(139,92,246,0.15);
    animation: ageFadeIn 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes ageFadeIn {
    from { opacity: 0; transform: scale(0.92) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.age-gate-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #fff; font-size: 1.3rem; font-weight: 900;
    padding: 0.35rem 1rem; border-radius: 999px;
    margin-bottom: 1.25rem;
    letter-spacing: 0.04em;
    box-shadow: 0 4px 20px rgba(239,68,68,0.4);
}

.age-gate-title {
    font-size: 1.8rem; font-weight: 800;
    letter-spacing: -0.04em; margin-bottom: 0.6rem;
    background: linear-gradient(135deg, #fff 40%, #a1a1aa 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.age-gate-subtitle {
    font-size: 0.9rem; color: var(--text-2);
    line-height: 1.5; margin-bottom: 1rem;
    font-weight: 500;
}

.age-gate-body {
    font-size: 0.8rem; color: var(--text-3);
    line-height: 1.6; margin-bottom: 1.75rem;
}
.age-gate-body strong { color: var(--text-2); }

.age-gate-actions {
    display: flex; flex-direction: column; gap: 0.65rem;
    margin-bottom: 1.25rem;
}

.age-gate-enter {
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    width: 100%; padding: 0.85rem 1rem;
    background: var(--accent-grad);
    color: #fff; font-size: 0.95rem; font-weight: 700;
    border: none; border-radius: var(--r-md);
    cursor: pointer; transition: var(--ease);
    box-shadow: 0 4px 20px rgba(139,92,246,0.35);
    font-family: var(--font);
}
.age-gate-enter:hover {
    box-shadow: 0 6px 28px rgba(139,92,246,0.5);
    transform: translateY(-1px);
}

.age-gate-exit {
    display: block; padding: 0.7rem;
    font-size: 0.82rem; color: var(--text-3); font-weight: 500;
    border-radius: var(--r-sm);
    border: 1px solid rgba(255,255,255,0.06);
    transition: var(--ease);
}
.age-gate-exit:hover { color: var(--text-2); background: rgba(255,255,255,0.04); }

.age-gate-legal {
    font-size: 0.68rem; color: var(--text-3); line-height: 1.5;
}
