/* ============================================================
   PeepGuys — Mobile-first CSS
   Design: dark theme, 2-6 column responsive performer grid
   ============================================================ */

/* ── Custom properties ─────────────────────────────────────── */
/* Light theme — default */
:root {
    --bg:            #f5f5f5;
    --surface:       #ffffff;
    --surface-hover: #eeeeee;
    --border:        #e0e0e0;
    --text:          #111111;
    --text-muted:    #666666;
    --accent:        #336699;
    --accent-hover:  #27527a;
    --online:        #2e7d32;
    --live-red:      #c62828;
    --radius:        8px;
    --card-radius:   8px;
    --transition:    0.2s ease;
    --header-height: 56px;
    /* Semantic aliases used for theme-sensitive elements */
    --header-bg:     rgba(245, 245, 245, 0.97);
    --nav-mobile-bg: rgba(248, 248, 248, 0.99);
    --card-thumb-bg: #dde0e4;
    --shadow-card:   0 10px 28px rgba(0, 0, 0, 0.14);
}

/* Dark theme — toggled by [data-theme="dark"] on <html> */
[data-theme="dark"] {
    --bg:            #0d0d0d;
    --surface:       #181818;
    --surface-hover: #242424;
    --border:        #2a2a2a;
    --text:          #f0f0f0;
    --text-muted:    #888;
    --accent:        #e91e8c;
    --accent-hover:  #c2185b;
    --online:        #4caf50;
    --live-red:      #e53935;
    --header-bg:     rgba(15, 15, 15, 0.96);
    --nav-mobile-bg: rgba(13, 13, 13, 0.98);
    --card-thumb-bg: #111;
    --shadow-card:   0 10px 28px rgba(0, 0, 0, 0.55);
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    line-height: 1.5;
    min-height: 100dvh;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Refresh progress bar — sits above everything ──────────── */
.refresh-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 200;
    background: transparent;
    overflow: hidden;
    pointer-events: none;
}

.refresh-bar-fill {
    height: 100%;
    width: 0;
    background: var(--accent);
}

/* ── Site Header ───────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    gap: 12px;
}

/*
 * Blurred background lives on ::before so that position:fixed children
 * (the mobile nav overlay) use the viewport as their containing block.
 * Chrome/WebKit incorrectly make backdrop-filter elements containing blocks
 * for fixed descendants, which broke the nav overlay and hid the hamburger.
 */
.site-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: -1;
    pointer-events: none;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
    text-decoration: none;
}

.site-logo-text {
    font-size: 22px;
    font-weight: 900;
    color: var(--accent);
    letter-spacing: -0.5px;
    line-height: 1;
}

/* ── Site Nav ──────────────────────────────────────────────── */
.site-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    padding: 0 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.site-nav::-webkit-scrollbar { display: none; }

.site-nav-link {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 6px 10px;
    border-radius: var(--radius);
    white-space: nowrap;
    transition: color var(--transition), background var(--transition);
}

.site-nav-link:hover,
.site-nav-link:focus-visible {
    color: var(--text);
    background: var(--surface-hover);
    outline: none;
}

.site-nav-link.is-active {
    color: var(--text);
    background: var(--surface);
}

.nav-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.7;
}

.site-nav-link.is-active .nav-icon,
.site-nav-link:hover .nav-icon {
    opacity: 1;
}

/* ── Header Right ──────────────────────────────────────────── */
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.live-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 10px 4px 8px;
    white-space: nowrap;
}

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--online);
    box-shadow: 0 0 6px var(--online);
    flex-shrink: 0;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 4px var(--online); }
    50%       { box-shadow: 0 0 10px var(--online); }
}

.live-label { color: var(--text-muted); }

/* ── Hamburger button ──────────────────────────────────────── */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 6px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color var(--transition), background var(--transition);
}

.hamburger:hover,
.hamburger:focus-visible {
    background: var(--surface-hover);
    border-color: var(--text-muted);
    outline: none;
}

.hamburger-bar {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--text);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Animate to X when open */
.hamburger.is-open .hamburger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.is-open .hamburger-bar:nth-child(2) {
    opacity: 0;
}
.hamburger.is-open .hamburger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile nav overlay ────────────────────────────────────── */
@media (max-width: 767px) {
    .hamburger { display: flex; }

    .site-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        flex-direction: column;
        align-items: stretch;
        overflow-y: auto;
        background: var(--nav-mobile-bg);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        padding: 12px 16px 32px;
        gap: 4px;
        z-index: 99;
        transform: translateX(100%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .site-nav.is-open {
        transform: translateX(0);
    }

    .site-nav-link {
        font-size: 16px;
        padding: 12px 14px;
        border-radius: var(--radius);
        border-bottom: 1px solid var(--border);
    }

    .site-nav-link:last-child { border-bottom: none; }

    .nav-icon { width: 18px; height: 18px; }
}

/* ── Section header ────────────────────────────────────────── */
.section-header {
    display: flex;
    flex-direction: column;  /* stack title + filter bar vertically */
    gap: 10px;
    padding: 16px 16px 8px;
    position: relative;
}

.section-header-main {
    min-width: 0;
}

/* Filter wrap spans full width below the title */
.section-header > .pgf-wrap {
    padding: 0;
    width: 100%;
}

.section-header > .pgf-wrap .pgf-toggle-row {
    padding: 0;
}

@media (min-width: 1100px) {
    .section-header {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: 24px;
    }

    .section-header-main {
        flex: 1 1 auto;
    }

    .section-header > .pgf-wrap {
        flex: 0 0 min(640px, 48vw);
        max-width: min(640px, 48vw);
        margin-left: auto;
    }
}

/* Panel positioning kept for legacy safety but overlay is now position:fixed */
.section-header > .pgf-wrap .pgf-panel:not([hidden]) {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 4px 0 0;
    z-index: 20;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.section-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* ── Performer Grid ────────────────────────────────────────── */
.performer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 8px 10px 24px;
}

@media (min-width: 480px) {
    .performer-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
    .performer-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
        padding: 10px 16px 28px;
    }
}

@media (min-width: 1024px) {
    .performer-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (min-width: 1400px) {
    .performer-grid { grid-template-columns: repeat(6, 1fr); }
}

/* ── Performer Card ────────────────────────────────────────── */
.performer-card {
    display: block;
    background: var(--surface);
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    transform-origin: center center;
    will-change: transform, opacity;
    cursor: pointer;
}

.performer-card:hover,
.performer-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
    outline: none;
}

.performer-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Thumbnail */
.card-thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--card-thumb-bg);
    overflow: hidden;
}

.card-thumb img:not(.card-thumb-platform) {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.performer-card:hover .card-thumb img:not(.card-thumb-platform) {
    transform: scale(1.06);
}

/* Badges on thumbnail */
.badge-live,
.badge-hd,
.badge-viewers {
    position: absolute;
    border-radius: 3px;
    font-weight: 700;
    line-height: 1;
    padding: 3px 5px;
}

.badge-live {
    top: 5px;
    left: 5px;
    background: var(--live-red);
    color: #fff;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.badge-hd {
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 9px;
    text-transform: uppercase;
}

.badge-viewers {
    bottom: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 11px;
}

/* Badge: New performer */
.badge-new {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: #2e7d32;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    padding: 3px 5px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Card text */
.card-info {
    padding: 6px 8px 8px;
}

.card-username {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    color: var(--text);
}

.card-status {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    margin-top: 1px;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
    flex-wrap: wrap;
}

.card-platform {
    font-size: 11px;
    color: var(--text-muted);
}

.card-platform-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    border-radius: 3px;
    flex-shrink: 0;
}

/* Platform icon pinned to bottom-right of thumbnail */
.card-thumb-platform {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 18px;
    height: 18px;
    border-radius: 3px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.55);
    padding: 2px;
}

.card-thumb-platform-text {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 5px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Username row: name left, live viewer count right */
.card-username-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-username-row .card-username {
    flex: 1;
    min-width: 0;
}

.card-viewer-count {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Topic line — shown only on Home and Live pages */
.card-topic {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    margin-top: 1px;
}

.card-meta-icon {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
    opacity: 0.6;
}

.card-followers,
.card-location,
.card-first-seen {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    max-width: 80px;
    text-overflow: ellipsis;
}

/* Offline thumbnail placeholder */
.card-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: var(--card-thumb-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-thumb-placeholder::after {
    content: 'Offline';
    color: var(--text-muted);
    opacity: 0.5;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Empty state */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 16px;
    color: var(--text-muted);
    font-size: 15px;
}

.empty-state a { color: var(--accent); }

/* ── Load More button ──────────────────────────────────────── */
.load-more-wrap {
    display: flex;
    justify-content: center;
    padding: 16px 16px 32px;
}

.btn-load-more {
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.btn-load-more:hover:not(:disabled),
.btn-load-more:focus-visible:not(:disabled) {
    color: var(--text);
    border-color: var(--text-muted);
    background: var(--surface-hover);
    outline: none;
}

.btn-load-more:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ── Infinite scroll sentinel ──────────────────────────────── */
.scroll-sentinel {
    height: 1px;
    width: 100%;
}

/* ── Back to top button ────────────────────────────────────── */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 20px;
    z-index: 150;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, background var(--transition), color var(--transition);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover,
.back-to-top:focus-visible {
    background: var(--surface-hover);
    color: var(--text);
    outline: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .performer-card,
    .card-thumb img:not(.card-thumb-platform),
    .back-to-top {
        transition: none;
    }
}

/* ── SEO text sections ─────────────────────────────────────── */
.page-seo-text,
.profile-seo-text {
    max-width: none;
    padding: 0 16px 48px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.75;
}

.page-seo-text h2,
.profile-seo-text h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.page-seo-text p + p,
.profile-seo-text p + p {
    margin-top: 10px;
}

.link-inline {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── Performer Profile Page ────────────────────────────────── */
.profile-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

/* Top-level heading */
.profile-page > .profile-name {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

@media (min-width: 640px) {
    .profile-page > .profile-name { font-size: 32px; }
}

/* Section label (Live Preview, Similar Cams) */
.profile-section-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* ── Hero unit: live preview + status + CTA as a viewport-height unit ── */
/*
 * On wide/landscape screens the embed could be so tall that the CTA is
 * pushed below the fold. The hero unit constrains total height to the
 * browser viewport (minus the header + h1 headroom), so the viewer
 * always sees the preview AND the watch button together.
 */
.profile-hero-unit {
    display: flex;
    flex-direction: column;
    min-height: 280px;
    margin-bottom: 20px;
}

/* On desktop, give the hero unit a defined height so flex children
   can distribute space. The hero fills all available viewport height
   below the header and the page heading (≈80px of headroom). */
@media (min-width: 768px) {
    .profile-hero-unit {
        height: calc(100dvh - var(--header-height) - 80px);
    }
}

/* Let the player section fill available space inside the hero unit.
   It must be a flex column so the h2 label takes natural height and
   the player-wrap fills the remainder — needed for the iframe to resolve
   its height correctly when padding-top trick is disabled. */
.profile-hero-unit .profile-player-section {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

/* On mobile, keep the 16:9 aspect-ratio padding trick because the hero unit
   has no fixed height, so flex-grow cannot give the player a definite height. */
.profile-hero-unit .profile-player-wrap {
    padding-top: 56.47%;
}

/* On desktop (hero unit has an explicit viewport height), switch to flex fill. */
@media (min-width: 768px) {
    .profile-hero-unit .profile-player-wrap {
        flex: 1 1 0;
        min-height: 0;
        padding-top: 0;   /* disable the aspect-ratio trick used outside hero unit */
    }
}

/* CTA: keep natural width and center horizontally inside the hero unit */
.profile-hero-unit .btn-watch {
    margin-top: 12px;
}

/* ── Live preview player (standalone / offline fallback) ─────────────── */
.profile-player-section {
    margin-bottom: 20px;
}

/*
 * Responsive 16:9 container (850×480 ≈ 56.47%).
 * The iframe / video is absolutely positioned inside,
 * filling 100% width and height.
 */
.profile-player-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.47%;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
}

.profile-player-wrap iframe,
.profile-player-wrap video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Show large-screen Chaturbate embed on ≥768px, small-screen embed below */
.profile-player-large { display: none; }
.profile-player-small { display: block; }

@media (min-width: 768px) {
    .profile-player-large { display: block; }
    .profile-player-small { display: none; }
}

/* ── Status bar (live indicator + topic + show type) ─────── */
.profile-status-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.profile-topic {
    font-size: 13px;
    color: var(--text-muted);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Don't truncate the room topic on the profile/bio page */
.profile-hero-unit .profile-topic {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
}

.profile-show-status {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 2px 9px;
    white-space: nowrap;
}

/* ── Profile layout (thumbnail + info) ───────────────────── */
.profile-layout {
    display: grid;
    gap: 24px;
    margin-top: 24px;
}

@media (min-width: 640px) {
    .profile-layout {
        grid-template-columns: minmax(0, 260px) 1fr;
        align-items: start;
    }
}

.profile-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius);
    background: var(--card-thumb-bg);
}

/* Reuse .profile-name inside the info column only when needed */
.profile-info .profile-name {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
}

@media (min-width: 640px) { .profile-info .profile-name { font-size: 30px; } }

.profile-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

.profile-status.is-live { color: var(--online); }

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
}

.status-dot.online {
    background: var(--online);
    box-shadow: 0 0 7px var(--online);
}

/* Tags */
.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    list-style: none;
    padding-left: 0;
}

.tag {
    background: var(--surface);
    color: var(--text-muted);
    font-size: 12px;
    padding: 4px 9px;
    border-radius: 100px;
    border: 1px solid var(--border);
    white-space: nowrap;
}

/* Clickable tag variant (profile bio) */
.tag-link {
    color: var(--text-muted);
    text-decoration: none;
    display: block;
}

.tag:has(.tag-link):hover {
    border-color: var(--accent);
    background: var(--surface-hover);
}

.tag-link:hover {
    color: var(--accent);
}

/* Meta table */
.profile-meta {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    margin-top: 16px;
    font-size: 13px;
}

.profile-meta dt { color: var(--text-muted); }
.profile-meta dd { color: var(--text); }

/* Inline links inside the bio meta (country, language) */
.meta-link {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: var(--border);
}

.meta-link:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

.profile-meta-sub {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 1px;
}

/* CTA button — block + auto margins = horizontally centered everywhere */
.btn-watch {
    display: block;
    width: fit-content;
    margin: 20px auto 0;
    background: var(--accent);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    padding: 12px 22px;
    border-radius: var(--radius);
    transition: background var(--transition);
    white-space: nowrap;
}

.btn-watch:hover,
.btn-watch:focus-visible {
    background: var(--accent-hover);
    outline: none;
}

.profile-handle {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

.profile-seo-text {
    margin-top: 32px;
    padding-left: 0;
    padding-right: 0;
}

/* ── Similar cams ────────────────────────────────────────── */
.profile-similar {
    margin-top: 40px;
}
    padding-left: 0;
    padding-right: 0;
}

/* ── Site container — constrains whole page width ─────────── */
.site-container {
    max-width: 1720px;
    margin: 0 auto;
    position: relative;
}

/* ── Theme toggle button ───────────────────────────────────── */
.theme-toggle {
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    color: var(--text);
    background: var(--surface-hover);
    border-color: var(--text-muted);
    outline: none;
}

.theme-toggle svg {
    width: 16px;
    height: 16px;
    pointer-events: none;
}

/* Show sun icon in dark mode; moon icon in light mode */
.icon-sun  { display: none; }
.icon-moon { display: block; }
[data-theme="dark"] .icon-sun  { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* ── Filter bar ────────────────────────────────────────────── */
.filter-bar {
    padding: 8px 16px 0;
}

.filter-bar-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-search {
    height: 36px;
    padding: 0 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 13px;
    flex: 1;
    min-width: 160px;
    max-width: 340px;
    outline: none;
    transition: border-color var(--transition);
    font-family: inherit;
}

.filter-search:focus {
    border-color: var(--accent);
}

.filter-search::placeholder {
    color: var(--text-muted);
}

.filter-pills {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.filter-pill {
    height: 36px;
    padding: 0 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: color var(--transition), border-color var(--transition), background var(--transition);
    font-family: inherit;
}

.filter-pill:hover {
    color: var(--text);
    border-color: var(--text-muted);
    background: var(--surface-hover);
}

.filter-pill.is-active {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--surface-hover);
}

/* ── Advanced filter panel (pgf-*) ──────────────────────────
   A collapsible multi-field filter panel included on all grid pages
   via @include('components.filter-bar').
   ──────────────────────────────────────────────────────────── */

.pgf-wrap {
    padding: 8px 0 4px;
}

.pgf-toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
}

.pgf-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.pgf-toggle-btn:hover,
.pgf-toggle-btn.is-open {
    color: var(--accent);
    border-color: var(--accent);
}

.pgf-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.pgf-active-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: var(--accent);
    color: #fff;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.pgf-clear-btn {
    margin-left: auto;
    height: 32px;
    padding: 0 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    transition: color var(--transition), border-color var(--transition);
}

.pgf-clear-btn:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

/* Panel: hidden by default via [hidden] attr; revealed by removing that attr */
.pgf-panel:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 10px 16px 8px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* Each section: label + control(s) stacked */
.pgf-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.pgf-section:first-child {
    padding-top: 0;
}

.pgf-section:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

/* Side-by-side fields within a section */
.pgf-section--row,
.pgf-section--triad {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px;
}

.pgf-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 120px;
    min-width: 100px;
}

.pgf-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.pgf-input {
    height: 34px;
    padding: 0 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition);
}

.pgf-input:focus {
    border-color: var(--accent);
}

.pgf-input::placeholder {
    color: var(--text-muted);
}

.pgf-search-input {
    width: 100%;
    max-width: 480px;
}

.pgf-number {
    height: 34px;
    padding: 0 8px;
    width: 74px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition);
    -moz-appearance: textfield;
}

.pgf-number::-webkit-inner-spin-button,
.pgf-number::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

.pgf-number:focus {
    border-color: var(--accent);
}

.pgf-number--wider {
    width: 96px;
}

.pgf-select {
    height: 34px;
    padding: 0 28px 0 10px;
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
    transition: border-color var(--transition);
}

.pgf-select:focus {
    border-color: var(--accent);
}

.pgf-range-pair {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pgf-range-sep {
    color: var(--text-muted);
    font-size: 13px;
}

.pgf-pills {
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.pgf-pills::-webkit-scrollbar {
    display: none;
}

.pgf-pills--wrap {
    flex-wrap: wrap;
}

.pgf-pill {
    height: 30px;
    padding: 0 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
    transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.pgf-pill:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

.pgf-pill.is-active {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--surface);
}

/* ── pgf standalone search bar ──────────────────────────────
   Rendered above the filter toggle row, always visible.    */
.pgf-search-wrap {
    padding: 0 0 6px;
}

.pgf-search-field {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 480px;
}

@media (max-width: 767px) {
    .pgf-search-field {
        max-width: none;
    }

    .pgf-toggle-row {
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .pgf-clear-btn {
        margin-left: 0;
    }
}

@media (min-width: 1100px) {
    .pgf-search-wrap,
    .pgf-toggle-row {
        display: flex;
        justify-content: flex-end;
    }

    .pgf-search-field {
        width: 100%;
        max-width: 460px;
        margin-left: auto;
    }

    .pgf-toggle-row {
        gap: 12px;
    }

    .pgf-clear-btn {
        margin-left: 0;
    }
}

.pgf-search-icon {
    position: absolute;
    left: 10px;
    width: 15px;
    height: 15px;
    color: var(--text-muted);
    pointer-events: none;
    flex-shrink: 0;
}

.pgf-standalone-search {
    width: 100%;
    height: 36px;
    padding: 0 10px 0 32px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition);
}

.pgf-standalone-search:focus {
    border-color: var(--accent);
}

.pgf-standalone-search::placeholder {
    color: var(--text-muted);
}

/* ── pgf filter overlay backdrop ────────────────────────────
   position:fixed so it sits above everything, not clipped
   by section-header or any positioned ancestor.           */
.pgf-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 500;
    display: flex;
    align-items: flex-end;   /* bottom sheet on mobile */
    justify-content: center;
    padding: 0;
    overscroll-behavior: none;
}

@media (min-width: 540px) {
    .pgf-overlay {
        align-items: center;  /* centered modal on larger screens */
        padding: 16px;
    }
}

.pgf-overlay[hidden] { display: none; }

/* Lock body scroll while overlay is open */
body.pgf-open { overflow: hidden; }

/* ── pgf modal box ───────────────────────────────────────── */
.pgf-modal {
    width: 100%;
    max-width: 880px;
    max-height: 92dvh;
    max-height: 92vh;     /* fallback for browsers without dvh */
    background: var(--surface);
    border-radius: 20px 20px 0 0;  /* bottom sheet corners on mobile */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.35);
}

@media (min-width: 540px) {
    .pgf-modal {
        border-radius: 16px;  /* fully rounded on larger screens */
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    }
}

.pgf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.pgf-modal-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.pgf-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    transition: background var(--transition), color var(--transition);
}

.pgf-modal-close:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.pgf-modal-body {
    overflow-y: auto;
    flex: 1;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

@media (min-width: 900px) {
    .pgf-modal-body {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-content: start;
    }
}

/* Sections inside the modal body get left/right padding and dividers */
.pgf-modal-body .pgf-section {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
}

@media (min-width: 900px) {
    .pgf-modal-body .pgf-section--full {
        grid-column: 1 / -1;
    }
}

.pgf-modal-body .pgf-section:last-child {
    border-bottom: none;
}

.pgf-modal-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.pgf-modal-reset {
    flex-shrink: 0;
    height: 40px;
    padding: 0 16px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    transition: color var(--transition), border-color var(--transition);
}

.pgf-modal-reset:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

.pgf-modal-apply {
    flex: 1;
    height: 40px;
    background: var(--accent);
    border: none;
    border-radius: 100px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background var(--transition);
}

.pgf-modal-apply:hover {
    background: var(--accent-hover);
}

/* ── Checkbox lists (tags / languages / countries) ───────── */
.pgf-list-search {
    width: 100%;
    height: 32px;
    padding: 0 10px;
    margin-bottom: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition);
}

.pgf-list-search:focus {
    border-color: var(--accent);
}

.pgf-list-search::placeholder {
    color: var(--text-muted);
}

.pgf-checkbox-list {
    display: flex;
    flex-direction: column;
    max-height: 200px;
    overflow-y: auto;
    gap: 2px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.pgf-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 6px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.3;
    transition: background var(--transition);
    user-select: none;
}

.pgf-checkbox-item:hover {
    background: var(--surface-hover);
}

.pgf-checkbox-item input[type='checkbox'] {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    accent-color: var(--accent);
    cursor: pointer;
}

.pgf-count {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: normal;
}

.pgf-selected-count {
    font-size: 11px;
    font-weight: normal;
    color: var(--accent);
    margin-left: 4px;
    text-transform: none;
    letter-spacing: 0;
}

/* ── Profile 2-column details area ────────────────────────── */
.profile-details-area {
    margin-top: 24px;
}

.profile-details-area .profile-layout {
    margin-top: 0;
}

.profile-details-area .profile-seo-text {
    margin-top: 24px;
    padding: 0;
}

@media (min-width: 1024px) {
    .profile-details-area {
        display: grid;
        grid-template-columns: 340px 1fr;
        gap: 36px;
        align-items: start;
    }

    .profile-details-area .profile-seo-text {
        margin-top: 0;
    }
}

/* ── Site Footer ───────────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 24px 32px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 40px;
}

.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.footer-nav a { color: var(--text-muted); }
.footer-nav a:hover { color: var(--text); }
