/**
 * Base Components Styles - extracted from base.html inline <style> blocks
 * Includes: Font Awesome fixes, font fallback, language switcher, search,
 * sidebar, modals, dashboard overrides, and misc UI components
 * Loaded async - critical layout handled by critical.css
 */
        /* Ensure Font Awesome icons display correctly */
        .fas, .far, .fab, .fa {
            font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
            font-weight: 900;
            -webkit-font-smoothing: antialiased;
            display: inline-block;
            font-style: normal;
            font-variant: normal;
            text-rendering: auto;
            line-height: 1;
        }
        .fab {
            font-family: "Font Awesome 6 Brands" !important;
            font-weight: 400;
        }
        .far {
            font-weight: 400;
        }
        /* Font fallback stack to prevent CLS during Inter font load */
        body{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif}
        body.no-sidebar .main-content{margin-left:0}
        /* CLS Fix: Home page layout - remove container padding so home-wrapper margin works */
        body.home-page .main-content.p-4{padding:0!important}
        body.home-page .row.h-100{height:auto!important}
        /* Language Switcher Active State */
        [aria-labelledby="languageSwitcher"] .dropdown-item.active,
        [aria-labelledby="languageSwitcherGuest"] .dropdown-item.active {
            background-color: rgba(255, 255, 255, 0.1) !important;
            color: var(--secondary-color) !important;
        }
        /* Language Switcher Hover State - Different from active */
        [aria-labelledby="languageSwitcher"] .dropdown-item:hover:not(.active),
        [aria-labelledby="languageSwitcherGuest"] .dropdown-item:hover:not(.active) {
            background-color: rgba(125, 25, 255, 0.15) !important;
            color: #ffffff !important;
        }
        #topNavbarSearch {
            max-width: 500px;
        }
        
        .navbar-right-group {
            margin-left: auto;
            gap: 1rem;
        }
        
        
        #topNavbarSearch .search-container {
            position: relative;
        }
        
        #topNavbarSearch .search-input {
            background-color: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.2);
            color: white;
            padding: 0.5rem 2.5rem 0.5rem 1rem;
            border-radius: 20px;
            font-size: 0.9rem;
            transition: all 0.3s ease;
        }
        
        #topNavbarSearch .search-input:focus {
            background-color: rgba(255, 255, 255, 0.15);
            border-color: rgba(255, 255, 255, 0.3);
            box-shadow: none;
            outline: none;
            color: white;
        }
        
        #topNavbarSearch .search-input::placeholder {
            color: rgba(255, 255, 255, 0.6);
        }
        
        #topNavbarSearch .search-icon {
            position: absolute;
            right: 1rem;
            top: 50%;
            transform: translateY(-50%);
            color: rgba(255, 255, 255, 0.6);
            pointer-events: none;
        }
        
        #topNavbarSearch .search-toggle-btn {
            background: transparent;
            border: none;
            color: rgba(255, 255, 255, 0.8);
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            margin-right: 0.5rem;
        }
        
        #topNavbarSearch .search-toggle-btn:hover {
            color: white;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 4px;
        }
        
        #topNavbarSearch .search-toggle-btn i {
            font-size: 1rem;
        }
        
        #topNavbarSearch .search-results {
            background: #2a2a2a;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            max-height: 400px;
            overflow-y: auto;
            z-index: 1050;
            top: calc(100% + 8px);
        }
        
        #topNavbarSearch .search-container::after,
        #topNavbarSearch::after,
        #topNavbarSearch .search-container::before,
        #topNavbarSearch::before {
            display: none !important;
        }
        
        #topNavbarSearch {
            border: none !important;
            outline: none !important;
        }
        
        #topNavbarSearch *,
        #topNavbarSearch *::before,
        #topNavbarSearch *::after {
            border: none !important;
            outline: none !important;
        }
        
        /* Remove any Bootstrap form-control borders specifically for search */
        #topNavbarSearch .form-control,
        #topNavbarSearch .form-control:focus,
        #topNavbarSearch .form-control:focus-visible {
            border: 1px solid rgba(255, 255, 255, 0.2) !important;
            outline: none !important;
            box-shadow: none !important;
        }
        
        /* Remove any navbar borders that might be causing issues */
        .navbar.navbar-dark {
            border-bottom: none !important;
        }
        
        .header-container {
            border-bottom: none !important;
        }
        
        
        .search-result-item {
            padding: 0.75rem 1rem;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            cursor: pointer;
            transition: background-color 0.2s ease;
            text-decoration: none;
            color: white;
            display: flex;
            align-items: center;
        }
        
        .search-result-item:hover {
            background-color: rgba(125, 25, 255, 0.1);
            color: white;
            text-decoration: none;
        }
        
        .search-result-item:last-child {
            border-bottom: none;
        }
        
        .search-result-item.active {
            background-color: rgba(125, 25, 255, 0.2);
        }
        
        .search-result-icon {
            margin-right: 0.75rem;
            font-size: 1.1rem;
            color: var(--primary-color, #7d19ff);
            min-width: 20px;
        }
        
        .search-result-content {
            flex: 1;
        }
        
        .search-result-title {
            font-weight: 500;
            margin-bottom: 0.25rem;
            font-size: 0.95rem;
        }
        
        .search-result-description {
            font-size: 0.8rem;
            color: rgba(255, 255, 255, 0.7);
            line-height: 1.3;
        }
        
        .search-no-results {
            padding: 1rem;
            text-align: center;
            color: rgba(255, 255, 255, 0.6);
            font-style: italic;
        }
        /* Default collapsed state for all screen sizes */
        #topNavbarSearch {
            max-width: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* Mobile responsive */
        @media (max-width: 768px) {
            #topNavbarSearch {
                max-width: 250px;
                margin: 0 0.5rem;
            }
            
            #topNavbarSearch .search-input {
                font-size: 0.85rem;
                padding: 0.4rem 2rem 0.4rem 0.8rem;
            }
            
            #topNavbarSearch .search-icon {
                right: 0.8rem;
            }
        }
        
        
        /* Desktop positioning - before upgrade button */
        @media (min-width: 769px) {
            #topNavbarSearch {
                position: absolute;
                right: 280px;
                top: 50%;
                transform: translateY(-50%);
                margin: 0;
            }
        }
        
        /* Mobile positioning - absolute position near hamburger menu */
        @media (max-width: 768px) {
            #topNavbarSearch {
                position: absolute;
                right: 45px;
                top: 50%;
                transform: translateY(-50%);
                margin: 0;
            }
        }
        
        /* Ensure it appears on desktop navbar */
        @media (min-width: 769px) {
            .mobile-menu-bottom .navbar-nav {
                flex-direction: row !important;
                align-items: center;
                gap: 0 !important;
            }
            
            .mobile-menu-bottom {
                position: static !important;
                background: transparent !important;
                border: none !important;
                padding: 0 !important;
            }
            
            .mobile-menu-bottom .navbar-nav > li {
                margin: 0 0 0 0.75rem !important;
                padding: 0 !important;
                flex-shrink: 0;
            }
            
            .mobile-menu-bottom .navbar-nav > li:first-child {
                margin-left: 0 !important;
            }
            
            .mobile-menu-bottom .nav-link {
                padding: 0.5rem !important;
            }
            
            .mobile-menu-bottom .btn-primary {
                margin: 0 !important;
            }
        }
        
        #topNavbarSearch.collapsed {
            flex-grow: 0;
            flex-shrink: 0;
            transition: none !important;
        }
        
        #topNavbarSearch.collapsed .search-input {
            opacity: 0;
            width: 0;
            padding: 0;
            border: none;
            pointer-events: none;
            position: absolute;
            visibility: hidden;
            transition: none !important;
        }
        
        #topNavbarSearch.collapsed .search-icon {
            display: none;
        }
        
        #topNavbarSearch.collapsed .search-toggle-btn {
            display: flex !important;
            margin-right: 1rem;
        }
        
        #topNavbarSearch.expanded {
            max-width: 300px;
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            z-index: 1000;
            background: #1a1a1a;
            border-radius: 25px;
            padding: 5px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            transition: none !important;
        }
        
        /* Desktop expanded positioning */
        @media (min-width: 769px) {
            #topNavbarSearch.expanded {
                right: 250px;
            }
        }
        
        #topNavbarSearch.expanded .search-input {
            opacity: 1;
            width: 100%;
            font-size: 0.9rem;
            visibility: visible;
            position: relative;
            transition: none !important;
        }
        
        #topNavbarSearch.expanded .search-toggle-btn {
            display: none !important;
        }

        /* Sidebar Section Styling */
        .sidebar-section {
                margin-bottom: 1rem;
                padding-bottom: 0.5rem;
                border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            }

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

        .sidebar-section-header {
                font-size: 0.7rem;
                font-weight: 500;
                text-transform: uppercase;
                color: rgba(255, 255, 255, 0.3);
                letter-spacing: 0.8px;
                margin-bottom: 0.75rem;
                padding: 0 1rem;
        }

        .sidebar-section:first-child .sidebar-section-header {
            margin-top: 0;
        }

        .sidebar-section .nav-link {
            margin-bottom: 0.125rem;
            border-radius: 0.375rem;
            transition: all 0.2s ease;
            padding: 0.625rem 1rem;
            font-size: 0.9rem;
        }

        .sidebar-section .nav-link:hover {
            background-color: rgba(255, 255, 255, 0.08);
        }

        .sidebar-section .nav-link.active {
            background-color: rgba(126, 58, 242, 0.15);
            color: #8b5cf6;
        }

        /* Navigation link content styling */
        .nav-link-content {
            display: flex;
            flex-direction: column;
            width: 100%;
        }

        .nav-link-main {
            display: flex;
            align-items: center;
            font-weight: 500;
        }

        .nav-link-description {
            font-size: 0.75rem;
            color: rgba(255, 255, 255, 0.6);
            margin-top: 0.25rem;
            margin-left: 1.75rem;
            line-height: 1.2;
        }

        .sidebar-section .nav-link.active .nav-link-description {
            color: rgba(139, 92, 246, 0.7);
        }

        .sidebar-section .nav-link:hover .nav-link-description {
            color: rgba(255, 255, 255, 0.8);
        }

        
        @media (max-width: 768px) {
            #topNavbarSearch.expanded {
                max-width: 250px;
                right: 50px;
            }
            
            #topNavbarSearch.expanded .search-input {
                font-size: 0.8rem;
            }
        }

        /* Desktop styles (above 768px) - dropdowns, spacing; layout from Section 11 */
        @media (min-width: 769px) {
            .navbar-nav {
                flex-direction: row !important;
                align-items: center;
            }

            .mobile-menu-bottom .navbar-nav {
                flex-direction: row !important;
                align-items: center;
                gap: 0 !important;
            }
            
            .mobile-menu-bottom .navbar-nav > li {
                margin: 0 0 0 0.75rem !important;
                padding: 0 !important;
                flex-shrink: 0;
            }
            
            .mobile-menu-bottom .navbar-nav > li:first-child {
                margin-left: 0 !important;
            }
            
            .mobile-menu-bottom .nav-link {
                padding: 0.5rem !important;
            }
            
            .mobile-menu-bottom .btn-primary {
                margin: 0 !important;
            }

            .navbar-nav.ms-auto .btn-primary {
                margin: 0;
                padding: 0.5rem 1rem;
            }

            .navbar-nav.ms-auto .nav-item.dropdown {
                margin-left: 0;
            }

            .navbar-nav.ms-auto .nav-item:has([data-bs-target="#whatsNewModal"]) {
                margin-right: 0;
            }

            .dropdown-menu {
                position: absolute !important;
                margin-top: 0.5rem;
            }

            .dropdown-menu.dropdown-menu-end {
                right: 0;
                left: auto;
            }
        }

                    /* Mobile styles */
        @media (max-width: 768px) {
            .mobile-menu-container {
                display: flex;
                flex-direction: column;
                height: 100%;
                overflow: hidden;
                min-height: 0;
            }
            
            /* Ensure all top-level nav items have consistent padding and alignment */
            .mobile-menu-top .navbar-nav > .nav-item {
                margin: 0 !important;
                padding: 0 !important;
            }
            
            .mobile-menu-top .navbar-nav > .nav-item > .nav-link,
            .mobile-menu-top .navbar-nav > .nav-item > .dropdown-toggle {
                display: block;
                width: 100%;
                padding: 12px 16px !important;
                margin: 0 !important;
                text-align: left;
                box-sizing: border-box;
            }
            
            /* Add left margin to gift icon (smiling face) in mobile */
            .navbar-nav .nav-item .nav-link[data-bs-target="#whatsNewModal"] {
                padding-left: 1rem;
            }

            .navbar-expand-md .navbar-collapse {
                display: none !important;
            }

            .navbar-expand-md .navbar-collapse.show {
                display: block !important;
                left: 0 !important;
            }

            .navbar-expand-md .navbar-toggler {
                display: block !important;
            }

            .navbar-expand-md .navbar-nav {
                flex-direction: column !important;
            }

            /* Hamburger menu styling */
            .navbar-toggler {
                padding: 8px;
                margin-right: 8px;
                border: none;
                background: transparent;
            }

            .navbar-toggler:focus {
                box-shadow: none;
                outline: none;
            }

            .navbar-toggler i,
            .navbar-toggler .navbar-icon-svg {
                font-size: 1.25rem;
                color: #fff;
            }
            .navbar-toggler .navbar-icon-svg {
                width: 1.25rem;
                height: 1.25rem;
                color: #fff;
            }

            /* Collapsed navbar styling */
            .navbar-collapse {
                position: fixed;
                top: 0;
                left: -100%;
                bottom: 0;
                width: 85%;
                max-width: 350px;
                height: 100vh;
                background: #1a1a1a;
                transition: left 0.3s ease;
                z-index: 1000;
                overflow: hidden;
            }

            /* Split navbar content into top and bottom sections */
            .navbar-collapse > .navbar-nav {
                flex: 1;
                overflow-y: auto;
                margin: 0;
                padding: 16px 0;
            }

            /* Bottom actions container */
            .navbar-collapse .navbar-nav.ms-auto {
                flex: 0 0 auto;
                margin-top: auto !important;
                padding: 16px;
                border-top: 1px solid rgba(255, 255, 255, 0.1);
                background: rgba(0, 0, 0, 0.2);
            }

            /* Adjust invite bot button in bottom section */
            .navbar-nav.ms-auto .nav-item .btn-primary {
                margin: 0 0 12px 0;
                width: 100%;
                justify-content: center;
                padding: 12px;
                background: linear-gradient(90deg, #7c3aed, #c026d3);
            }

            /* Profile dropdown in bottom section */
            .navbar-nav.ms-auto .nav-item.dropdown {
                margin: 0;
            }

            .navbar-nav.ms-auto .dropdown-toggle {
                padding: 8px 0;
            }

            /* Main navigation items styling */
            .nav-item.dropdown {
                margin-bottom: 4px;
            }

            .nav-item.dropdown .dropdown-toggle {
                padding: 12px 16px;
                font-weight: 500;
            }

            /* Section headers if needed */
            .nav-section-header {
                padding: 16px 16px 8px;
                font-size: 0.75rem;
                text-transform: uppercase;
                color: rgba(255, 255, 255, 0.5);
                letter-spacing: 0.5px;
            }

            /* Adjust spacing for feature items */
            .nav-feature-item {
                padding: 12px 16px;
            }

            /* Remove last margin/border from lists */
            .navbar-nav > li:last-child {
                margin-bottom: 0;
                border-bottom: none;
            }

            /* Adjust logo size */
            .navbar-brand img {
                height: 32px;
            }

            /* Ensure proper spacing when collapsed */
            .navbar-nav {
                padding: 8px 0;
            }

            /* Adjust spacing for the last nav item */
            .navbar-nav:last-child {
                padding-bottom: 16px;
            }

            /* Main nav items */
            .navbar-nav {
                width: 100%;
                padding: 0;
                flex-direction: column;
                margin: 0;
            }

            .nav-item {
                width: 100%;
                border-bottom: none;
                margin: 0 !important;
                padding: 0 !important;
            }

            /* Dropdown specific styles */
            .nav-item.dropdown {
                display: flex;
                flex-direction: column;
                width: 100%;
                margin: 0 !important;
                padding: 0 !important;
            }

            .nav-item.dropdown .dropdown-toggle {
                width: 100%;
                padding: 12px 16px !important;
                margin: 0 !important;
                text-align: left;
                color: #fff;
                border: none;
                background: transparent;
                font-size: 0.95rem;
            }
            
            /* Remove any Bootstrap default spacing on dropdown toggle pseudo-elements */
            .nav-item.dropdown .dropdown-toggle::after {
                margin-left: 0;
            }

            /* Dropdown menu */
            .dropdown-menu.features-menu {
                width: 100%;
                position: static !important;
                border: none;
                border-radius: 0;
                margin: 0;
                padding: 0;
                box-shadow: none;
                display: none;
            }

            .dropdown-menu.features-menu.show {
                display: flex;
                flex-direction: column;
            }

            .dropdown-menu.features-menu li {
                width: 100%;
                margin: 0;
                padding: 0;
            }

            /* Feature items - updated for more compact design */
            .nav-feature-item {
                display: grid;
                grid-template-columns: 24px 1fr;
                gap: 12px;
                align-items: start;
                padding: 12px 16px;
                border-bottom: none;
                background: #2a2a2a;
                color: #fff;
                text-decoration: none;
                min-height: 44px; /* Minimum touch target size */
            }

            .nav-feature-icon {
                display: flex;
                align-items: center;
                justify-content: center;
                color: rgba(255, 255, 255, 0.7);
                width: 24px;
                height: 24px;
                margin-top: 2px;
            }

            .nav-feature-icon i {
                font-size: 14px;
            }

            .nav-feature-content {
                display: flex;
                flex-direction: column;
                width: calc(100% - 36px); /* Account for icon width + gap */
                min-width: 0; /* Prevent content from overflowing */
            }

            .nav-feature-title {
                display: block;
                font-weight: 500;
                margin-bottom: 2px;
                color: #fff;
                font-size: 0.9rem;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .nav-feature-description {
                display: -webkit-box;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;
                line-clamp: 2;
                overflow: hidden;
                font-size: 0.75rem;
                color: rgba(255, 255, 255, 0.6);
                line-height: 1.3;
                margin: 0;
            }

            .nav-feature-item:active {
                background: rgba(255, 255, 255, 0.05);
            }

            /* Animation */
            .dropdown-menu.show {
                animation: slideDown 0.15s ease-out;
            }

            @keyframes slideDown {
                from {
                    opacity: 0;
                    transform: translateY(-4px);
                }
                to {
                    opacity: 1;
                    transform: translateY(0);
                }
            }

            /* Extra small screens */
            @media (max-width: 480px) {
                .nav-feature-item {
                    padding: 8px 12px;
                }

                .nav-feature-title {
                    font-size: 0.85rem;
                }

                .nav-feature-description {
                    font-size: 0.7rem;
                }
            }

            /* Invite Bot Button styling for mobile */
            .btn-primary {
                padding: 8px 16px;
                font-size: 0.9rem;
                width: auto;
                margin: 8px 16px;
                border-radius: 6px;
                white-space: nowrap;
                display: inline-flex;
                align-items: center;
                justify-content: center;
                min-height: 36px;
            }

            /* Adjust navbar spacing for the button */
            .navbar-nav.ms-auto {
                display: flex;
                align-items: center;
                padding: 8px 0;
            }

            /* Specific to the invite bot button container */
            .nav-item .btn-primary {
                background: linear-gradient(90deg, #7c3aed, #c026d3);
                border: none;
                box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
                transition: opacity 0.2s ease;
            }

            .nav-item .btn-primary:active {
                opacity: 0.9;
                transform: translateY(1px);
            }

            /* Extra small screens */
            @media (max-width: 480px) {
                .btn-primary {
                    padding: 6px 12px;
                    font-size: 0.85rem;
                    margin: 6px 12px;
                    min-height: 32px;
                }
            }

            /* Authentication dropdown styling */
            .navbar-nav.ms-auto .nav-item.dropdown {
                width: 100%;
                align-items: flex-start;
            }

            .navbar-nav.ms-auto .dropdown-toggle {
                width: 100%;
                display: flex;
                align-items: center;
                padding: 10px 16px;
                text-align: left;
            }

            .navbar-nav.ms-auto .dropdown-toggle img {
                width: 28px;
                height: 28px;
                margin-right: 12px;
            }

            .navbar-nav.ms-auto .dropdown-menu {
                width: 100%;
                position: static !important;
                background: #2a2a2a;
                border: none;
                border-radius: 0;
                margin: 0;
                padding: 8px 0;
                box-shadow: none;
            }

            .navbar-nav.ms-auto .dropdown-menu .dropdown-item {
                padding: 8px 16px;
                color: #fff;
                font-size: 0.9rem;
            }

            .navbar-nav.ms-auto .dropdown-divider {
                margin: 4px 0;
                border-color: rgba(255, 255, 255, 0.1);
            }

            .navbar-nav.ms-auto .dropdown-menu.show {
                display: block;
                animation: slideDown 0.15s ease-out;
            }

            /* Extra small screens */
            @media (max-width: 480px) {
                .navbar-nav.ms-auto .dropdown-toggle {
                    padding: 8px 12px;
                }

                .navbar-nav.ms-auto .dropdown-menu .dropdown-item {
                    padding: 6px 12px;
                    font-size: 0.85rem;
                }
            }

            /* Ensure visibility of nav items at exactly 768px */
            .navbar-nav {
                display: flex !important;
                width: 100%;
            }

            .navbar-nav.ms-auto {
                display: flex !important;
                margin-top: 1rem;
            }

            /* Explicitly show the invite bot button */
            .nav-item .btn-primary,
            .navbar-nav.ms-auto .nav-item {
                display: flex !important;
                width: 100%;
            }

            /* Force show profile dropdown */
            .navbar-nav.ms-auto .nav-item.dropdown {
                display: flex !important;
                width: 100%;
            }

            /* Ensure all nav items are visible */
            .navbar-collapse.show .navbar-nav > li {
                display: flex !important;
                width: 100%;
            }

            /* Override any potential hiding */
            .navbar-collapse.show .nav-item,
            .navbar-collapse.show .nav-link {
                display: flex !important;
                visibility: visible !important;
                opacity: 1 !important;
            }

            .mobile-menu-container {
                display: flex;
                flex-direction: column;
                height: 100%;
                overflow: hidden;
                min-height: 0;
            }

            .mobile-menu-top {
                flex: 1 1 auto;
                overflow-y: auto;
                overflow-x: hidden;
                padding: 16px 0;
                min-height: 0;
                -ms-overflow-style: none;
                scrollbar-width: none;
            }
            
            .mobile-menu-top::-webkit-scrollbar {
                width: 0;
                background: transparent;
            }

            .mobile-menu-bottom {
                flex: 0 0 auto;
                padding: 16px;
                background: rgba(0, 0, 0, 0.2);
                border-top: 1px solid rgba(255, 255, 255, 0.1);
                margin-top: auto;
            }

            /* Button styling */
            .mobile-menu-bottom .btn-primary {
                width: 100%;
                margin-bottom: 12px;
                padding: 12px;
                background: linear-gradient(90deg, #7c3aed, #c026d3);
                border: none;
            }

            /* Profile section */
            .mobile-menu-bottom .nav-item.dropdown {
                margin: 0;
            }

            .mobile-menu-bottom .dropdown-toggle {
                padding: 8px 0;
            }

            /* Navigation items */
            .nav-item.dropdown .dropdown-toggle {
                padding: 12px 16px;
                font-weight: 500;
            }

            .nav-feature-item {
                padding: 12px 16px;
            }

            /* Resources grid in mobile - single column layout */
            .resources-grid {
                display: block;
            }

            .resources-column {
                width: 100%;
                padding: 0;
            }
            
            .resources-column li {
                width: 100%;
                margin: 0;
                padding: 0;
            }

            .resources-header {
                padding: 12px 16px 6px;
                font-size: 0.7rem;
                color: rgba(255, 255, 255, 0.4);
                text-transform: uppercase;
                letter-spacing: 0.5px;
                font-weight: 500;
                text-align: left;
            }
            
            /* Make resources menu items match features menu items exactly */
            .resources-menu .nav-feature-item {
                display: grid;
                grid-template-columns: 24px 1fr;
                gap: 12px;
                align-items: start;
                padding: 12px 16px;
                background: #2a2a2a;
                text-align: left;
            }
            
            .resources-menu .nav-feature-icon {
                display: flex;
                align-items: center;
                justify-content: center;
                width: 24px;
                height: 24px;
            }
            
            .resources-menu .nav-feature-content {
                display: flex;
                flex-direction: column;
                text-align: left;
            }
            
            .resources-menu .nav-feature-title {
                text-align: left;
            }
            
            .resources-menu .nav-feature-description {
                text-align: left;
            }
            
            .resources-menu .nav-feature-item:hover {
                background: rgba(255, 255, 255, 0.05);
            }
            
            /* Consistent dropdown menu styling */
            .dropdown-menu.features-menu,
            .dropdown-menu.resources-menu {
                background: transparent;
                padding: 0rem !important;
            }

            /* Profile dropdown styling for mobile */
            .mobile-menu-bottom .nav-item.dropdown .dropdown-menu {
                position: absolute !important;
                right: 16px;
                left: 16px;
                top: auto;
                bottom: 100%;
                margin-bottom: 8px;
                background: #2a2a2a;
                border: none;
                border-radius: 8px;
                box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2);
            }

            .mobile-menu-bottom .nav-item.dropdown .dropdown-toggle {
                display: flex;
                align-items: center;
                justify-content: flex-start;
            }

            .mobile-menu-bottom .nav-item.dropdown .dropdown-toggle img {
                width: 32px;
                height: 32px;
                margin-right: 12px;
            }

            .mobile-menu-bottom .dropdown-menu .dropdown-item {
                padding: 12px 16px;
                color: #fff;
                font-size: 0.9rem;
            }

            .mobile-menu-bottom .dropdown-divider {
                margin: 4px 0;
                border-color: rgba(255, 255, 255, 0.1);
            }

            /* Animation for dropdown */
            .mobile-menu-bottom .dropdown-menu.show {
                animation: slideUpMenu 0.2s ease-out;
            }

            @keyframes slideUpMenu {
                from {
                    opacity: 0;
                    transform: translateY(8px);
                }
                to {
                    opacity: 1;
                    transform: translateY(0);
                }
            }

            /* Hide the regular navbar menu in dashboard pages */
            .dashboard-page .mobile-menu-container {
                display: none;
            }

            /* Sidebar mobile styling - updated */
            .sidebar {
                position: fixed;
                top: 0;
                left: -100%;
                width: 85%;
                max-width: 350px;
                height: 100vh;
                background: #1a1a1a;
                transition: left 0.3s ease;
                z-index: 1050; /* Increased z-index */
                overflow-y: auto;
                padding: 1rem;
                display: flex;
                flex-direction: column;
            }

            .sidebar.show {
                left: 0;
                box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
            }

            /* Backdrop for sidebar - updated */
            .sidebar-backdrop {
                position: fixed;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                background: rgba(0, 0, 0, 0.5);
                z-index: 1040; /* Lower than sidebar but higher than other elements */
                opacity: 0;
                visibility: hidden;
                transition: all 0.3s ease;
            }

            .sidebar-backdrop.show {
                opacity: 1;
                visibility: visible;
            }

            /* Sidebar content styling */
            .sidebar .sidebar-top {
                padding-bottom: 1rem;
                border-bottom: 1px solid rgba(255, 255, 255, 0.1);
                margin-bottom: 1rem;
            }

            .sidebar .nav-link {
                padding: 0.75rem 1rem;
                color: rgba(255, 255, 255, 0.8);
                border-radius: 0.5rem;
                transition: all 0.2s ease;
            }

            .sidebar .nav-link:hover {
                background: rgba(255, 255, 255, 0.1);
                color: #fff;
            }

            .sidebar .nav-link.active {
                background: rgba(126, 58, 242, 0.2);
                color: #7e3af2;
            }

            /* Server switch styling */
            .server-switch {
                padding: 1rem;
                background: rgba(255, 255, 255, 0.05);
                border-radius: 0.5rem;
                margin-bottom: 1rem;
            }

            .server-switch h4 {
                margin: 0;
                font-size: 1rem;
                font-weight: 600;
            }

            /* Ensure navbar stays above sidebar */
            .navbar {
                z-index: 1060;
                position: relative;
            }

            .refresh-server {
                opacity: 0.7;
                transition: all 0.2s ease;
            }
            
            .refresh-server:hover {
                opacity: 1;
                transform: scale(1.1);
            }
            
            .refresh-server .fa-spin {
                animation: fa-spin 1s infinite linear;
            }
            
            @keyframes starPulse {
                0%, 100% {
                    transform: scale(1);
                    opacity: 1;
                }
                50% {
                    transform: scale(1.2);
                    opacity: 0.8;
                }
            }
            

            @keyframes fa-spin {
                0% {
                    transform: rotate(0deg);
                }
                100% {
                    transform: rotate(360deg);
                }
            }


                .sidebar .sidebar-section {
                    margin-bottom: 1.25rem;
                    padding-bottom: 1.25rem;
                    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
                }

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

                .sidebar .sidebar-section-header {
                    font-size: 0.65rem;
                    margin-bottom: 0.5rem;
                    padding: 0 1rem;
                    margin-top: 0.5rem;
                }

                .sidebar .sidebar-section:first-child .sidebar-section-header {
                    margin-top: 0;
                }

                .sidebar .sidebar-section .nav-link {
                    padding: 0.75rem 1rem;
                    margin-bottom: 0.125rem;
                    font-size: 0.9rem;
                }

            }
        

        /* Modal Styling */
        #sparkWaitlistModal .modal-content {
            border: none;
            border-radius: 16px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
            background: linear-gradient(145deg, #1a1a1a 0%, #2d2d2d 100%);
            overflow: hidden;
        }

        #sparkWaitlistModal .modal-header {
            border-bottom: 1px solid rgba(125, 25, 255, 0.2);
            padding: 2rem 2rem 1.5rem 2rem;
            background: linear-gradient(135deg, rgba(125, 25, 255, 0.1) 0%, rgba(147, 51, 234, 0.05) 100%);
        }

        #sparkWaitlistModal .modal-title {
            font-weight: 700;
            font-size: 1.4rem;
            background: linear-gradient(135deg, #fff, #e5e7eb);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        #sparkWaitlistModal .modal-body { 
            padding: 1.5rem 2rem 2rem 2rem;
        }

        /* Enhanced button styling */
        #sparkWaitlistModal .btn-primary:hover {
            background: linear-gradient(135deg, #6d15e6 0%, #7c2ae8 100%) !important;
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(125, 25, 255, 0.4);
            transition: all 0.3s ease;
        }

        #sparkWaitlistModal .btn-primary:active {
            transform: translateY(0);
        }

        /* Image styling */
        #sparkWaitlistModal .modal-body img {
            box-shadow: 0 8px 24px rgba(125, 25, 255, 0.2);
            transition: transform 0.3s ease;
        }

        #sparkWaitlistModal .modal-body img:hover {
            transform: scale(1.02);
        }

        #sparkWaitlistModal .text-muted {
            color: rgba(255, 255, 255, 0.6) !important;
            font-size: 0.875rem;
            font-weight: 500;
            letter-spacing: 0.5px;
            text-transform: uppercase;
        }

        #sparkWaitlistModal .btn-primary {
            background: linear-gradient(90deg, #7c3aed, #c026d3);
            border: none;
            padding: 0.75rem 1.5rem;
            font-weight: 500;
            border-radius: 8px;
            transition: all 0.2s ease;
        }

        #sparkWaitlistModal .btn-primary:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
        }

        #sparkWaitlistModal .btn-primary:active {
            transform: translateY(0);
        }

        #sparkWaitlistModal img {
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        #sparkWaitlistModal .mb-4 {
            position: relative;
        }

        #sparkWaitlistModal .mb-4::after {
            content: '';
            position: absolute;
            bottom: -1.5rem;
            left: 0;
            right: 0;
            height: 1px;
            background: rgba(255, 255, 255, 0.1);
        }
        /* Reduce gap between gift icon and profile picture */
        .nav-item > [data-bs-target="#whatsNewModal"] {
            margin-right: -1.5rem;
            padding-right: 0;
        }

        /* What's New Modal Styling */
        #whatsNewModal .modal-content {
            border: none;
            border-radius: 16px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
            background: linear-gradient(145deg, #1a1a1a 0%, #2d2d2d 100%);
        }

        #whatsNewModal .modal-body > div {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
        }

        #whatsNewModal .modal-body img {
            width: 100%;
            height: auto;
            border-radius: 12px;
            margin-bottom: 1rem;
        }

        #whatsNewModal .modal-body .btn {
            margin-top: auto;
        }

        /* Mobile specific adjustments */
        @media (max-width: 768px) {
            #whatsNewModal .modal-body {
                padding: 1rem;
            }
            
            #whatsNewModal .modal-body > div {
                margin-bottom: 1.5rem;
            }
            
            #whatsNewModal .modal-body > div:last-child {
                margin-bottom: 0;
            }
        }

        /* Specific centering for 768px width */
        @media (width: 768px) {
            #whatsNewModal .modal-dialog {
                position: absolute !important;
                top: 50% !important;
                left: 50% !important;
                transform: translate(-50%, -50%) !important;
                margin: 0 !important;
                max-width: 90% !important;
                width: 90% !important;
                max-height: 90vh;
                overflow-y: auto;
            }
            
            #whatsNewModal .modal-content {
                max-height: 90vh;
                overflow-y: auto;
            }
            
            #sparkWaitlistModal .modal-dialog {
                position: absolute !important;
                top: 50% !important;
                left: 50% !important;
                transform: translate(-50%, -50%) !important;
                margin: 0 !important;
                max-width: 90% !important;
                width: 90% !important;
                max-height: 90vh;
                overflow-y: auto;
            }
            
            #sparkWaitlistModal .modal-content {
                max-height: 90vh;
                overflow-y: auto;
            }
        }

        /* Email Collection Modal Styles */
        #emailCollectionModal .modal-content {
            border: none;
            border-radius: 16px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
            background: linear-gradient(145deg, #1a1a1a 0%, #2d2d2d 100%);
        }

        #emailCollectionModal .modal-header {
            padding: 2rem 2rem 1rem 2rem;
            border-bottom: 1px solid rgba(125, 25, 255, 0.2);
        }

        #emailCollectionModal .modal-body {
            padding: 1rem 2rem 2rem 2rem;
        }

        #emailCollectionModal .modal-title {
            font-weight: 600;
            font-size: 1.4rem;
            background: linear-gradient(135deg, #7d19ff, #c026d3);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        #emailCollectionModal .form-control {
            background: rgba(255, 255, 255, 0.1);
            border: 2px solid rgba(125, 25, 255, 0.3);
            border-radius: 12px;
            padding: 1rem 1.25rem;
            font-size: 1rem;
            transition: all 0.3s ease;
        }

        #emailCollectionModal .form-control:focus {
            background: rgba(255, 255, 255, 0.15);
            border-color: #7d19ff;
            box-shadow: 0 0 0 0.2rem rgba(125, 25, 255, 0.25);
            color: white;
        }

        #emailCollectionModal .form-control::placeholder {
            color: rgba(255, 255, 255, 0.5);
        }

        #emailCollectionModal .form-label {
            font-weight: 500;
            color: rgba(255, 255, 255, 0.9);
            margin-bottom: 0.5rem;
        }

        #emailCollectionModal .btn-primary {
            background: linear-gradient(135deg, #7d19ff, #c026d3);
            border: none;
            border-radius: 12px;
            padding: 0.875rem 1.5rem;
            font-weight: 600;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(125, 25, 255, 0.3);
        }

        #emailCollectionModal .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(125, 25, 255, 0.4);
        }

        #emailCollectionModal .btn-secondary {
            background: rgba(255, 255, 255, 0.1);
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-radius: 12px;
            padding: 0.875rem 1.5rem;
            font-weight: 500;
            transition: all 0.3s ease;
        }

        #emailCollectionModal .btn-secondary:hover {
            background: rgba(255, 255, 255, 0.15);
            border-color: rgba(255, 255, 255, 0.3);
            transform: translateY(-1px);
        }

        #emailCollectionModal .form-control.is-invalid {
            border-color: #dc3545;
            box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
        }

        #emailCollectionModal .invalid-feedback {
            display: block;
            color: #ff6b6b;
            font-size: 0.875rem;
            margin-top: 0.5rem;
        }

        /* Form Select Styling for Questionnaire */
        #sparkWaitlistModal .form-select {
            background-color: rgba(255, 255, 255, 0.1);
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-radius: 8px;
            padding: 0.75rem;
            font-size: 1rem;
            transition: all 0.3s ease;
        }

        #sparkWaitlistModal .form-select:focus {
            background-color: rgba(255, 255, 255, 0.15);
            border-color: #7d19ff;
            box-shadow: 0 0 0 0.2rem rgba(125, 25, 255, 0.25);
            color: white;
        }

        #sparkWaitlistModal .form-select option {
            background-color: #2a2a2a;
            color: white;
        }

        #sparkWaitlistModal .form-select.is-invalid {
            border-color: #dc3545;
            box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
        }

        /* Questionnaire styling */
        #sparkWaitlistModal .form-label {
            font-weight: 600;
            color: #ffffff;
            margin-bottom: 0.25rem;
        }

        #sparkWaitlistModal .form-control {
            background-color: #1a1a1a;
            border: 1px solid #333;
            color: #ffffff;
            border-radius: 8px;
            transition: all 0.2s ease;
        }

        #sparkWaitlistModal .form-control:focus {
            background-color: #1a1a1a;
            border-color: #7d19ff;
            box-shadow: 0 0 0 0.2rem rgba(125, 25, 255, 0.25);
            color: #ffffff;
        }

        #sparkWaitlistModal .form-control::placeholder {
            color: #888;
        }

        #sparkWaitlistModal .form-control.is-invalid {
            border-color: #dc3545;
            box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
        }

        /* Animation for modal transition */
        #emailCollectionModal.fade .modal-dialog {
            transition: transform 0.4s ease-out;
            transform: translate(0, -50px);
        }

        #emailCollectionModal.show .modal-dialog {
            transform: translate(0, 0);
        }

        /* Help Modal Styling */
        #helpModal .modal-content {
            background: #1a1a1a;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        #helpModal .help-section h6 {
            color: #fff;
            margin-bottom: 0.5rem;
        }

        #helpModal .help-section p {
            color: rgba(255, 255, 255, 0.7) !important;
        }

        #helpModal .help-section i {
            color: #7d19ff;
            margin-right: 0.5rem;
        }

        /* --- Sidebar: Always single column, scrollable, with bottom margin --- */
        .sidebar {
            display: flex;
            flex-direction: column;
            height: 100vh;
            min-width: 220px;
            max-width: 350px;
            background: #1a1a1a;
        }
        .sidebar nav {
            flex: 1 1 auto;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
            overflow-x: hidden;
            padding-bottom: 2rem; /* margin for last child */
            
            /* Hide scrollbar by default, show on hover/scroll */
            scrollbar-width: none; /* Firefox */
            -ms-overflow-style: none; /* IE/Edge */
        }
        
        /* Hide scrollbar for webkit browsers */
        .sidebar nav::-webkit-scrollbar {
            width: 0px;
            background: transparent;
        }
        
        /* Show scrollbar on hover or when actively scrolling */
        .sidebar nav:hover::-webkit-scrollbar,
        .sidebar nav:focus::-webkit-scrollbar,
        .sidebar nav.scrolling::-webkit-scrollbar {
            width: 6px;
        }
        
        .sidebar nav:hover::-webkit-scrollbar-track,
        .sidebar nav:focus::-webkit-scrollbar-track,
        .sidebar nav.scrolling::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 3px;
        }
        
        .sidebar nav:hover::-webkit-scrollbar-thumb,
        .sidebar nav:focus::-webkit-scrollbar-thumb,
        .sidebar nav.scrolling::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.3);
            border-radius: 3px;
        }
        
        .sidebar nav:hover::-webkit-scrollbar-thumb:hover,
        .sidebar nav:focus::-webkit-scrollbar-thumb:hover,
        .sidebar nav.scrolling::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 255, 255, 0.5);
        }
        .sidebar .sidebar-section:last-child {
            margin-bottom: 2rem;
            padding-bottom: 2rem;
        }
        /* Prevent sidebar from wrapping into columns */
        .sidebar .nav, .sidebar .nav.flex-column {
            flex-direction: column !important;
            flex-wrap: nowrap !important;
        }
        /* Prevent columns on all screen sizes */
        @media (max-width: 1200px) {
            .sidebar, .sidebar nav, .sidebar .nav, .sidebar .nav.flex-column {
                flex-direction: column !important;
                flex-wrap: nowrap !important;
            }
        }
        /* Ensure sidebar never splits into columns on any screen size */
        @media (max-width: 768px) {
            .sidebar, .sidebar nav, .sidebar .nav, .sidebar .nav.flex-column {
                flex-direction: column !important;
                flex-wrap: nowrap !important;
            }

            #joinWaitlistBtn {
                margin-left: 0 !important;
                margin-right: 0 !important;
                width: 100% !important;
                text-align: center !important;
            }

        }
        
        /* Fix Join Waitlist button alignment on mobile */
        @media (max-width: 480px) {
            #sparkWaitlistModal .modal-body {
                padding-left: 1rem !important;
                padding-right: 1rem !important;
            }
            
            #joinWaitlistBtn {
                margin-left: 0 !important;
                margin-right: 0 !important;
                width: 100% !important;
                text-align: center !important;
            }
        }
        
        @media (max-width: 480px) {
            #sparkWaitlistModal .modal-body {
                padding-left: 1rem !important;
                padding-right: 1rem !important;
            }
            
            /* Keep mobile menu scrollable on small screens */
            .mobile-menu-container {
                height: 100%;
                min-height: 0;
            }
            .mobile-menu-top {
                overflow-y: auto;
                min-height: 0;
            }
            .mobile-menu-bottom .nav-item.dropdown .dropdown-menu {
                position: static !important;
                right: auto;
                left: auto;
                bottom: auto;
                margin: 0;
            }
        }

        /* Dashboard: stretch navbar - override all width constraints so logo is flush left, right items flush right */
        body.dashboard-page .header-container .navbar,
        body.dashboard-page .header-container .navbar .container-fluid,
        body.dashboard-page .navbar,
        body.dashboard-page .navbar > .container-fluid {
            max-width: 100% !important;
        }
        @media (min-width: 769px) {
            body.dashboard-page .header-container .navbar .container-fluid,
            body.dashboard-page .navbar > .container-fluid {
                padding-left: 1.5rem !important;
                padding-right: 1.5rem !important;
            }
        }
        @media (max-width: 768px) {
            body.dashboard-page .header-container .navbar .container-fluid,
            body.dashboard-page .navbar > .container-fluid {
                padding-left: 1rem !important;
                padding-right: 1rem !important;
            }
        }


