/* rvx/screen.css — webcamtube fingerprint rewrite + PIE spec */

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
    --color-bg:         #0d0d0d;
    --color-surface:    #161616;
    --color-surface-2:  #1e1e1e;
    --color-border:     rgba(255,255,255,.08);
    --color-text:       #e8e8e8;
    --color-muted:      #888;
    --color-accent:     #fc0;
    --color-accent-dim: rgba(255,204,0,.2);
    --color-live:       #00ff7e;
    --radius-card:      8px;
    --radius-sm:        4px;
    --shadow-card:      0 2px 8px rgba(0,0,0,.45);
    --shadow-hover:     0 8px 24px rgba(0,0,0,.65);
    --shadow-press:     0 10px 30px -10px rgba(0,0,0,.7);
    --transition-fast:  80ms cubic-bezier(0.4,0,0.2,1);
    --transition-std:   .2s ease;
    --font-ui:          Arial, Helvetica, sans-serif;
    --nav-height:       56px;
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-ui);
    font-size: 14px;
    background: var(--color-bg);
    color: var(--color-text);
}

a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

a:active, button:active {
    transform: scale(0.96);
}

button {
    cursor: pointer;
    font-family: inherit;
    transition: transform var(--transition-fast);
}

img { vertical-align: middle; }
h1,h2,h3,h4,h5,h6 { margin-top: 0; margin-bottom: .5rem; }
p { margin-top: 0; margin-bottom: 1rem; }
ul { list-style: none; margin: 0; padding: 0; }

/* ============================================================
   PIE 1a — HAPTIC SIMULATION (all links/buttons)
   ============================================================ */
a:active  { transform: scale(0.96); }
button:active { transform: scale(0.96); }

/* ============================================================
   PIE 1b — FOCUS-WITHIN GLOW
   ============================================================ */
.site-search-wrap:focus-within,
.stream-search-form:focus-within {
    box-shadow: 0 0 0 3px rgba(255,204,0,.35);
    border-radius: var(--radius-sm);
}
input:focus { outline: none; }

/* ============================================================
   LAYOUT SHELL
   ============================================================ */
.site-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-wrap {
    display: flex;
    flex: 1;
}

.content-area {
    flex: 1;
    padding: 12px 15px;
    min-width: 0;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    height: var(--nav-height);
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 12px;
}

.header-logo-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header-menu-toggle {
    background: none;
    border: none;
    color: var(--color-text);
    padding: 6px;
    display: flex;
    align-items: center;
}

.header-logo img {
    max-height: 36px;
    width: auto;
}

.header-search-wrap {
    flex: 1;
    max-width: 480px;
}

.header-search-form {
    display: flex;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    overflow: hidden;
}

.header-search-input {
    flex: 1;
    background: none;
    border: none;
    color: var(--color-text);
    padding: 8px 14px;
    font-size: 13px;
    min-width: 0;
}

.header-search-btn {
    background: none;
    border: none;
    color: var(--color-muted);
    padding: 8px 14px;
    display: flex;
    align-items: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.header-online-count {
    font-size: 12px;
    color: var(--color-live);
    font-weight: 700;
    white-space: nowrap;
}

.header-online-count::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-live);
    margin-right: 5px;
    vertical-align: middle;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.side-rail {
    width: 220px;
    flex-shrink: 0;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    overflow-y: auto;
    max-height: calc(100vh - var(--nav-height));
    position: sticky;
    top: var(--nav-height);
}

.side-rail.is-collapsed {
    transform: translateX(-100%);
    position: fixed;
    top: var(--nav-height);
    left: 0;
    height: 100%;
    z-index: 90;
}

.side-rail-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 89;
}

.side-rail-overlay.is-visible { display: block; }

.rail-section { padding: 8px 0; border-bottom: 1px solid var(--color-border); }
.rail-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-muted);
    padding: 8px 16px 4px;
    letter-spacing: .06em;
}

.rail-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    font-size: 13px;
    color: var(--color-text);
    transition: background var(--transition-std), color var(--transition-std);
    min-height: 48px;
}

.rail-link:hover  { background: var(--color-surface-2); color: var(--color-accent); }
.rail-link.active { background: var(--color-accent-dim); color: var(--color-accent); font-weight: 700; }

/* ============================================================
   STREAM GRID (was .item-grid)
   ============================================================ */
.stream-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -5px;
}

.stream-tile {
    width: 20%;
    padding: 0 5px;
    margin-bottom: 14px;
}

.stream-grid.layout-small  .stream-tile { width: 14.28%; }
.stream-grid.layout-medium .stream-tile { width: 20%; }
.stream-grid.layout-large  .stream-tile { width: 25%; }

/* video-grid uses same id="webcams" — apply size rules to video-tile too */
.video-grid.layout-small  .video-tile { width: 16.66%; }
.video-grid.layout-medium .video-tile { width: 25%; }
.video-grid.layout-large  .video-tile { width: 33.333%; }

/* ============================================================
   TILE SHELL (was .item-wrapper)
   ============================================================ */
.tile-shell {
    position: relative;
    border-radius: var(--radius-card);
    overflow: hidden;
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
    transition: box-shadow var(--transition-std), transform var(--transition-std);
    cursor: pointer;
}

.tile-shell:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.tile-shell:active {
    transform: translateY(-3px) scale(0.96);
    box-shadow: var(--shadow-press);
}

/* ============================================================
   TILE MEDIA (was .preview)
   ============================================================ */
.tile-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--color-surface-2);
}

.tile-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.tile-shell:hover .tile-media img {
    transform: scale(1.03);
}

.tile-media-overlay {
    position: absolute;
    inset: 0;
    background: rgba(20,20,20,.35);
    opacity: 0;
    transition: opacity var(--transition-std);
    pointer-events: none;
}

.tile-shell:hover .tile-media-overlay { opacity: 1; }

/* ============================================================
   PIE 1c — QUICKSTATS OVERLAY (was webcam-card-quickstats)
   ============================================================ */
.tile-quickstats {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.85));
    color: #fff;
    font-size: 11px;
    padding: 24px 8px 7px;
    transform: translateY(100%);
    transition: transform var(--transition-std);
    pointer-events: none;
}

.tile-shell:hover .tile-quickstats { transform: translateY(0); }

.tile-quickstats-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tile-quickstat {
    background: rgba(255,255,255,.12);
    border-radius: 3px;
    padding: 2px 5px;
}

/* ============================================================
   TILE BADGES / CORNERS
   ============================================================ */
.tile-badge-topleft {
    position: absolute;
    top: 5px;
    left: 5px;
    z-index: 3;
}

.tile-badge-topright {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 3;
}

.tile-badge-botleft {
    position: absolute;
    bottom: 6px;
    left: 6px;
    z-index: 3;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0,0,0,.7);
}

.tile-badge-botright {
    position: absolute;
    bottom: 5px;
    right: 5px;
    z-index: 3;
}

/* Live badge */
.live-dot {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(20,20,20,.75);
    border-radius: 10px;
    padding: 3px 7px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

.live-dot::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-live);
    flex-shrink: 0;
}

/* PIE 1e — viewer count pulse */
@keyframes live-pulse { 0%,100% { opacity:1 } 50% { opacity:.6 } }

.viewer-count-badge {
    animation: live-pulse 3s ease-in-out infinite;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,.7);
}

/* ============================================================
   TILE INFO (below image)
   ============================================================ */
.tile-info {
    padding: 7px 8px 9px;
}

.tile-name {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--color-text);
}

.tile-meta {
    font-size: 11px;
    color: var(--color-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================
   PIE 1k — PATTERN INTERRUPTER CARD
   ============================================================ */
.grid-novelty-card {
    border-radius: var(--radius-card);
    background: linear-gradient(135deg, #0f0f1a, #1a1a2e);
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4/3;
    animation: novelty-glow 4s ease-in-out infinite alternate;
    font-size: 13px;
    color: var(--color-accent);
    text-align: center;
    padding: 12px;
}

@keyframes novelty-glow {
    from { box-shadow: 0 0 8px rgba(255,204,0,.2); }
    to   { box-shadow: 0 0 24px rgba(255,204,0,.6), 0 0 48px rgba(255,204,0,.15); }
}

/* ============================================================
   PIE 1g — PAGE TRANSITION WRAPPER
   ============================================================ */
#pg-content {
    transition: opacity var(--transition-std), transform var(--transition-std);
}

#pg-content.is-leaving {
    opacity: 0;
    transform: scale(0.98);
}

/* ============================================================
   PIE 1j — SKELETON CARDS
   ============================================================ */
.skeleton-card {
    border-radius: var(--radius-card);
    overflow: hidden;
    background: linear-gradient(90deg, #1a1a1a 25%, #222 50%, #1a1a1a 75%);
    background-size: 800px 100%;
    animation: skeleton-shimmer 1.4s ease infinite;
}

@keyframes skeleton-shimmer {
    0%   { background-position: -400px 0 }
    100% { background-position: 400px 0 }
}

.skeleton-thumb { aspect-ratio: 4/3; }
.skeleton-line  { height: 11px; border-radius: 3px; background: rgba(255,255,255,.06); margin: 8px 10px; }
.skeleton-line.short { width: 55%; }

/* ============================================================
   PROFILE PAGE — BENTO GRID LAYOUT
   ============================================================ */
.profile-stage {
    display: grid;
    grid-template-columns: 1fr 170px;
    gap: 14px;
    padding: 14px;
}

/* Grid children must not blow out their columns */
.profile-stage > * { min-width: 0; overflow: hidden; }

.profile-embed-wrap {
    background: #000;
    border-radius: var(--radius-card);
    overflow: hidden;
    aspect-ratio: 16/9;
    position: relative;
    width: 100%;
    max-width: 100%;
}

.profile-embed-wrap #embed-live {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Force all embed descendants to fit — covers iframe, script-injected divs, <a> wrappers */
.profile-embed-wrap a,
.profile-embed-wrap iframe,
.profile-embed-wrap embed,
.profile-embed-wrap object,
.profile-embed-wrap > div > div {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    border: none;
}

.profile-embed-wrap #embed-live iframe,
.profile-embed-wrap #embed-live > div,
.profile-embed-wrap #embed-live > script + * {
    width: 100% !important;
    height: 100% !important;
    border: none;
    display: block;
}

.profile-sidebar-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ---- Related models sidebar block ---- */
.profile-related-heading {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--color-muted);
    margin: 0 0 10px;
}

.profile-related-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
    position: relative;
    text-align: center;
    transition: background var(--transition-fast);
}
.profile-related-cell:last-child { border-bottom: none; }
.profile-related-cell:hover .profile-related-name { color: var(--color-accent); }

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

.profile-related-info {
    width: 100%;
}

.profile-related-name {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color var(--transition-fast);
}

.profile-related-meta {
    font-size: 11px;
    color: var(--color-muted);
    margin-top: 2px;
}

.profile-related-dot {
    position: absolute;
    top: 14px;
    right: 4px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--color-muted);
    border: 2px solid var(--color-surface);
}
.profile-related-dot--public   { background: var(--color-live); }
.profile-related-dot--freechat { background: var(--color-live); }
.profile-related-dot--private  { background: #f59e0b; }

/* Bento cells */
.bento-cell {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    padding: 14px;
    transition: transform var(--transition-std), box-shadow var(--transition-std);
}

.bento-cell:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,.5);
}

/* PIE 1f — CTA nudge */
@keyframes cta-nudge { 0%,100% { transform:scale(1) } 50% { transform:scale(1.05) } }

.profile-cta-block.is-nudging .btn-cta-primary {
    animation: cta-nudge .6s ease-in-out 2;
}

.btn-cta-primary {
    display: block;
    width: 100%;
    padding: 13px;
    background: var(--color-accent);
    color: #000;
    font-weight: 700;
    font-size: 15px;
    border-radius: var(--radius-sm);
    border: none;
    text-align: center;
    transition: filter .2s ease, transform var(--transition-fast);
}

.btn-cta-primary:hover { filter: brightness(1.1); }
.btn-cta-primary:active { transform: scale(0.96); }

/* Offline overlay */
.profile-offline-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.82);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    border-radius: var(--radius-card);
    z-index: 5;
}

.offline-timer {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-accent);
    margin-top: 8px;
}

/* ============================================================
   PIE 3 — PROFILE STICKY STRIP (mobile, after 300px scroll)
   ============================================================ */
.profile-sticky-strip {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    z-index: 190;
    background: rgba(13,13,13,.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    transform: translateY(100%);
    transition: transform .3s ease;
}

.profile-sticky-strip.is-visible { transform: translateY(0); }

.sticky-strip-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.sticky-strip-name {
    flex: 1;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sticky-strip-btn {
    background: var(--color-accent);
    color: #000;
    font-weight: 700;
    font-size: 13px;
    border: none;
    border-radius: 20px;
    padding: 8px 18px;
    white-space: nowrap;
    min-height: 48px;
    display: flex;
    align-items: center;
}

/* ============================================================
   PANEL TABS (was .tab-nav / .model-tab)
   ============================================================ */
.panel-tabs-bar {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 0 14px;
}

.panel-tabs-list {
    display: flex;
    gap: 4px;
}

.panel-tab-link {
    display: inline-block;
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-muted);
    border-bottom: 2px solid transparent;
    transition: color var(--transition-std), border-color var(--transition-std);
    min-height: 48px;
    line-height: 26px;
}

.panel-tab-link:hover { color: var(--color-text); }
.panel-tab-link.is-active { color: var(--color-accent); border-bottom-color: var(--color-accent); }

.panel-tab-pane { display: none; padding: 16px; }
.panel-tab-pane.is-active { display: block; }

/* ============================================================
   PROFILE STATS / BIO
   ============================================================ */
.profile-stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
}

.stat-tile {
    background: var(--color-surface-2);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    min-width: 100px;
    flex: 1;
}

.stat-tile-label { font-size: 10px; color: var(--color-muted); text-transform: uppercase; letter-spacing: .05em; }
.stat-tile-value { font-size: 18px; font-weight: 700; margin-top: 2px; }

.bio-details-grid {
    display: flex;
    flex-wrap: wrap;
}

.bio-detail-item {
    width: 50%;
    padding: 8px 14px;
    font-size: 13px;
    color: var(--color-text);
}

.bio-detail-label { color: var(--color-muted); font-size: 11px; display: block; margin-bottom: 2px; }

/* Lightbox */
.image-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    z-index: 300;
    align-items: center;
    justify-content: center;
}

.image-lightbox.is-open { display: flex; }

.lightbox-img-main {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,.1);
    border: none;
    color: #fff;
    font-size: 28px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition-std);
}

.lightbox-btn:hover { background: rgba(255,255,255,.25); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; font-size: 22px; }

/* Photo strip */
.photo-strip {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 12px 14px;
}

.photo-strip-thumb {
    width: calc(16.66% - 5px);
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform var(--transition-std), opacity var(--transition-std);
}

.photo-strip-thumb:hover { transform: scale(1.04); opacity: .85; }

/* ============================================================
   RELATED MODELS ROW
   ============================================================ */
.related-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.related-row::-webkit-scrollbar { display: none; }

.related-tile {
    flex-shrink: 0;
    width: 100px;
    text-align: center;
    font-size: 11px;
}

.related-tile-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    margin: 0 auto 5px;
}

/* ============================================================
   VOYEUR GRID (was .minimal-grid)
   ============================================================ */
.voyeur-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
    gap: 8px;
    padding: 10px;
}

.voyeur-cell {
    position: relative;
    background: #000;
    border-radius: var(--radius-card);
    overflow: hidden;
    aspect-ratio: 16/9;
    min-width: 0;
}

.voyeur-cell-video {
    position: absolute;
    inset: 0;
}

.voyeur-cell video,
.voyeur-cell iframe,
.voyeur-cell-video video,
.voyeur-cell-video iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
}

.voyeur-cell-label {
    position: absolute;
    bottom: 6px;
    left: 6px;
    right: 6px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    z-index: 2;
}

.voyeur-name-tag {
    background: rgba(0,0,0,.7);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 3px;
}

/* Tag nav for voyeur */
.cam-filter-bar {
    display: flex;
    gap: 6px;
    padding: 10px 14px;
    flex-wrap: wrap;
}

.cam-filter-btn {
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 14px;
    cursor: pointer;
    transition: background var(--transition-std), color var(--transition-std);
    min-height: 36px;
}

.cam-filter-btn:hover,
.cam-filter-btn.is-active {
    background: var(--color-accent);
    color: #000;
    border-color: var(--color-accent);
}

/* ============================================================
   VIDEOS INDEX
   ============================================================ */
.video-grid { display: flex; flex-wrap: wrap; margin: 0 -5px; }

.video-tile {
    width: 25%;
    padding: 0 5px;
    margin-bottom: 14px;
}

.video-tile-shell {
    border-radius: var(--radius-card);
    overflow: hidden;
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
    transition: box-shadow var(--transition-std), transform var(--transition-std);
}

.video-tile-shell:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.video-tile-shell:active { box-shadow: var(--shadow-press); }

.video-thumb-wrap {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--color-surface-2);
}

.video-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.video-tile-shell:hover .video-thumb-wrap img { transform: scale(1.04); }

.video-duration-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0,0,0,.8);
    color: #fff;
    font-size: 11px;
    padding: 2px 5px;
    border-radius: 3px;
}

.video-tile-info { padding: 7px 8px 9px; }
.video-tile-title { font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-tile-meta  { font-size: 11px; color: var(--color-muted); margin-top: 4px; }

/* ============================================================
   VIDEO PLAYER
   ============================================================ */
.player-stage {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 14px;
    padding: 14px;
}

.player-main-wrap {
    background: #000;
    border-radius: var(--radius-card);
    overflow: hidden;
}

.player-sidebar { display: flex; flex-direction: column; gap: 12px; }

.player-title {
    font-size: 18px;
    font-weight: 700;
    padding: 12px 14px 0;
}

.player-meta {
    font-size: 12px;
    color: var(--color-muted);
    padding: 4px 14px 10px;
}

/* Related videos column */
.related-videos-list { display: flex; flex-direction: column; gap: 8px; }

.related-video-item {
    display: flex;
    gap: 8px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: background var(--transition-std);
    padding: 4px;
}

.related-video-item:hover { background: var(--color-surface-2); }

.related-video-thumb {
    width: 100px;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
}

.related-video-info { flex: 1; min-width: 0; }
.related-video-title { font-size: 12px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-video-meta  { font-size: 11px; color: var(--color-muted); margin-top: 3px; }

/* ============================================================
   TAGS HERO GRID
   ============================================================ */
/* 3-column grid: normal · normal · stack-of-2 */
.tag-hero-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 14px;
}

.tag-hero-card {
    position: relative;
    display: block;
    aspect-ratio: 2/3;
    overflow: hidden;
    border-radius: var(--radius-card);
    background: var(--color-surface);
    text-decoration: none;
    color: #fff;
    cursor: pointer;
}

/* Stack wrapper — fills its grid cell, splits height between 2 minis */
.tag-hero-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Mini cards: no fixed aspect-ratio, flex fills the stack height */
.tag-hero-mini {
    flex: 1;
    min-height: 0;
    aspect-ratio: unset;
}

.tag-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.tag-hero-card:hover .tag-hero-img { transform: scale(1.06); }

/* Persistent bottom gradient */
.tag-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,.0) 35%,
        rgba(0,0,0,.55) 65%,
        rgba(0,0,0,.88) 100%
    );
    pointer-events: none;
}

/* Top-right live badge */
.tag-hero-badge-tr {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 20px;
    padding: 3px 9px 3px 6px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
}

.tag-hero-live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #f00;
    border-radius: 50%;
    animation: live-pulse 2s ease-in-out infinite;
}

/* Bottom footer: always-visible name + hover-reveal stats */
.tag-hero-foot {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 12px 14px;
}

.tag-hero-name {
    font-size: 15px;
    font-weight: 700;
    text-shadow: 0 1px 4px rgba(0,0,0,.6);
    margin-bottom: 4px;
}

.tag-hero-hover-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .25s ease, opacity .25s ease;
}

.tag-hero-card:hover .tag-hero-hover-info {
    max-height: 40px;
    opacity: 1;
}

.tag-hero-viewers {
    font-size: 11px;
    color: rgba(255,255,255,.75);
}

.tag-hero-cta {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-accent);
    letter-spacing: .02em;
}

@media (max-width: 680px) {
    /* Collapse to 2 cols: normal · stack — drop one normal card slot */
    .tag-hero-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 8px; }
    .tag-hero-stack { gap: 6px; }
    /* Always show hover info on touch */
    .tag-hero-hover-info { max-height: 40px; opacity: 1; }
}

/* ============================================================
   VIEWED NOW (was .webcamsViewedNow)
   ============================================================ */
.spotlight-zone {
    padding: 12px;
    max-width: 900px;
    margin: 0 auto 4px;
}

.spotlight-card {
    position: relative;
    border-radius: var(--radius-card);
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--color-surface-2);
    cursor: pointer;
    width: 100%;
}

.spotlight-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.spotlight-card:hover .spotlight-card-img { transform: scale(1.04); }

.spotlight-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 12px 10px;
    background: linear-gradient(transparent, rgba(0,0,0,.85));
    color: #fff;
}

.now-mosaic {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
    padding: 12px;
}

.now-tile {
    position: relative;
    border-radius: var(--radius-card);
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--color-surface-2);
    cursor: pointer;
    min-width: 0;
}

.now-tile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.now-tile:hover .now-tile-img { transform: scale(1.04); }

.now-tile-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 8px 6px;
    background: linear-gradient(transparent, rgba(0,0,0,.8));
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.view-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 20px;
    border: 1px solid var(--color-border);
    background: none;
    color: var(--color-text);
    font-size: 12px;
    cursor: pointer;
    transition: background var(--transition-std), border-color var(--transition-std);
    min-height: 36px;
}

.view-action-btn:hover { background: var(--color-surface-2); border-color: var(--color-accent); color: var(--color-accent); }

/* ============================================================
   DISCOVER — spiced horizontal scroll rows
   ============================================================ */
.discover-row {
    margin-bottom: 28px;
}

.discover-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px 8px;
}

.discover-row-head-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.discover-row-title {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.01em;
    border-left: 3px solid var(--color-accent);
    padding-left: 8px;
    color: var(--color-text);
}

.discover-row-stats {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--color-muted);
}

.discover-online-pill {
    background: rgba(255,0,60,.15);
    color: #ff3c5a;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    letter-spacing: .02em;
}

.discover-stat-sep { opacity: .4; }

.discover-see-all {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-accent);
    white-space: nowrap;
}

/* Row: arrows + scrollable strip */
.discover-row-wrap {
    position: relative;
}

/* Fade mask hinting at more content */
.discover-row-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 10px;
    width: 60px;
    background: linear-gradient(to right, transparent, var(--color-bg));
    pointer-events: none;
    z-index: 2;
}

.discover-row-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 14px 12px;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
}

.discover-row-scroll::-webkit-scrollbar { display: none; }

/* Prev / next arrows */
.discover-arrow {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(20,20,20,.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--color-border);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-std), transform var(--transition-std);
}

.discover-arrow-prev { left: 2px; }
.discover-arrow-next { right: 2px; }
.discover-arrow:hover { background: var(--color-accent); color: #000; transform: translateY(-50%) scale(1.08); }

.discover-row-wrap:hover .discover-arrow { display: flex; }

/* Cards */
.discover-tile {
    position: relative;
    flex-shrink: 0;
    width: 150px;
    border-radius: var(--radius-card);
    overflow: hidden;
    background: var(--color-surface);
    scroll-snap-align: start;
    text-decoration: none;
    color: #fff;
    transition: transform .25s ease, box-shadow .25s ease;
}

.discover-tile:hover {
    transform: scale(1.04);
    box-shadow: 0 12px 32px -8px rgba(0,0,0,.6);
    z-index: 1;
}

/* First card per row — hero size */
.discover-tile--hero {
    width: 220px;
}

.discover-tile-img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.discover-tile:hover .discover-tile-img { transform: scale(1.06); }

/* Persistent gradient overlay */
.discover-tile-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 45%, rgba(0,0,0,.9) 100%);
    pointer-events: none;
}

/* Live status dot — top-right */
.discover-tile-status-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,.5);
    background: var(--color-muted);
}

.discover-tile-status-dot--freechat { background: var(--color-live); animation: live-pulse 2s ease-in-out infinite; }
.discover-tile-status-dot--public    { background: #4caf50; animation: live-pulse 2s ease-in-out infinite; }
.discover-tile-status-dot--private   { background: #ff9800; }
.discover-tile-status-dot--offline   { background: #555; }

/* Bottom info */
.discover-tile-foot {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 8px 8px;
}

.discover-tile-name {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 3px rgba(0,0,0,.6);
}

.discover-tile-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .2s ease, opacity .2s ease;
}

.discover-tile:hover .discover-tile-meta {
    max-height: 20px;
    opacity: 1;
}

.discover-tile-viewers {
    font-size: 10px;
    color: rgba(255,255,255,.8);
}

.discover-tile-age {
    font-size: 10px;
    color: rgba(255,255,255,.5);
}

/* ============================================================
   HOME MIX — section rows
   ============================================================ */
.home-section { margin-bottom: 20px; }

.home-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0 8px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 10px;
}

.home-section-title { font-size: 15px; font-weight: 700; }
.home-section-more  { font-size: 12px; color: var(--color-accent); }

/* ============================================================
   MARQUEE TICKER (pause-on-hover)
   ============================================================ */
.marquee-wrap {
    overflow: hidden;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.marquee-track {
    display: flex;
    gap: 28px;
    white-space: nowrap;
    animation: marquee-scroll 40s linear infinite;
}

.marquee-wrap:hover .marquee-track { animation-play-state: paused; }

@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    font-size: 12px;
    flex-shrink: 0;
}

.marquee-item a { color: var(--color-text); }
.marquee-item a:hover { color: var(--color-accent); }

/* ============================================================
   PIE 5 — MOBILE BOTTOM NAV (glassmorphic)
   ============================================================ */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: rgba(13,13,13,.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--color-border);
    padding: 6px 0 env(safe-area-inset-bottom, 6px);
    justify-content: space-around;
    align-items: center;
}

.mobile-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 48px;
    min-height: 48px;
    justify-content: center;
    background: none;
    border: none;
    color: var(--color-muted);
    font-size: 10px;
    transition: color var(--transition-std);
    padding: 0 8px;
}

.mobile-nav-btn.is-active { color: var(--color-accent); }
.mobile-nav-btn svg { width: 22px; height: 22px; }

.mobile-nav-dab {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-accent);
    color: #000;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 16px rgba(255,204,0,.4);
}

/* ============================================================
   TOAST STACK (PIE 7)
   ============================================================ */
.toast-stack {
    position: fixed;
    bottom: 80px;
    right: 16px;
    z-index: 250;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    padding: 10px 14px;
    font-size: 12px;
    color: var(--color-text);
    box-shadow: var(--shadow-card);
    animation: toast-in .3s ease;
    pointer-events: auto;
    max-width: 240px;
}

@keyframes toast-in {
    from { opacity:0; transform: translateX(20px); }
    to   { opacity:1; transform: translateX(0); }
}

/* ============================================================
   FLOATING CHAT EMBED
   ============================================================ */
#embed-floating-wrap {
    position: fixed;
    bottom: 70px;
    right: 16px;
    z-index: 150;
    display: none;
}

#embed-floating-wrap.is-visible { display: block; }

/* ============================================================
   PIE PARTICLE BURST
   ============================================================ */
.particle-canvas {
    position: fixed;
    pointer-events: none;
    z-index: 999;
}

/* ============================================================
   SECTION TITLE / PAGE HEADER
   ============================================================ */
.page-section-title {
    font-size: 20px;
    font-weight: 700;
    padding: 10px 0 12px;
    color: var(--color-text);
}

.page-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

/* ============================================================
   FILTER / SORT BAR
   ============================================================ */
.filter-sort-bar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 12px;
    align-items: center;
}

.filter-sort-btn {
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 14px;
    cursor: pointer;
    transition: background var(--transition-std), color var(--transition-std);
    min-height: 36px;
}

.filter-sort-btn:hover,
.filter-sort-btn.is-active {
    background: var(--color-accent);
    color: #000;
    border-color: var(--color-accent);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 24px 16px;
    font-size: 12px;
    color: var(--color-muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin-bottom: 14px;
}

.footer-links a { color: var(--color-muted); }
.footer-links a:hover { color: var(--color-accent); }

/* ============================================================
   UTILITY
   ============================================================ */
.hidden { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.text-accent { color: var(--color-accent); }
.text-muted  { color: var(--color-muted); }
.text-live   { color: var(--color-live); }

.btn-outline {
    background: none;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    border-radius: var(--radius-sm);
    padding: 7px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: border-color var(--transition-std), color var(--transition-std);
    min-height: 36px;
}

.btn-outline:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* Theme alert */
.theme-alert-banner {
    background: var(--color-surface-2);
    border: 1px solid var(--color-accent-dim);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
    .stream-tile { width: 25%; }
    .player-stage { grid-template-columns: 1fr 260px; }
}

@media (max-width: 1024px) {
    .side-rail { display: none; }
    .stream-tile { width: 25%; }
    .profile-stage { grid-template-columns: 1fr; }
    .profile-sidebar-col { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .stream-tile { width: 33.333%; }
    .video-tile  { width: 50%; }
    .mobile-bottom-nav { display: flex; }
    .site-footer { padding-bottom: 80px; }
    .player-stage { grid-template-columns: 1fr; }
    .spotlight-zone { grid-template-columns: 1fr; }
    .profile-sidebar-col { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
    .stream-tile { width: 50%; }
    .video-tile  { width: 50%; }
    .stream-grid.layout-small .stream-tile,
    .stream-grid.layout-medium .stream-tile,
    .stream-grid.layout-large .stream-tile { width: 50%; }
    .video-grid.layout-small .video-tile,
    .video-grid.layout-medium .video-tile,
    .video-grid.layout-large .video-tile { width: 50%; }
    .voyeur-grid { grid-template-columns: 1fr 1fr; }
    .bio-detail-item { width: 100%; }
    .photo-strip-thumb { width: calc(25% - 5px); }
}

/* ============================================================
   PIE 8 — REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* ============================================================
   LAYOUT COMPAT — actual class names used by layout.php
   ============================================================ */

/* ---- header ---- */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.primary-header {
    display: flex;
    align-items: center;
    background: var(--color-surface);
    padding: 8px 12px;
    gap: 10px;
    min-height: var(--nav-height);
}

.primary-header .ph-col {
    flex-grow: 1;
    flex-basis: 0;
    display: flex;
    align-items: center;
}

.primary-header .col-logo {
    flex-grow: 0;
    flex-basis: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.primary-header .logo-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.primary-header .logo img,
.primary-header #logo-icon {
    max-height: 38px;
    width: auto;
}

.primary-header .mobile-menu {
    background: none;
    border: none;
    color: var(--color-text);
    padding: 6px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.primary-header .mobile-menu svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
}

.primary-header .col-logo .online-status {
    font-size: 12px;
    color: var(--color-live);
    font-weight: 700;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
}

.primary-header .col-logo .online-status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-live);
    display: block;
    flex-shrink: 0;
}

.primary-header .col-search {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    overflow: visible;
}

.primary-header .col-action {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* search group */
.search-group {
    display: flex;
    align-items: center;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    overflow: hidden;
    width: 280px;
    max-width: 360px;
    flex-shrink: 1;
}

#search-box-top {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 0;
}

#container-search { display: none; }

/* Grid size selectors */
.thumb-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.thumb-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: var(--color-surface-2);
    color: var(--color-muted);
    cursor: pointer;
    transition: border-color var(--transition-std), color var(--transition-std), background var(--transition-std);
}

.thumb-nav a svg { fill: currentColor; display: block; }

.thumb-nav a.active,
.thumb-nav a:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: rgba(255,204,0,.08);
}

.search-group:focus-within {
    box-shadow: 0 0 0 2px rgba(255,204,0,.35);
}

.search-txt {
    flex: 1;
    background: none;
    border: none;
    color: var(--color-text);
    padding: 8px 14px;
    font-size: 13px;
    min-width: 0;
}

.search-txt:focus { outline: none; }

.search-submit {
    background: none;
    border: none;
    color: var(--color-muted);
    padding: 6px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.search-submit svg {
    width: 16px !important;
    height: 16px !important;
    fill: currentColor;
}

/* ad banner inside header col-search */
.primary-header .col-search .ad img {
    height: 36px;
    width: auto;
    display: block;
}

/* ---- Notification / alerts bell ---- */
/* Override customcss.php which sets position:fixed;right:16pc */
.notification-container {
    position: relative !important;
    right: auto !important;
    z-index: 100 !important;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.bell-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    cursor: pointer;
    color: var(--color-text);
    font-size: 15px;
    transition: border-color var(--transition-std);
}

.bell-icon:hover { border-color: var(--color-accent); }

.bell-icon .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #f00;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

.alerts-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 300px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-md);
    z-index: 200;
    max-height: 400px;
    overflow-y: auto;
}

/* ---- Index title bar (tabs + grid selectors) ---- */
.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    min-height: 40px;
    border-bottom: 1px solid var(--color-border);
    gap: 10px;
}

.index-tabs-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
    flex: 1;
}

.index-tab-link {
    display: inline-block;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-muted);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: color var(--transition-std), background var(--transition-std);
}

.index-tab-link:hover,
.index-tab-link.is-active {
    color: var(--color-text);
    background: var(--color-surface-2);
}

.index-tab-link.is-active { font-weight: 700; color: var(--color-accent); }

.index-tab-item {
    position: relative;
}

.index-tab-item .index-tab-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-md);
    min-width: 160px;
    z-index: 110;
    padding: 4px 0;
}

.index-tab-item:hover .index-tab-dropdown { display: block; }

.index-tab-dropdown li a {
    display: block;
    padding: 7px 14px;
    font-size: 13px;
    color: var(--color-text);
}

.index-tab-dropdown li a:hover { background: var(--color-surface-2); }

.index-tab-label {
    font-size: 11px;
    color: var(--color-muted);
    padding: 0 8px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.index-head-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* mobile search toggle */
.btn-search-mobile {
    background: none;
    border: none;
    color: var(--color-text);
    padding: 8px;
    cursor: pointer;
    display: none;
}

/* btn generic */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background var(--transition-std), color var(--transition-std);
}

.btn-account {
    background: var(--color-accent);
    color: #000;
}

.btn-account:hover { filter: brightness(1.1); }
.btn-theme { background: #000; color: var(--color-accent); }
.btn-theme:hover { background: var(--color-accent); color: #000; }

/* ---- main layout ---- */
.main {
    display: flex;
    align-items: stretch;
}

.main .content {
    flex: 1;
    min-width: 0;
}

.page-content {
    padding: 12px 15px;
}

#pg-swap-target {
    transition: opacity .15s ease, transform .15s ease;
}
#pg-swap-target.is-leaving {
    opacity: 0;
    transform: scale(0.99);
}

/* ---- sidebar ---- */
.sidebar {
    width: 230px;
    flex-shrink: 0;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    overflow-y: auto;
    transition: transform .3s ease;
}

.sidebar.collapse { transform: translateX(-100%); display: none; }

/* Mobile sidebar — always fixed full-height, sits below sticky header via z-index */
.sidebar-mobile {
    position: fixed !important;
    top: 0;
    left: -280px;
    width: 260px;
    height: 100%;
    z-index: 99;
    overflow-y: auto;
    transition: left .25s ease;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
}

body.sidebar-active .sidebar-mobile {
    left: 0;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 899;
}

.sidebar-active .sidebar-overlay { display: block; }

/* Sidebar accordion: sub-menus start closed */
.widget-accordian .sub-items { display: none; }
.toggle { display: flex; align-items: center; width: 16px; height: 16px; flex-shrink: 0; }
.toggle svg { width: 14px; height: 14px; fill: currentColor; transition: transform .2s ease; }
.widget-accordian li.active .toggle svg { transform: rotate(180deg); }

/* hide desktop sidebar on tablet/mobile */
@media (max-width: 1024px) {
    .sidebar-desktop { display: none !important; }
}

/* ---- language dropdown ---- */
.lang-dropdown_language_select {
    position: relative;
}

.lang-current_language_select {
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    padding: 5px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.lang-menu_language_select {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    min-width: 140px;
    z-index: 120;
    box-shadow: var(--shadow-hover);
    padding: 4px 0;
}

.lang-menu_language_select.is-open { display: block; }

.lang-item_language_select {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    font-size: 13px;
    color: var(--color-text);
    transition: background var(--transition-std);
}

.lang-item_language_select:hover { background: var(--color-surface-2); }

/* flag SVGs — constrain size no matter what inline attrs say */
.flag_language_select,
.flag_language_select * {
    display: inline-flex !important;
    align-items: center;
    flex-shrink: 0;
    max-width: 26px !important;
    max-height: 20px !important;
    overflow: hidden;
}

.flag_language_select svg {
    width: 22px !important;
    height: 15px !important;
    object-fit: cover;
    border-radius: 2px;
    display: block !important;
    flex-shrink: 0;
}

.label_language_select {
    font-size: 12px;
}

/* ---- header menu / nav ---- */
.menu-header {
    background: var(--color-surface-2);
    border-bottom: 1px solid var(--color-border);
    padding: 0 12px;
}

.menu-header .main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-header .main-nav li a {
    display: block;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--color-text);
    white-space: nowrap;
    transition: color var(--transition-std);
    min-height: 44px;
    line-height: 24px;
}

.menu-header .main-nav li a:hover,
.menu-header .main-nav li.active a { color: var(--color-accent); }

/* sub-menu dropdowns — hidden by default */
.menu-header .main-nav .has-items > ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 110;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    min-width: 160px;
    padding: 4px 0;
    box-shadow: var(--shadow-hover);
}

.menu-header .main-nav .has-items {
    position: relative;
}

.menu-header .main-nav .has-items:hover > ul {
    display: block;
}

.menu-header .main-nav .has-items > ul li a {
    padding: 8px 14px;
    min-height: auto;
    display: block;
    white-space: nowrap;
}

/* plain label items */
.menu-header .main-nav .menu-label {
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-muted);
    cursor: default;
}

/* ---- theme alert banner ---- */
.theme-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--color-surface-2);
    border: 1px solid var(--color-accent-dim);
    border-radius: var(--radius-sm);
    padding: 5px 10px;
    font-size: 12px;
    margin-left: 10px;
}

.theme-alert-link { color: var(--color-accent); }
.theme-alert-close { cursor: pointer; color: var(--color-muted); margin-left: 4px; }

/* ---- misc layout ---- */
.page-title h1, .page-title h2, .page-title h3 { margin: 0; font-size: 18px; }
.display-h1 { font-size: 13px; color: var(--color-muted); text-align: center; margin-top: 10px; }
.display-h2 { font-size: 13px; color: var(--color-muted); }
.section-title { font-size: 18px; font-weight: 700; margin: 14px 0; }

.ad-mobile { max-width: 100%; height: auto; }
.hidden-xs { display: block; }

/* ---- cookie banner ---- */
#cookiePolicyBanner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 500;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 12px 16px;
    display: none;
    gap: 12px;
    align-items: center;
}

#cookiePolicyBanner.show { display: flex; }

.warning-age {
    background: var(--color-accent);
    color: #000;
    font-weight: 700;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.policy-copy { flex: 1; font-size: 12px; color: var(--color-muted); }
.age-warn-title { font-size: 13px; color: var(--color-text); margin-bottom: 2px; }
.cookie-notify-button { background: var(--color-accent); color: #000; border: none; padding: 6px 14px; border-radius: var(--radius-sm); font-weight: 700; cursor: pointer; margin-top: 6px; }

/* tag cloud footer */
.tag-cloud { padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag-cloud a { font-size: 12px; color: var(--color-muted); transition: color var(--transition-std); }
.tag-cloud a:hover { color: var(--color-accent); }

/* floating CTA */
.floating-cta {
    position: fixed;
    bottom: 80px;
    right: 16px;
    z-index: 150;
    background: var(--color-accent);
    border-radius: 24px;
    padding: 12px 20px;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 16px rgba(255,204,0,.4);
}

.floating-cta a { color: #000; display: flex; align-items: center; gap: 8px; }
.close-cta { margin-left: 8px; cursor: pointer; opacity: .6; }

/* ============================================================
   OFFLINE COUNTDOWN
   ============================================================ */
.offline-countdown-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 280px;
    border-radius: var(--radius-card);
    overflow: hidden;
    background: #000;
}

/* Background embed — blurred until revealed */
.offline-embed-bg {
    position: absolute;
    inset: 0;
    filter: blur(8px) brightness(.5);
    transition: filter .6s ease;
    z-index: 1;
}
.offline-embed-bg iframe,
.offline-embed-bg video,
.offline-embed-bg object,
.offline-embed-bg embed {
    width: 100% !important;
    height: 100% !important;
    pointer-events: none;
    border: none;
}
.offline-embed-bg.is-revealed {
    filter: none;
}
.offline-embed-bg.is-revealed iframe,
.offline-embed-bg.is-revealed video,
.offline-embed-bg.is-revealed object,
.offline-embed-bg.is-revealed embed {
    pointer-events: auto;
}

/* Live bar at bottom of revealed embed */
.offline-embed-live-bar {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0,0,0,.7);
    font-size: 12px;
    flex-wrap: wrap;
    z-index: 3;
    opacity: 0;
    transition: opacity .4s ease .6s;
}
.offline-embed-bg.is-revealed .offline-embed-live-bar { opacity: 1; }

.offline-embed-live-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--color-live);
    flex-shrink: 0;
    animation: live-pulse 2s ease-in-out infinite;
}

.offline-embed-join {
    margin-left: auto;
    background: var(--color-accent);
    color: #000;
    font-weight: 700;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

/* Countdown overlay panel */
.offline-overlay-panel {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    text-align: center;
    background: rgba(0,0,0,.72);
    backdrop-filter: blur(4px);
    transition: opacity .4s ease, visibility .4s ease;
}
.offline-overlay-panel.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.offline-skip-btn {
    position: absolute;
    top: 10px; right: 12px;
    background: none;
    border: none;
    color: rgba(255,255,255,.5);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition-fast);
}
.offline-skip-btn:hover { color: #fff; }

.offline-badge {
    display: inline-block;
    background: rgba(255,0,0,.2);
    color: #ff6b6b;
    border: 1px solid rgba(255,100,100,.3);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 10px;
    letter-spacing: .04em;
}

.offline-model-name {
    margin: 4px 0 0;
    font-size: 20px;
}

.offline-eta {
    color: var(--color-muted);
    font-size: 13px;
    margin: 0;
}

.offline-teaser {
    font-size: 12px;
    color: var(--color-muted);
    margin: 4px 0 0;
}

/* SVG ring countdown */
.offline-timer-ring {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 8px auto 0;
}
.offline-timer-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }

.offline-ring-track {
    fill: none;
    stroke: rgba(255,255,255,.12);
    stroke-width: 7;
}
.offline-ring-bar {
    fill: none;
    stroke: var(--color-accent);
    stroke-width: 7;
    stroke-linecap: round;
    stroke-dasharray: 264;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.offline-ring-count {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--color-accent);
}

.offline-preparing {
    font-size: 11px;
    color: var(--color-muted);
    margin: 4px 0 0;
}

/* ============================================================
   FLOATING EMBED WINDOW
   ============================================================ */
#float-embed-window {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 500;
    width: 340px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    box-shadow: 0 8px 32px rgba(0,0,0,.7);
    overflow: hidden;
    transition: box-shadow var(--transition-std);
}

#float-embed-window.is-dragging {
    box-shadow: 0 16px 48px rgba(0,0,0,.85);
    cursor: grabbing;
}

#float-embed-titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--color-surface-2);
    border-bottom: 1px solid var(--color-border);
    cursor: grab;
    user-select: none;
}

#float-embed-drag-hint {
    width: 16px;
    height: 10px;
    flex-shrink: 0;
    background-image: radial-gradient(circle, var(--color-muted) 1px, transparent 1px);
    background-size: 4px 4px;
    opacity: .5;
}

.float-embed-name {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.float-embed-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--color-muted);
}
.float-embed-dot--public { background: var(--color-live); }
.float-embed-dot--private { background: #f59e0b; }
.float-embed-dot--offline { background: var(--color-muted); }

#float-embed-close {
    background: none;
    border: none;
    color: var(--color-muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 4px;
    flex-shrink: 0;
    transition: color var(--transition-fast);
}
#float-embed-close:hover { color: var(--color-text); }

#float-embed-body {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #000;
}

#float-embed-body iframe,
#float-embed-body video,
#float-embed-body object,
#float-embed-body embed {
    width: 100% !important;
    height: 100% !important;
    display: block;
    border: none;
}

.float-embed-cta {
    display: block;
    text-align: center;
    padding: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-accent);
    background: var(--color-surface-2);
    border-top: 1px solid var(--color-border);
    transition: background var(--transition-fast);
}
.float-embed-cta:hover { background: rgba(255,204,0,.08); }

/* Mobile strip — shown instead of window */
#float-embed-strip {
    display: none;
}

@media (max-width: 680px) {
    #float-embed-window { display: none !important; }

    #float-embed-strip {
        display: flex;
        align-items: center;
        gap: 8px;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        z-index: 99;
        background: rgba(20,20,20,.92);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--color-border);
        padding: 8px 12px;
        font-size: 13px;
    }
}

.float-strip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--color-muted);
}
.float-strip-dot.float-embed-dot--public,
.float-strip-dot.float-embed-dot--freechat { background: var(--color-live); }
.float-strip-dot.float-embed-dot--private  { background: #f59e0b; }

.float-strip-name {
    font-weight: 700;
    flex-shrink: 0;
    color: var(--color-text);
}

.float-strip-viewers {
    color: var(--color-muted);
    font-size: 12px;
    white-space: nowrap;
}

.float-strip-join {
    margin-left: auto;
    background: var(--color-accent);
    color: #000;
    font-weight: 700;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

.float-strip-close {
    background: none;
    border: none;
    color: var(--color-muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 4px;
    flex-shrink: 0;
}

/* ---- responsive ---- */
@media (max-width: 1024px) {
    .sidebar-desktop { display: none; }
    .btn-search-mobile { display: flex; }
}

@media (max-width: 768px) {
    .primary-header { flex-wrap: wrap; padding: 6px 10px; }
    .primary-header .col-search { display: none; }
    .primary-header .col-search.is-open { display: flex; flex-basis: 100%; order: 10; padding: 6px 0; }
    .hidden-xs { display: none; }
}

@media (max-width: 576px) {
    .primary-header .col-logo .logo img,
    .primary-header #logo-icon { max-height: 30px; }
}
