/* ==========================================================================
   Google Fonts Preconnect & Import (100% PageSpeed Optimized)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ==========================================================================
   Global Variables
   ========================================================================== */
:root {
    --primary-color: #1877F2;
    --primary-dark: #165ec9;
    --bg-light: #F0F2F5;
    --bg-white: #FFFFFF;
    --bg-dark: #1c1e21;
    --text-dark: #050505;
    --text-gray: #65676B;
    --text-white: #FFFFFF;
    --border-color: #CED0D4;
    --danger-color: #fa3e3e;
    --overlay-color: rgba(0, 0, 0, 0.5);
    
    --font-main: 'Inter', sans-serif;
    --transition: 0.3s ease;
}

/* ==========================================================================
   Base Reset
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

body {
    background: var(--bg-light);
    color: var(--text-dark);
    font-size: 15px;
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button, input[type="submit"] {
    cursor: pointer;
    font-family: var(--font-main);
    background: transparent;
    border: 0 solid transparent;
    outline: none;
}

ul {
    list-style: none;
}

/* ==========================================================================
   Global Utility Classes (SaaS Level)
   ========================================================================== */
/* Display & Flexbox */
.d-block { display: block; }
.d-inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }

/* Spacing */
.gap-1 { gap: 1rem; }
.gap-half { gap: 0.5rem; }
.gap-xs { gap: 0.25rem; }
.p-1 { padding: 1rem; }
.p-half { padding: 0.5rem; }
.p-xs { padding: 0.25rem; }
.px-half { padding: 0 0.5rem; }
.pt-half { padding: 0.5rem 0 0 0; }
.pb-half { padding: 0 0 0.5rem 0; }
.m-0 { margin: 0; }
.mb-1 { margin: 0 0 1rem 0; }
.mb-half { margin: 0 0 0.5rem 0; }
.mb-xs { margin: 0 0 0.25rem 0; }
.mt-1 { margin: 1rem 0 0 0; }
.mt-2 { margin: 2rem 0 0 0; }
.mt-half { margin: 0.5rem 0 0 0; }
.mt-xs { margin: 0.25rem 0 0 0; }
.my-half { margin: 0.5rem 0; }
.my-1 { margin: 1rem 0; }

/* Backgrounds & Colors */
.bg-white { background: var(--bg-white); }
.bg-light { background: var(--bg-light); }
.bg-primary { background: var(--primary-color); }
.bg-primary-dark { background: var(--primary-dark); }
.bg-dark { background: var(--bg-dark); }
.bg-danger { background: var(--danger-color); }
.bg-transparent { background: transparent; }
.bg-overlay { background: var(--overlay-color); }

.text-primary { color: var(--primary-color); }
.text-dark { color: var(--text-dark); }
.text-gray { color: var(--text-gray); }
.text-white { color: var(--text-white); }
.text-danger { color: var(--danger-color); }

/* Typography */
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.text-sm { font-size: 0.85rem; }
.text-md { font-size: 1rem; }
.text-lg { font-size: 1.25rem; }
.text-center { text-align: center; }
.text-decoration-none { text-decoration: none; }

/* Borders & Shadows (STRICTLY avoiding longhand directional borders) */
.b-1 { border: 1px solid var(--border-color); }
.border-none { border: 0 solid transparent; }
.br-8 { border-radius: 8px; }
.br-circle { border-radius: 50%; }
.shadow { box-shadow: 0 2px 5px rgba(0,0,0,0.05); }

/* Box-shadow hacks to simulate directional borders without longhands */
.b-bottom { box-shadow: 0 1px 0 0 var(--border-color); }
.b-top { box-shadow: 0 -1px 0 0 var(--border-color); }
.border-light { box-shadow: 0 1px 0 0 #E4E6EB; } 

/* Sizing & Positioning */
.w-full { width: 100%; }
.h-full { height: 100%; }
.h-auto { height: auto; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.inset-0 { inset: 0; }
.sticky-top { position: sticky; top: 0; z-index: 1000; }
.overflow-hidden { overflow: hidden; }

/* ==========================================================================
   Custom Components (Screenshot Specific)
   ========================================================================== */
.custom-auth-input {
    padding: 14px 16px; 
    border: 1px solid #D1D9E0; 
    background: #FFFFFF; 
    font-size: 1.05rem;
    color: var(--text-dark);
}
.custom-auth-input::placeholder { color: #8F959E; }
.custom-auth-input:focus {
    border: 1px solid var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.15);
}

.container-fluid {
    max-width: 1600px;
    margin: 0 auto;
}

.avatar-sm { width: 40px; height: 40px; object-fit: cover; }
.avatar-md { width: 50px; height: 50px; object-fit: cover; }

/* Button System Updated */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-weight: 600;
    transition: var(--transition);
    border-radius: 8px;
    text-decoration: none;
}
.btn-primary { background: var(--primary-color); color: var(--text-white); }
.btn-success { background: #28a745; color: var(--text-white); }
.btn-danger { background: var(--danger-color); color: var(--text-white); }
.btn-light { background: #ffe5e5; color: var(--danger-color); }

.btn-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-light);
    color: var(--text-dark);
}
.btn-icon:hover { background: #E4E6EB; }
.btn-text {
    padding: 0.5rem;
    border-radius: 8px;
    font-weight: 600;
    background: transparent;
}
.btn-text:hover { background: var(--bg-light); }

.hover-opacity:hover { opacity: 0.85; }
.hover-text-primary:hover { color: var(--primary-color); }
.cursor-pointer { cursor: pointer; }

.badge-wrap .badge {
    top: -5px;
    right: -5px;
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    font-weight: bold;
}

.form-control {
    color: var(--text-dark);
    font-size: 0.95rem;
}
.form-control::placeholder { color: var(--text-gray); }
.outline-none { outline: 0 solid transparent; }
.outline-primary:focus { outline: 2px solid var(--primary-color); }

/* Navigation specific */
.logo-icon { width: 35px; height: 35px; font-size: 1.2rem; }
.nav-link {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: var(--text-gray);
}
.nav-link:hover, .nav-link.active {
    background: #E7F3FF;
    color: var(--primary-color);
}
.active-bg { background: #E7F3FF; }

/* ==========================================================================
   Layout & Grid System
   ========================================================================== */
.main-grid {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 1.5rem;
    align-items: flex-start;
}

/* Offcanvas Mobile Menu Variables */
.transition-transform { transition: transform 0.3s ease-in-out; }
.translate-x-hidden { transform: translateX(-100%); }
.offcanvas-menu {
    top: 0;
    left: 0;
    width: 300px;
    z-index: 2000;
}
.offcanvas-overlay { z-index: 1999; }
.hidden { display: none !important; }

/* Mobile hiding classes */
.mobile-only { display: none; }

/* ==========================================================================
   100% Fully Responsive Breakpoints
   ========================================================================== */
/* Tablet & Small Desktops */
@media screen and (max-width: 1200px) {
    .main-grid {
        grid-template-columns: 240px 1fr 280px;
        gap: 1rem;
    }
}

/* Tablets (Portrait) */
@media screen and (max-width: 992px) {
    .main-grid {
        grid-template-columns: 1fr 300px;
    }
    .left-sidebar { display: none; }
    .desktop-only { display: none; }
    .mobile-only { display: flex; }
}

/* Mobile Devices */
@media screen and (max-width: 768px) {
    .main-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .right-sidebar { display: none; }
    .desktop-nav { display: none; }
    
    .bottom-features .container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-box {
        width: 150px;
    }
}

/* Small Mobile Devices */
@media screen and (max-width: 480px) {
    body { font-size: 14px; }
    .p-1 { padding: 0.75rem; }
    .search-box { display: none; }
    
    .post-card .btn-text {
        font-size: 0.8rem;
        padding: 0.25rem;
    }
}

/* Premium Features Background */
.bg-premium { 
    background: linear-gradient(135deg, #182848 0%, #4b6cb7 100%); 
}
.bg-glass { 
    background: rgba(255, 255, 255, 0.2); 
}

/* ==========================================================================
   Modern Premium Footer
   ========================================================================== */
.modern-footer {
    width: 100%;
    font-family: var(--font-main);
}

.modern-footer a:hover {
    color: #3B82F6 !important; /* Soft blue on hover */
}

.link-group {
    min-width: 150px;
}

@media screen and (max-width: 768px) {
    .modern-footer .flex.wrap.justify-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }
    .footer-links {
        width: 100%;
        justify-content: space-between;
    }
    .modern-footer .pb-1 {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* =========================================================
   20 NEXT-LEVEL PURE CSS PROFILE THEMES (ZERO SERVER LOAD)
   ========================================================= */

/* Base Theme Wrapper Properties */
.theme-wrapper {
    position: relative;
    z-index: 1;
    overflow: hidden;
    background-size: 200% 200%;
    transition: all 0.4s ease;
}

/* Force Text Colors based on Theme Brightness */
.theme-text-light, .theme-text-light *, .theme-text-light svg { color: #ffffff !important; stroke: #ffffff !important; }
.theme-text-dark, .theme-text-dark *, .theme-text-dark svg { color: #050505 !important; stroke: #050505 !important; }

/* 1. Classic Light (Default) */
.theme_default { background: #FFFFFF; }

/* 2. Cyberpunk 2077 */
.theme_cyberpunk { background: linear-gradient(135deg, #120458, #ff007f, #00f3ff); animation: bgGradient 8s ease infinite; }

/* 3. Midnight Oasis */
.theme_midnight { background: linear-gradient(180deg, #0f0c29, #302b63, #24243e); }

/* 4. Sunset Vibes */
.theme_sunset { background: linear-gradient(45deg, #ff512f, #dd2476, #ff512f); animation: bgGradient 6s ease infinite; }

/* 5. Forest Whisper */
.theme_forest { background: linear-gradient(135deg, #134e5e, #71b280); }

/* 6. Crimson Blood */
.theme_crimson { background: radial-gradient(circle at top left, #8a2387, #e94057, #f27121); }

/* 7. Ocean Breeze */
.theme_ocean { background: linear-gradient(to right, #2193b0, #6dd5ed); }

/* 8. Golden Luxury */
.theme_golden { background: linear-gradient(135deg, #232526, #414345); border: 2px solid #FFD700; box-shadow: inset 0 0 20px rgba(255,215,0,0.2); }

/* 9. Galactic Space */
.theme_galactic { background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%); }

/* 10. Cherry Blossom */
.theme_cherry { background: linear-gradient(120deg, #fbc2eb 0%, #a6c1ee 100%); }

/* 11. Toxic Venom */
.theme_toxic { background: linear-gradient(135deg, #000000, #0f9b0f); }

/* 12. Royal Amethyst */
.theme_amethyst { background: linear-gradient(135deg, #4b1248, #f0c27b); }

/* 13. Arctic Frost */
.theme_arctic { background: linear-gradient(to right, #00c6ff, #0072ff); }

/* 14. Solar Flare */
.theme_solar { background: linear-gradient(to right, #f12711, #f5af19); }

/* 15. Phantom Ghost */
.theme_phantom { background: linear-gradient(to top, #2c3e50, #fd746c); }

/* 16. Neon Matrix */
.theme_matrix { background: linear-gradient(180deg, #000000, #003300); border-bottom: 3px solid #00ff00; }

/* 17. Desert Mirage */
.theme_desert { background: linear-gradient(to top, #e52d27, #b31217); }

/* 18. Velvet Night */
.theme_velvet { background: linear-gradient(to right, #141e30, #243b55); }

/* 19. Pastel Dream */
.theme_pastel { background: linear-gradient(135deg, #ff9a9e, #fecfef, #ff9a9e); animation: bgGradient 5s ease infinite; }

/* 20. Obsidian Elite */
.theme_obsidian { background: #0a0a0a; border: 1px solid #333; box-shadow: inset 0 0 50px rgba(255,255,255,0.05); }

/* Smooth Gradient Animation for Premium Themes */
@keyframes bgGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* =========================================================================
   DYNAMIC HEADER BRANDING CSS
========================================================================= */

/* Dynamic Image Logo */
.dynamic-logo-img {
    height: 32px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    display: block;
}

/* Fallback Text Icon Logo */
.logo-icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
    font-weight: bold;
    flex-shrink: 0;
}

/* Responsive Overrides */
@media screen and (max-width: 768px) {
    .dynamic-logo-img {
        height: 28px; /* Slightly smaller on mobile to save header space */
        max-width: 100px;
    }
    
    .logo-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}

/* =========================================================================
   DYNAMIC STAFF & MODERATOR BADGE CSS
========================================================================= */

.staff-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 14px;
    border-radius: 30px; /* Modern Pill Shape */
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15) !important;
    border: 2px solid rgba(255, 255, 255, 0.9) !important; /* Beautiful white contrast border */
    z-index: 10;
    backdrop-filter: blur(4px); /* Glassmorphism touch */
}

/* Force colors to prevent theme overrides */
.mod-badge {
    background: linear-gradient(135deg, #28a745, #20c997) !important; /* Vibrant Green */
    color: #ffffff !important;
}

.mod-badge svg {
    stroke: #ffffff !important;
}

.admin-badge {
    background: linear-gradient(135deg, var(--primary-color, #1877F2), #0056b3) !important; /* Vibrant Blue */
    color: #ffffff !important;
}

.admin-badge svg {
    stroke: #ffffff !important;
}

/* Ensure inner spans don't inherit theme text colors */
.staff-badge span {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2) !important;
}

/* =========================================================================
   NEXT-LEVEL STAFF CONTROL PANEL CSS (100% Theme Independent)
========================================================================= */

/* Trigger Button (Visible directly on profile) */
.staff-trigger-btn {
    background: rgba(255, 71, 87, 0.1) !important;
    color: #ff4757 !important;
    border: 1px solid rgba(255, 71, 87, 0.3) !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    cursor: pointer;
}

.staff-trigger-btn:hover {
    background: rgba(255, 71, 87, 0.2) !important;
}

/* Control Panel Container */
.staff-control-panel {
    background: #1e272e !important; /* Premium Dark Background */
    border: 2px solid #ff4757 !important; /* Danger Red Border */
    box-shadow: 0 8px 24px rgba(255, 71, 87, 0.2) !important;
    animation: slideDownStaff 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 12px !important;
}

@keyframes slideDownStaff {
    from { opacity: 0; transform: translateY(-15px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Custom Independent Inputs */
.custom-staff-input {
    background-color: #ffffff !important;
    color: #2f3542 !important;
    border: 2px solid transparent !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: all 0.3s ease !important;
    outline: none !important;
    font-family: inherit !important;
    appearance: none;
}

.custom-staff-input:focus {
    border-color: #ff4757 !important;
    box-shadow: 0 0 0 4px rgba(255, 71, 87, 0.15) !important;
}

.custom-staff-input::placeholder {
    color: #a4b0be !important;
    font-weight: 500 !important;
}

/* Dropdown Arrow & Option Visibility Fix */
select.custom-staff-input {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f3542' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    padding-right: 40px !important;
}

.custom-staff-input option {
    background-color: #ffffff !important;
    color: #2f3542 !important;
    font-weight: 500 !important;
    padding: 10px !important;
}

/* Action Buttons */
.staff-btn-danger {
    background: linear-gradient(135deg, #ff4757, #ff6b81) !important;
    color: #ffffff !important;
    border: none !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2) !important;
    letter-spacing: 0.5px !important;
}

.staff-btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 71, 87, 0.4) !important;
}

.staff-btn-success {
    background: linear-gradient(135deg, #2ed573, #7bed9f) !important;
    color: #ffffff !important;
    border: none !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2) !important;
}

.staff-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(46, 213, 115, 0.4) !important;
}

/* Alerts */
.staff-alert {
    padding: 10px 15px !important;
    border-radius: 8px !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    text-align: center !important;
}

.staff-alert.error {
    background-color: rgba(255, 71, 87, 0.1) !important;
    color: #ff4757 !important;
    border: 1px solid rgba(255, 71, 87, 0.3) !important;
}

.staff-alert.success {
    background-color: rgba(46, 213, 115, 0.1) !important;
    color: #2ed573 !important;
    border: 1px solid rgba(46, 213, 115, 0.3) !important;
}

@media screen and (max-width: 480px) {
    .custom-staff-input {
        font-size: 0.9rem !important;
        padding: 10px 14px !important;
    }
}

/* =========================================================================
   SMILEY INTEGRATION CSS
========================================================================= */

.inline-smiley {
    display: inline-block;
    vertical-align: middle;
    width: 24px;       /* Fixed size to prevent layout shifts */
    height: 24px;
    object-fit: contain;
    margin: 0 2px;
    background: transparent;
}

@media screen and (max-width: 480px) {
    .inline-smiley {
        width: 20px;   /* Slightly smaller on mobile to match font size */
        height: 20px;
    }
}

/* =========================================================================
   SMILEY GALLERY CSS
========================================================================= */

.smiley-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.smiley-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.gallery-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.smiley-card:hover .gallery-img {
    transform: scale(1.15);
}

.smiley-code {
    border: 1px dashed var(--primary-color);
    user-select: all; /* Easy selection */
}

.hover-bg-primary:hover {
    background-color: var(--primary-color) !important;
}
.hover-text-white:hover {
    color: #fff !important;
}

@media screen and (max-width: 480px) {
    .smiley-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.5rem;
    }
    .w-full-sm {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Edit Smiley Specific CSS */
.edit-input {
    letter-spacing: 1px;
    color: var(--primary-color) !important;
}
.edit-input:focus {
    box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.2);
}

/* =========================================================================
   CUSTOM MOBILE MENU & SEARCH (Fixes Theme Conflict)
========================================================================= */

/* Ensure the Custom Hamburger is visible on Mobile */
.custom-hamburger { display: none; }
@media screen and (max-width: 992px) {
    .custom-hamburger { display: flex !important; }
}

/* Base Styles for the Custom Overlay & Menu */
#myMobileOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(2px);
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#myMobileMenu {
    position: fixed;
    top: 0;
    left: -320px;
    width: 280px; 
    max-width: 85vw;
    height: 100vh;
    background: #ffffff;
    z-index: 100001;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    transition: left 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow-x: hidden;
}

/* The Active State triggers visibility */
#myMobileOverlay.active {
    opacity: 1;
    visibility: visible;
}

#myMobileMenu.active {
    left: 0;
}

/* Professional & Compact Spacing for Menu Items */
#myMobileMenu .custom-mobile-scroll a {
    padding: 0.6rem 1rem !important; 
    font-size: 0.95rem !important; 
    margin-bottom: 0.15rem; 
    border-radius: 8px;
    display: flex;
    align-items: center;
}

#myMobileMenu .custom-mobile-scroll a svg {
    width: 18px !important; 
    height: 18px !important;
}

/* Custom Scrollbar for Mobile Menu */
.custom-mobile-scroll::-webkit-scrollbar {
    width: 4px;
}
.custom-mobile-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.custom-mobile-scroll::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 10px;
}

/* =========================================================================
   CUSTOM MOBILE MENU & SEARCH (Fixes Theme Conflict)
========================================================================= */

/* Ensure the Custom Hamburger is visible on Mobile */
.custom-hamburger { display: none; }
@media screen and (max-width: 992px) {
    .custom-hamburger { display: flex !important; }
}

/* Base Styles for the Custom Overlay & Menu */
#myMobileOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(2px);
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#myMobileMenu {
    position: fixed;
    top: 0;
    left: -320px;
    width: 280px; 
    max-width: 85vw;
    height: 100vh;
    background: #ffffff;
    z-index: 100001;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    transition: left 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow-x: hidden;
}

/* The Active State triggers visibility */
#myMobileOverlay.active {
    opacity: 1;
    visibility: visible;
}

#myMobileMenu.active {
    left: 0;
}

/* Professional & Compact Spacing for Menu Items */
#myMobileMenu .custom-mobile-scroll a {
    padding: 0.6rem 1rem !important; 
    font-size: 0.95rem !important; 
    margin-bottom: 0.15rem; 
    border-radius: 8px;
    display: flex;
    align-items: center;
}

#myMobileMenu .custom-mobile-scroll a svg {
    width: 18px !important; 
    height: 18px !important;
}

/* Custom Scrollbar for Mobile Menu */
.custom-mobile-scroll::-webkit-scrollbar {
    width: 4px;
}
.custom-mobile-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.custom-mobile-scroll::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 10px;
}

/* 🚀 100% RESPONSIVE MOBILE SEARCH DROPDOWN */
.mobile-search-dropdown {
    position: absolute;
    top: 100%; /* Sits exactly below the header */
    left: 0;
    right: 0;
    width: 100%;
    box-sizing: border-box !important; /* Prevents overflow */
    padding: 10px 15px !important; /* Professional padding */
    background: #ffffff;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    z-index: 990;
}

.mobile-search-dropdown.slide-down-active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    display: block !important;
}

/* Form Wrapper - Pill Shape Design */
.mobile-search-dropdown form {
    display: flex;
    align-items: center;
    background: #F0F2F5 !important; /* Standard FB light gray */
    border-radius: 20px !important; /* Sleek rounded edges */
    padding: 2px 12px !important;
    width: 100%;
    box-sizing: border-box !important;
    border: none !important; /* Removed rigid border */
}

/* Search Input Styling */
.mobile-search-dropdown input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 16px !important; /* 16px prevents auto-zoom on iOS */
    padding: 8px 8px !important;
    color: #050505;
    width: 100%;
}

/* Search Button/Icon Styling */
.mobile-search-dropdown button {
    background: transparent;
    border: none;
    padding: 0;
    color: #65676B;
    display: flex;
    align-items: center;
    justify-content: center;
}

    /* 🚀 OPTIMIZED: Compact, Sleek Desktop Sidebar Styling */
    .desktop-sidebar-link {
        padding: 0.45rem 0.75rem; /* Perfect compact vertical and horizontal padding */
        font-size: 0.92rem;        /* Clean and balanced standard UI text size */
        margin-bottom: 2px;         /* Tight gap between links */
        border-radius: 6px;
        font-weight: 500;
    }
    
    .desktop-sidebar-link svg {
        width: 18px; /* Perfectly proportional SVG size */
        height: 18px;
        flex-shrink: 0;
    }

    .hover-bg-light:hover {
        background-color: #F0F2F5; /* Smooth hover effect */
    }

    .sidebar-divider {
        margin: 0.4rem 0; /* Compact divider line */
        opacity: 0.5;
    }