/* ========================================= */
/* DESKTOP NAVIGATION                        */
/* ========================================= */
.custom-nav {
    background: rgba(11, 14, 20, 0.85); backdrop-filter: blur(15px);
    position: sticky; top: 0; z-index: 1000; border-bottom: 1px solid var(--glass-border);
}
.nav-container { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.logo {
    font-weight: 900; color: var(--primary); text-decoration: none; font-size: 1.8rem;
    letter-spacing: -1px; display: inline-flex; align-items: baseline; transition: all 0.5s ease;
    animation: logo-distinguished-pulse 8s infinite ease-in-out;
}
.logo:hover { text-shadow: 0 0 15px rgba(0, 210, 255, 0.4); }
.logo .flix { color: #fff; }
.logo .dot-com { font-size: 0.35em; color: var(--secondary); margin-left: 2px; letter-spacing: 0; font-weight: 800; opacity: 0.9; text-transform: lowercase; }

@keyframes logo-distinguished-pulse {
    0%, 100% { text-shadow: 0 0 10px rgba(0, 210, 255, 0.2); letter-spacing: -1px; transform: scale(1); }
    50% { text-shadow: -2px 0 15px rgba(0, 210, 255, 0.6), 2px 0 20px rgba(58, 123, 213, 0.4); letter-spacing: 0px; transform: scale(1.02); }
}

.nav-links { display: flex; gap: 25px; align-items: center; }
.nav-item { text-decoration: none; color: var(--text); font-weight: 500; font-size: 0.9rem; transition: 0.3s; display: flex; align-items: center; position: relative; padding: 5px 0; }
.nav-item:hover { color: var(--primary); }

.nav-item-dropdown { position: relative; display: inline-block; }
.dropdown-menu {
    position: absolute; top: 130%; left: 50%; transform: translateX(-50%); min-width: 200px;
    background: rgba(11, 14, 20, 0.85); backdrop-filter: blur(25px); border: 1px solid var(--glass-border);
    border-radius: 16px; padding: 10px; z-index: 1000; box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    opacity: 0; visibility: hidden; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.nav-item-dropdown:hover .dropdown-menu { top: 100%; opacity: 1; visibility: visible; }
.dropdown-link { display: flex; align-items: center; gap: 10px; padding: 12px 18px; color: var(--text); text-decoration: none; font-size: 0.85rem; font-weight: 600; transition: 0.3s; border-radius: 10px; }
.dropdown-link i { font-size: 1rem; color: var(--text-dim); transition: 0.3s; }
.dropdown-link:hover { background: rgba(0, 210, 255, 0.1); color: var(--primary); transform: translateX(5px); }
.dropdown-link:hover i { color: var(--primary); filter: drop-shadow(0 0 5px rgba(0, 210, 255, 0.5)); }
.nav-item-dropdown::after { content: ""; position: absolute; width: 100%; height: 25px; bottom: -25px; left: 0; }
.nav-divider { width: 1px; height: 20px; background: var(--glass-border); margin: 0 10px; }

/* Light Mode Overrides */
:root.light-mode .custom-nav { background: rgba(255, 255, 255, 0.9); border-bottom: 1px solid rgba(0, 0, 0, 0.05); box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03); }
:root.light-mode .dropdown-menu { background: rgba(255, 255, 255, 0.98); border: 1px solid rgba(0, 0, 0, 0.08); box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1); }
:root.light-mode .app-menu-item:hover { background: #f3f4f6; }

/* Professional Notification Badge - High Contrast */
.notif-badge {
    position: absolute; 
    top: -10px; 
    right: -12px; 
    background: #00d2ff; /* Bright neon cyan */
    color: #000; /* Pure black text for ultimate readability */
    font-size: 0.85rem; /* Bumped up the font size */
    font-weight: 900; /* Made the font extra thick */
    min-width: 20px; /* Slightly larger circle */
    height: 22px; 
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding: 2px;
    border: 2px solid #0b0e14; /* Dark background border to separate it from the yellow bell */
    box-shadow: 0 4px 10px rgba(0, 210, 255, 0.5); /* Soft cyan glow */
    line-height: 1;
}

/* ========================================= */
/* PREMIUM MORPHING HAMBURGER BUTTON         */
/* ========================================= */
.mobile-toggle-modern { display: none; width: 32px; height: 24px; position: relative; cursor: pointer; z-index: 10000; }
.mobile-toggle-modern .line { display: block; position: absolute; height: 3px; width: 100%; background: var(--primary); border-radius: 4px; opacity: 1; left: 0; transform: rotate(0deg); transition: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); box-shadow: 0 0 10px rgba(0, 210, 255, 0.4); }
.mobile-toggle-modern .line1 { top: 0px; }
.mobile-toggle-modern .line2 { top: 10px; width: 80%; right: 0; left: auto; } 
.mobile-toggle-modern .line3 { top: 20px; }
.mobile-toggle-modern.is-active .line1 { top: 10px; transform: rotate(135deg); width: 100%; box-shadow: 0 0 15px #ff4d4d; background: #ff4d4d; }
.mobile-toggle-modern.is-active .line2 { opacity: 0; right: -20px; }
.mobile-toggle-modern.is-active .line3 { top: 10px; transform: rotate(-135deg); box-shadow: 0 0 15px #ff4d4d; background: #ff4d4d; }

/* ========================================= */
/* THE ULTIMATE MOBILE APP GRID (NAV)        */
/* ========================================= */
@media (max-width: 768px) {
    .mobile-toggle { display: none !important; } 
    .mobile-toggle-modern { display: block; }
    
    .nav-links {
        position: fixed; inset: 0; width: 100vw; height: 100vh;
        background: radial-gradient(circle at top right, rgba(11, 14, 20, 0.95), rgba(0, 0, 0, 0.98));
        backdrop-filter: blur(25px); display: grid !important; grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: max-content; align-content: start; padding: 110px 20px 100px 20px; gap: 10px; z-index: 9999;
        clip-path: circle(0px at calc(100% - 35px) 40px); transition: clip-path 0.6s cubic-bezier(0.85, 0, 0.15, 1); pointer-events: none; 
        transform: translate3d(0, 0, 0); backface-visibility: hidden; will-change: clip-path; 
    }
    .nav-links.active { clip-path: circle(150vh at calc(100% - 35px) 40px); pointer-events: all; }
    .nav-links > * { opacity: 0; transform: translateY(40px) scale(0.9); transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); margin: 0 !important; }
    .nav-links.active > * { opacity: 1; transform: translateY(0) scale(1); }
    .nav-links.active > *:nth-child(1) { transition-delay: 0.15s; }
    .nav-links.active > *:nth-child(2) { transition-delay: 0.20s; }
    .nav-links.active > *:nth-child(3) { transition-delay: 0.25s; }
    .nav-links.active > *:nth-child(4) { transition-delay: 0.30s; }
    .nav-links.active > *:nth-child(5) { transition-delay: 0.35s; }
    .nav-links.active > *:nth-child(6) { transition-delay: 0.40s; }
    .nav-links.active > *:nth-child(7) { transition-delay: 0.45s; }

    .nav-item {
        background: rgba(255, 255, 255, 0.03); border: 1px solid var(--glass-border); padding: 12px 10px !important; 
        border-radius: 16px; flex-direction: column !important; justify-content: center; align-items: center; text-align: center;
        box-shadow: 0 10px 25px rgba(0,0,0,0.2); font-size: 0.5rem !important; position: relative; overflow: hidden; height: auto !important; 
    }
    .nav-item:active::after { content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent); transform: skewX(-20deg); animation: glassSwipe 0.5s forwards; }
    @keyframes glassSwipe { 100% { left: 150%; } }
    
    .nav-item i { font-size: 1.3rem; color: var(--primary); margin: 0 0 5px 0 !important; filter: drop-shadow(0 0 8px rgba(0, 210, 255, 0.4)); }
    
    .nav-item-dropdown, .logout-btn, .register-btn, .nav-item:has(.user-display), a[href="/admin/index.php"] { grid-column: span 3; width: 100%; }
    .user-display { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 1.1rem; color: #fff; font-weight: 800; }
    
    .nav-item-dropdown .nav-item { flex-direction: row !important; justify-content: space-between; padding: 20px 25px !important; }
    .nav-item-dropdown .hide-on-mobile { display: inline !important; flex: 1; text-align: left; margin-left: 15px !important; font-size: 0.70rem !important; font-weight: 800 !important; }
    
    .dropdown-menu { position: static !important; display: none !important; background: transparent !important; border: none !important; box-shadow: none !important; padding: 0 !important; margin-top: 15px !important; transform: none !important; width: 100% !important; }
    .nav-item-dropdown.open .dropdown-menu { display: grid !important; grid-template-columns: 1fr 1fr; gap: 15px; }
    .dropdown-link { background: rgba(0, 210, 255, 0.05); border: 1px solid rgba(0, 210, 255, 0.15); border-radius: 16px; padding: 18px 10px; font-size: 0.85rem; font-weight: 700; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; color: #fff; }
    .dropdown-link i { font-size: 1.4rem; color: var(--primary); filter: drop-shadow(0 0 5px rgba(0, 210, 255, 0.3)); }
    .nav-item-dropdown .fa-chevron-down { transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
    .nav-item-dropdown.open .fa-chevron-down { transform: rotate(180deg); color: var(--primary); }
    .nav-divider { display: none !important; }
    .logout-btn { padding: 20px; text-align: center; border-radius: 20px; font-size: 1rem; margin-top: 10px; background: rgba(255, 77, 77, 0.08); border-color: rgba(255, 77, 77, 0.3); color: #ff4d4d; }
}

/* ========================================= */
/* PREMIUM GLASSMORPHISM TOOLTIPS            */
/* ========================================= */
[data-tooltip] { position: relative; cursor: pointer; }
[data-tooltip]::after {
    content: attr(data-tooltip); position: absolute; bottom: -40px; left: 50%; transform: translateX(-50%) translateY(10px);
    background: rgba(15, 20, 28, 0.95); backdrop-filter: blur(5px); color: #fff; padding: 6px 12px; font-size: 0.75rem;
    font-weight: 800; text-transform: uppercase; letter-spacing: 1px; border-radius: 8px; border: 1px solid var(--primary);
    white-space: nowrap; opacity: 0; visibility: hidden; transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55); 
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3); z-index: 9999; pointer-events: none; 
}
[data-tooltip]::before {
    content: ''; position: absolute; bottom: -15px; left: 50%; transform: translateX(-50%) translateY(10px);
    border-width: 0 6px 6px 6px; border-style: solid; border-color: transparent transparent var(--primary) transparent;
    opacity: 0; visibility: hidden; transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55); z-index: 9999; pointer-events: none;
}
[data-tooltip]:hover::after, [data-tooltip]:hover::before { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

@media (max-width: 768px) {
    .nav-item[data-tooltip]::after {
        content: attr(data-tooltip) !important; position: static !important; opacity: 1 !important; visibility: visible !important;
        background: transparent !important; border: none !important; box-shadow: none !important; transform: none !important; padding: 0 !important; color: #fff !important;
        font-size: 0.65rem !important; font-weight: 700 !important; margin-top: 5px !important; white-space: normal !important; pointer-events: auto !important;
    }
    .nav-item[data-tooltip]::before { display: none !important; } 
    .nav-item:has(.user-display)::after { display: none !important; }
}

/* ========================================= */
/* NAV ALERTS (SMART LIVE & MISSING)         */
/* ========================================= */
.missing-glitch-alert {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    margin-left: 15px;
    
    /* background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(153, 27, 27, 0.4)); */
    /* border: 1px solid rgba(239, 68, 68, 0.5); */
    border-radius: 20px;
    /* box-shadow: 0 0 10px rgba(239, 68, 68, 0.4), inset 0 0 5px rgba(239, 68, 68, 0.1); */
    /* backdrop-filter: blur(5px); */
    
    color: #ffcccc;
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: none;
    font-size: 0.65rem;
    letter-spacing: 0.5px;
    
    animation: chaotic-glitch 4s infinite;
    transition: all 0.2s ease;
}

.missing-glitch-alert i {
    color: #ef4444;
    font-size: 0.7rem;
    filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.8));
}

.missing-glitch-alert:hover {
    /* background: rgba(239, 68, 68, 0.8); */
    color: #fff;
    /* border-color: #ff4d4d; */
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.8);
    animation: none;
    transform: scale(1.05);
}

.missing-glitch-alert:hover i { color: #fff; }

/* --- PREMIUM GLASS SHIMMER ALERT --- */
    .missing-glitch-alert {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 3px 10px;
        margin-left: 15px;
        
        /* background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(153, 27, 27, 0.5)); */
        /* border: 1px solid rgba(239, 68, 68, 0.4);
        border-radius: 20px;
        box-shadow: 0 0 10px rgba(239, 68, 68, 0.2); */
        
        color: #fff;
        font-weight: 900;
        text-transform: uppercase;
        text-decoration: none;
        font-size: 0.65rem;
        letter-spacing: 0.5px;
        
        position: relative;
        overflow: hidden; /* Keeps the shine inside the pill */
        transition: all 0.3s ease;
    }

    /* Soft breathing glow on the icon */
    .missing-glitch-alert i {
        color: #ff8080;
        font-size: 0.7rem;
        animation: subtle-breathe 2s infinite alternate;
    }

    /* The diagonal light sweep */
    .missing-glitch-alert::after {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 50%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
        transform: skewX(-25deg);
        animation: swipe-shimmer 3s infinite;
    }

    @keyframes swipe-shimmer {
        0% { left: -100%; }
        20% { left: 200%; }
        100% { left: 200%; } /* Pauses before shining again */
    }
    
    @keyframes subtle-breathe {
        0% { filter: drop-shadow(0 0 2px rgba(239, 68, 68, 0.4)); }
        100% { filter: drop-shadow(0 0 8px rgba(239, 68, 68, 1)); }
    }

    .missing-glitch-alert:hover {
        /* background: rgba(239, 68, 68, 0.9); */
        /* box-shadow: 0 0 20px rgba(239, 68, 68, 0.6); */
        transform: scale(1.05);
    }
    
    .missing-glitch-alert:hover i { color: #fff; animation: none; }

.nav-live-alert {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.65rem;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.5px;
    margin-left: 10px;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}

.nav-live-alert i {
    font-size: 0.7rem;
}

.nav-live-alert.live-now {
        background: rgba(46, 204, 113, 0.15);
        border: 1px solid rgba(46, 204, 113, 0.4);
        color: #2ecc71;
        box-shadow: 0 0 10px rgba(46, 204, 113, 0.2);
    }
    .nav-live-alert.live-now:hover { 
        background: #2ecc71; 
        color: #000; 
        box-shadow: 0 0 15px rgba(46, 204, 113, 0.6); 
        transform: scale(1.05); 
    }

.nav-live-alert.live-soon {
    background: rgba(241, 196, 15, 0.15);
    border: 1px solid rgba(241, 196, 15, 0.4);
    color: #f1c40f;
    box-shadow: 0 0 10px rgba(241, 196, 15, 0.2);
}
.nav-live-alert.live-soon:hover { background: #f1c40f; color: #000; box-shadow: 0 0 15px rgba(241, 196, 15, 0.6); transform: scale(1.05); }

.nav-live-alert.live-guide {
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid rgba(0, 210, 255, 0.3);
    color: var(--primary);
}
.nav-live-alert.live-guide:hover { background: var(--primary); color: #000; box-shadow: 0 0 15px rgba(0, 210, 255, 0.4); transform: scale(1.05); }

@media (max-width: 768px) {
    .nav-alert-group { flex-wrap: wrap; justify-content: center; width: 100%; margin-top: 10px; }
    .missing-glitch-alert, .nav-live-alert { margin-left: 3px; margin-right: 3px; margin-bottom: 5px; }
}