@import './design-tokens.css';

/* ===================================================================
   Comment Universal UI & Interaction Styles (Modals, Lightbox, Share, Animations)
   =================================================================== */

/* --- Universal App Background Gradient (Light & Dark) --- */
body {
    min-height: 100vh;
    background: var(--bz-bg-app, var(--bz-bg-app, #F7F8FC)) !important;
    background-attachment: fixed !important;
    color: var(--bz-text-primary, #0f172a);
    font-family: var(--bz-font-sans, 'Inter', sans-serif);
}

/* Subtle premium ambient grid overlay */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: .45;
    background-image:
        linear-gradient(rgba(99, 102, 241, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, .035) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(to bottom, black, transparent 88%);
    -webkit-mask-image: linear-gradient(to bottom, black, transparent 88%);
}

/* Universal Dark Mode Background */
html.dark body,
body.dark-theme,
[data-theme="dark"] body {
    background:
        radial-gradient(circle at 8% 8%, rgba(59, 130, 246, .12), transparent 24%),
        radial-gradient(circle at 91% 18%, rgba(124, 58, 237, .10), transparent 23%),
        radial-gradient(circle at 55% 100%, rgba(14, 165, 233, .08), transparent 30%),
        linear-gradient(135deg, #0b0f17 0%, #0f172a 48%, #0b1120 100%) !important;
    background-attachment: fixed !important;
    color: #f1f5f9 !important;
}

html.dark body::before,
body.dark-theme::before,
[data-theme="dark"] body::before {
    opacity: .2;
    background-image:
        linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
}

/* --- Modal & Lightbox Backdrop --- */
.bz-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.bz-modal-backdrop.bz-active {
    opacity: 1;
    visibility: visible;
}

/* --- Modal Container --- */
.bz-modal-card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.3), 0 0 0 1px rgba(226, 232, 240, 0.8);
    width: 100%;
    max-width: 440px;
    overflow: hidden;
    transform: scale(0.92) translateY(10px);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

.bz-modal-backdrop.bz-active .bz-modal-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* --- Heart Burst Animation --- */
@keyframes bzHeartBurst {
    0% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.45) rotate(-8deg);
    }
    50% {
        transform: scale(0.9) rotate(4deg);
    }
    75% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
    }
}

.bz-heart-burst {
    animation: bzHeartBurst 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
    color: #ef4444 !important;
}

/* --- Lightbox Viewer --- */
.bz-lightbox-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.bz-lightbox-backdrop.bz-active {
    opacity: 1;
    visibility: visible;
}

.bz-lightbox-media {
    max-width: 92vw;
    max-height: 85vh;
    border-radius: 16px;
    object-fit: contain;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bz-lightbox-backdrop.bz-active .bz-lightbox-media {
    transform: scale(1);
}

/* --- Pull To Refresh Indicator --- */
.bz-ptr-indicator {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%) translateY(-60px);
    z-index: 999;
    background: #ffffff;
    padding: 8px 16px;
    border-radius: 30px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #1d4ed8;
    transition: transform 0.25s ease, opacity 0.25s ease;
    opacity: 0;
    pointer-events: none;
}

.bz-ptr-indicator.bz-pulling {
    opacity: 1;
    transform: translateX(-50%) translateY(0px);
}

.bz-ptr-indicator.bz-refreshing {
    opacity: 1;
    transform: translateX(-50%) translateY(10px);
}

/* ===================================================================
   Responsive Layout & Navigation Guards
   =================================================================== */

/* Show bottom navigation bar on both mobile and desktop (as quick-access bar) */
.bz-mobile-bottom-nav,
nav.fixed.bottom-0,
.mobile-bottom-nav {
    display: flex !important;
}

@media (min-width: 1024px) {
    .bz-mobile-bottom-nav,
    nav.fixed.bottom-0,
    .mobile-bottom-nav {
        display: flex !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: auto !important;
        min-width: 540px !important;
        max-width: 680px !important;
        bottom: 12px !important;
        border-radius: 9999px !important;
        padding: 6px 20px !important;
        box-shadow: 0 12px 36px rgba(15, 23, 42, 0.12), 0 2px 10px rgba(0, 0, 0, 0.04) !important;
        border: 1px solid rgba(226, 232, 240, 0.85) !important;
        z-index: 45 !important;
    }
    html.dark .bz-mobile-bottom-nav,
    html.dark nav.fixed.bottom-0,
    html.dark .mobile-bottom-nav {
        background: rgba(15, 23, 42, 0.95) !important;
        border-color: #334155 !important;
        box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4) !important;
    }
}

/* When chat is active on ANY screen, strictly hide the bottom nav so it never obstructs the chat input */
body.has-active-chat .bz-mobile-bottom-nav,
body.has-active-chat .mobile-bottom-nav,
body.has-active-chat nav.fixed.bottom-0 {
    display: none !important;
}
body.has-active-chat {
    padding-bottom: 0 !important;
}


/* Strictly hide desktop sidebars on mobile/tablet (< 1024px) */
@media (max-width: 1023px) {
    .desktop-sidebar,
    aside.desktop-sidebar,
    .bz-nav-rail,
    .bz-right-rail {
        display: none !important;
    }
}

/* Safe bottom padding for pages with bottom nav */
.safe-mobile-pb,
body {
    padding-bottom: 5.5rem !important;
}

/* ===================================================================
   Task 7: Clean & Consistent Active-State (No Solid Blue/Purple Boxes)
   Applies to both Mobile Bottom-Nav and Desktop Left-Sidebar
   =================================================================== */

/* Mobile & Desktop Bottom-Nav: Transparent background, pure color highlight */
.bz-mobile-bottom-nav a,
.bz-mobile-bottom-nav a:first-child,
.bz-mobile-bottom-nav a:hover,
.mobile-bottom-nav a,
.mobile-bottom-nav a:first-child,
.mobile-bottom-nav a:hover,
.bottom-nav-item,
.bottom-nav-item:first-child,
.bottom-nav-item:hover {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.bz-mobile-bottom-nav a.active,
.bz-mobile-bottom-nav a:first-child.active,
.mobile-bottom-nav a.active,
.bottom-nav-item.active {
    background: transparent !important;
    background-color: transparent !important;
    color: #2563eb !important;
    box-shadow: none !important;
}

.nav-icon-pill {
    background: transparent !important;
    background-color: transparent !important;
    color: inherit !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

/* ===================================================================
   Universal Compact Sidebar Sizing (matching Video Studio Menu: video_bigzaint)
   =================================================================== */
.sidebar-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 14px !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
    color: #475569;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    text-decoration: none !important;
    background: transparent;
    border: 1px solid transparent;
    min-height: unset !important;
}

.sidebar-item .material-symbols-outlined,
.sidebar-item .material-symbols-rounded {
    font-size: 22px !important;
    width: 22px !important;
    height: 22px !important;
    line-height: 22px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.sidebar-item span:not([class*="bg-"]):not([class*="badge"]):not([class*="material-symbols"]) {
    font-size: 13px !important;
    font-weight: 700 !important;
}

.sidebar-item .text-body-md {
    font-size: 13px !important;
    font-weight: 700 !important;
}

aside div[class*="tracking-wider"],
.sidebar-heading {
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
}

html.dark .sidebar-item {
    color: #94a3b8;
}

/* 1. Home Feed (Blue) */
.sidebar-item.nav-blue:hover,
.sidebar-item[href*="home_feed"]:hover {
    background: rgba(37, 99, 235, 0.08) !important;
    border-color: rgba(37, 99, 235, 0.20) !important;
    color: #2563eb !important;
}
.sidebar-item.nav-blue:hover span:not([class*="bg-"]),
.sidebar-item[href*="home_feed"]:hover span:not([class*="bg-"]) {
    color: #2563eb !important;
}
.sidebar-item.nav-blue.active,
.sidebar-item[href*="home_feed"].active {
    background: rgba(37, 99, 235, 0.12) !important;
    border: 1px solid rgba(37, 99, 235, 0.28) !important;
    color: #2563eb !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}
.sidebar-item.nav-blue.active span:not([class*="bg-"]),
.sidebar-item[href*="home_feed"].active span:not([class*="bg-"]) {
    color: #2563eb !important;
}

/* 2. Explore (Teal) */
.sidebar-item.nav-teal:hover,
.sidebar-item[href*="explore"]:hover {
    background: rgba(20, 184, 166, 0.08) !important;
    border-color: rgba(20, 184, 166, 0.20) !important;
    color: #0d9488 !important;
}
.sidebar-item.nav-teal:hover span:not([class*="bg-"]),
.sidebar-item[href*="explore"]:hover span:not([class*="bg-"]) {
    color: #0d9488 !important;
}
.sidebar-item.nav-teal.active,
.sidebar-item[href*="explore"].active {
    background: rgba(20, 184, 166, 0.12) !important;
    border: 1px solid rgba(20, 184, 166, 0.28) !important;
    color: #0d9488 !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}
.sidebar-item.nav-teal.active span:not([class*="bg-"]),
.sidebar-item[href*="explore"].active span:not([class*="bg-"]) {
    color: #0d9488 !important;
}

/* 3. Reels (Fuchsia / Purple-Pink) */
.sidebar-item.nav-fuchsia:hover,
.sidebar-item[href*="reels"]:hover {
    background: rgba(217, 70, 239, 0.08) !important;
    border-color: rgba(217, 70, 239, 0.20) !important;
    color: #c026d3 !important;
}
.sidebar-item.nav-fuchsia:hover span:not([class*="bg-"]),
.sidebar-item[href*="reels"]:hover span:not([class*="bg-"]) {
    color: #c026d3 !important;
}
.sidebar-item.nav-fuchsia.active,
.sidebar-item[href*="reels"].active {
    background: rgba(217, 70, 239, 0.12) !important;
    border: 1px solid rgba(217, 70, 239, 0.28) !important;
    color: #c026d3 !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}
.sidebar-item.nav-fuchsia.active span:not([class*="bg-"]),
.sidebar-item[href*="reels"].active span:not([class*="bg-"]) {
    color: #c026d3 !important;
}

/* 4. Video (Rose / Red) */
.sidebar-item.nav-rose:hover,
.sidebar-item[href*="video"]:hover {
    background: rgba(244, 63, 94, 0.08) !important;
    border-color: rgba(244, 63, 94, 0.20) !important;
    color: #e11d48 !important;
}
.sidebar-item.nav-rose:hover span:not([class*="bg-"]),
.sidebar-item[href*="video"]:hover span:not([class*="bg-"]) {
    color: #e11d48 !important;
}
.sidebar-item.nav-rose.active,
.sidebar-item[href*="video"].active {
    background: rgba(244, 63, 94, 0.12) !important;
    border: 1px solid rgba(244, 63, 94, 0.28) !important;
    color: #e11d48 !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}
.sidebar-item.nav-rose.active span:not([class*="bg-"]),
.sidebar-item[href*="video"].active span:not([class*="bg-"]) {
    color: #e11d48 !important;
}

/* 5. Communities (Emerald / Green) */
.sidebar-item.nav-emerald:hover,
.sidebar-item[href*="communities"]:hover {
    background: rgba(16, 185, 129, 0.08) !important;
    border-color: rgba(16, 185, 129, 0.20) !important;
    color: #059669 !important;
}
.sidebar-item.nav-emerald:hover span:not([class*="bg-"]),
.sidebar-item[href*="communities"]:hover span:not([class*="bg-"]) {
    color: #059669 !important;
}
.sidebar-item.nav-emerald.active,
.sidebar-item[href*="communities"].active {
    background: rgba(16, 185, 129, 0.12) !important;
    border: 1px solid rgba(16, 185, 129, 0.28) !important;
    color: #059669 !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}
.sidebar-item.nav-emerald.active span:not([class*="bg-"]),
.sidebar-item[href*="communities"].active span:not([class*="bg-"]) {
    color: #059669 !important;
}

/* 6. Messages (Sky Blue) */
.sidebar-item.nav-sky:hover,
.sidebar-item#sidebar-messages:hover,
.sidebar-item[href*="messages"]:hover {
    background: rgba(14, 165, 233, 0.08) !important;
    border-color: rgba(14, 165, 233, 0.20) !important;
    color: #0284c7 !important;
}
.sidebar-item.nav-sky:hover span:not([class*="bg-"]),
.sidebar-item#sidebar-messages:hover span:not([class*="bg-"]),
.sidebar-item[href*="messages"]:hover span:not([class*="bg-"]) {
    color: #0284c7 !important;
}
.sidebar-item.nav-sky.active,
.sidebar-item#sidebar-messages.active,
.sidebar-item[href*="messages"].active {
    background: rgba(14, 165, 233, 0.12) !important;
    border: 1px solid rgba(14, 165, 233, 0.28) !important;
    color: #0284c7 !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}
.sidebar-item.nav-sky.active span:not([class*="bg-"]),
.sidebar-item#sidebar-messages.active span:not([class*="bg-"]),
.sidebar-item[href*="messages"].active span:not([class*="bg-"]) {
    color: #0284c7 !important;
}

/* 7. Notifications (Amber) */
.sidebar-item.nav-amber:hover,
.sidebar-item#sidebar-notifications:hover,
.sidebar-item[href*="notifications"]:hover {
    background: rgba(245, 158, 11, 0.08) !important;
    border-color: rgba(245, 158, 11, 0.20) !important;
    color: #d97706 !important;
}
.sidebar-item.nav-amber:hover span:not([class*="bg-"]),
.sidebar-item#sidebar-notifications:hover span:not([class*="bg-"]),
.sidebar-item[href*="notifications"]:hover span:not([class*="bg-"]) {
    color: #d97706 !important;
}
.sidebar-item.nav-amber.active,
.sidebar-item#sidebar-notifications.active,
.sidebar-item[href*="notifications"].active {
    background: rgba(245, 158, 11, 0.12) !important;
    border: 1px solid rgba(245, 158, 11, 0.28) !important;
    color: #d97706 !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}
.sidebar-item.nav-amber.active span:not([class*="bg-"]),
.sidebar-item#sidebar-notifications.active span:not([class*="bg-"]),
.sidebar-item[href*="notifications"].active span:not([class*="bg-"]) {
    color: #d97706 !important;
}

/* 8. Conference Call (Indigo) */
.sidebar-item.nav-indigo:hover,
.sidebar-item#sidebar-conference:hover,
.sidebar-item[onclick*="Conference"]:hover,
.sidebar-item[onclick*="conference"]:hover {
    background: rgba(99, 102, 241, 0.08) !important;
    border-color: rgba(99, 102, 241, 0.20) !important;
    color: #4f46e5 !important;
}
.sidebar-item.nav-indigo:hover span:not([class*="bg-"]),
.sidebar-item#sidebar-conference:hover span:not([class*="bg-"]),
.sidebar-item[onclick*="Conference"]:hover span:not([class*="bg-"]),
.sidebar-item[onclick*="conference"]:hover span:not([class*="bg-"]) {
    color: #4f46e5 !important;
}
.sidebar-item.nav-indigo.active,
.sidebar-item#sidebar-conference.active,
.sidebar-item[onclick*="Conference"].active,
.sidebar-item[onclick*="conference"].active {
    background: rgba(99, 102, 241, 0.12) !important;
    border: 1px solid rgba(99, 102, 241, 0.28) !important;
    color: #4f46e5 !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}
.sidebar-item.nav-indigo.active span:not([class*="bg-"]),
.sidebar-item#sidebar-conference.active span:not([class*="bg-"]),
.sidebar-item[onclick*="Conference"].active span:not([class*="bg-"]),
.sidebar-item[onclick*="conference"].active span:not([class*="bg-"]) {
    color: #4f46e5 !important;
}

/* 9. My Profile (Violet) */
.sidebar-item.nav-violet:hover,
.sidebar-item[href*="profile"]:hover {
    background: rgba(139, 92, 246, 0.08) !important;
    border-color: rgba(139, 92, 246, 0.20) !important;
    color: #7c3aed !important;
}
.sidebar-item.nav-violet:hover span:not([class*="bg-"]),
.sidebar-item[href*="profile"]:hover span:not([class*="bg-"]) {
    color: #7c3aed !important;
}
.sidebar-item.nav-violet.active,
.sidebar-item[href*="profile"].active {
    background: rgba(139, 92, 246, 0.12) !important;
    border: 1px solid rgba(139, 92, 246, 0.28) !important;
    color: #7c3aed !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}
.sidebar-item.nav-violet.active span:not([class*="bg-"]),
.sidebar-item[href*="profile"].active span:not([class*="bg-"]) {
    color: #7c3aed !important;
}

/* 10. Saved (Purple) */
.sidebar-item.nav-purple:hover,
.sidebar-item#sidebar-saved:hover,
.sidebar-item[href*="saved"]:hover {
    background: rgba(168, 85, 247, 0.08) !important;
    border-color: rgba(168, 85, 247, 0.20) !important;
    color: #9333ea !important;
}
.sidebar-item.nav-purple:hover span:not([class*="bg-"]),
.sidebar-item#sidebar-saved:hover span:not([class*="bg-"]),
.sidebar-item[href*="saved"]:hover span:not([class*="bg-"]) {
    color: #9333ea !important;
}
.sidebar-item.nav-purple.active,
.sidebar-item#sidebar-saved.active,
.sidebar-item[href*="saved"].active {
    background: rgba(168, 85, 247, 0.12) !important;
    border: 1px solid rgba(168, 85, 247, 0.28) !important;
    color: #9333ea !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}
.sidebar-item.nav-purple.active span:not([class*="bg-"]),
.sidebar-item#sidebar-saved.active span:not([class*="bg-"]),
.sidebar-item[href*="saved"].active span:not([class*="bg-"]) {
    color: #9333ea !important;
}

/* 11. Settings (Cyan) */
.sidebar-item.nav-cyan:hover,
.sidebar-item#sidebar-settings:hover,
.sidebar-item[href*="settings"]:hover {
    background: rgba(8, 145, 178, 0.08) !important;
    border-color: rgba(8, 145, 178, 0.20) !important;
    color: #0891b2 !important;
}
.sidebar-item.nav-cyan:hover span:not([class*="bg-"]),
.sidebar-item#sidebar-settings:hover span:not([class*="bg-"]),
.sidebar-item[href*="settings"]:hover span:not([class*="bg-"]) {
    color: #0891b2 !important;
}
.sidebar-item.nav-cyan.active,
.sidebar-item#sidebar-settings.active,
.sidebar-item[href*="settings"].active {
    background: rgba(8, 145, 178, 0.12) !important;
    border: 1px solid rgba(8, 145, 178, 0.28) !important;
    color: #0891b2 !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}
.sidebar-item.nav-cyan.active span:not([class*="bg-"]),
.sidebar-item#sidebar-settings.active span:not([class*="bg-"]),
.sidebar-item[href*="settings"].active span:not([class*="bg-"]) {
    color: #0891b2 !important;
}

/* ─── DARK MODE HIGHLIGHTS ─── */
html.dark .sidebar-item.nav-blue:hover, html.dark .sidebar-item[href*="home_feed"]:hover { background: rgba(37, 99, 235, 0.18) !important; border-color: rgba(96, 165, 250, 0.3) !important; color: #60a5fa !important; }
html.dark .sidebar-item.nav-blue.active, html.dark .sidebar-item[href*="home_feed"].active { background: rgba(37, 99, 235, 0.25) !important; border-color: rgba(96, 165, 250, 0.4) !important; color: #60a5fa !important; }
html.dark .sidebar-item.nav-blue:hover span:not([class*="bg-"]), html.dark .sidebar-item.nav-blue.active span:not([class*="bg-"]),
html.dark .sidebar-item[href*="home_feed"]:hover span:not([class*="bg-"]), html.dark .sidebar-item[href*="home_feed"].active span:not([class*="bg-"]) { color: #60a5fa !important; }

html.dark .sidebar-item.nav-teal:hover, html.dark .sidebar-item[href*="explore"]:hover { background: rgba(20, 184, 166, 0.18) !important; border-color: rgba(45, 212, 191, 0.3) !important; color: #2dd4bf !important; }
html.dark .sidebar-item.nav-teal.active, html.dark .sidebar-item[href*="explore"].active { background: rgba(20, 184, 166, 0.25) !important; border-color: rgba(45, 212, 191, 0.4) !important; color: #2dd4bf !important; }
html.dark .sidebar-item.nav-teal:hover span:not([class*="bg-"]), html.dark .sidebar-item.nav-teal.active span:not([class*="bg-"]),
html.dark .sidebar-item[href*="explore"]:hover span:not([class*="bg-"]), html.dark .sidebar-item[href*="explore"].active span:not([class*="bg-"]) { color: #2dd4bf !important; }

html.dark .sidebar-item.nav-fuchsia:hover, html.dark .sidebar-item[href*="reels"]:hover { background: rgba(217, 70, 239, 0.18) !important; border-color: rgba(240, 171, 252, 0.3) !important; color: #e879f9 !important; }
html.dark .sidebar-item.nav-fuchsia.active, html.dark .sidebar-item[href*="reels"].active { background: rgba(217, 70, 239, 0.25) !important; border-color: rgba(240, 171, 252, 0.4) !important; color: #e879f9 !important; }
html.dark .sidebar-item.nav-fuchsia:hover span:not([class*="bg-"]), html.dark .sidebar-item.nav-fuchsia.active span:not([class*="bg-"]),
html.dark .sidebar-item[href*="reels"]:hover span:not([class*="bg-"]), html.dark .sidebar-item[href*="reels"].active span:not([class*="bg-"]) { color: #e879f9 !important; }

html.dark .sidebar-item.nav-rose:hover, html.dark .sidebar-item[href*="video"]:hover { background: rgba(244, 63, 94, 0.18) !important; border-color: rgba(251, 113, 133, 0.3) !important; color: #fb7185 !important; }
html.dark .sidebar-item.nav-rose.active, html.dark .sidebar-item[href*="video"].active { background: rgba(244, 63, 94, 0.25) !important; border-color: rgba(251, 113, 133, 0.4) !important; color: #fb7185 !important; }
html.dark .sidebar-item.nav-rose:hover span:not([class*="bg-"]), html.dark .sidebar-item.nav-rose.active span:not([class*="bg-"]),
html.dark .sidebar-item[href*="video"]:hover span:not([class*="bg-"]), html.dark .sidebar-item[href*="video"].active span:not([class*="bg-"]) { color: #fb7185 !important; }

html.dark .sidebar-item.nav-emerald:hover, html.dark .sidebar-item[href*="communities"]:hover { background: rgba(16, 185, 129, 0.18) !important; border-color: rgba(52, 211, 153, 0.3) !important; color: #34d399 !important; }
html.dark .sidebar-item.nav-emerald.active, html.dark .sidebar-item[href*="communities"].active { background: rgba(16, 185, 129, 0.25) !important; border-color: rgba(52, 211, 153, 0.4) !important; color: #34d399 !important; }
html.dark .sidebar-item.nav-emerald:hover span:not([class*="bg-"]), html.dark .sidebar-item.nav-emerald.active span:not([class*="bg-"]),
html.dark .sidebar-item[href*="communities"]:hover span:not([class*="bg-"]), html.dark .sidebar-item[href*="communities"].active span:not([class*="bg-"]) { color: #34d399 !important; }

html.dark .sidebar-item.nav-sky:hover, html.dark .sidebar-item#sidebar-messages:hover, html.dark .sidebar-item[href*="messages"]:hover { background: rgba(14, 165, 233, 0.18) !important; border-color: rgba(56, 189, 248, 0.3) !important; color: #38bdf8 !important; }
html.dark .sidebar-item.nav-sky.active, html.dark .sidebar-item#sidebar-messages.active, html.dark .sidebar-item[href*="messages"].active { background: rgba(14, 165, 233, 0.25) !important; border-color: rgba(56, 189, 248, 0.4) !important; color: #38bdf8 !important; }
html.dark .sidebar-item.nav-sky:hover span:not([class*="bg-"]), html.dark .sidebar-item.nav-sky.active span:not([class*="bg-"]),
html.dark .sidebar-item#sidebar-messages:hover span:not([class*="bg-"]), html.dark .sidebar-item#sidebar-messages.active span:not([class*="bg-"]),
html.dark .sidebar-item[href*="messages"]:hover span:not([class*="bg-"]), html.dark .sidebar-item[href*="messages"].active span:not([class*="bg-"]) { color: #38bdf8 !important; }

html.dark .sidebar-item.nav-amber:hover, html.dark .sidebar-item#sidebar-notifications:hover, html.dark .sidebar-item[href*="notifications"]:hover { background: rgba(245, 158, 11, 0.18) !important; border-color: rgba(251, 191, 36, 0.3) !important; color: #fbbf24 !important; }
html.dark .sidebar-item.nav-amber.active, html.dark .sidebar-item#sidebar-notifications.active, html.dark .sidebar-item[href*="notifications"].active { background: rgba(245, 158, 11, 0.25) !important; border-color: rgba(251, 191, 36, 0.4) !important; color: #fbbf24 !important; }
html.dark .sidebar-item.nav-amber:hover span:not([class*="bg-"]), html.dark .sidebar-item.nav-amber.active span:not([class*="bg-"]),
html.dark .sidebar-item#sidebar-notifications:hover span:not([class*="bg-"]), html.dark .sidebar-item#sidebar-notifications.active span:not([class*="bg-"]),
html.dark .sidebar-item[href*="notifications"]:hover span:not([class*="bg-"]), html.dark .sidebar-item[href*="notifications"].active span:not([class*="bg-"]) { color: #fbbf24 !important; }

html.dark .sidebar-item.nav-indigo:hover, html.dark .sidebar-item#sidebar-conference:hover, html.dark .sidebar-item[onclick*="Conference"]:hover, html.dark .sidebar-item[onclick*="conference"]:hover { background: rgba(99, 102, 241, 0.18) !important; border-color: rgba(129, 140, 248, 0.3) !important; color: #818cf8 !important; }
html.dark .sidebar-item.nav-indigo.active, html.dark .sidebar-item#sidebar-conference.active, html.dark .sidebar-item[onclick*="Conference"].active, html.dark .sidebar-item[onclick*="conference"].active { background: rgba(99, 102, 241, 0.25) !important; border-color: rgba(129, 140, 248, 0.4) !important; color: #818cf8 !important; }
html.dark .sidebar-item.nav-indigo:hover span:not([class*="bg-"]), html.dark .sidebar-item.nav-indigo.active span:not([class*="bg-"]),
html.dark .sidebar-item#sidebar-conference:hover span:not([class*="bg-"]), html.dark .sidebar-item#sidebar-conference.active span:not([class*="bg-"]),
html.dark .sidebar-item[onclick*="Conference"]:hover span:not([class*="bg-"]), html.dark .sidebar-item[onclick*="conference"].active span:not([class*="bg-"]) { color: #818cf8 !important; }

html.dark .sidebar-item.nav-violet:hover, html.dark .sidebar-item[href*="profile"]:hover { background: rgba(139, 92, 246, 0.18) !important; border-color: rgba(167, 139, 250, 0.3) !important; color: #a78bfa !important; }
html.dark .sidebar-item.nav-violet.active, html.dark .sidebar-item[href*="profile"].active { background: rgba(139, 92, 246, 0.25) !important; border-color: rgba(167, 139, 250, 0.4) !important; color: #a78bfa !important; }
html.dark .sidebar-item.nav-violet:hover span:not([class*="bg-"]), html.dark .sidebar-item.nav-violet.active span:not([class*="bg-"]),
html.dark .sidebar-item[href*="profile"]:hover span:not([class*="bg-"]), html.dark .sidebar-item[href*="profile"].active span:not([class*="bg-"]) { color: #a78bfa !important; }

html.dark .sidebar-item.nav-purple:hover, html.dark .sidebar-item#sidebar-saved:hover, html.dark .sidebar-item[href*="saved"]:hover { background: rgba(168, 85, 247, 0.18) !important; border-color: rgba(192, 132, 252, 0.3) !important; color: #c084fc !important; }
html.dark .sidebar-item.nav-purple.active, html.dark .sidebar-item#sidebar-saved.active, html.dark .sidebar-item[href*="saved"].active { background: rgba(168, 85, 247, 0.25) !important; border-color: rgba(192, 132, 252, 0.4) !important; color: #c084fc !important; }
html.dark .sidebar-item.nav-purple:hover span:not([class*="bg-"]), html.dark .sidebar-item.nav-purple.active span:not([class*="bg-"]),
html.dark .sidebar-item#sidebar-saved:hover span:not([class*="bg-"]), html.dark .sidebar-item#sidebar-saved.active span:not([class*="bg-"]),
html.dark .sidebar-item[href*="saved"]:hover span:not([class*="bg-"]), html.dark .sidebar-item[href*="saved"].active span:not([class*="bg-"]) { color: #c084fc !important; }

html.dark .sidebar-item.nav-cyan:hover, html.dark .sidebar-item#sidebar-settings:hover, html.dark .sidebar-item[href*="settings"]:hover { background: rgba(8, 145, 178, 0.18) !important; border-color: rgba(34, 211, 238, 0.3) !important; color: #22d3ee !important; }
html.dark .sidebar-item.nav-cyan.active, html.dark .sidebar-item#sidebar-settings.active, html.dark .sidebar-item[href*="settings"].active { background: rgba(8, 145, 178, 0.25) !important; border-color: rgba(34, 211, 238, 0.4) !important; color: #22d3ee !important; }
html.dark .sidebar-item.nav-cyan:hover span:not([class*="bg-"]), html.dark .sidebar-item.nav-cyan.active span:not([class*="bg-"]),
html.dark .sidebar-item#sidebar-settings:hover span:not([class*="bg-"]), html.dark .sidebar-item#sidebar-settings.active span:not([class*="bg-"]),
html.dark .sidebar-item[href*="settings"]:hover span:not([class*="bg-"]), html.dark .sidebar-item[href*="settings"].active span:not([class*="bg-"]) { color: #22d3ee !important; }

/* ===================================================================
   Task 2: Messages Page Mobile Viewport Chat Input Bar
   =================================================================== */
@media (max-width: 1023px) {
    /* When chat is active on mobile, hide the bottom navigation bar so chat gets the full screen */
    body.has-active-chat .bz-mobile-bottom-nav,
    body.has-active-chat .mobile-bottom-nav,
    body.has-active-chat nav.fixed.bottom-0 {
        display: none !important;
    }

    #activeChatContainer.active-mobile-chat {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        width: 100vw !important;
        height: 100% !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        z-index: 99999 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        background: #f0f4f9 !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
        border: none !important;
        overflow: hidden !important;
        overscroll-behavior: contain !important;
    }

    html.dark #activeChatContainer.active-mobile-chat {
        background: #0b1120 !important;
    }

    #activeChatContainer.active-mobile-chat #chatMessagesArea {
        flex: 1 1 0% !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: 0.5rem !important;
    }

    #activeChatContainer.active-mobile-chat #chatInputBarContainer {
        position: relative !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 30 !important;
        flex-shrink: 0 !important;
        padding-bottom: max(0.65rem, env(safe-area-inset-bottom, 0.65rem)) !important;
    }
}

/* ===================================================================
   Task 6 & Task 1: UI/UX Polish (Card Hover-lift, Button Gradients, Category Pills, Responsive)
   =================================================================== */

/* --- Card Hover Elevation & Smooth Micro-transitions --- */
.feed-card, .video-card, .stat-card, .glass-card {
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease !important;
}
.feed-card:hover, .video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px -6px rgba(37, 99, 235, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04) !important;
}
html.dark .feed-card:hover, html.dark .video-card:hover {
    box-shadow: 0 10px 28px -6px rgba(124, 58, 237, 0.25), 0 4px 16px rgba(0, 0, 0, 0.45) !important;
}

/* --- Vibrant Button Gradients & Active State --- */
.btn-primary-gradient {
    background: linear-gradient(135deg, #1550d3 0%, #7c3aed 100%) !important;
    color: #ffffff !important;
    transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.btn-primary-gradient:hover {
    box-shadow: 0 8px 24px -4px rgba(37, 99, 235, 0.35) !important;
    transform: translateY(-1px);
}
.btn-primary-gradient:active {
    transform: scale(0.98);
}

/* --- Vibrant Category Pills & Chips --- */
.cat-pill, .category-chip {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.cat-pill:hover, .category-chip:hover {
    transform: translateY(-1px);
    border-color: #3b82f6 !important;
}
.cat-pill.active, .category-chip.active {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
    border-color: transparent !important;
}

/* --- Responsive Polish Across 320px - 1920px --- */
@media (max-width: 380px) {
    body {
        font-size: 13.5px;
    }
    nav.fixed.bottom-0 a span.material-symbols-outlined,
    nav.fixed.bottom-0 a span.material-symbols-rounded {
        font-size: 20px !important;
    }
    nav.fixed.bottom-0 a span.text-\[10px\] {
        font-size: 9px !important;
    }
    .feed-card {
        padding: 0.875rem !important;
        border-radius: 1rem !important;
    }
}

/* Safe-area bottom inset for notched devices */
nav.fixed.bottom-0 {
    padding-bottom: calc(0.35rem + env(safe-area-inset-bottom, 0px)) !important;
}

/* ===================================================================
   Task 3: Whole-App Universal Typography Audit & Comment System
   =================================================================== */

:root {
    --bz-font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --bz-font-heading: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
    --bz-font-size-caption: 15.5px;
    --bz-font-size-comment: 13px;
    --bz-font-size-author: 12.5px;
}

body {
    font-family: var(--bz-font-body);
}

h1, h2, h3, .bz-heading, .font-sora {
    font-family: var(--bz-font-heading);
}

/* Distinct, uniform comment bubble */
.bz-comment-bubble {
    background: rgba(241, 245, 249, 0.75) !important;
    border: 1px solid rgba(226, 232, 240, 0.85) !important;
    border-radius: 14px !important;
    padding: 10px 14px !important;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.bz-comment-bubble:hover {
    background: rgba(241, 245, 249, 0.95) !important;
    border-color: rgba(203, 213, 225, 0.9) !important;
}

html.dark .bz-comment-bubble {
    background: rgba(30, 41, 59, 0.65) !important;
    border: 1px solid rgba(51, 65, 85, 0.7) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

html.dark .bz-comment-bubble:hover {
    background: rgba(30, 41, 59, 0.85) !important;
    border-color: rgba(71, 85, 105, 0.8) !important;
}

/* Comment text: crisp 13px, font-medium, distinct from 16px post captions */
.bz-comment-text {
    font-family: var(--bz-font-body) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.45 !important;
    letter-spacing: -0.01em;
    color: #334155;
}

html.dark .bz-comment-text {
    color: #e2e8f0 !important;
}

/* Comment author: distinctive Sora font, bold 12.5px */
.bz-comment-author {
    font-family: var(--bz-font-heading) !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em;
    color: #1e293b;
}

html.dark .bz-comment-author {
    color: #f8fafc !important;
}

/* Distinct Post Caption vs Comment scale contrast */
.bz-post-caption {
    font-family: var(--bz-font-body);
    font-size: 15.5px !important;
    line-height: 1.55 !important;
}

/* ===================================================================
   Comment Unified Design System: Standard Components & Micro-interactions
   =================================================================== */

/* ─── 1. BUTTONS ─── */
.btn, .bz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--bz-space-2, 8px);
    font-family: var(--bz-font-sans, 'Inter', sans-serif);
    font-size: var(--bz-text-body-sm, 14px);
    font-weight: var(--bz-weight-body-semibold, 600);
    border-radius: var(--bz-radius-lg, 16px);
    padding: 10px 20px;
    cursor: pointer;
    transition: all var(--bz-transition-base, 220ms ease);
    border: 1px solid transparent;
    text-decoration: none;
    user-select: none;
    line-height: 1.25;
    outline: none;
}

/* Universal Tactile Micro-interaction: Active Scale Feedback */
button:active,
.btn:active,
.bz-btn:active,
a.btn:active,
.bz-interactive:active {
    transform: scale(0.97) !important;
}

/* Primary Button (Gradient CTA) */
.btn-primary, .bz-btn-primary {
    background: var(--bz-gradient-primary) !important;
    color: var(--bz-text-on-primary, #ffffff) !important;
    box-shadow: var(--bz-shadow-sm);
}

.btn-primary:hover, .bz-btn-primary:hover {
    filter: brightness(1.08);
    box-shadow: var(--bz-shadow-md);
}

/* Secondary Button (Ghost / Outline Surface) */
.btn-secondary, .bz-btn-secondary {
    background: var(--bz-bg-surface, #ffffff) !important;
    color: var(--bz-text-primary, #0f172a) !important;
    border-color: var(--bz-border, #e2e8f0) !important;
    box-shadow: var(--bz-shadow-xs);
}

.btn-secondary:hover, .bz-btn-secondary:hover {
    background: var(--bz-bg-surface-secondary, #f1f5f9) !important;
    border-color: var(--bz-border-hover, #cbd5e1) !important;
}

/* Danger Button (Destructive / Delete Actions) */
.btn-danger, .bz-btn-danger {
    background: var(--bz-error, #ef4444) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover, .bz-btn-danger:hover {
    background: var(--bz-error-hover, #dc2626) !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

/* Icon Action Button */
.btn-icon, .bz-btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--bz-radius-full, 9999px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--bz-text-secondary, #475569);
    border: none;
    cursor: pointer;
    transition: all var(--bz-transition-fast, 150ms ease);
}

.btn-icon:hover, .bz-btn-icon:hover {
    background: var(--bz-bg-surface-secondary, rgba(0, 0, 0, 0.05));
    color: var(--bz-text-primary, #0f172a);
}

/* Follow Button Micro-transition */
.btn-follow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--bz-gradient-primary);
    color: #ffffff !important;
    border-radius: var(--bz-radius-full, 9999px);
    padding: 7px 18px;
    font-size: var(--bz-text-caption, 12.5px);
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--bz-transition-base, 220ms ease);
    text-decoration: none;
    box-shadow: var(--bz-shadow-xs);
}

.btn-follow:hover {
    filter: brightness(1.08);
    box-shadow: var(--bz-shadow-sm);
}

.btn-follow.following {
    background: var(--bz-bg-surface-secondary, #f1f5f9) !important;
    color: var(--bz-text-secondary, #475569) !important;
    border-color: var(--bz-border, #e2e8f0) !important;
    box-shadow: none;
}

.btn-follow.following:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    color: var(--bz-error, #ef4444) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}

/* ─── 2. CARDS & CONTAINERS ─── */
.bz-card {
    background: var(--bz-bg-surface, #ffffff);
    border: 1px solid var(--bz-border, #e2e8f0);
    border-radius: var(--bz-radius-xl, 24px);
    box-shadow: var(--bz-shadow-card);
    padding: var(--bz-space-5, 20px);
    transition: all var(--bz-transition-base, 220ms ease);
}

.bz-card-hover {
    transition: transform var(--bz-transition-base), box-shadow var(--bz-transition-base), border-color var(--bz-transition-base);
}

.bz-card-hover:hover {
    transform: translateY(-2px);
    box-shadow: var(--bz-shadow-md);
    border-color: var(--bz-border-hover, #cbd5e1);
}

/* ─── 3. FORM INPUTS & CONTROLS ─── */
.bz-input,
.bz-select,
.bz-textarea {
    width: 100%;
    background: var(--bz-bg-surface, #ffffff);
    border: 1px solid var(--bz-border, #e2e8f0);
    border-radius: var(--bz-radius-lg, 16px);
    padding: 11px 16px;
    font-family: var(--bz-font-sans, 'Inter', sans-serif);
    font-size: var(--bz-text-body-sm, 14px);
    color: var(--bz-text-primary, #0f172a);
    transition: border-color var(--bz-transition-fast), box-shadow var(--bz-transition-fast);
    outline: none;
}

.bz-input:focus,
.bz-select:focus,
.bz-textarea:focus {
    border-color: var(--bz-border-focus, #6366f1) !important;
    box-shadow: var(--bz-focus-ring) !important;
}

.bz-input::placeholder,
.bz-textarea::placeholder {
    color: var(--bz-text-muted, #94a3b8);
}

/* ─── 4. AVATARS ─── */
.bz-avatar-sm {
    width: 32px !important;
    height: 32px !important;
    border-radius: var(--bz-radius-full, 9999px) !important;
    object-fit: cover !important;
}

.bz-avatar-md {
    width: 48px !important;
    height: 48px !important;
    border-radius: var(--bz-radius-full, 9999px) !important;
    object-fit: cover !important;
}

.bz-avatar-lg {
    width: 80px !important;
    height: 80px !important;
    border-radius: var(--bz-radius-full, 9999px) !important;
    object-fit: cover !important;
}

.bz-avatar-xl {
    width: 100px !important;
    height: 100px !important;
    border-radius: var(--bz-radius-full, 9999px) !important;
    object-fit: cover !important;
}

/* ─── 5. TOAST NOTIFICATIONS ─── */
.bz-toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

@media (max-width: 640px) {
    .bz-toast-container {
        bottom: 80px; /* Above mobile bottom navigation bar */
    }
}

.bz-toast {
    display: inline-flex;
    align-items: center;
    gap: var(--bz-space-3, 12px);
    padding: 12px 22px;
    border-radius: var(--bz-radius-xl, 24px);
    background: rgba(15, 23, 42, 0.94);
    color: #ffffff;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--bz-shadow-lg);
    font-family: var(--bz-font-sans, 'Inter', sans-serif);
    font-size: var(--bz-text-body-sm, 14px);
    font-weight: 600;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.bz-toast.bz-toast-visible {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.bz-toast-success {
    border-color: rgba(16, 185, 129, 0.35);
}

.bz-toast-success .material-symbols-outlined {
    color: #34d399;
}

.bz-toast-error {
    border-color: rgba(239, 68, 68, 0.35);
}

.bz-toast-error .material-symbols-outlined {
    color: #f87171;
}

.bz-toast-info .material-symbols-outlined {
    color: #60a5fa;
}

.bz-toast-warning {
    border-color: rgba(245, 158, 11, 0.4);
}

.bz-toast-warning .material-symbols-outlined {
    color: #fbbf24;
}

/* ─── 6. MICRO-INTERACTIONS ─── */

/* Double-tap / click heart pop */
@keyframes bzLikePop {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.35) rotate(-6deg); opacity: 1; }
    75% { transform: scale(0.95) rotate(3deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.bz-like-pop {
    animation: bzLikePop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Bookmark pop */
@keyframes bzBookmarkPop {
    0% { transform: scale(0.85); }
    50% { transform: scale(1.25) translateY(-3px); }
    100% { transform: scale(1) translateY(0); }
}

.bz-bookmark-pop {
    animation: bzBookmarkPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Repost icon spin */
@keyframes bzRepostSpin {
    0% { transform: rotate(0deg) scale(0.9); }
    70% { transform: rotate(200deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

.bz-repost-spin {
    animation: bzRepostSpin 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ─── 7. SKELETON LOADERS (SHIMMER) ─── */
@keyframes bzShimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.bz-skeleton {
    display: block;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: bzShimmer 1.6s infinite ease-in-out;
    border-radius: var(--bz-radius-md, 12px);
}

html.dark .bz-skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
}

.bz-skeleton-text {
    height: 14px;
    margin-bottom: 8px;
    border-radius: var(--bz-radius-sm, 8px);
}

.bz-skeleton-text.short {
    width: 60%;
}

.bz-skeleton-title {
    height: 22px;
    width: 75%;
    margin-bottom: 12px;
    border-radius: var(--bz-radius-sm, 8px);
}

.bz-skeleton-circle {
    border-radius: var(--bz-radius-full, 9999px) !important;
    flex-shrink: 0;
}

.bz-skeleton-card {
    background: var(--bz-bg-surface, #ffffff);
    border: 1px solid var(--bz-border, #e2e8f0);
    border-radius: var(--bz-radius-xl, 24px);
    padding: var(--bz-space-5, 20px);
    margin-bottom: var(--bz-space-4, 16px);
    box-shadow: var(--bz-shadow-card);
}

/* ─── 8. FRIENDLY ERROR STATE COMPONENT ─── */
.bz-error-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 36px 24px;
    border-radius: var(--bz-radius-xl, 24px);
    background: var(--bz-bg-surface, #ffffff);
    border: 1px solid var(--bz-border, #e2e8f0);
    box-shadow: var(--bz-shadow-card);
    max-width: 440px;
    margin: 24px auto;
}

.bz-error-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--bz-radius-xl, 24px);
    background: var(--bz-error-bg, #fef2f2);
    border: 1px solid var(--bz-error-border, #fecaca);
    color: var(--bz-error, #ef4444);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.bz-error-title {
    font-family: var(--bz-font-brand, 'Sora', sans-serif);
    font-size: var(--bz-text-h3, 18px);
    font-weight: 700;
    color: var(--bz-text-primary, #0f172a);
    margin-bottom: 8px;
}

.bz-error-message {
    font-size: var(--bz-text-body-sm, 14px);
    color: var(--bz-text-secondary, #475569);
    line-height: 1.5;
    margin-bottom: 20px;
}

/* ─── 9. OFFLINE STATUS BANNER ─── */
.bz-offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10001;
    background: #f59e0b;
    color: #ffffff;
    font-family: var(--bz-font-sans, 'Inter', sans-serif);
    font-size: var(--bz-text-caption, 12.5px);
    font-weight: 700;
    text-align: center;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    transform: translateY(-100%);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bz-offline-banner.bz-active {
    transform: translateY(0);
}

/* ─── 10. ACCESSIBILITY & FOCUS-VISIBLE ─── */
/* Keyboard navigation: a clear outline plus the existing soft ring.
   Pointer clicks keep the current design (no outline for :focus alone). */
:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--bz-primary, #1550d3) !important;
    outline-offset: 2px;
    box-shadow: var(--bz-focus-ring, 0 0 0 3px rgba(99, 102, 241, 0.35)) !important;
}

/* Screen reader only utility class */
.bz-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ===================================================================
   Comment Conversation Layer: Top Highlights, AI Summary & Nested Threads
   =================================================================== */

/* ─── 11. TOP CONVERSATION HIGHLIGHT CARD ─── */
.bz-top-conversation-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.07) 0%, rgba(147, 51, 234, 0.07) 100%);
    border: 1px solid rgba(99, 102, 241, 0.28);
    border-radius: var(--bz-radius-xl, 24px);
    padding: 14px 16px;
    margin-bottom: 14px;
    box-shadow: 0 4px 16px -2px rgba(99, 102, 241, 0.08);
    position: relative;
    overflow: hidden;
}

html.dark .bz-top-conversation-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.14) 0%, rgba(147, 51, 234, 0.14) 100%);
    border-color: rgba(129, 140, 248, 0.3);
    box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.4);
}

.bz-top-convo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.bz-top-convo-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--bz-font-brand, 'Sora', sans-serif);
    font-size: 11.5px;
    font-weight: 800;
    color: #4f46e5;
    background: rgba(99, 102, 241, 0.12);
    padding: 3px 10px;
    border-radius: var(--bz-radius-full, 9999px);
    letter-spacing: 0.02em;
}

html.dark .bz-top-convo-badge {
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.25);
}

.bz-top-convo-thread {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    padding-left: 12px;
    border-left: 2px solid rgba(99, 102, 241, 0.3);
    margin-left: 4px;
    margin-bottom: 12px;
}

.bz-top-convo-item {
    font-size: 13px;
    line-height: 1.45;
    color: var(--bz-text-primary, #0f172a);
}

.bz-top-convo-author {
    font-family: var(--bz-font-brand, 'Sora', sans-serif);
    font-size: 12px;
    font-weight: 700;
    color: #4338ca;
    margin-right: 4px;
}

html.dark .bz-top-convo-author {
    color: #c7d2fe;
}

.bz-top-convo-join-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--bz-font-sans, 'Inter', sans-serif);
    font-size: 11.5px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: var(--bz-radius-full, 9999px);
    background: var(--bz-gradient-primary);
    color: #ffffff !important;
    border: none;
    cursor: pointer;
    transition: all var(--bz-transition-fast);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.25);
}

.bz-top-convo-join-btn:hover {
    filter: brightness(1.08);
    transform: scale(1.02);
}

/* ─── 12. AI DISCUSSION SUMMARY CARD ─── */
.bz-summary-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--bz-font-sans, 'Inter', sans-serif);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: var(--bz-radius-full, 9999px);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: #4f46e5;
    cursor: pointer;
    transition: all var(--bz-transition-base);
    user-select: none;
    margin-bottom: 12px;
}

html.dark .bz-summary-toggle-btn {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(147, 51, 234, 0.2) 100%);
    border-color: rgba(129, 140, 248, 0.35);
    color: #c7d2fe;
}

.bz-summary-toggle-btn:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18) 0%, rgba(147, 51, 234, 0.18) 100%);
    transform: translateY(-1px);
}

.bz-discussion-summary-card {
    background: linear-gradient(135deg, rgba(245, 243, 255, 0.95), rgba(238, 242, 255, 0.95));
    border: 1px solid rgba(167, 139, 250, 0.4);
    border-radius: var(--bz-radius-xl, 24px);
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 4px 16px -2px rgba(99, 102, 241, 0.08);
    transition: all var(--bz-transition-base);
}

html.dark .bz-discussion-summary-card {
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.85), rgba(15, 23, 42, 0.92));
    border-color: rgba(139, 92, 246, 0.35);
    box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.5);
}

.bz-summary-pillar {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

html.dark .bz-summary-pillar {
    border-bottom-color: rgba(51, 65, 85, 0.5);
}

.bz-summary-pillar:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.bz-summary-pillar-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--bz-font-brand, 'Sora', sans-serif);
    font-size: 11.5px;
    font-weight: 800;
    color: #4338ca;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

html.dark .bz-summary-pillar-title {
    color: #c7d2fe;
}

.bz-summary-pillar-content {
    font-size: 13px;
    line-height: 1.45;
    color: var(--bz-text-primary, #0f172a);
}

/* ─── 13. THREADED & NESTED REPLIES VISUAL GUIDE ─── */
.bz-comment-thread {
    margin-bottom: 12px;
    position: relative;
}

.bz-nested-replies {
    margin-left: 28px;
    padding-left: 12px;
    border-left: 2px solid rgba(99, 102, 241, 0.22);
    margin-top: 8px;
    transition: all 0.25s ease;
}

html.dark .bz-nested-replies {
    border-left-color: rgba(129, 140, 248, 0.28);
}

.bz-nested-replies.hidden {
    display: none;
}

.bz-reply-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 700;
    color: #6366f1;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: var(--bz-radius-sm, 8px);
    transition: all var(--bz-transition-fast);
    margin-top: 4px;
}

.bz-reply-toggle-btn:hover {
    background: rgba(99, 102, 241, 0.08);
    color: #4f46e5;
}

html.dark .bz-reply-toggle-btn {
    color: #a5b4fc;
}

html.dark .bz-reply-toggle-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    color: #c7d2fe;
}

.bz-comment-action-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

.bz-action-btn-small {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    color: var(--bz-text-muted, #94a3b8);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px 5px;
    border-radius: var(--bz-radius-sm, 8px);
    transition: all var(--bz-transition-fast);
}

.bz-action-btn-small:hover {
    color: var(--bz-text-primary, #0f172a);
    background: rgba(0, 0, 0, 0.04);
}

html.dark .bz-action-btn-small:hover {
    background: rgba(255, 255, 255, 0.06);
}

.bz-action-btn-small.liked {
    color: #e11d48;
}

.bz-action-btn-small.liked .material-symbols-outlined {
    font-variation-settings: 'FILL' 1;
}

/* Universal header gradient brand text */
.shimmer-text,
.primary-gradient-text {
    background: linear-gradient(135deg, #2563EB 0%, #5B5CE2 50%, #7C3AED 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

/* ===================================================================
   Universal Toast System (bzToast)
   =================================================================== */
.bz-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 90vw;
}

@media (max-width: 640px) {
    .bz-toast-container {
        top: auto;
        bottom: 74px;
        right: 50%;
        transform: translateX(50%);
        width: calc(100% - 32px);
        max-width: 420px;
    }
}

.bz-toast {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 14px;
    font-family: var(--bz-font-sans, 'Inter', sans-serif);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    box-shadow: 0 16px 36px -6px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: translateY(-12px) scale(0.96);
    opacity: 0;
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
    cursor: pointer;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.bz-toast.bz-toast-visible {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.bz-toast-info {
    background: #0F172A;
    color: #F8FAFC;
    border: 1px solid rgba(255, 255, 255, 0.14);
}
.bz-toast-info span:first-child {
    color: #60A5FA;
}

.bz-toast-success {
    background: #064E3B;
    color: #ECFDF5;
    border: 1px solid rgba(52, 211, 153, 0.35);
}
.bz-toast-success span:first-child {
    color: #34D399;
}

.bz-toast-error {
    background: #881337;
    color: #FFF1F2;
    border: 1px solid rgba(251, 113, 133, 0.35);
}
.bz-toast-error span:first-child {
    color: #FB7185;
}

.bz-toast-warning {
    background: #78350F;
    color: #FFFBEB;
    border: 1px solid rgba(251, 191, 36, 0.35);
}
.bz-toast-warning span:first-child {
    color: #FBBF24;
}

/* ===================================================================
   Design System Utility Classes (Cards, Skeletons, Buttons)
   =================================================================== */
.bz-card {
    background: var(--bz-bg-surface, #FFFFFF);
    border: 1px solid var(--bz-border, #E8EAF0);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
    transition: box-shadow 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.bz-card:hover {
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    border-color: var(--bz-border-hover, #CBD5E1);
}

html.dark .bz-card {
    background: var(--bz-bg-surface, #131B2E);
    border-color: var(--bz-border, #263247);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

html.dark .bz-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
    border-color: var(--bz-border-hover, #334155);
}

/* Brand Button */
.bz-btn-primary {
    background: var(--bz-gradient-primary, linear-gradient(135deg, #2563EB 0%, #5B5CE2 50%, #7C3AED 100%));
    color: #FFFFFF !important;
    font-weight: 600;
    font-size: 14px;
    border-radius: 12px;
    padding: 10px 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px -2px rgba(91, 92, 226, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.bz-btn-primary:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 8px 22px -3px rgba(91, 92, 226, 0.48);
}

.bz-btn-primary:active {
    transform: translateY(0);
    filter: brightness(0.96);
}

/* Skeleton Loading Shimmer */
@keyframes bzSkeletonShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.bz-skeleton {
    background: linear-gradient(90deg, rgba(232, 234, 240, 0.7) 25%, rgba(241, 243, 247, 0.9) 50%, rgba(232, 234, 240, 0.7) 75%);
    background-size: 200% 100%;
    animation: bzSkeletonShimmer 1.6s infinite ease-in-out;
    border-radius: 8px;
}

html.dark .bz-skeleton {
    background: linear-gradient(90deg, rgba(30, 41, 59, 0.6) 25%, rgba(51, 65, 85, 0.8) 50%, rgba(30, 41, 59, 0.6) 75%);
    background-size: 200% 100%;
}

/* =========================================================================
   Mobile Drawer & Scrollbar Treatments
   ========================================================================= */
html,
body,
#mobileDrawer,
.hide-scrollbar,
.no-scrollbar,
#creatorStudioModal,
.cs-tab-pane,
#csTab_overview,
#csTab_content,
#csTab_audience,
#csTab_earnings,
#csRecentTipsList,
#bzPromoBody,
#bzPromoSheet {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
#mobileDrawer::-webkit-scrollbar,
.hide-scrollbar::-webkit-scrollbar,
.no-scrollbar::-webkit-scrollbar,
#creatorStudioModal::-webkit-scrollbar,
.cs-tab-pane::-webkit-scrollbar,
#csTab_overview::-webkit-scrollbar,
#csTab_content::-webkit-scrollbar,
#csTab_audience::-webkit-scrollbar,
#csTab_earnings::-webkit-scrollbar,
#csRecentTipsList::-webkit-scrollbar,
#bzPromoBody::-webkit-scrollbar,
#bzPromoSheet::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Universal Toggle Switch Component (Mobile-Safe Pill) */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    min-width: 48px;
    height: 26px;
    min-height: 26px;
    flex-shrink: 0;
    box-sizing: border-box;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: all .25s ease;
    border-radius: 9999px;
    box-sizing: border-box;
}
html.dark .slider {
    background-color: #334155;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: all .25s ease;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.18);
    box-sizing: border-box;
}
input:checked + .slider {
    background-color: #1550d3;
}
input:checked + .slider:before {
    transform: translateX(22px);
}

/* Home Feed Header & Tabs Hide-on-Scroll Transition */
/* Header stays constant and never hides on scroll */
@media (max-width: 1023px) {
    header.feed-header-hidden {
        transform: none !important;
        margin-top: 0 !important;
    }
}
#feedTabsRow {
    max-height: 80px;
    transition: max-height 0.22s ease-in-out, opacity 0.2s ease-in-out, margin-bottom 0.22s ease-in-out, padding-bottom 0.22s ease-in-out !important;
}
#feedTabsRow.tabs-hidden {
    max-height: 0 !important;
    opacity: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}
#stories-strip {
    max-height: 190px;
    transition: max-height 0.22s ease-in-out, opacity 0.2s ease-in-out, margin-bottom 0.22s ease-in-out, padding 0.22s ease-in-out !important;
}
@media (max-width: 1023px) {
    #stories-strip.stories-hidden {
        max-height: 0 !important;
        opacity: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
    }
}
#feed-sticky-header {
    transition: transform 0.22s ease-in-out, opacity 0.2s ease-in-out, max-height 0.22s ease-in-out, margin 0.22s ease-in-out, padding 0.22s ease-in-out, border-color 0.2s ease-in-out !important;
}
@media (max-width: 1023px) {
    #feed-sticky-header.sticky-header-hidden {
        transform: translateY(-100%) !important;
        opacity: 0 !important;
        pointer-events: none !important;
        max-height: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        border-bottom-width: 0 !important;
        overflow: hidden !important;
    }
}

/* ===================================================================
   Universal Mobile Bottom Navigation Bar (Matching Image 2)
   =================================================================== */
nav.bz-mobile-bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 50 !important;
    height: 60px !important;
    background: #ffffff !important;
    border-top: 1px solid #edf0f7 !important;
    box-shadow: 0 -2px 14px rgba(0, 0, 0, 0.04) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 12px !important;
    overflow: visible !important;
}

html.dark nav.bz-mobile-bottom-nav,
body.dark-theme nav.bz-mobile-bottom-nav {
    background: #0f172a !important;
    border-top-color: rgba(51, 65, 85, 0.6) !important;
}

@media (min-width: 1024px) {
    nav.bz-mobile-bottom-nav,
    .bz-mobile-bottom-nav,
    #exploreMobileBottomNav,
    #reelsBottomNav,
    body nav.bz-mobile-bottom-nav,
    body nav.fixed.bottom-0 {
        display: none !important;
    }
}

nav.bz-mobile-bottom-nav > a:not(.mobile-center-fab) {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 1 0% !important;
    text-decoration: none !important;
}

.mobile-center-fab,
nav.bz-mobile-bottom-nav > a.mobile-center-fab {
    position: relative !important;
    z-index: 60 !important;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
    color: #ffffff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.45) !important;
    border: 3px solid #ffffff !important;
    margin-top: -24px !important;
    cursor: pointer !important;
    transition: transform 0.15s ease !important;
    text-decoration: none !important;
}

.mobile-center-fab:active {
    transform: scale(0.95) !important;
}

/* ===================================================================
   Universal Mobile Header (Matching Image 3) - 100% Constant Across All Pages
   =================================================================== */
@media (max-width: 1023px) {
    header,
    header#mainHeader,
    header#mainTopHeader,
    header.glass-header,
    header.sticky,
    header.sticky.top-0,
    header[class*="sticky"],
    body header {
        height: 60px !important;
        min-height: 60px !important;
        max-height: 60px !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
        position: sticky !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        background: #ffffff !important;
        border-bottom: 1px solid #f1f4f9 !important;
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        z-index: 50 !important;
        transform: none !important;
        margin: 0 !important;
    }

    html.dark header,
    html.dark header#mainHeader,
    html.dark header#mainTopHeader,
    body.dark-theme header,
    [data-theme="dark"] header {
        background: #0f172a !important;
        border-bottom: 1px solid rgba(51, 65, 85, 0.6) !important;
    }

    /* Neutralize all inner wrappers (e.g. max-w-[1560px], max-w-7xl, comment-header-inner) */
    header > div.comment-header-inner,
    header > div.max-w-\[1560px\],
    header > div[class*="max-w-"],
    header > div.container {
        height: 100% !important;
        min-height: 100% !important;
        max-height: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        box-sizing: border-box !important;
        gap: 0 !important;
    }

    /* Elements marked hidden on mobile must strictly stay hidden */
    header div.hidden,
    header .hidden.lg\:flex {
        display: none !important;
    }

    /* Left Brand Area */
    header .bz-hdr-menu,
    header button.bz-hdr-menu {
        display: none !important;
    }

    header div:has(> a[href*="home_feed"]),
    header .comment-header-left,
    header .comment-header-left a,
    header a[href*="home_feed"] {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        text-decoration: none !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        flex: 0 0 auto !important;
    }

    /* Universal Logo Height */
    header img[src*="Big-Zaint-new-logo"],
    header img[src*="logo.png"],
    header img[src*="logo"],
    header img[alt="Comment"], header img[alt="BigZaint"] {
        height: 38px !important;
        min-height: 38px !important;
        max-height: 38px !important;
        width: auto !important;
        object-fit: contain !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
    }

    /* Universal "Comment" Wordmark - Option 01: Deep Obsidian Black */
    header a[href*="home_feed"] span,
    header .comment-brand-title,
    header .shimmer-text {
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
        font-family: 'Sora', sans-serif !important;
        font-size: 21px !important;
        font-weight: 800 !important;
        letter-spacing: -0.015em !important;
        color: #0A0F1D !important;
        -webkit-text-fill-color: #0A0F1D !important;
        line-height: 1 !important;
        margin: 0 !important;
        padding: 0 !important;
        vertical-align: middle !important;
        background: none !important;
    }

    html.dark header a[href*="home_feed"] span,
    html.dark header .comment-brand-title,
    html.dark header .shimmer-text {
        color: #F8FAFC !important;
        -webkit-text-fill-color: #F8FAFC !important;
    }

    /* Hide desktop center search and desktop action bar on mobile */
    header .comment-header-center,
    header .comment-header-right,
    header div:has(> #searchInput),
    header div:has(> input[type="text"]) {
        display: none !important;
    }

    /* Universal Mobile Right Actions (Matching Image 3) */
    .comment-header-mobile,
    header .comment-header-mobile,
    header > div > div.comment-header-mobile {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 8px !important;
        margin-left: auto !important;
        margin-right: 0 !important;
        padding: 0 !important;
        height: 100% !important;
        width: auto !important;
        min-width: auto !important;
        max-width: none !important;
        flex: 0 0 auto !important;
        grid-template-columns: none !important;
    }

    .comment-header-mobile button {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        max-width: 36px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        cursor: pointer !important;
        flex: 0 0 36px !important;
        color: #334155 !important;
        position: relative !important;
    }

    .comment-header-mobile button .material-symbols-outlined {
        font-size: 22px !important;
        color: #334155 !important;
    }

    html.dark .comment-header-mobile button .material-symbols-outlined {
        color: #cbd5e1 !important;
    }

    .comment-header-mobile button .bg-rose-500,
    .comment-header-mobile button span[class*="bg-rose-500"] {
        position: absolute !important;
        top: 1px !important;
        right: 1px !important;
        width: 14px !important;
        height: 14px !important;
        min-width: 14px !important;
        max-width: 14px !important;
        font-size: 9px !important;
        font-weight: 700 !important;
        border-radius: 50% !important;
        background-color: #f43f5e !important;
        color: #ffffff !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1 !important;
        padding: 0 !important;
    }

    .comment-header-mobile > div,
    .comment-header-mobile div[title="Profile"] {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        max-width: 32px !important;
        flex: 0 0 32px !important;
        border-radius: 50% !important;
        overflow: hidden !important;
        border: 1.5px solid #e2e8f0 !important;
        margin-left: 2px !important;
        margin-right: 0 !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    html.dark .comment-header-mobile > div,
    html.dark .comment-header-mobile div[title="Profile"] {
        border-color: rgba(255, 255, 255, 0.2) !important;
    }

    .comment-header-mobile > div img,
    .comment-header-mobile div[title="Profile"] img,
    header div[title="Profile"] img,
    header div[onclick*="profile"] img,
    #headerUserAvatarMobile,
    #headerUserAvatar,
    header img#headerUserAvatarMobile,
    header img#headerUserAvatar {
        width: 100% !important;
        height: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        min-height: 100% !important;
        max-height: 100% !important;
        object-fit: cover !important;
        border-radius: 50% !important;
        -webkit-border-radius: 50% !important;
        aspect-ratio: 1 / 1 !important;
        clip-path: circle(50% at 50% 50%) !important;
        -webkit-clip-path: circle(50% at 50% 50%) !important;
        display: block !important;
    }

    header:has(.comment-header-mobile) .bz-hdr-actions,
    header:has(.comment-header-mobile) div:has(> .bz-hdr-actions) {
        display: none !important;
    }
}

/* ===================================================================
   Universal Profile Avatar Rules: Desktop (36px) & Mobile (100% of 32px pill)
   =================================================================== */
/* Desktop Avatar: Explicit 36px Circle */
#headerUserAvatar,
header img#headerUserAvatar,
.comment-header-right img#headerUserAvatar,
.comment-header-right div[title="Profile"] img {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    -webkit-border-radius: 50% !important;
    aspect-ratio: 1 / 1 !important;
    clip-path: circle(50% at 50% 50%) !important;
    -webkit-clip-path: circle(50% at 50% 50%) !important;
    display: block !important;
}

/* Mobile Avatar: 100% inside its 32px parent container */
#headerUserAvatarMobile,
header img#headerUserAvatarMobile,
.comment-header-mobile div[title="Profile"] img,
.comment-header-mobile > div img {
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    -webkit-border-radius: 50% !important;
    aspect-ratio: 1 / 1 !important;
    clip-path: circle(50% at 50% 50%) !important;
    -webkit-clip-path: circle(50% at 50% 50%) !important;
    display: block !important;
}

/* Mobile Avatar Container */
.comment-header-mobile div[title="Profile"],
.comment-header-mobile > div:has(img),
header div:has(> #headerUserAvatarMobile) {
    border-radius: 50% !important;
    -webkit-border-radius: 50% !important;
    overflow: hidden !important;
    clip-path: circle(50% at 50% 50%) !important;
    -webkit-clip-path: circle(50% at 50% 50%) !important;
    -webkit-mask-image: -webkit-radial-gradient(white, black) !important;
}

/* =========================================================================
   Universal account dropdown (desktop + mobile)
   ========================================================================= */
.bz-account-menu {
    position: fixed;
    top: 60px;
    right: 14px;
    z-index: 100030;
    display: none;
    flex-direction: column;
    width: min(320px, calc(100vw - 20px));
    max-height: calc(100vh - 76px);
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
    color: #0f172a;
    font-family: inherit;
    overflow: hidden;
}
.bz-account-menu.open { display: flex !important; }
html.dark .bz-account-menu {
    background: #0f172a;
    border-color: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
}
.bz-account-menu__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px 12px;
    margin-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
}
html.dark .bz-account-menu__header { border-color: rgba(255, 255, 255, 0.1); }
.bz-account-menu__avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e0e7ff;
}
.bz-account-menu__identity { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bz-account-menu__name {
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bz-account-menu__handle {
    font-size: 11px;
    font-weight: 600;
    color: #6366f1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bz-account-menu__scroll {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.bz-account-menu__scroll::-webkit-scrollbar { display: none; width: 0; height: 0; }
.bz-account-menu__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: inherit;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.bz-account-menu__item:hover { background: #f1f5f9; color: #4338ca; }
html.dark .bz-account-menu__item:hover { background: rgba(148, 163, 184, 0.14); color: #a5b4fc; }
.bz-account-menu__item .material-symbols-outlined { font-size: 19px; }
.bz-account-menu__label {
    padding: 10px 10px 4px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #94a3b8;
}
.bz-account-menu__accounts {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 210px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.bz-account-menu__accounts::-webkit-scrollbar { display: none; width: 0; height: 0; }
.bz-account-menu__account-avatar {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e2e8f0;
}
.bz-account-menu__account-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    flex: 1;
}
.bz-account-menu__account-name {
    font-size: 12px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bz-account-menu__account-sub {
    font-size: 10.5px;
    font-weight: 600;
    color: #94a3b8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bz-account-menu__account-state {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 800;
    color: #6366f1;
}
.bz-account-menu__account.is-active { background: #eef2ff; }
html.dark .bz-account-menu__account.is-active { background: rgba(99, 102, 241, 0.18); }
.bz-account-menu__empty {
    padding: 10px;
    font-size: 11.5px;
    font-weight: 600;
    color: #94a3b8;
}
.bz-account-menu__divider { height: 1px; background: #e2e8f0; margin: 5px 4px; }
html.dark .bz-account-menu__divider { background: rgba(255, 255, 255, 0.1); }
.bz-account-menu__danger { color: #e11d48; }
.bz-account-menu__danger:hover { background: #fff1f2; color: #be123c; }
html.dark .bz-account-menu__danger:hover { background: rgba(225, 29, 72, 0.14); color: #fb7185; }

.bz-account-trigger-mobile {
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 50% !important;
    overflow: hidden;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.bz-account-trigger-mobile img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    object-fit: cover;
}

@media (max-width: 1023px) {
    .bz-account-menu {
        top: 52px;
        right: 8px;
        width: min(320px, calc(100vw - 16px));
        max-height: calc(100vh - 64px);
        border-radius: 14px;
    }
}



/* Desktop header: notifications bell removed (mobile header + sidebar link stay) */
@media (min-width: 1024px) {
    .comment-header-right button[title="Notifications"],
    .comment-header-right a[title="Notifications"] {
        display: none !important;
    }
}


/* Sidebar unread badges: uniform circular count chips */
span[data-badge] {
    min-width: 18px;
    width: 18px;
    height: 18px;
    padding: 0;
    border-radius: 9999px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0;
    background-color: #f43f5e !important;
    color: #ffffff !important;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(244, 63, 94, 0.35);
}
span[data-badge].hidden {
    display: none !important;
}
span[data-badge][data-wide="true"] {
    width: auto;
    min-width: 24px;
    padding: 0 5px;
}
