@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #2563eb;
    --secondary-color: #3b82f6;
    --accent-color: #10b981;
    --bg-color: #f3f4f6;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    
    /* Glassmorphism Variables */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    
    --nav-height: 54px;
    --bottom-nav-height: 52px;
}

[data-theme="dark"] {
    --primary-color: #3b82f6;
    --secondary-color: #60a5fa;
    --bg-color: #18191a;
    --text-main: #e4e6eb;
    --text-muted: #b0b3b8;
    
    /* Dark Glassmorphism */
    --glass-bg: rgba(36, 37, 38, 0.9);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    color: var(--text-main);
    transition: background-color 0.2s ease, color 0.2s ease;
    padding-top: 54px !important;
    padding-bottom: 54px !important;
    margin: 0 !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

/* Glassmorphism Utility */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.glass-nav {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
}

/* Top Navigation */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1030;
    display: flex;
    align-items: center;
    padding: 0 1rem;
}

.brand-logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.search-bar {
    background: rgba(107, 114, 128, 0.1);
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    color: var(--text-main);
}
.search-bar:focus {
    background: rgba(107, 114, 128, 0.15);
    box-shadow: none;
    color: var(--text-main);
}

.nav-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(107, 114, 128, 0.1);
    color: var(--text-main);
    text-decoration: none;
    transition: background 0.2s;
    position: relative;
}
.nav-icon-btn:hover {
    background: rgba(107, 114, 128, 0.2);
    color: var(--primary-color);
}
.nav-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: 600;
}

/* Bottom Mobile Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1030;
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.25rem;
    transition: color 0.2s;
}
.bottom-nav-item span {
    font-size: 0.7rem;
    margin-top: 2px;
    font-weight: 500;
}
.bottom-nav-item.active {
    color: var(--primary-color);
}
.bottom-nav-item:hover {
    color: var(--primary-color);
}

/* Main Layout Setup */
.main-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 12px;
}

@media (max-width: 768px) {
    .main-wrapper {
        padding: 8px 10px 14px !important;
        margin: 0 auto !important;
    }
    .main-wrapper.has-feed {
        padding: 0 0 14px !important;
    }
}

/* Sidebars for Desktop */
.left-sidebar {
    display: none;
    position: sticky !important;
    top: 66px !important;
    height: calc(100vh - 80px) !important;
    max-height: calc(100vh - 80px) !important;
    width: 285px !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    overscroll-behavior: contain !important;
}

.right-sidebar {
    display: none;
    position: sticky !important;
    top: 66px !important;
    height: calc(100vh - 80px) !important;
    width: 300px !important;
    flex-shrink: 0 !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
}

.left-sidebar .glass-card {
    height: 100% !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    margin-bottom: 0 !important;
    border-radius: 16px !important;
    padding: 14px 10px 14px 12px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
    box-sizing: border-box !important;
    overscroll-behavior: contain !important;
}

[data-theme="dark"] .left-sidebar .glass-card {
    background: #242526 !important;
    border-color: #393a3b !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
}

.left-sidebar-profile {
    flex-shrink: 0 !important;
    width: 100% !important;
}

.left-sidebar-nav,
.left-sidebar .nav {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    gap: 4px !important;
    padding-right: 6px !important;
    margin-bottom: 0 !important;
    overscroll-behavior: contain !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.18) transparent;
}

.left-sidebar-nav::-webkit-scrollbar,
.left-sidebar .nav::-webkit-scrollbar {
    width: 5px;
}

.left-sidebar-nav::-webkit-scrollbar-thumb,
.left-sidebar .nav::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.18);
    border-radius: 6px;
}

.left-sidebar-nav::-webkit-scrollbar-track,
.left-sidebar .nav::-webkit-scrollbar-track {
    background: transparent;
}

[data-theme="dark"] .left-sidebar-nav::-webkit-scrollbar-thumb,
[data-theme="dark"] .left-sidebar .nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
}

.left-sidebar .nav-item,
.left-sidebar-nav .nav-item {
    width: 100% !important;
    max-width: 100% !important;
    flex-shrink: 0 !important;
    display: block !important;
    list-style: none !important;
}

.left-sidebar .nav-link,
.left-sidebar-nav .nav-link {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 14px !important;
    border-radius: 10px !important;
    font-size: 0.90rem !important;
    font-weight: 600 !important;
    transition: all 0.15s ease !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    white-space: nowrap !important;
    min-height: 42px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.left-sidebar .nav-link:hover,
.left-sidebar-nav .nav-link:hover {
    background: #f0f2f5 !important;
    color: #1877F2 !important;
}

[data-theme="dark"] .left-sidebar .nav-link:hover,
[data-theme="dark"] .left-sidebar-nav .nav-link:hover {
    background: #3a3b3c !important;
    color: #2d88ff !important;
}

/* Feed Column */
.feed-column {
    max-width: 680px;
    margin: 0 auto;
}

/* Scrollbar styling for sidebars */
.right-sidebar::-webkit-scrollbar {
    width: 4px;
}
.right-sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}
.right-sidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.12) transparent;
}

/* Responsive Overrides */
@media (min-width: 992px) {
    body {
        padding-bottom: 0; /* Remove bottom padding on desktop */
    }
    .bottom-nav {
        display: none; /* Hide bottom nav on desktop */
    }
    .left-sidebar, .right-sidebar {
        display: block !important;
    }
}

/* Post Cards */
.post-header .avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}
.post-header .user-name {
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
}
.post-header .post-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.post-content p {
    font-size: 0.95rem;
    line-height: 1.5;
}
.post-image {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    max-height: 500px;
}
.post-actions {
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    padding: 8px 0;
    margin-top: 12px;
}
.action-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.action-btn:hover {
    background: rgba(107, 114, 128, 0.1);
    color: var(--primary-color);
}

/* Stories */
.stories-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
}
.stories-container::-webkit-scrollbar {
    display: none;
}
.story-card {
    min-width: 110px;
    height: 180px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    box-shadow: var(--glass-shadow);
}
.story-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
}
.story-avatar {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    z-index: 2;
    object-fit: cover;
}
.story-name {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Modals */
.modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    color: var(--text-main);
}
.modal-header {
    border-bottom: 1px solid var(--glass-border);
}
.modal-footer {
    border-top: 1px solid var(--glass-border);
}

/* Forms */
.form-control {
    background-color: var(--bg-color);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}
.form-control:focus {
    background-color: var(--bg-color);
    color: var(--text-main);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.25);
}

/* Profile specific */
.cover-photo {
    height: 250px;
    width: 100%;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
}
.profile-avatar-container {
    margin-top: -60px;
    padding-left: 20px;
    display: flex;
    align-items: flex-end;
    gap: 16px;
}
.profile-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid var(--bg-color);
    object-fit: cover;
    background: var(--glass-bg);
}

/* Directory Cards (Leaders/Lecturers) */
.directory-card {
    text-align: center;
    padding: 1.5rem;
}
.directory-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    border: 3px solid var(--primary-color);
}

/* Chat UI */
.chat-list {
    height: calc(100vh - var(--nav-height) - var(--bottom-nav-height) - 100px);
    overflow-y: auto;
}
.chat-window {
    height: calc(100vh - var(--nav-height) - var(--bottom-nav-height) - 100px);
    display: flex;
    flex-direction: column;
}
.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.msg-bubble {
    max-width: 75%;
    padding: 10px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.4;
}
.msg-sent {
    background: var(--primary-color);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.msg-received {
    background: rgba(107, 114, 128, 0.1);
    color: var(--text-main);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

/* Utilities */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}
.text-primary-custom {
    color: var(--primary-color) !important;
}

/* --- Interactive Features --- */

/* Search Auto-complete Dropdown */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--glass-shadow);
    z-index: 1050;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}
.search-dropdown.show {
    display: block;
}
.search-item {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--glass-border);
}
.search-item:last-child {
    border-bottom: none;
}
.search-item:hover {
    background: rgba(107, 114, 128, 0.1);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.custom-toast {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    color: var(--text-main);
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.custom-toast.show {
    transform: translateX(0);
    opacity: 1;
}
.custom-toast.success { border-left-color: var(--accent-color); }
.custom-toast.info { border-left-color: var(--secondary-color); }
.custom-toast.error { border-left-color: #ef4444; }

/* Skeleton Loading Animation */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}
.skeleton {
    background: linear-gradient(90deg, rgba(107, 114, 128, 0.1) 25%, rgba(107, 114, 128, 0.2) 50%, rgba(107, 114, 128, 0.1) 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 8px;
}
.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}
.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}
.skeleton-block {
    height: 150px;
    width: 100%;
}

/* Utilities */
.cursor-pointer {
    cursor: pointer;
}
.mention-tag, .hash-tag {
    color: var(--primary-color);
    font-weight: 500;
    cursor: pointer;
}
.mention-tag:hover, .hash-tag:hover {
    text-decoration: underline;
}

/* Comment Section */
.comment-section {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
}
.comment-section.open {
    max-height: 500px;
    padding-top: 12px;
}
.comment-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    animation: fadeInUp 0.3s ease;
}
.comment-item .comment-bubble {
    background: rgba(107, 114, 128, 0.08);
    padding: 8px 14px;
    border-radius: 0 14px 14px 14px;
    flex-grow: 1;
}
.comment-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
}
.comment-input-row input {
    flex-grow: 1;
    border: none;
    background: rgba(107, 114, 128, 0.08);
    border-radius: 20px;
    padding: 8px 16px;
    color: var(--text-main);
    font-size: 0.9rem;
}
.comment-input-row input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px 16px;
    align-self: flex-start;
}
.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Notification Mark as Read */
.notif-item {
    transition: background 0.3s ease, opacity 0.3s ease;
}
.notif-item.read {
    background: transparent !important;
}
.notif-item.read .text-primary.fw-bold {
    color: var(--text-muted) !important;
    font-weight: 400 !important;
}

/* RSVP Button States */
.rsvp-btn.registered {
    pointer-events: none;
}

/* Character Counter */
.char-counter {
    font-size: 0.75rem;
    text-align: right;
    transition: color 0.2s;
}
.char-counter.warning { color: #f59e0b; }
.char-counter.danger { color: #ef4444; }

/* Notification filter tabs */
.filter-tab {
    transition: all 0.2s ease;
}
.filter-tab.active-filter {
    background-color: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

/* FadeInUp animation */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   FACEBOOK NATIVE MOBILE EXPERIENCE STYLES
   ============================================================ */

/* Facebook Top Mobile Tabs Header */
.fb-mobile-tabs {
    display: none;
    background: var(--card-bg);
    border-bottom: 1px solid var(--glass-border);
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    z-index: 1025;
    height: 48px;
}

.fb-tab-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.3rem;
    position: relative;
    text-decoration: none;
    transition: color 0.2s ease;
}

.fb-tab-item:hover, .fb-tab-item.active {
    color: #1877F2;
}

.fb-tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15%;
    right: 15%;
    height: 3px;
    background-color: #1877F2;
    border-radius: 3px 3px 0 0;
}

/* Facebook Mobile Fixed Bottom Navbar */
.fb-mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--card-bg);
    border-top: 1px solid var(--glass-border);
    z-index: 1040;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.fb-bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.72rem;
    text-decoration: none;
    gap: 2px;
}

.fb-bottom-nav-item i {
    font-size: 1.3rem;
}

.fb-bottom-nav-item.active {
    color: #1877F2;
    font-weight: 700;
}

/* Media Queries for Mobile Phones (< 768px) */
@media (max-width: 768px) {
    body {
        padding-top: 104px !important; /* Top nav + Tab bar */
        padding-bottom: 65px !important; /* Bottom nav */
    }

    .fb-mobile-tabs {
        display: flex !important;
    }

    .fb-mobile-bottom-nav {
        display: flex !important;
    }

    .left-sidebar, .right-sidebar {
        display: none !important;
    }

    .feed-column {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }

    .glass-card {
        border-radius: 12px;
        margin-left: 0;
        margin-right: 0;
    }

    .main-wrapper {
        padding: 0 6px !important;
    }

    /* Mobile Stories Bar */
    .stories-container {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 8px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .story-card {
        min-width: 105px !important;
        height: 165px !important;
        scroll-snap-align: start;
        border-radius: 12px;
    }

    .story-card .avatar-ring {
        border: 2px solid #1877F2;
    }
}

/* --- Facebook Mobile Navigation Elements --- */

/* Top Mobile Sub-Tabs Bar (Hidden on Desktop >= 768px) */
.fb-mobile-tabs {
    display: none !important;
}

@media (max-width: 767.98px) {
    .fb-mobile-tabs {
        display: flex !important;
        justify-content: space-around;
        align-items: center;
        background: var(--card-bg);
        border-bottom: 1px solid var(--glass-border);
        position: sticky;
        top: 56px;
        z-index: 1020;
        padding: 4px 0;
    }
    .fb-mobile-tab-item, .fb-tab-item {
        color: var(--text-muted);
        font-size: 1.3rem;
        padding: 8px 16px;
        position: relative;
        text-decoration: none;
    }
    .fb-mobile-tab-item.active, .fb-tab-item.active {
        color: #1877F2;
        border-bottom: 3px solid #1877F2;
    }
}


/* ==========================================================================
   AUTHENTIC FACEBOOK MOBILE UI & DESIGN SYSTEM
   ========================================================================== */

/* Top Navigation Bar - Facebook Style */
.fb-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 54px;
    background: #ffffff;
    border-bottom: 1px solid #e4e6eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    z-index: 1030;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .fb-top-bar {
    background: #242526;
    border-color: #393a3b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.fb-brand-title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: #1877F2 !important;
    letter-spacing: -1.2px;
    text-decoration: none;
    line-height: 1;
}

.fb-circle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e4e6eb;
    color: #050505;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    border: none;
    text-decoration: none;
    position: relative;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: background 0.15s ease, transform 0.1s ease;
}

/* Touch hit-area expansion for effortless mobile tapping */
.fb-circle-btn::before {
    content: '';
    position: absolute;
    top: -6px;
    bottom: -6px;
    left: -6px;
    right: -6px;
    border-radius: 50%;
    z-index: 1;
}

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

.fb-circle-btn i {
    pointer-events: none;
    position: relative;
    z-index: 2;
}

.fb-circle-btn:hover {
    background: #d8dadf;
    color: #050505;
}

[data-theme="dark"] .fb-circle-btn {
    background: #3a3b3c;
    color: #e4e6eb;
}

[data-theme="dark"] .fb-circle-btn:hover {
    background: #4e4f50;
    color: #ffffff;
}

.fb-circle-btn .fb-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #e41e3f;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    padding: 0 5px;
    height: 18px;
    min-width: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    pointer-events: none;
    z-index: 3;
}

/* Facebook Desktop Center Navigation Tabs */
.fb-top-nav-tabs {
    display: none;
    align-items: center;
    justify-content: center;
    height: 100%;
    flex: 1 1 auto;
    min-width: 320px;
    max-width: 580px;
    margin: 0 auto;
    gap: 8px;
}

@media (min-width: 768px) {
    .fb-top-nav-tabs {
        display: flex !important;
    }
}

.fb-nav-tab {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 1 0 !important;
    min-width: 60px !important;
    max-width: 105px !important;
    height: 48px !important;
    font-size: 1.45rem !important;
    text-decoration: none !important;
    border-radius: 10px !important;
    position: relative !important;
    transition: background 0.15s ease, transform 0.15s ease !important;
}

/* Vibrant Distinctive Colors for Each Top Navigation Icon */
.fb-nav-tab i {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.2s ease;
}

.fb-nav-tab i.bi-house-door-fill {
    color: #1877F2 !important; /* Home: Blue */
}
.fb-nav-tab i.bi-camera-reels-fill {
    color: #E41E3F !important; /* Watch & Reels: Crimson Red */
}
.fb-nav-tab i.bi-people-fill,
.fb-nav-tab i.bi-award-fill {
    color: #F59E0B !important; /* Leaders: Amber Gold */
}
.fb-nav-tab i.bi-person-video3,
.fb-nav-tab i.bi-diagram-3-fill {
    color: #0EA5E9 !important; /* Faculty & Staff: Sky Blue */
}
.fb-nav-tab i.bi-search-heart-fill,
.fb-nav-tab i.bi-search-heart {
    color: #E11D48 !important; /* Lost & Found: Rose Red */
}
.fb-nav-tab i.bi-shop {
    color: #10B981 !important; /* Marketplace: Emerald Green */
}

/* Hover effects with colored tints and scaling */
.fb-nav-tab:hover i {
    transform: scale(1.18);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.18));
}

.fb-nav-tab:hover {
    background: #f0f2f5;
}

[data-theme="dark"] .fb-nav-tab:hover {
    background: #3a3b3c;
}

.fb-nav-tab:has(i.bi-house-door-fill):hover {
    background: rgba(24, 119, 242, 0.12) !important;
}
.fb-nav-tab:has(i.bi-camera-reels-fill):hover {
    background: rgba(228, 30, 63, 0.12) !important;
}
.fb-nav-tab:has(i.bi-people-fill):hover,
.fb-nav-tab:has(i.bi-award-fill):hover {
    background: rgba(245, 158, 11, 0.12) !important;
}
.fb-nav-tab:has(i.bi-person-video3):hover,
.fb-nav-tab:has(i.bi-diagram-3-fill):hover {
    background: rgba(14, 165, 233, 0.12) !important;
}
.fb-nav-tab:has(i.bi-search-heart-fill):hover,
.fb-nav-tab:has(i.bi-search-heart):hover {
    background: rgba(225, 29, 72, 0.12) !important;
}
.fb-nav-tab:has(i.bi-shop):hover {
    background: rgba(16, 185, 129, 0.12) !important;
}

/* Active Tab indicator matching the tab's specific brand color */
.fb-nav-tab.active {
    border-radius: 0 !important;
}
.fb-nav-tab.active i {
    transform: scale(1.12);
}

.fb-nav-tab.active:has(i.bi-house-door-fill),
.fb-nav-tab.active[title*="Home"] {
    border-bottom: 3px solid #1877F2 !important;
}
.fb-nav-tab.active:has(i.bi-camera-reels-fill),
.fb-nav-tab.active[title*="Watch"] {
    border-bottom: 3px solid #E41E3F !important;
}
.fb-nav-tab.active:has(i.bi-people-fill),
.fb-nav-tab.active:has(i.bi-award-fill),
.fb-nav-tab.active[title*="Leaders"],
.fb-nav-tab.active[title*="DITSO"] {
    border-bottom: 3px solid #F59E0B !important;
}
.fb-nav-tab.active:has(i.bi-person-video3),
.fb-nav-tab.active:has(i.bi-diagram-3-fill),
.fb-nav-tab.active[title*="Faculty"],
.fb-nav-tab.active[title*="Directory"] {
    border-bottom: 3px solid #0EA5E9 !important;
}
.fb-nav-tab.active:has(i.bi-search-heart-fill),
.fb-nav-tab.active:has(i.bi-search-heart),
.fb-nav-tab.active[title*="Lost"],
.fb-nav-tab.active[title*="Found"] {
    border-bottom: 3px solid #E11D48 !important;
}
.fb-nav-tab.active:has(i.bi-shop),
.fb-nav-tab.active[title*="Marketplace"] {
    border-bottom: 3px solid #10B981 !important;
}

/* Colorful Top Action Circle Buttons */
.fb-circle-btn i.bi-plus-lg {
    color: #1877F2 !important;
    font-weight: 800;
}
.fb-circle-btn i.bi-chat-dots-fill {
    color: #1877F2 !important;
}
.fb-circle-btn i.bi-moon-stars-fill,
.fb-circle-btn i.bi-sun-fill {
    color: #F59E0B !important;
}
.fb-circle-btn i.bi-search {
    color: #1877F2 !important;
}

/* Facebook Plus Dropdown Menu */
.fb-plus-dropdown {
    width: 320px !important;
    max-width: 92vw !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    border: 1px solid #e4e6eb !important;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.2) !important;
    padding: 10px !important;
    margin-top: 8px !important;
    z-index: 1060 !important;
}

[data-theme="dark"] .fb-plus-dropdown {
    background: #242526 !important;
    border-color: #393a3b !important;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.6) !important;
}

.fb-dropdown-item {
    padding: 9px 12px !important;
    border-radius: 10px !important;
    transition: background 0.15s ease, transform 0.1s ease;
    color: var(--text-main) !important;
    cursor: pointer;
    text-decoration: none !important;
}

.fb-dropdown-item:hover, .fb-dropdown-item:focus {
    background: #f0f2f5 !important;
    transform: translateX(2px);
}

[data-theme="dark"] .fb-dropdown-item:hover,
[data-theme="dark"] .fb-dropdown-item:focus {
    background: #3a3b3c !important;
}

.fb-menu-icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.15rem;
}

.fb-dropdown-heading {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #65676b;
    padding: 6px 10px 4px;
    text-transform: uppercase;
}

[data-theme="dark"] .fb-dropdown-heading {
    color: #b0b3b8;
}

/* Facebook Page Header Card (High-Contrast & Clean) */
.fb-page-header-card {
    background: #ffffff !important;
    border: 1px solid #e4e6eb !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    color: #050505 !important;
}

[data-theme="dark"] .fb-page-header-card {
    background: #242526 !important;
    border-color: #393a3b !important;
    color: #e4e6eb !important;
}

.fb-header-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Lost & Found Hub Styling */
.lf-item-card {
    background: #ffffff;
    border: 1px solid #e4e6eb;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.lf-item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .lf-item-card {
    background: #242526;
    border-color: #393a3b;
}

.lf-badge-lost {
    background: #fee2e2;
    color: #dc2626;
    font-weight: 700;
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 0.76rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.lf-badge-found {
    background: #dcfce7;
    color: #16a34a;
    font-weight: 700;
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 0.76rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.lf-badge-returned {
    background: #e0e7ff;
    color: #4338ca;
    font-weight: 700;
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 0.76rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

[data-theme="dark"] .lf-badge-lost {
    background: rgba(220, 38, 38, 0.2);
    color: #f87171;
}

[data-theme="dark"] .lf-badge-found {
    background: rgba(22, 163, 74, 0.2);
    color: #4ade80;
}

[data-theme="dark"] .lf-badge-returned {
    background: rgba(67, 56, 202, 0.25);
    color: #a5b4fc;
}

/* Facebook Messenger Mobile Style */
.messenger-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px 6px;
}

.messenger-title {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #050505;
    margin: 0;
}

[data-theme="dark"] .messenger-title {
    color: #e4e6eb;
}

.messenger-search-bar {
    background: #f0f2f5;
    border-radius: 24px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 14px 10px;
    border: none;
}

[data-theme="dark"] .messenger-search-bar {
    background: #3a3b3c;
}

.messenger-search-input {
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    color: #050505;
    font-size: 0.95rem;
}

[data-theme="dark"] .messenger-search-input {
    color: #e4e6eb;
}

.messenger-ai-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
}

.ai-sparkle-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ai-sparkle-circle:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.6);
}

.messenger-online-tray {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 4px 14px 12px;
    scrollbar-width: none;
}

.messenger-online-tray::-webkit-scrollbar {
    display: none;
}

.online-tray-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    width: 68px;
}

.online-avatar-wrap {
    position: relative;
    width: 58px;
    height: 58px;
    margin-bottom: 4px;
}

.online-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.online-dot-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 15px;
    height: 15px;
    background: #31a24c;
    border: 2.5px solid #ffffff;
    border-radius: 50%;
}

[data-theme="dark"] .online-dot-badge {
    border-color: #242526;
}

.online-tray-name {
    font-size: 0.76rem;
    color: #050505;
    text-align: center;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

[data-theme="dark"] .online-tray-name {
    color: #b0b3b8;
}

.note-bubble-pill {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: #3a3b3c;
    color: #fff;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 12px;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.msg-filter-pills {
    display: flex;
    gap: 8px;
    padding: 0 14px 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.msg-filter-pills::-webkit-scrollbar {
    display: none;
}

.msg-filter-pill {
    background: #e4e6eb;
    color: #050505;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    border: none;
}

.msg-filter-pill.active {
    background: #e7f3ff;
    color: #1877f2;
}

[data-theme="dark"] .msg-filter-pill {
    background: #3a3b3c;
    color: #e4e6eb;
}

[data-theme="dark"] .msg-filter-pill.active {
    background: #263951;
    color: #2d88ff;
}

.messenger-chat-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.15s ease;
}

.messenger-chat-row:hover {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .messenger-chat-row:hover {
    background: rgba(255, 255, 255, 0.06);
}

.messenger-unread-dot {
    width: 10px;
    height: 10px;
    background: #1877f2;
    border-radius: 50%;
    flex-shrink: 0;
}

.floating-meta-ai-btn {
    position: fixed;
    bottom: 68px;
    right: 18px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: conic-gradient(from 180deg at 50% 50%, #0064e0 0deg, #d300c5 90deg, #ff7a00 180deg, #00c950 270deg, #0064e0 360deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    z-index: 1020;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.floating-meta-ai-btn:hover {
    transform: scale(1.08);
}

.floating-meta-ai-inner {
    width: 38px;
    height: 38px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1877f2;
}

[data-theme="dark"] .floating-meta-ai-inner {
    background: #242526;
}

/* Facebook Composer Box */
.fb-composer-box {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e4e6eb;
    padding: 10px 14px;
    margin-bottom: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .fb-top-bar {
        border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    }
    .fb-composer-box {
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        border-top: none !important;
        border-bottom: 1px solid #e4e6eb !important;
        margin-top: 0 !important;
        margin-bottom: 8px !important;
        padding: 4px 14px 10px !important;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    }
    .fb-feed-card {
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        margin-bottom: 8px !important;
    }
    .fb-stories-section {
        padding: 2px 8px 8px !important;
    }
}

[data-theme="dark"] .fb-composer-box {
    background: #242526;
    border-color: #393a3b;
}

.fb-composer-input {
    background: #f0f2f5;
    border-radius: 50px;
    padding: 9px 18px;
    color: #65676b;
    font-size: 0.95rem;
    flex-grow: 1;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.2s;
    user-select: none;
}

.fb-composer-input:hover {
    background: #e4e6eb;
}

[data-theme="dark"] .fb-composer-input {
    background: #3a3b3c;
    color: #b0b3b8;
}

[data-theme="dark"] .fb-composer-input:hover {
    background: #4e4f50;
}

/* Stories Tray */
.fb-stories-section {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 12px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.fb-stories-section::-webkit-scrollbar {
    display: none;
}

/* Create Story Card */
.fb-create-story-card {
    width: 112px;
    min-width: 112px;
    height: 188px;
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e4e6eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fb-create-story-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .fb-create-story-card {
    background: #242526;
    border-color: #393a3b;
}

.create-story-img {
    width: 100%;
    height: 125px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.fb-create-story-card:hover .create-story-img {
    transform: scale(1.04);
}

.create-story-bottom {
    height: 63px;
    background: #ffffff;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 8px;
}

[data-theme="dark"] .create-story-bottom {
    background: #242526;
}

.create-story-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #1877F2;
    border: 3px solid #ffffff;
    position: absolute;
    top: -17px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.15rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .create-story-btn {
    border-color: #242526;
}

.create-story-label {
    font-size: 12px;
    font-weight: 700;
    color: #050505;
    text-align: center;
    line-height: 1.2;
}

[data-theme="dark"] .create-story-label {
    color: #e4e6eb;
}

/* Friend Story Card */
.fb-story-card {
    width: 112px;
    min-width: 112px;
    height: 188px;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-touch-callout: none !important;
}

.fb-story-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.fb-story-video-card {
    background-color: #0b0f19;
}

.fb-story-card-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}

.fb-story-play-icon {
    transition: transform 0.2s ease, background 0.2s ease;
}

.fb-story-card:hover .fb-story-play-icon {
    transform: translate(-50%, -50%) scale(1.15) !important;
    background: rgba(24, 119, 242, 0.9) !important;
    border-color: #ffffff !important;
}

.fb-story-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, transparent 40%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
    pointer-events: none;
}

.fb-story-ring-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 3.5px solid #1877F2;
    padding: 1.5px;
    background: #ffffff;
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    object-fit: cover;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.fb-story-username {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    z-index: 2;
    color: #ffffff;
    font-weight: 700;
    font-size: 12px;
    line-height: 1.2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* Multi-story count badge on story card */
.fb-story-count-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    z-index: 3;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* ============================================================
   FACEBOOK / INSTAGRAM FULL STORY VIEWER MODAL
   ============================================================ */
.fb-story-modal {
    background: rgba(0, 0, 0, 0.92) !important;
    backdrop-filter: blur(12px) !important;
}

.fb-story-dialog {
    max-width: 440px;
    margin: 1.5rem auto;
}

@media (max-width: 576px) {
    .fb-story-dialog {
        max-width: 100vw;
        height: 100vh;
        margin: 0;
    }
}

.fb-story-content {
    background: #000000 !important;
    border-radius: 20px !important;
    overflow: visible !important;
}

@media (max-width: 576px) {
    .fb-story-content {
        border-radius: 0 !important;
        height: 100vh !important;
    }
}

.story-viewer-frame {
    height: 720px;
    max-height: calc(100vh - 40px);
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    background-color: #000000;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-touch-callout: none !important;
    touch-action: none !important;
}

.fb-story-modal,
.fb-story-modal * {
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-user-drag: none !important;
}

.story-reply-input {
    -webkit-touch-callout: default !important;
    -webkit-user-select: text !important;
    user-select: text !important;
}

@media (max-width: 576px) {
    .story-viewer-frame {
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
}

/* Segmented Progress Bars */
.story-progress-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 4px;
    padding: 12px 14px 6px;
    z-index: 20;
}

.story-progress-segment {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.story-progress-fill {
    height: 100%;
    width: 0%;
    background: #ffffff;
    border-radius: 3px;
    transition: width linear;
}

/* Top Header */
.story-top-header {
    position: absolute;
    top: 22px;
    left: 0;
    right: 0;
    padding: 4px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 20;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
}

.story-ctrl-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    backdrop-filter: blur(6px);
    transition: all 0.15s ease;
    cursor: pointer;
}

.story-ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    transform: scale(1.05);
}

/* Desktop Prev / Next Navigation Floating Buttons */
.story-desktop-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    z-index: 1060;
    transition: all 0.2s ease;
}

.story-desktop-prev {
    left: -60px;
}

.story-desktop-next {
    right: -60px;
}

.story-desktop-nav-btn:hover {
    background: rgba(255, 255, 255, 0.45);
    transform: translateY(-50%) scale(1.1);
    color: #ffffff;
}

@media (max-width: 600px) {
    .story-desktop-nav-btn {
        display: none !important;
    }
}

/* Tap Zones */
.story-tap-zone {
    position: absolute;
    top: 65px;
    bottom: 65px;
    z-index: 15;
    pointer-events: none !important;
}

.story-tap-left {
    left: 0;
    width: 35%;
}

.story-tap-right {
    right: 0;
    width: 65%;
}

/* Media Containers */
.story-media-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    z-index: 5;
    pointer-events: none !important;
    -webkit-touch-callout: none !important;
    user-select: none !important;
}

.story-media-element {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
    pointer-events: none !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-user-drag: none !important;
}

/* Text Status Container */
.story-text-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 24px;
    z-index: 5;
}

.story-text-content {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.45;
    word-break: break-word;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    max-width: 90%;
}

/* Caption Overlay */
.story-caption-overlay {
    position: absolute;
    bottom: 55px;
    left: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 500;
    text-align: center;
    z-index: 18;
    line-height: 1.35;
    max-height: 100px;
    overflow-y: auto;
}

/* Hold to Freeze & Hide UI Controls */
.story-top-header,
.story-bottom-controls,
.story-progress-container,
.story-caption-overlay,
.story-desktop-nav-btn {
    transition: opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1), transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.story-viewer-frame.is-holding .story-top-header {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(-8px);
}

.story-viewer-frame.is-holding .story-bottom-controls {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(8px);
}

.story-viewer-frame.is-holding .story-progress-container {
    opacity: 0 !important;
    pointer-events: none !important;
}

.story-viewer-frame.is-holding .story-caption-overlay {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Facebook Bottom Bar Matching Screenshot */
.story-bottom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 25;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0,0,0,0.4) 70%, transparent 100%);
}

.story-bottom-action-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.story-bottom-action-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.06);
}

.story-reply-capsule {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 24px;
    padding: 2px 14px;
    height: 42px;
    transition: all 0.2s ease;
}

.story-reply-capsule:focus-within {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.5);
}

.story-reply-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 500;
}

.story-reply-input::placeholder {
    color: rgba(255, 255, 255, 0.75);
    font-weight: 400;
}

.story-send-reply-btn {
    background: #1877F2;
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    margin-left: 6px;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s;
}

.story-send-reply-btn:hover {
    transform: scale(1.1);
}

/* Quick Reaction Buttons */
.story-reactions-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.story-reaction-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    font-size: 24px;
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.story-reaction-btn:hover {
    transform: scale(1.25);
}

.story-reaction-btn:active {
    transform: scale(0.9);
}

.reaction-like-bg {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #1877F2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(24, 119, 242, 0.4);
}

/* Floating Reaction Bubbles Animation */
.floating-reactions-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 40;
}

.floating-bubble-emoji {
    position: absolute;
    bottom: 60px;
    font-size: 32px;
    pointer-events: none;
    animation: floatEmojiBubble 1.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes floatEmojiBubble {
    0% {
        opacity: 1;
        transform: translateY(0) scale(0.5) rotate(0deg);
    }
    50% {
        opacity: 0.95;
        transform: translateY(-180px) scale(1.3) rotate(var(--rot, 12deg));
    }
    100% {
        opacity: 0;
        transform: translateY(-380px) scale(1.6) rotate(var(--rot, -15deg));
    }
}

/* Facebook Feed Card */
.fb-feed-card {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e4e6eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    margin-bottom: 12px;
    overflow: hidden;
}

[data-theme="dark"] .fb-feed-card {
    background: #242526;
    border-color: #393a3b;
}

.fb-post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 6px;
}

.fb-post-author-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.fb-post-author-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #050505;
    text-decoration: none;
}

[data-theme="dark"] .fb-post-author-name {
    color: #e4e6eb;
}

.fb-post-meta {
    font-size: 0.78rem;
    color: #65676b;
    display: flex;
    align-items: center;
    gap: 4px;
}

[data-theme="dark"] .fb-post-meta {
    color: #b0b3b8;
}

.fb-post-body {
    padding: 6px 14px 10px;
    font-size: 0.95rem;
    color: #050505;
    line-height: 1.45;
}

[data-theme="dark"] .fb-post-body {
    color: #e4e6eb;
}

.fb-post-media {
    width: 100%;
    max-height: 540px;
    object-fit: cover;
    display: block;
}

.fb-post-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    font-size: 0.82rem;
    color: #65676b;
    border-bottom: 1px solid #e4e6eb;
}

[data-theme="dark"] .fb-post-stats {
    color: #b0b3b8;
    border-color: #393a3b;
}

.fb-post-actions {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 4px 6px;
}

.fb-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 0;
    border: none;
    background: transparent;
    color: #65676b;
    font-weight: 600;
    font-size: 0.88rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    text-decoration: none;
}

.fb-action-btn:hover {
    background: #f0f2f5;
    color: #050505;
}

[data-theme="dark"] .fb-action-btn {
    color: #b0b3b8;
}

[data-theme="dark"] .fb-action-btn:hover {
    background: #3a3b3c;
    color: #ffffff;
}

.fb-action-btn.liked {
    color: #1877F2 !important;
    font-weight: 700;
}

/* Facebook Clean Action Bar (Screenshot 2) */
.fb-post-stats-row {
    background: transparent;
    border-top: 1px solid #e4e6eb;
    border-bottom: 1px solid #e4e6eb;
    padding: 6px 14px;
}

[data-theme="dark"] .fb-post-stats-row {
    border-color: #393a3b;
}

.btn-clean-action {
    background: transparent;
    border: none;
    padding: 6px 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #65676b;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    text-decoration: none;
}

.btn-clean-action:hover {
    background: #f0f2f5;
    color: #050505;
}

[data-theme="dark"] .btn-clean-action {
    color: #b0b3b8;
}

[data-theme="dark"] .btn-clean-action:hover {
    background: #3a3b3c;
    color: #ffffff;
}

.btn-clean-action.liked {
    color: #1877F2 !important;
}

/* Facebook Mobile Comments Bottom Sheet Drawer (Screenshot 1) */
.fb-comments-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.fb-comments-drawer {
    width: 100%;
    max-width: 600px;
    height: 82vh;
    max-height: 85vh;
    background: #ffffff;
    border-radius: 18px 18px 0 0;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25);
    animation: drawerSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

[data-theme="dark"] .fb-comments-drawer {
    background: #242526;
    color: #e4e6eb;
}

@keyframes drawerSlideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.drawer-drag-handle {
    width: 42px;
    height: 5px;
    background: #ccd0d5;
    border-radius: 3px;
    margin: 10px auto 4px;
}

[data-theme="dark"] .drawer-drag-handle {
    background: #4e4f50;
}

.drawer-header {
    background: inherit;
}

.drawer-body {
    background: inherit;
}

.drawer-footer {
    background: #ffffff;
}

[data-theme="dark"] .drawer-footer {
    background: #242526;
    border-color: #393a3b !important;
}

.drawer-comment-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
}

.drawer-comment-avatar {
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.drawer-comment-content {
    flex-grow: 1;
    min-width: 0;
}

.drawer-comment-author {
    font-weight: 700;
    color: #050505;
    white-space: nowrap;
}

[data-theme="dark"] .drawer-comment-author {
    color: #e4e6eb;
}

.drawer-comment-text {
    color: #050505;
    margin-top: 1px;
    line-height: 1.35;
    word-break: break-word;
}

[data-theme="dark"] .drawer-comment-text {
    color: #e4e6eb;
}

.drawer-comment-actions-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
}

.drawer-reply-btn {
    background: transparent;
    border: none;
    padding: 0;
    font-weight: 700;
    color: #65676b;
    cursor: pointer;
}

.drawer-reply-btn:hover {
    text-decoration: underline;
}

[data-theme="dark"] .drawer-reply-btn {
    color: #b0b3b8;
}

.drawer-action-icon-btn {
    background: transparent;
    border: none;
    padding: 0;
    color: #65676b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: transform 0.15s ease, color 0.15s ease;
}

.drawer-action-icon-btn:hover {
    color: #1877F2;
    transform: scale(1.15);
}

[data-theme="dark"] .drawer-action-icon-btn {
    color: #b0b3b8;
}

.drawer-view-replies-toggle {
    background: transparent;
    border: none;
    padding: 1px 0;
    font-weight: 600;
    color: #65676b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.drawer-view-replies-toggle:hover {
    text-decoration: underline;
}

[data-theme="dark"] .drawer-view-replies-toggle {
    color: #b0b3b8;
}

.drawer-nested-replies-list {
    margin-left: 8px;
    padding-left: 8px;
    border-left: 1.5px solid #dcdfe3;
    margin-top: 4px;
}

[data-theme="dark"] .drawer-nested-replies-list {
    border-color: #3e4042;
}

/* Facebook Authentic Comment Section */
.comment-section {
    border-top: 1px solid #e4e6eb;
    padding: 10px 14px 14px;
    background: transparent;
}

[data-theme="dark"] .comment-section {
    border-color: #393a3b;
}

.comments-list {
    margin-bottom: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.fb-comment-bubble {
    background: #f0f2f5;
    border-radius: 18px;
    padding: 8px 14px;
    display: inline-block;
    max-width: 100%;
}

[data-theme="dark"] .fb-comment-bubble {
    background: #3a3b3c;
}

.fb-comment-author {
    font-weight: 700;
    font-size: 0.85rem;
    color: #050505;
    margin-bottom: 2px;
}

[data-theme="dark"] .fb-comment-author {
    color: #e4e6eb;
}

.fb-comment-text {
    font-size: 0.88rem;
    color: #050505;
    line-height: 1.35;
    word-break: break-word;
}

[data-theme="dark"] .fb-comment-text {
    color: #e4e6eb;
}

.fb-comment-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 3px;
    margin-left: 10px;
    font-size: 0.72rem;
    color: #65676b;
    font-weight: 600;
}

[data-theme="dark"] .fb-comment-actions {
    color: #b0b3b8;
}

.comment-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-top: 6px;
}

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

.comment-input-box-wrapper {
    position: relative;
    flex-grow: 1;
    display: flex;
    align-items: center;
    background: #f0f2f5;
    border-radius: 22px;
    padding: 3px 6px 3px 14px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

[data-theme="dark"] .comment-input-box-wrapper {
    background: #3a3b3c;
}

.comment-input-box-wrapper:focus-within {
    background: #ffffff;
    border-color: #1877F2;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.2);
}

[data-theme="dark"] .comment-input-box-wrapper:focus-within {
    background: #242526;
    border-color: #2e89ff;
    box-shadow: 0 0 0 2px rgba(46, 137, 255, 0.25);
}

.comment-input-box-wrapper .comment-input {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 7px 0 !important;
    font-size: 0.9rem !important;
    color: #050505 !important;
    width: 100% !important;
}

[data-theme="dark"] .comment-input-box-wrapper .comment-input {
    color: #e4e6eb !important;
}

.comment-input-box-wrapper .comment-input::placeholder {
    color: #65676b;
}

[data-theme="dark"] .comment-input-box-wrapper .comment-input::placeholder {
    color: #b0b3b8;
}

.comment-input-box-wrapper .submit-comment-btn {
    background: #1877F2;
    color: #ffffff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.comment-input-box-wrapper .submit-comment-btn:hover {
    background: #166fe5;
    transform: scale(1.06);
}

/* Facebook Bottom Navigation Bar - MOBILE ONLY (< 768px) */
.fb-mobile-bottom-bar {
    display: none !important;
}

@media (max-width: 767.98px) {
    .fb-mobile-bottom-bar {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 52px !important;
        background: #ffffff !important;
        border-top: 1px solid #e4e6eb !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-around !important;
        z-index: 1040 !important;
        box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.05) !important;
        padding-bottom: env(safe-area-inset-bottom);
    }

    [data-theme="dark"] .fb-mobile-bottom-bar {
        background: #242526 !important;
        border-color: #393a3b !important;
        box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.2) !important;
    }
}

.fb-bottom-btn {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #65676b;
    font-size: 1.45rem;
    position: relative;
    text-decoration: none;
    transition: color 0.15s ease;
}

[data-theme="dark"] .fb-bottom-btn {
    color: #b0b3b8;
}

.fb-bottom-btn:hover {
    color: #1877F2;
}

.fb-bottom-btn.active {
    color: #1877F2 !important;
}

.fb-bottom-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15%;
    right: 15%;
    height: 3px;
    background: #1877F2;
    border-radius: 3px 3px 0 0;
}

.fb-bottom-btn .fb-badge {
    position: absolute;
    top: 5px;
    right: calc(50% - 16px);
    background: #e41e3f;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    padding: 0 4px;
    height: 17px;
    min-width: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
}

[data-theme="dark"] .fb-bottom-btn .fb-badge {
    border-color: #242526;
}

.fb-bottom-avatar-wrap {
    position: relative;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fb-bottom-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #65676b;
}

.fb-bottom-btn.active .fb-bottom-avatar {
    border-color: #1877F2;
}

.fb-bottom-avatar-menu {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 13px;
    height: 13px;
    background: #65676b;
    border-radius: 50%;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    border: 1.5px solid #ffffff;
}

/* Facebook Mobile Menu & Shortcuts Page */
.fb-menu-profile-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    border: 1px solid #e4e6eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    margin-bottom: 16px;
    transition: background 0.2s ease;
}

.fb-menu-profile-card:hover {
    background: #f0f2f5;
}

[data-theme="dark"] .fb-menu-profile-card {
    background: #242526;
    border-color: #393a3b;
}

[data-theme="dark"] .fb-menu-profile-card:hover {
    background: #3a3b3c;
}

.fb-shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.fb-shortcut-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 14px;
    text-decoration: none;
    color: #050505;
    border: 1px solid #e4e6eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.15s ease, background 0.15s ease;
}

.fb-shortcut-card:hover {
    background: #f0f2f5;
    color: #050505;
    transform: translateY(-2px);
}

[data-theme="dark"] .fb-shortcut-card {
    background: #242526;
    border-color: #393a3b;
    color: #e4e6eb;
}

[data-theme="dark"] .fb-shortcut-card:hover {
    background: #3a3b3c;
    color: #ffffff;
}

.fb-shortcut-title {
    font-weight: 700;
    font-size: 0.9rem;
}

.fb-logout-btn {
    width: 100%;
    background: #e4e6eb;
    color: #050505 !important;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 12px 16px;
    border-radius: 8px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.1s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.fb-logout-btn:hover {
    background: #d8dadf;
}

[data-theme="dark"] .fb-logout-btn {
    background: #3a3b3c;
    color: #e4e6eb !important;
}

/* Facebook Mobile Reels / Watch Video Player */
.fb-reels-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    background: #08090b;
    z-index: 100;
    margin: 0;
    padding: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.fb-reels-wrapper::-webkit-scrollbar {
    display: none;
}

.fb-reel-item {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow: hidden;
    background: #08090b;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

/* Stage container holding the video and its overlay controls */
.fb-reel-stage {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
}

/* Desktop Centered & Balanced Reel Card Layout */
@media (min-width: 768px) {
    .fb-reels-wrapper {
        background: #08090b !important;
    }

    .fb-reel-item {
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: #08090b !important;
        padding: 14px 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    /* Ambient blurred glow behind the reel card */
    .fb-reel-ambient-backdrop {
        position: absolute;
        inset: -50px;
        background-size: cover;
        background-position: center;
        filter: blur(65px) brightness(0.24);
        opacity: 0.55;
        pointer-events: none;
        z-index: 1;
        transform: scale(1.15);
    }

    /* Centered balanced 9:16 phone card */
    .fb-reel-stage {
        position: relative !important;
        z-index: 10 !important;
        width: 100% !important;
        max-width: 440px !important;
        height: calc(100vh - 54px - 28px) !important;
        max-height: 780px !important;
        aspect-ratio: 9 / 16 !important;
        border-radius: 20px !important;
        overflow: hidden !important;
        background: #000000 !important;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.12) !important;
        margin: 0 auto !important;
    }
}

.fb-reel-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    cursor: pointer;
}

.fb-reel-bg-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* Subtle top & bottom vignette gradient */
.fb-reel-gradient-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.65) 0%, transparent 100%);
    z-index: 5;
    pointer-events: none;
}

.fb-reel-gradient-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 220px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    z-index: 5;
    pointer-events: none;
}

.fb-reel-overlay-top {
    position: absolute;
    top: 14px;
    left: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 20;
    color: #ffffff;
}

.fb-reel-top-icon {
    color: #ffffff !important;
    text-decoration: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
    transition: transform 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fb-reel-top-icon:hover {
    transform: scale(1.1);
}

.fb-reel-overlay-actions {
    position: absolute;
    right: 12px;
    bottom: 85px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    z-index: 20;
}

.reel-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    text-decoration: none;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reel-action-btn:hover {
    transform: scale(1.15);
}

.reel-action-btn:active {
    transform: scale(0.9);
}

.reel-action-btn i {
    font-size: 28px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85));
}

.reel-action-count {
    font-size: 12px;
    font-weight: 700;
    margin-top: 3px;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
    line-height: 1;
    letter-spacing: -0.2px;
}

.fb-reel-overlay-bottom {
    position: absolute;
    bottom: 80px;
    left: 16px;
    right: 76px;
    z-index: 20;
    color: #ffffff;
}

.reel-author-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.reel-author-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.reel-author-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #ffffff;
    text-decoration: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
}

.reel-follow-btn {
    border: 1.5px solid rgba(255, 255, 255, 0.85);
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #ffffff;
    border-radius: 6px;
    padding: 2px 12px;
    font-weight: 700;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reel-follow-btn:hover {
    background: #ffffff;
    color: #000000;
}

.reel-caption {
    font-size: 0.88rem;
    line-height: 1.35;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fb-reel-upnext-pill {
    position: absolute;
    bottom: 18px;
    left: 14px;
    right: 14px;
    background: rgba(25, 25, 27, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 50px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 20;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.upnext-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    border: 1.5px solid #ffffff;
}

.upnext-text {
    font-size: 0.78rem;
    color: #ffffff;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upnext-close {
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.85;
    background: transparent;
    border: none;
    padding: 0 4px;
    line-height: 1;
}

/* Facebook Universal Mobile Bottom Bar */
.fb-mobile-bottom-bar {
    display: none !important;
}

@media (max-width: 767.98px) {
    .fb-mobile-bottom-bar {
        display: flex !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 52px !important;
        background: #ffffff !important;
        border-top: 1px solid #e4e6eb !important;
        align-items: center !important;
        justify-content: space-around !important;
        z-index: 1040 !important;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06) !important;
    }
    [data-theme="dark"] .fb-mobile-bottom-bar {
        background: #242526 !important;
        border-top-color: #393a3b !important;
    }
    .fb-bottom-btn {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        color: #65676b !important;
        font-size: 1.25rem !important;
        text-decoration: none !important;
        flex: 1 !important;
        height: 100% !important;
        transition: color 0.15s ease !important;
    }
    [data-theme="dark"] .fb-bottom-btn {
        color: #b0b3b8 !important;
    }
    .fb-bottom-btn.active, .fb-bottom-btn:hover {
        color: #1877F2 !important;
    }
    .fb-bottom-avatar-wrap {
        position: relative;
        width: 28px;
        height: 28px;
    }
    .fb-bottom-avatar {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        object-fit: cover;
    }
    .fb-bottom-avatar-menu {
        position: absolute;
        bottom: -2px;
        right: -2px;
        background: #e4e6eb;
        border-radius: 50%;
        width: 14px;
        height: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 8px;
        color: #050505;
        border: 1px solid #ffffff;
    }
}

/* ============================================================ */
/* FULL-SCREEN IMAGE LIGHTBOX & INTERACTIVE ZOOM VIEWER */
/* ============================================================ */
.fb-post-media-container {
    position: relative;
    cursor: zoom-in;
    background: #000000;
}

.fb-post-media-container:hover .fb-media-expand-hint {
    opacity: 1;
    transform: translateY(0);
}

.fb-media-expand-hint {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.78);
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(6px);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    z-index: 2;
}

.post-image-clickable {
    cursor: zoom-in !important;
    transition: opacity 0.18s ease;
}

.post-image-clickable:hover {
    opacity: 0.95;
}

.post-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8, 10, 14, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 999999 !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    animation: lbFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lbFadeIn {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

.lightbox-header {
    height: 64px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 80%, transparent 100%);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
}

.lightbox-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lightbox-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    backdrop-filter: blur(8px);
}

.lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #ffffff !important;
    transform: scale(1.08);
}

.lightbox-btn-close {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.45);
}

.lightbox-btn-close:hover {
    background: #ef4444;
    border-color: #ef4444;
}

.lightbox-viewport {
    flex: 1;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
    touch-action: none;
}

.lightbox-viewport.is-dragging {
    cursor: grabbing !important;
}

.lightbox-img-wrapper {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.05s ease-out;
    transform-origin: center center;
    will-change: transform;
    touch-action: none;
}

#lightboxMainImage {
    max-width: 90vw;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

.lightbox-hint-pill {
    position: absolute;
    bottom: 84px;
    background: rgba(0, 0, 0, 0.7);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.4s ease;
}

.lightbox-caption-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 28px 24px 18px;
    background: linear-gradient(0deg, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.5) 65%, transparent 100%);
    color: #ffffff;
    z-index: 15;
    max-height: 130px;
    overflow-y: auto;
}

.lightbox-caption-inner {
    max-width: 820px;
    margin: 0 auto;
    font-size: 0.9rem;
    line-height: 1.45;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

@media (max-width: 768px) {
    .lightbox-header {
        padding: 0 10px;
        height: 56px;
    }
    .lightbox-toolbar {
        gap: 4px;
    }
    .lightbox-btn {
        width: 32px;
        height: 32px;
        font-size: 0.88rem;
    }
    #lightboxZoomBadge,
    #lightboxOpenTabBtn,
    #lightboxResetBtn {
        display: none !important;
    }
    #lightboxMainImage {
        max-width: 96vw;
        max-height: 75vh;
    }
    .lightbox-hint-pill {
        bottom: 92px;
        font-size: 0.68rem;
    }
}

/* Real-Time Live Counter Pop / Pulse Animation (Facebook Style) */
@keyframes liveCounterPulse {
    0% { transform: scale(1); }
    35% { transform: scale(1.35); color: #1877f2; }
    70% { transform: scale(0.92); }
    100% { transform: scale(1); }
}

.like-count.live-pulse,
.comment-count.live-pulse,
.share-count.live-pulse {
    display: inline-block;
    animation: liveCounterPulse 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ============================================================
   SEAMLESS SPA ROUTER & INSTANT NAVIGATION ENGINE
   ============================================================ */
#appTopProgressBar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #1877F2 0%, #8b5cf6 50%, #ec4899 100%);
    z-index: 9999999;
    pointer-events: none;
    transition: width 0.22s cubic-bezier(0.1, 0.9, 0.2, 1), opacity 0.25s ease;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.8), 0 0 20px rgba(236, 72, 153, 0.5);
    opacity: 0;
}

.main-wrapper {
    transition: opacity 0.12s ease-in-out;
}

.main-wrapper.app-view-swapping {
    opacity: 0.85;
}

/* Micro-feedback on bottom navigation button tap */
.fb-bottom-btn {
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.15s ease !important;
}
.fb-bottom-btn:active {
    transform: scale(0.88);
}
.fb-bottom-btn.active i {
    animation: navPulse 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes navPulse {
    0% { transform: scale(0.9); }
    50% { transform: scale(1.18); }
    100% { transform: scale(1); }
}

/* Micro-feedback on top navigation tabs */
.fb-nav-tab {
    transition: transform 0.15s ease, color 0.15s ease !important;
}
.fb-nav-tab:active {
    transform: scale(0.92);
}

/* Left sidebar instant active link style */
.left-sidebar-nav .nav-link {
    transition: all 0.18s ease !important;
}
.left-sidebar-nav .nav-link:active {
    transform: translateX(4px);
}

