/* ==========================================================================
   XTIKX.com - Premium Adult Short-Form Video Platform Design System
   ========================================================================== */

/* --- CSS Variables & Design Tokens --- */
:root {
    --bg-black: #060709;
    --bg-base: #0a0b0e;
    --bg-surface: #12141a;
    --bg-surface-elevated: #1a1c24;
    --bg-surface-glass: rgba(14, 16, 22, 0.75);
    --bg-card: rgba(22, 25, 34, 0.85);

    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-medium: rgba(255, 255, 255, 0.16);
    --border-accent: rgba(255, 42, 85, 0.4);

    --text-primary: #FFFFFF;
    --text-secondary: #A0A5BA;
    --text-muted: #646A82;
    --text-dim: #3E4357;

    /* Distinctive Signature Accent: Crimson Ruby */
    --accent: #FF2A55;
    --accent-hover: #FF426A;
    --accent-dim: rgba(255, 42, 85, 0.15);
    --accent-glow: 0 0 24px rgba(255, 42, 85, 0.45);
    
    --accent-gold: #FFB800;
    --accent-verified: #00A3FF;

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

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    --bottom-nav-height: 64px;
    --header-height: 56px;
    --feed-width: 450px;

    --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-heavy: 0 20px 50px rgba(0, 0, 0, 0.85);
    --shadow-glow: 0 8px 32px rgba(255, 42, 85, 0.25);

    --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-smooth: 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-bounce: 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Global Reset & Base Styles --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-black);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 15px;
    line-height: 1.4;
    user-select: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
    outline: none;
}

input, textarea {
    font-family: inherit;
    border: none;
    outline: none;
    color: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

/* --- Distinctive Brand Typography & Logo --- */
.brand-logo {
    display: inline-flex;
    align-items: center;
    font-weight: 900;
    font-size: 22px;
    letter-spacing: 2px;
    color: #FFFFFF;
    position: relative;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.brand-logo span.logo-x {
    color: var(--accent);
    text-shadow: 0 0 14px rgba(255, 42, 85, 0.8);
}

.brand-logo span.logo-sub {
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-left: 4px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 5px;
    border-radius: 4px;
}

.brand-logo:hover {
    transform: scale(1.02);
}

/* --- App Shell & Layout Structure --- */
#app {
    width: 100%;
    height: 100%;
    display: flex;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-black);
}

/* --- Desktop Sidebars (Hidden on Mobile) --- */
.desktop-sidebar {
    display: none;
}

@media (min-width: 1024px) {
    .desktop-sidebar-left {
        display: flex;
        flex-direction: column;
        width: 290px;
        min-width: 290px;
        height: 100%;
        padding: 24px 20px;
        background-color: var(--bg-base);
        border-right: 1px solid var(--border-subtle);
        overflow-y: auto;
        z-index: 30;
    }

    .desktop-sidebar-right {
        display: flex;
        flex-direction: column;
        width: 340px;
        min-width: 340px;
        height: 100%;
        padding: 24px 20px;
        background-color: var(--bg-base);
        border-left: 1px solid var(--border-subtle);
        overflow-y: auto;
        z-index: 30;
    }

    .main-viewport {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        background: radial-gradient(circle at 50% 50%, #13151f 0%, #060709 100%);
    }

    .mobile-frame {
        width: 100%;
        max-width: var(--feed-width);
        height: calc(100vh - 32px);
        max-height: 880px;
        border-radius: var(--radius-xl);
        overflow: hidden;
        position: relative;
        box-shadow: var(--shadow-heavy), 0 0 0 1px var(--border-subtle);
        background-color: #000000;
    }
}

@media (max-width: 1023px) {
    .main-viewport {
        width: 100%;
        height: 100%;
        position: relative;
    }
    
    .mobile-frame {
        width: 100%;
        height: 100%;
        position: relative;
        background-color: #000000;
    }
}

/* --- Left Sidebar Navigation Elements --- */
.sidebar-brand {
    margin-bottom: 28px;
    padding-left: 8px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 32px;
}

.sidebar-nav-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 15px;
    transition: all var(--transition-fast);
}

.sidebar-nav-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    transition: transform var(--transition-fast);
}

.sidebar-nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    transform: translateX(4px);
}

.sidebar-nav-btn.active {
    background: linear-gradient(90deg, var(--accent-dim) 0%, transparent 100%);
    color: var(--accent);
    border-left: 3px solid var(--accent);
}

.sidebar-nav-btn.active svg {
    fill: var(--accent);
}

.sidebar-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    margin: 20px 0 12px 10px;
}

.sidebar-creators-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-creator-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.sidebar-creator-item:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

.sidebar-creator-item img {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.sidebar-creator-info {
    flex: 1;
    overflow: hidden;
}

.sidebar-creator-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}

.sidebar-creator-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.sidebar-footer-links {
    margin-top: auto;
    padding-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 11px;
    color: var(--text-muted);
}

.sidebar-footer-links a:hover {
    color: var(--text-secondary);
    text-decoration: underline;
}

/* --- Right Sidebar Content --- */
.desktop-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 20px;
}

.desktop-card-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.trending-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trending-pill-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.trending-pill-item:hover {
    border-color: var(--accent);
    color: #FFFFFF;
    background: var(--accent-dim);
}

.keyboard-hints {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.keyboard-hint-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.key-badge {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-medium);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

/* --- App View Container --- */
.view-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    overflow: hidden;
}

.view-container.active-view {
    opacity: 1;
    pointer-events: auto;
    z-index: 10;
}

/* --- Fixed Top Header (Mobile & In-Frame) --- */
.top-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 50;
    pointer-events: auto;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.top-header.hidden-header {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
}

.header-brand {
    font-weight: 900;
    font-size: 19px;
    letter-spacing: 1.5px;
}

.header-tabs {
    display: flex;
    align-items: center;
    gap: 16px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.header-tab {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    position: relative;
    padding: 4px 2px;
    transition: color var(--transition-fast);
}

.header-tab.active {
    color: #FFFFFF;
    font-weight: 700;
}

.header-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    border-radius: 2px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    transition: transform var(--transition-fast), background var(--transition-fast);
}

.header-icon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.header-icon-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* --- Vertical Video Feed (Scroll Snap) --- */
.feed-scroller {
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    position: relative;
}

.feed-scroller::-webkit-scrollbar {
    display: none;
}

/* --- Video Card Item --- */
.video-card {
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    background-color: #000000;
    overflow: hidden;
}

/* Video Player Element */
.video-media-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.video-element {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background-color: #000000;
}

/* Subtle Video Gradient Overlays */
.video-overlay-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, transparent 100%);
    pointer-events: none;
    z-index: 5;
}

.video-overlay-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 240px;
    background: linear-gradient(0deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    pointer-events: none;
    z-index: 5;
}

/* Play/Pause Center Indicator */
.center-play-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    width: 72px;
    height: 72px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s var(--transition-bounce);
    z-index: 15;
}

.center-play-indicator svg {
    width: 32px;
    height: 32px;
    fill: #FFFFFF;
    margin-left: 4px;
}

.center-play-indicator.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Double-Tap Heart Pop Animation */
.heart-pop {
    position: absolute;
    pointer-events: none;
    z-index: 25;
    transform: translate(-50%, -50%) scale(0);
    animation: heartBurst 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.heart-pop svg {
    width: 88px;
    height: 88px;
    fill: var(--accent);
    filter: drop-shadow(0 0 20px rgba(255, 42, 85, 0.8));
}

@keyframes heartBurst {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(-15deg);
        opacity: 0.9;
    }
    40% {
        transform: translate(-50%, -50%) scale(1.3) rotate(0deg);
        opacity: 1;
    }
    70% {
        transform: translate(-50%, -50%) scale(1) rotate(6deg);
        opacity: 0.9;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.4) translateY(-40px);
        opacity: 0;
    }
}

/* --- Action Rail (Right Side) --- */
.action-rail {
    position: absolute;
    right: 12px;
    bottom: calc(var(--bottom-nav-height) + 20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    z-index: 20;
}

/* Creator Avatar & Follow (+) badge */
.avatar-action-wrapper {
    position: relative;
    margin-bottom: 6px;
}

.creator-avatar-btn {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    border: 2px solid var(--accent);
    padding: 2px;
    background-color: var(--bg-surface);
    display: block;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,0.6);
}

.creator-avatar-btn img {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.follow-badge-btn {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 22px;
    border-radius: var(--radius-full);
    background: var(--accent);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(255, 42, 85, 0.6);
    transition: transform var(--transition-fast), background var(--transition-fast);
}

.follow-badge-btn:hover {
    transform: translateX(-50%) scale(1.15);
}

.follow-badge-btn.following {
    background: #252836;
    color: #22C55E;
}

.follow-badge-btn svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

/* Action Button (Like, Comment, Share, Sound) */
.action-btn-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.action-circle-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: rgba(18, 20, 28, 0.65);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    box-shadow: var(--shadow-subtle);
    transition: transform var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.action-circle-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    transition: transform var(--transition-fast);
}

.action-circle-btn:hover {
    transform: scale(1.12);
    background: rgba(255, 255, 255, 0.18);
}

.action-circle-btn:active {
    transform: scale(0.92);
}

.action-label {
    font-size: 11px;
    font-weight: 700;
    color: #FFFFFF;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    letter-spacing: 0.2px;
}

/* Like Button Active Animation */
.action-btn-item.liked .action-circle-btn {
    color: var(--accent);
    background: var(--accent-dim);
    border-color: var(--accent);
}

.action-btn-item.liked .action-circle-btn svg {
    fill: var(--accent);
    animation: heartBeat 0.4s var(--transition-bounce);
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.35); }
    100% { transform: scale(1); }
}

/* Audio Track Spinning Disk */
.sound-disk-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: #111;
    border: 2px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    animation: diskSpin 6s linear infinite;
    animation-play-state: paused;
}

.sound-disk-btn.playing {
    animation-play-state: running;
}

.sound-disk-btn img {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

@keyframes diskSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Clean Letter Avatar Fallback */
.creator-avatar-initial {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF2A55 0%, #7928CA 100%);
    color: #FFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.disk-inner-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #11141c;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 12px;
}

/* Official Channel Tags & Badges */
.official-tag {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(255, 42, 85, 0.2);
    border: 1px solid var(--accent);
    color: var(--accent);
    text-transform: uppercase;
}

/* ==========================================
   ADULT CATEGORIES & LIVE SEARCH STYLES
   ========================================== */
.adult-category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.adult-cat-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
}

.adult-cat-btn:hover {
    background: rgba(255, 42, 85, 0.15);
    border-color: var(--accent);
    color: #FFF;
    transform: translateY(-1px);
}

.adult-cat-btn.active {
    background: linear-gradient(135deg, rgba(255, 42, 85, 0.3) 0%, rgba(121, 40, 202, 0.3) 100%);
    border-color: var(--accent);
    color: #FFF;
    box-shadow: 0 0 16px rgba(255, 42, 85, 0.3);
    font-weight: 700;
}

/* Desktop Sidebar Category List */
.desktop-category-scroll {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    max-height: calc(100vh - 270px);
    padding-right: 4px;
}

.desktop-cat-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    width: 100%;
}

.desktop-cat-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #FFF;
}

.desktop-cat-btn.active {
    background: rgba(255, 42, 85, 0.15);
    border-color: rgba(255, 42, 85, 0.4);
    color: var(--accent);
    font-weight: 700;
}

/* Top Active Filter Badge */
.active-category-badge {
    position: absolute;
    top: calc(var(--header-height) + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    background: rgba(18, 20, 28, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 42, 85, 0.5);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 12px rgba(255, 42, 85, 0.2);
    font-size: 12px;
    font-weight: 700;
    color: #FFF;
    animation: fadeInSlideDown 0.25s ease;
}

.active-category-badge button {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #FFF;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.active-category-badge button:hover {
    background: var(--accent);
}

@keyframes fadeInSlideDown {
    from { opacity: 0; transform: translate(-50%, -8px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.verified-badge-mini {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-verified);
    color: #FFF;
    font-size: 10px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #000;
}

/* Bookmark Action Active State */
.action-btn-item.bookmarked .action-circle-btn {
    color: var(--accent-gold);
    background: rgba(255, 184, 0, 0.18);
    border-color: var(--accent-gold);
}

.action-btn-item.bookmarked .action-circle-btn svg {
    fill: var(--accent-gold);
}

/* User Library View */
.library-page {
    width: 100%;
    height: 100%;
    background-color: var(--bg-black);
    overflow-y: auto;
    padding: 20px 0 calc(var(--bottom-nav-height) + 20px) 0;
}

.library-header {
    padding: 0 16px 14px 16px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 14px;
}

.library-tabs-row {
    display: flex;
    gap: 10px;
    padding: 0 16px 14px 16px;
}

.library-tab-btn {
    padding: 7px 18px;
    border-radius: var(--radius-full);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.library-tab-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #FFF;
    box-shadow: 0 0 14px rgba(255, 42, 85, 0.4);
}
.video-info-overlay {
    position: absolute;
    left: 16px;
    bottom: calc(var(--bottom-nav-height) + 16px);
    right: 76px;
    z-index: 20;
    pointer-events: auto;
}

.creator-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.creator-handle {
    font-size: 15px;
    font-weight: 700;
    color: #FFFFFF;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.creator-handle:hover {
    text-decoration: underline;
}

.verified-icon {
    width: 14px;
    height: 14px;
    fill: var(--accent-verified);
}

.creator-follow-inline-btn {
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
    backdrop-filter: blur(8px);
    transition: all var(--transition-fast);
}

.creator-follow-inline-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.video-description {
    font-size: 13.5px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.94);
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-hashtags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.video-hashtag-pill {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
}

.video-hashtag-pill:hover {
    text-decoration: underline;
}

.video-music-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.video-music-row svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
}

.music-marquee {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* Scrubbable Progress Bar */
.video-progress-container {
    position: absolute;
    bottom: var(--bottom-nav-height);
    left: 0;
    right: 0;
    height: 14px;
    cursor: pointer;
    z-index: 30;
    display: flex;
    align-items: flex-end;
}

.video-progress-track {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    position: relative;
    transition: height var(--transition-fast);
}

.video-progress-container:hover .video-progress-track {
    height: 5px;
}

.video-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--accent);
    position: relative;
}

.video-progress-fill::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    background: #FFFFFF;
    box-shadow: 0 0 6px var(--accent);
    transition: transform var(--transition-fast);
}

.video-progress-container:hover .video-progress-fill::after {
    transform: translateY(-50%) scale(1);
}

/* --- Fixed Bottom Navigation Bar --- */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: rgba(8, 9, 12, 0.88);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 50;
    padding: 0 4px;
}

.nav-tab-btn {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-muted);
    font-size: 10.5px;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.nav-tab-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    transition: transform var(--transition-fast);
}

.nav-tab-btn:hover {
    color: var(--text-secondary);
}

.nav-tab-btn.active {
    color: #FFFFFF;
}

.nav-tab-btn.active svg {
    fill: var(--accent);
    transform: translateY(-1px);
}

/* Upload Button Styling (Visually Emphasized) */
.nav-upload-btn {
    flex: none;
    width: 44px;
    height: 32px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--accent) 0%, #B80036 100%);
    box-shadow: var(--shadow-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    margin: 0 4px;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.nav-upload-btn svg {
    width: 18px;
    height: 18px;
    fill: #FFFFFF;
}

.nav-upload-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 0 28px rgba(255, 42, 85, 0.7);
}

/* ==========================================================================
   DISCOVER & SEARCH PAGE VIEW
   ========================================================================== */
.discover-page {
    width: 100%;
    height: 100%;
    background-color: var(--bg-black);
    overflow-y: auto;
    padding: 16px 14px calc(var(--bottom-nav-height) + 20px) 14px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-medium) transparent;
}

.discover-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.search-bar-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 14px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    fill: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    height: 44px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 0 42px 0 42px;
    font-size: 14px;
    color: #FFFFFF;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.search-input:focus {
    border-color: var(--accent);
    background: var(--bg-surface-elevated);
}

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

.search-clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.1);
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.search-clear-btn.visible {
    display: flex;
}

/* Category Filter Pills */
.category-pill-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
    margin-bottom: 14px;
}

.category-pill-bar::-webkit-scrollbar {
    display: none;
}

.category-pill {
    flex: none;
    padding: 7px 16px;
    border-radius: var(--radius-full);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.category-pill:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.08);
}

.category-pill.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #FFFFFF;
    box-shadow: 0 0 16px rgba(255, 42, 85, 0.4);
}

/* 3-Column Video Thumbnail Grid */
.discover-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

@media (min-width: 768px) {
    .discover-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
}

.thumbnail-card {
    position: relative;
    aspect-ratio: 9/15;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-surface);
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.thumbnail-card:hover {
    transform: scale(1.02);
    z-index: 2;
}

.thumbnail-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumbnail-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 6px 6px 6px;
    background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, transparent 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 600;
    color: #FFFFFF;
}

.thumbnail-views {
    display: flex;
    align-items: center;
    gap: 3px;
}

.thumbnail-views svg {
    width: 11px;
    height: 11px;
    fill: currentColor;
}

.thumbnail-duration {
    font-size: 10px;
    background: rgba(0,0,0,0.6);
    padding: 1px 4px;
    border-radius: 3px;
}

/* ==========================================================================
   CREATOR PROFILE PAGE VIEW
   ========================================================================== */
.profile-page {
    width: 100%;
    height: 100%;
    background-color: var(--bg-black);
    overflow-y: auto;
    padding-bottom: calc(var(--bottom-nav-height) + 20px);
    scrollbar-width: thin;
}

.profile-banner {
    width: 100%;
    height: 130px;
    position: relative;
    background-color: var(--bg-surface);
}

.profile-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(6,7,9,1) 100%);
}

.profile-content {
    padding: 0 16px;
    margin-top: -45px;
    position: relative;
}

.profile-header-meta {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 14px;
}

.profile-avatar-large {
    width: 84px;
    height: 84px;
    border-radius: var(--radius-full);
    border: 3px solid var(--bg-black);
    object-fit: cover;
    box-shadow: var(--shadow-heavy);
}

.profile-action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-follow-btn {
    padding: 8px 22px;
    border-radius: var(--radius-full);
    background: var(--accent);
    color: #FFFFFF;
    font-size: 13.5px;
    font-weight: 700;
    box-shadow: var(--shadow-glow);
    transition: all var(--transition-fast);
}

.profile-follow-btn.following {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    box-shadow: none;
}

.profile-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
}

.profile-icon-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.profile-name-row {
    margin-bottom: 6px;
}

.profile-display-name {
    font-size: 19px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-handle {
    font-size: 13px;
    color: var(--text-muted);
}

.profile-bio {
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.profile-stats-bar {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 12px 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 18px;
}

.profile-stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-value {
    font-size: 16px;
    font-weight: 800;
    color: #FFFFFF;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.profile-tabs-header {
    display: flex;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 12px;
}

.profile-tab-item {
    flex: 1;
    padding: 10px 0;
    text-align: center;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-muted);
    position: relative;
    cursor: pointer;
}

.profile-tab-item.active {
    color: #FFFFFF;
}

.profile-tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: var(--accent);
}

/* ==========================================================================
   BOTTOM SHEETS & MODALS (Comments, Share, Upload, Age Gate)
   ========================================================================== */
.bottom-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-smooth);
}

.bottom-sheet-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.bottom-sheet-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65%;
    max-height: 520px;
    background: #11131a;
    border-top: 1px solid var(--border-medium);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    box-shadow: var(--shadow-heavy);
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform var(--transition-smooth);
    z-index: 160;
}

.bottom-sheet-panel.active {
    transform: translateY(0);
}

.drawer-drag-handle {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    margin: 10px auto 4px auto;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 18px 12px 18px;
    border-bottom: 1px solid var(--border-subtle);
}

.drawer-title {
    font-size: 15px;
    font-weight: 700;
}

.drawer-close-btn {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.drawer-close-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* Comments List inside Drawer */
.comments-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.comment-row {
    display: flex;
    gap: 12px;
}

.comment-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex: none;
}

.comment-body {
    flex: 1;
}

.comment-user-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.comment-username {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-primary);
}

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

.comment-text {
    font-size: 13px;
    color: rgba(255,255,255,0.9);
    line-height: 1.4;
}

.comment-like-btn {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--text-muted);
    font-size: 11px;
    padding-top: 4px;
}

.comment-like-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.comment-like-btn.liked {
    color: var(--accent);
}

.comment-like-btn.liked svg {
    fill: var(--accent);
}

/* Comment Input Bar */
.comment-input-bar {
    padding: 12px 16px;
    background: #171922;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-input-box {
    flex: 1;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 10px 16px;
    font-size: 13.5px;
    color: #FFFFFF;
}

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

.comment-send-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    background: var(--accent);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-fast);
}

.comment-send-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    margin-left: 2px;
}

.comment-send-btn:hover {
    transform: scale(1.08);
}

/* Share Modal / Menu */
.share-grid {
    padding: 20px 18px 28px 18px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    text-align: center;
}

.share-item-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.share-icon-circle {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-full);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    transition: transform var(--transition-fast), background var(--transition-fast);
}

.share-icon-circle:hover {
    transform: scale(1.1);
    background: var(--bg-surface-elevated);
}

.share-icon-circle svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.share-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ==========================================================================
   UPLOAD / COMING SOON MODAL
   ========================================================================== */
.center-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-smooth);
    padding: 16px;
}

.center-modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.center-modal-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl);
    padding: 28px 24px;
    text-align: center;
    box-shadow: var(--shadow-heavy);
    transform: scale(0.92);
    transition: transform var(--transition-bounce);
}

.center-modal-backdrop.active .center-modal-card {
    transform: scale(1);
}

.upload-icon-pulse {
    width: 68px;
    height: 68px;
    border-radius: var(--radius-full);
    background: var(--accent-dim);
    border: 2px dashed var(--accent);
    margin: 0 auto 18px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.upload-icon-pulse svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

.modal-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
}

.modal-desc {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 22px;
}

.modal-btn-primary {
    width: 100%;
    padding: 12px 0;
    border-radius: var(--radius-full);
    background: var(--accent);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 14.5px;
    box-shadow: var(--shadow-glow);
    transition: background var(--transition-fast);
}

.modal-btn-primary:hover {
    background: var(--accent-hover);
}

/* ==========================================================================
   AGE VERIFICATION GATE (18+ Adult Content)
   ========================================================================== */
#ageGateModal {
    position: fixed;
    inset: 0;
    background: rgba(4, 5, 8, 0.96);
    backdrop-filter: blur(28px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 20px;
    transition: opacity 0.4s ease;
}

#ageGateModal.hidden {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.age-gate-card {
    width: 100%;
    max-width: 420px;
    background: #0f1118;
    border: 1px solid rgba(255, 42, 85, 0.35);
    border-radius: var(--radius-xl);
    padding: 36px 28px;
    text-align: center;
    box-shadow: 0 0 60px rgba(255, 42, 85, 0.2), var(--shadow-heavy);
}

.age-gate-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: rgba(255, 42, 85, 0.15);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.age-gate-logo {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 3px;
    margin-bottom: 12px;
}

.age-gate-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.age-gate-warning {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 28px;
}

.age-gate-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-age-enter {
    width: 100%;
    padding: 14px 0;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--accent) 0%, #C40030 100%);
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-glow);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-age-enter:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 32px rgba(255, 42, 85, 0.6);
}

.btn-age-exit {
    width: 100%;
    padding: 12px 0;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.btn-age-exit:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
}

.age-gate-legal {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ==========================================================================
   TOAST NOTIFICATION COMPONENT
   ========================================================================== */
#toastContainer {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast-item {
    background: rgba(18, 20, 28, 0.92);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-medium);
    color: #FFFFFF;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    box-shadow: var(--shadow-subtle);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: toastIn 0.3s var(--transition-bounce) forwards;
}

.toast-item.success {
    border-color: rgba(34, 197, 94, 0.4);
}

.toast-item.accent {
    border-color: var(--accent);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-16px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
