/* ============================================================
   OnlyCharr — Public Site Stylesheet
   Premium dark theme inspired by OnlyFans/Patreon aesthetic
   ============================================================ */

/* --- Design Tokens --- */
:root {
    --bg-base: #060c1a;
    --bg-surface: rgba(4, 9, 22, 0.9);
    --bg-elevated: linear-gradient(135deg, rgba(20, 35, 80, 0.8), rgba(10, 20, 50, 0.8));
    --bg-header: rgba(8, 14, 32, 0.92);
    --bg-hover: rgba(255, 255, 255, 0.06);
    --bg-input: rgba(5, 10, 30, 0.8);

    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.12);
    --border-accent: rgba(99, 180, 255, 0.3);
    --border-focus: rgba(99, 180, 255, 0.6);

    --text-primary: #f9fbff;
    --text-secondary: #c2cbf6;
    --text-muted: #8a94ba;
    --text-dimmed: #6a7195;

    --accent-gradient: linear-gradient(135deg, #2cd4ff, #6d4dff);
    --accent-start: #2cd4ff;
    --accent-end: #6d4dff;
    --accent-glow: rgba(45, 212, 255, 0.25);
    --accent-glow-strong: rgba(45, 212, 255, 0.4);

    --green: #34d399;
    --green-bg: rgba(34, 197, 94, 0.15);
    --green-border: rgba(34, 197, 94, 0.4);
    --green-text: #86efac;

    --red: #ff6b6b;
    --red-bg: rgba(220, 38, 38, 0.15);
    --red-border: rgba(220, 38, 38, 0.4);
    --red-text: #ff9b9b;

    --yellow-bg: rgba(251, 191, 36, 0.12);
    --yellow-border: rgba(251, 191, 36, 0.4);
    --yellow-text: #fcd34d;

    --info-bg: rgba(45, 212, 255, 0.08);
    --info-border: rgba(45, 212, 255, 0.2);
    --info-text: #a8d8ff;

    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-pill: 999px;

    --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-hero: 0 20px 50px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 12px 32px var(--accent-glow);

    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --transition: 0.2s ease;

    --bg-card: rgba(255, 255, 255, 0.04);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }

body.site {
    margin: 0;
    font-family: var(--font-sans);
    background: var(--bg-base);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* --- Flash Messages --- */
.flash-messages {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
.flash {
    padding: 0.8rem 1.1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.flash-success { background: var(--green-bg); border: 1px solid var(--green-border); color: var(--green-text); }
.flash-error   { background: var(--red-bg); border: 1px solid var(--red-border); color: var(--red-text); }
.flash-info    { background: var(--info-bg); border: 1px solid var(--info-border); color: var(--info-text); }
.flash-warning { background: var(--yellow-bg); border: 1px solid var(--yellow-border); color: var(--yellow-text); }

/* --- Header / Nav --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.75rem;
    height: 56px;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-subtle);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.site-header .brand a {
    font-weight: 700;
    letter-spacing: 0.03em;
    font-size: 1.15rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.site-header nav {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.site-header nav a,
.site-header nav .nav-item {
    font-size: 0.9rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-pill);
    color: var(--text-secondary);
    transition: background var(--transition);
}

.site-header nav a:hover {
    background: var(--bg-hover);
    text-decoration: none;
}

.site-header nav a.active {
    background: rgba(44, 212, 255, 0.1);
    color: var(--accent-start);
}

/* Hamburger */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    padding: 0.25rem;
    cursor: pointer;
    box-shadow: none;
    line-height: 1;
}

/* --- NSFW Toggle --- */
.nsfw-toggle-wrapper { display: inline-flex; align-items: center; gap: 0.4rem; }
.nsfw-toggle-input { display: none; }
.nsfw-toggle-label { display: flex; align-items: center; gap: 0.4rem; cursor: pointer; user-select: none; }
.nsfw-toggle-slider {
    position: relative;
    width: 36px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-pill);
    transition: all 0.3s;
}
.nsfw-toggle-slider::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    top: 2px;
    left: 2px;
    transition: all 0.3s;
}
.nsfw-toggle-input:checked + .nsfw-toggle-label .nsfw-toggle-slider {
    background: rgba(220, 38, 38, 0.6);
    border-color: rgba(220, 38, 38, 0.8);
}
.nsfw-toggle-input:checked + .nsfw-toggle-label .nsfw-toggle-slider::before {
    left: 20px;
    background: var(--red);
}
.nsfw-toggle-text { font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    cursor: pointer;
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.5rem 1.35rem;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    background: var(--accent-gradient);
    color: #020412;
    box-shadow: 0 6px 16px var(--accent-glow);
    transition: all var(--transition);
    text-decoration: none;
}
.btn:hover {
    filter: brightness(1.05);
    box-shadow: 0 10px 24px var(--accent-glow-strong);
    transform: translateY(-1px);
    text-decoration: none;
}
.btn:active { transform: translateY(0); }

button { cursor: pointer; }

.btn-ghost {
    background: var(--bg-hover);
    color: var(--text-secondary);
    box-shadow: none;
    border: 1px solid var(--border-medium);
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
    filter: none;
}

.btn-danger {
    background: rgba(220, 38, 38, 0.6);
    color: #fff;
    box-shadow: none;
}
.btn-danger:hover {
    background: rgba(220, 38, 38, 0.8);
    box-shadow: 0 8px 16px rgba(220, 38, 38, 0.3);
    filter: none;
}

.btn-sm { padding: 0.35rem 0.85rem; font-size: 0.8rem; }

.btn:disabled, .btn.disabled {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-dimmed);
    cursor: not-allowed;
    box-shadow: none;
    border: 1px solid var(--border-subtle);
    filter: none;
    transform: none;
}

.nav-login-btn {
    background: var(--accent-gradient);
    color: #020412;
    border: none;
    padding: 0.35rem 1rem;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 6px 16px var(--accent-glow);
}
.nav-login-btn:hover {
    filter: brightness(1.05);
    box-shadow: 0 10px 24px var(--accent-glow-strong);
    transform: translateY(-1px);
    text-decoration: none;
}

.link-btn {
    background: none;
    border: none;
    color: var(--accent-start);
    padding: 0;
    font-size: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none;
}
.link-btn:hover { color: var(--accent-end); text-decoration: underline; }

/* --- Layout --- */
.site-main {
    max-width: 1120px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
}

.site-footer {
    text-align: center;
    padding: 1.5rem 1rem 2.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- Creator Profile Hero --- */
.creator-hero {
    margin-bottom: 2rem;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-hero);
}

.creator-banner {
    width: 100%;
    height: 200px;
    background: var(--bg-input);
    background-size: cover;
    background-position: center;
}
.creator-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.creator-banner img.loaded,
.creator-banner img[data-loaded] { opacity: 1; }

.creator-info {
    padding: 0 2rem 2rem;
    text-align: center;
    position: relative;
}

.creator-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 3px solid var(--bg-base);
    margin: -48px auto 0.75rem;
    overflow: hidden;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
}
.creator-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.creator-avatar img.loaded,
.creator-avatar img[data-loaded] { opacity: 1; }
.creator-avatar-placeholder {
    font-size: 2.5rem;
    line-height: 1;
}

.creator-name {
    margin: 0 0 0.25rem;
    font-size: 1.6rem;
    font-weight: 700;
}

.creator-bio {
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.creator-socials {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1.25rem;
}
.creator-socials a {
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-pill);
    background: var(--bg-hover);
    transition: all var(--transition);
}
.creator-socials a:hover {
    background: rgba(44, 212, 255, 0.12);
    color: var(--accent-start);
    text-decoration: none;
}

.creator-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
}

.stat-item { text-align: center; }
.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.stat-divider {
    width: 1px;
    height: 2.5rem;
    background: var(--border-medium);
}

/* CTA section */
.creator-cta { text-align: center; }
.creator-cta p { margin: 0 0 0.75rem; color: var(--text-secondary); font-size: 0.95rem; }

.cta-button {
    background: var(--accent-gradient);
    color: #020412;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-pill);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.cta-button:hover {
    filter: brightness(1.08);
    box-shadow: 0 16px 40px var(--accent-glow-strong);
    transform: translateY(-2px);
    text-decoration: none;
}
.cta-button:active { transform: translateY(0); }
.cta-button.disabled, .cta-button:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-dimmed);
    cursor: not-allowed;
    box-shadow: none;
    border: 1px solid var(--border-subtle);
}

.subscribed-badge {
    color: var(--green);
    font-size: 1rem;
    font-weight: 600;
}

/* Donation progress bar */
.donation-bar {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
}
.donation-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}
.donation-bar-track {
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.donation-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--accent-gradient);
    transition: width 0.5s ease;
}

/* Waitlist form */
.waitlist-form {
    display: flex;
    gap: 0.5rem;
    max-width: 380px;
    margin: 0.75rem auto 0;
}
.waitlist-form input {
    flex: 1;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-medium);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
}
.waitlist-form input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(45, 212, 255, 0.1);
}

/* --- Gallery --- */
.gallery-section { margin-bottom: 2.5rem; }

.gallery-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.gallery-header h1,
.gallery-header h2 { margin: 0; }
.gallery-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Filter bar */
.filters {
    position: relative;
    z-index: 10;
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.filter-pill {
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border: 1px solid transparent;
    transition: all var(--transition);
}
.filter-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}
.filter-pill.active {
    background: rgba(44, 212, 255, 0.12);
    color: var(--accent-start);
    border-color: rgba(44, 212, 255, 0.3);
}

.filter-group { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.filter-group + .filter-group {
    margin-left: 0.25rem;
    padding-left: 0.75rem;
    border-left: 1px solid var(--border-subtle);
}

/* Card Grid */
/* --- Featured / Pinned section --- */
.featured-section {
    margin-bottom: 2rem;
}
.featured-header {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.featured-scroll {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.featured-scroll::-webkit-scrollbar { height: 4px; }
.featured-scroll::-webkit-scrollbar-track { background: transparent; }
.featured-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 99px; }
/* Cards inside the pinned scroll must be fixed width — same as the old .featured-card */
.featured-scroll .card {
    flex: 0 0 var(--grid-min-width, 200px);
}
.featured-card {
    flex: 0 0 var(--grid-min-width, 200px);
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-surface);
    border: 1px solid rgba(44, 212, 255, 0.25);
    transition: all 0.25s ease;
    text-decoration: none;
}
.featured-card:hover {
    border-color: rgba(44, 212, 255, 0.55);
    box-shadow: 0 6px 24px rgba(44, 212, 255, 0.12);
    transform: translateY(-2px);
}
.featured-thumb {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: rgba(255,255,255,0.02);
}
.featured-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease, opacity 0.25s ease;
    opacity: 0;
}
.featured-thumb img.loaded,
.featured-thumb img[data-loaded] { opacity: 1; }
.featured-card:hover .featured-thumb img { transform: scale(1.03); }
.featured-thumb.locked::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0, rgba(0,0,0,0.78) 80%);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--grid-min-width, 200px), 1fr));
    gap: 1rem;
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    transition: all 0.25s ease;
    /* Force GPU compositing — prevents subpixel seam during scale transform */
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: transform;
}
.card:hover {
    border-color: rgba(116, 189, 255, 0.5);
    box-shadow: 0 8px 24px rgba(44, 212, 255, 0.1);
    transform: translateY(-2px);
    text-decoration: none;
}

.thumb {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    transform: translateZ(0);
    backface-visibility: hidden;
    transition: transform 0.3s ease;
}
.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.25s ease;
    opacity: 0;
}
.thumb img.loaded,
.thumb img[data-loaded] { opacity: 1; }
/* Images that have already loaded (e.g. from cache) show immediately */
.thumb img.already-loaded { opacity: 1; }
.card:hover .thumb { transform: translateZ(0) scale(1.03); transition: transform 0.3s ease; }
.thumb.locked::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0, rgba(0, 0, 0, 0.78) 80%);
}

.no-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--text-dimmed);
    font-size: 0.85rem;
}

.lock-label {
    position: absolute;
    left: 0.6rem;
    top: 0.6rem;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-pill);
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(6, 15, 37, 0.85);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 2;
}

.mature-badge {
    position: absolute;
    right: 0.6rem;
    top: 0.6rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-pill);
    font-size: 0.65rem;
    font-weight: 700;
    background: rgba(245, 158, 11, 0.92);
    color: #fff;
    text-transform: uppercase;
    z-index: 2;
}

.nsfw-badge {
    position: absolute;
    right: 0.6rem;
    top: 0.6rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-pill);
    font-size: 0.65rem;
    font-weight: 700;
    background: rgba(239, 68, 68, 0.92);
    color: #fff;
    text-transform: uppercase;
    z-index: 2;
}

.tier-badge {
    position: absolute;
    left: 0.6rem;
    top: 0.6rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-pill);
    font-size: 0.65rem;
    font-weight: 600;
    z-index: 2;
}
.tier-badge.follower  { background: rgba(74, 222, 128, 0.7); color: #1a1a1a; }
.tier-badge.subscriber { background: rgba(99, 180, 255, 0.7); color: #fff; }
.tier-badge.premium { background: rgba(251, 191, 36, 0.8); color: #1a1a1a; }

.card-meta {
    padding: 0.6rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: -1px;
    position: relative;
    z-index: 1;
}
.card-meta h3 {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 500;
    color: #e0e6ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}
.card-likes {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Reaction bar — sits at bottom of thumb */
.card-reaction-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.35rem 0.5rem;
    background: linear-gradient(0deg, rgba(4,7,20,0.88) 0%, transparent 100%);
    z-index: 3;
}
.reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-pill);
    padding: 0.15rem 0.45rem;
    cursor: pointer;
    font-size: 0.72rem;
    color: var(--text-secondary);
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    line-height: 1;
    box-shadow: none;
}
.reaction-btn:hover {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.25);
    transform: scale(1.12);
}
.reaction-btn.active {
    background: rgba(44, 212, 255, 0.18);
    border-color: rgba(44, 212, 255, 0.45);
    color: var(--accent-start);
}
.reaction-emoji { font-size: 0.85rem; line-height: 1; }
.reaction-count { font-weight: 600; }
.card-views {
    margin-left: auto;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

/* Creator strip — bottom-left of thumb, behind reaction bar on hover */
.card-creator-strip {
    position: absolute;
    bottom: 2.4rem;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.55rem;
    z-index: 2;
    pointer-events: none;
}
.card-creator-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    overflow: hidden;
    border: 1.5px solid rgba(255,255,255,0.3);
    flex-shrink: 0;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-secondary);
}
.card-creator-avatar img { width: 100%; height: 100%; object-fit: cover; }
.card-creator-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    text-shadow: 0 1px 4px rgba(0,0,0,0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    transition: all var(--transition);
}
.pagination a:hover {
    background: var(--bg-hover);
    border-color: var(--border-medium);
    text-decoration: none;
}
.pagination .current {
    background: rgba(44, 212, 255, 0.15);
    color: var(--accent-start);
    border-color: rgba(44, 212, 255, 0.3);
    font-weight: 600;
}

/* --- Image Detail --- */
.image-detail { max-width: 900px; margin: 0 auto; }

.image-detail-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.back-btn,
.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    background: var(--bg-hover);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    transition: all var(--transition);
}
.back-btn:hover, .nav-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    text-decoration: none;
}
.nav-btn.disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}
.image-nav { display: flex; gap: 0.4rem; }

.image-detail header { margin-bottom: 1rem; }
.image-detail h1 { margin: 0; font-size: 1.4rem; }
.tier-label {
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Tags */
.image-tags {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin: 0.75rem 0;
}
.tag-pill {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-pill);
    background: rgba(109, 77, 255, 0.12);
    color: #c4b5fd;
    border: 1px solid rgba(109, 77, 255, 0.25);
    transition: all var(--transition);
}
.tag-pill:hover {
    background: rgba(109, 77, 255, 0.2);
    text-decoration: none;
}

/* Post story / caption */
.post-story {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    margin: 1.25rem 0;
    padding: 1.1rem 1.25rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    line-height: 1.65;
}
.post-story-avatar {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--border-medium);
}
.post-story-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.post-story-avatar-placeholder {
    color: var(--text-muted);
    font-size: 1rem;
}
.post-story-body {
    flex: 1;
    min-width: 0;
}
.post-story-author {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent-start);
    margin-bottom: 0.35rem;
    letter-spacing: 0.01em;
}
.post-story-author a {
    color: inherit;
    text-decoration: none;
}
.post-story-author a:hover {
    text-decoration: underline;
}
.post-story-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    white-space: pre-line;
}

/* Inline form hint (next to label) */
.form-hint-inline {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 0.3rem;
}

/* ============================================================
   Creator Studio — dashboard grid, filter, modal
   ============================================================ */

/* Filter bar */
.studio-filter-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.studio-filter-wrap {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 420px;
    background: var(--bg-input);
    border: 1.5px solid var(--border-medium);
    border-radius: var(--radius-pill);
    padding: 0 0.9rem;
    transition: border-color var(--transition);
}
.studio-filter-wrap:focus-within {
    border-color: var(--border-focus);
}
.studio-filter-icon {
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-right: 0.5rem;
    pointer-events: none;
}
.studio-filter-wrap input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    box-shadow: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    padding: 0.55rem 0;
    font-family: inherit;
    min-width: 0;
}
.studio-filter-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.2rem;
    border-radius: 50%;
    transition: color var(--transition);
    font-family: inherit;
}
.studio-filter-clear:hover { color: var(--text-primary); }
.studio-sort-select {
    background: var(--bg-input);
    border: 1.5px solid var(--border-medium);
    border-radius: var(--radius-pill);
    color: var(--text-primary);
    font-size: 0.87rem;
    font-family: inherit;
    padding: 0.5rem 1.75rem 0.5rem 1rem;
    cursor: pointer;
    transition: border-color var(--transition);
    flex-shrink: 0;
    width: auto;
    margin-bottom: 0;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a94ba' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}
.studio-sort-select:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(45, 212, 255, 0.1);
}
.studio-filter-count {
    font-size: 0.82rem;
    color: var(--accent-start);
    font-weight: 500;
    white-space: nowrap;
}

/* Studio card grid */
.studio-card {
    background: var(--bg-card, var(--bg-surface));
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color var(--transition), transform var(--transition);
}
.studio-card:hover {
    border-color: var(--border-medium);
    transform: translateY(-1px);
}
.studio-thumb-btn {
    position: relative;
    aspect-ratio: 1 / 1;
    width: 100%;
    background: var(--bg-input);
    border: none;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    display: block;
}
.studio-thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: filter var(--transition), opacity 0.25s ease;
}
.studio-thumb-btn img.loaded,
.studio-thumb-btn img[data-loaded] { opacity: 1; }
.studio-thumb-btn img.already-loaded { opacity: 1; transition: filter var(--transition); }
.studio-thumb-btn:hover img { filter: brightness(0.65); }
.studio-thumb-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dimmed);
    font-size: 0.8rem;
}
.studio-thumb-edit-hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
    letter-spacing: 0.03em;
    text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}
.studio-thumb-btn:hover .studio-thumb-edit-hint { opacity: 1; }
.studio-badge {
    position: absolute;
    top: 0.4rem;
    left: 0.4rem;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    pointer-events: none;
}
.studio-badge-free       { background: rgba(16,185,129,0.92);  border: 1px solid rgba(16,185,129,0.7);  color: #fff; }
.studio-badge-follower   { background: rgba(59,130,246,0.92);  border: 1px solid rgba(59,130,246,0.7);  color: #fff; }
.studio-badge-subscriber { background: rgba(6,182,212,0.92);   border: 1px solid rgba(6,182,212,0.7);   color: #fff; }
.studio-badge-premium    { background: rgba(109,77,255,0.92);  border: 1px solid rgba(109,77,255,0.7);  color: #fff; }
.studio-flag-badges {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    align-items: flex-end;
    pointer-events: none;
}
.studio-flag {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.1rem 0.35rem;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.studio-flag.nsfw   { background: rgba(239,68,68,0.92);   border: 1px solid rgba(239,68,68,0.7);   color: #fff; }
.studio-flag.mature { background: rgba(245,158,11,0.92);  border: 1px solid rgba(245,158,11,0.7);  color: #fff; }
.studio-flag.hidden { background: rgba(245,158,11,0.92);  border: 1px solid rgba(245,158,11,0.7);  color: #fff; }
.studio-card-info {
    padding: 0.6rem 0.7rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.studio-card-title {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.studio-card-date {
    font-size: 0.73rem;
    color: var(--text-dimmed);
}
.studio-card-views {
    font-size: 0.73rem;
    color: var(--text-dimmed);
}
.studio-delete-btn {
    width: 100%;
    margin-top: 0.3rem;
    font-size: 0.75rem;
    padding: 0.25rem 0;
}

/* Studio edit modal */
.studio-modal-content {
    background: linear-gradient(135deg, rgba(14,24,60,0.98), rgba(8,14,40,0.98));
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-xl);
    box-shadow: 0 30px 70px rgba(0,0,0,0.7);
    width: 92%;
    max-width: 780px;
    max-height: 92vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.studio-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.5rem 0.8rem;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}
.studio-modal-header h2 {
    margin: 0;
    font-size: 1.1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.studio-modal-close {
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all var(--transition);
    font-family: inherit;
}
.studio-modal-close:hover {
    background: rgba(255,255,255,0.15);
    color: var(--text-primary);
}
.studio-modal-body {
    display: flex;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem 1.5rem;
    flex: 1;
    min-height: 0;
}
.studio-modal-thumb {
    flex-shrink: 0;
    width: 180px;
    height: 180px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
}
.studio-modal-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.studio-modal-thumb-placeholder {
    color: var(--text-dimmed);
    font-size: 2rem;
}
.studio-modal-fields {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    flex: 1;
    min-width: 0;
}
.studio-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.studio-field label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}
.studio-field input,
.studio-field select,
.studio-field textarea {
    background: var(--bg-input);
    border: 1.5px solid var(--border-medium);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    padding: 0.5rem 0.7rem;
    font-family: inherit;
    transition: border-color var(--transition);
    resize: vertical;
}
.studio-field input:focus,
.studio-field select:focus,
.studio-field textarea:focus {
    outline: none;
    border-color: var(--border-focus);
}
.studio-field-inline {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}
.studio-field-inline label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
}
.studio-field-inline input[type="checkbox"] {
    width: auto;
    margin: 0;
    accent-color: var(--accent-start);
}
.studio-modal-actions {
    display: flex;
    gap: 0.6rem;
    padding-top: 0.4rem;
}
.studio-modal-error {
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-sm);
    background: var(--red-bg);
    border: 1px solid var(--red-border);
    color: var(--red-text);
    font-size: 0.85rem;
}
.studio-modal-success {
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-sm);
    background: var(--green-bg);
    border: 1px solid var(--green-border);
    color: var(--green-text);
    font-size: 0.85rem;
}
@media (max-width: 600px) {
    .studio-modal-body { flex-direction: column; }
    .studio-modal-thumb { width: 100%; height: 160px; }
    #studioGrid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ============================================================
   Search — album results
   ============================================================ */
.search-albums-grid {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.search-album-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: border-color var(--transition), background var(--transition);
}
.search-album-card:hover {
    border-color: var(--border-medium);
    background: var(--bg-hover);
    text-decoration: none;
}
.search-album-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    opacity: 0.7;
}
.search-album-info { flex: 1; min-width: 0; }
.search-album-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}
.search-album-desc {
    font-size: 0.83rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}
.search-album-meta {
    font-size: 0.78rem;
    color: var(--text-dimmed);
}
.search-album-meta a {
    color: var(--accent-start);
    text-decoration: none;
}
.search-album-meta a:hover { text-decoration: underline; }

/* Like button */
/* Detail page reaction bar */
.detail-reaction-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}
.detail-reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-pill);
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: none;
    font-family: inherit;
}
.detail-reaction-btn:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
    transform: none;
    filter: none;
}
.detail-reaction-btn.active {
    background: rgba(44, 212, 255, 0.12);
    border-color: rgba(44, 212, 255, 0.4);
    color: var(--accent-start);
}
.detail-reaction-btn .reaction-emoji { font-size: 1.1rem; line-height: 1; }
.detail-reaction-btn .reaction-count { font-size: 0.85rem; font-weight: 600; }
.detail-reaction-btn .reaction-count-zero { color: var(--text-dimmed); font-weight: 400; }
.detail-view-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.like-count { font-size: 0.85rem; color: var(--text-muted); }

/* Creator attribution */
.creator-attribution {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* Image viewer */
.image-viewer { margin-bottom: 1.5rem; }
.image-viewer .viewer {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    background: #040712;
}
.image-viewer img { width: 100%; display: block; }
.image-viewer .viewer.locked::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(4, 8, 22, 0.3), rgba(0, 0, 0, 0.9));
}
.image-viewer .overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 2;
    padding: 1rem;
}
.image-viewer .overlay p {
    margin: 0 0 0.6rem;
    font-size: 0.9rem;
    color: #e2e8ff;
}
.image-viewer .viewer-login-wall {
    min-height: 280px;
    background: rgba(4, 8, 22, 0.95);
}

.btn-subscribe-disabled {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-dimmed);
    border: 1px solid var(--border-subtle);
    padding: 0.5rem 1.35rem;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: not-allowed;
}
.btn-login-modal {
    background: none;
    border: none;
    color: var(--accent-start);
    padding: 0;
    font-size: inherit;
    font-weight: 600;
    cursor: pointer;
    box-shadow: none;
}
.btn-login-modal:hover { color: var(--accent-end); text-decoration: underline; }

/* Zoom */
.zoom-toolbar {
    display: flex;
    gap: 0.35rem;
    padding: 0.35rem 0.5rem;
    margin-bottom: 0.5rem;
    width: fit-content;
    background: rgba(6, 12, 30, 0.75);
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-medium);
    backdrop-filter: blur(8px);
}
.zoom-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #e0e6ff;
    border: none;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
    font-weight: 700;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition);
}
.zoom-btn:hover { background: rgba(255, 255, 255, 0.18); }

.zoom-container {
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    line-height: 0;
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    /* Reserve space before image loads to prevent layout shift */
    min-height: 300px;
    background: var(--bg-input);
}
.zoom-container img {
    display: block;
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    transform-origin: 0 0;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
    /* Prevent blank flash — image fades in once loaded */
    opacity: 0;
    transition: opacity 0.2s ease;
}
.zoom-container img.loaded,
.zoom-container img[data-loaded] {
    opacity: 1;
}

.viewer { position: relative; }

/* --- Comments --- */
.comments { margin-top: 2rem; }
.comments h2 { margin-top: 0; margin-bottom: 1rem; font-size: 1.15rem; }

.comment-form {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
}
.comment-form label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}
.comment-form textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-medium);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 80px;
}
.comment-form textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(45, 212, 255, 0.1);
}
.comment-form .btn { margin-top: 0.75rem; }

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.comment-list li {
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
}
.comment-list li.hidden-comment {
    opacity: 0.5;
    border-color: var(--red-border);
}
.comment-list .author { font-weight: 600; font-size: 0.88rem; }
.comment-list .text { margin-top: 0.2rem; font-size: 0.88rem; color: #c8d0ff; line-height: 1.5; }
.comment-list .comment-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.3rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0;
}

/* No comments */
.no-comments { color: var(--text-muted); font-size: 0.9rem; font-style: italic; }

/* --- Modal Overlay --- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }

.modal-content {
    position: relative;
    width: 90%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    box-shadow: none;
}
.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.modal-login-card {
    padding: 2rem 1.75rem;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(20, 35, 80, 0.95), rgba(10, 20, 50, 0.95));
    border: 1px solid var(--border-accent);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
}

.modal-header { margin-bottom: 1.5rem; text-align: center; }
.modal-header h2 {
    margin: 0 0 0.35rem;
    font-size: 1.4rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.modal-header p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }

.modal-error {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    background: var(--red-bg);
    border: 1px solid var(--red-border);
    color: var(--red-text);
    font-size: 0.85rem;
    text-align: center;
}
.modal-info {
    margin: -0.5rem 0 1rem 0;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    background: var(--info-bg);
    border: 1px solid var(--info-border);
    color: var(--info-text);
    font-size: 0.85rem;
    text-align: center;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-bottom: 1.25rem;
}
.form-group { display: flex; flex-direction: column; }
.form-group label {
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #d0d9ff;
}
.form-group input {
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-medium);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all var(--transition);
}
.form-group input:focus {
    outline: none;
    border-color: var(--border-focus);
    background: rgba(5, 10, 30, 1);
    box-shadow: 0 0 0 3px rgba(45, 212, 255, 0.1);
}
.form-group input::placeholder { color: var(--text-dimmed); }

.modal-submit {
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    background: var(--accent-gradient);
    color: #020412;
    border: none;
    box-shadow: 0 10px 28px var(--accent-glow);
    transition: all var(--transition);
    cursor: pointer;
}
.modal-submit:hover {
    filter: brightness(1.08);
    box-shadow: 0 15px 35px var(--accent-glow-strong);
    transform: translateY(-2px);
}
.modal-submit:active { transform: translateY(0); }

.modal-footer {
    text-align: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-subtle);
}
.modal-footer p { margin: 0; font-size: 0.85rem; color: var(--text-muted); }
.modal-footer a { color: var(--accent-start); font-weight: 600; }
.modal-footer a:hover { color: var(--accent-end); }

/* --- Standalone Auth Pages --- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: var(--bg-base);
}

.auth-page-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 3rem 1rem;
    width: 100%;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 2.25rem 2rem;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(20, 35, 80, 0.8), rgba(10, 20, 50, 0.8));
    border: 1px solid var(--border-accent);
    box-shadow: var(--shadow-hero);
}
.auth-card h1 {
    margin: 0 0 0.35rem;
    font-size: 1.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.auth-card .auth-subtitle {
    margin: 0 0 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.auth-card label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #d0d9ff;
}
.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"] {
    width: 100%;
    padding: 0.7rem 0.9rem;
    margin-bottom: 0.9rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-medium);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all var(--transition);
}
.auth-card input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(45, 212, 255, 0.1);
}
.auth-card .btn { width: 100%; margin-top: 0.25rem; }
.auth-card .error {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    background: var(--red-bg);
    border: 1px solid var(--red-border);
    color: var(--red-text);
    font-size: 0.85rem;
}
.auth-card .success {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    background: var(--green-bg);
    border: 1px solid var(--green-border);
    color: var(--green-text);
    font-size: 0.85rem;
}
.auth-card .auth-link {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.auth-card .auth-link a { color: var(--accent-start); font-weight: 600; }

/* --- Account Profile --- */
.account-page { max-width: 700px; margin: 0 auto; }

.account-section {
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    margin-bottom: 1.25rem;
}
.account-section h2 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
}
.account-section label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}
.account-section input[type="text"],
.account-section input[type="password"],
.account-section input[type="email"],
.account-section input[type="url"],
.account-section input[type="number"],
.account-section textarea,
.account-section select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    margin-bottom: 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-medium);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    box-sizing: border-box;
}
.account-section textarea { resize: vertical; }
.account-section select { cursor: pointer; }
.account-section input:focus,
.account-section textarea:focus,
.account-section select:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(45, 212, 255, 0.1);
}
.account-section .form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: -0.5rem 0 0.75rem;
}
.account-section .checkbox-group { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.85rem; }
.account-section .checkbox-group label { display: flex; align-items: center; font-weight: 500; cursor: pointer; color: var(--text-primary); }
.account-section .checkbox-group input[type="checkbox"] { margin: 0 0.5rem 0 0; }
.account-section .settings-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
@media (max-width: 600px) {
    .account-section .settings-row { grid-template-columns: 1fr; }
}

.danger-zone {
    border-color: var(--red-border);
    background: rgba(220, 38, 38, 0.05);
}
.danger-zone h2 { color: var(--red-text); }

/* --- Age Verification Gate --- */
.age-gate-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 12, 26, 0.97);
    backdrop-filter: blur(12px);
}
.age-gate-card {
    text-align: center;
    max-width: 400px;
    padding: 2.5rem 2rem;
    border-radius: var(--radius-xl);
    background: var(--bg-surface);
    border: 1px solid var(--border-accent);
    box-shadow: var(--shadow-hero);
}
.age-gate-card h2 {
    margin: 0 0 0.75rem;
    font-size: 1.4rem;
}
.age-gate-card p {
    margin: 0 0 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.age-gate-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

/* --- Error Page --- */
.error-page {
    text-align: center;
    padding: 4rem 1rem;
}
.error-code {
    font-size: 5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
    margin-bottom: 0.5rem;
}
.error-message {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* --- Scroll to top --- */
.scroll-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #020412;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px var(--accent-glow);
}
.scroll-top.visible { opacity: 1; pointer-events: auto; }
.scroll-top:hover { transform: translateY(-2px); box-shadow: 0 8px 20px var(--accent-glow-strong); }

/* --- Responsive --- */
@media (max-width: 768px) {
    .site-header { padding: 0 1rem; }
    .site-header nav.nav-open { display: flex; }
    .site-header nav {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        flex-direction: column;
        padding: 0.75rem 1rem;
        background: var(--bg-header);
        border-bottom: 1px solid var(--border-subtle);
        backdrop-filter: blur(18px);
        gap: 0.25rem;
    }
    .site-header nav a,
    .site-header nav .nav-item { padding: 0.5rem 0.75rem; }
    .hamburger { display: block; }

    .creator-banner { height: 140px; }
    .creator-info { padding: 0 1.25rem 1.5rem; }
    .creator-stats { gap: 1rem; }

    .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; }

    .image-detail-topbar { flex-direction: column; align-items: flex-start; }

    .filter-group + .filter-group { margin-left: 0; padding-left: 0; border-left: none; }
}

@media (max-width: 480px) {
    .grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .card-meta { padding: 0.5rem 0.6rem; }
    .card-meta h3 { font-size: 0.8rem; }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .card:hover { transform: none; }
    .card:hover .thumb img { transform: none; }
    .btn:hover { transform: none; }
    .cta-button:hover { transform: none; }
    .scroll-top:hover { transform: none; }
}

/* --- Skeleton loader --- */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
/* --- Creator profile edit page --- */
.creator-settings {
    width: 100%;
}
.creator-settings h1 {
    margin-bottom: 0.25rem;
    font-size: 1.6rem;
}
.creator-settings label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #d0d9ff;
}
.creator-settings input[type="text"],
.creator-settings input[type="password"],
.creator-settings input[type="email"],
.creator-settings input[type="url"],
.creator-settings input[type="number"],
.creator-settings textarea,
.creator-settings select {
    width: 100%;
    padding: 0.7rem 0.9rem;
    margin-bottom: 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-medium);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: all var(--transition);
    box-sizing: border-box;
}
.creator-settings input[type="file"] {
    padding: 0.45rem;
    width: 100%;
    margin-bottom: 0.5rem;
    background: transparent;
    border: none;
    box-sizing: border-box;
}
.creator-settings input[type="file"]::file-selector-button {
    background: var(--accent-gradient);
    color: #020412;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    margin-right: 0.75rem;
}
.creator-settings textarea { resize: vertical; min-height: 90px; }
.creator-settings input:focus,
.creator-settings textarea:focus,
.creator-settings select:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(45, 212, 255, 0.1);
}
.creator-settings .settings-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}
.creator-settings .settings-section h2 {
    margin: 0 0 1rem;
    font-size: 1.15rem;
    color: var(--text-primary);
}
.creator-settings .settings-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
@media (max-width: 600px) {
    .creator-settings .settings-row { grid-template-columns: 1fr; }
}
.creator-settings .form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: -0.5rem 0 0.75rem;
}
.creator-settings .checkbox-group { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 0.85rem; }
.creator-settings .checkbox-group label { display: flex; align-items: center; font-weight: 500; cursor: pointer; color: var(--text-primary); margin-bottom: 0; }
.creator-settings .checkbox-group input[type="checkbox"] { width: auto; margin: 0 0.5rem 0 0; padding: 0; background: transparent; border: 1px solid var(--border-medium); }