/* Custom Scrollbar - Dark Cyan Theme */
::-webkit-scrollbar {
    width: 14px;
    height: 14px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
    border-left: 1px solid rgba(0, 212, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00d4ff 0%, #0095b3 100%);
    border-radius: 2px;
    border: 3px solid #0a0a0a;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #33ddff 0%, #00d4ff 100%);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #00d4ff #0a0a0a;
}

/* Navbar base: translucent with blur (desktop + mobile closed) */
.navbar-glass {
    background: rgba(10, 10, 10, 0.6) !important; /* transparent look */
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3) !important;
    position: relative;
    transition: background-color 200ms ease, backdrop-filter 200ms ease;
}

/* Expanded (hamburger open) state: slightly darker for contrast */
.navbar-glass.expanded {
    background: rgba(10, 10, 10, 0.75) !important;
}

/* Footer Glass Effect */
.footer-glass {
    background: rgba(10, 10, 10, 0.9) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}

/* Mobile Menu Glass Effect (expanded panel) - matches navbar translucent style */
.mobile-menu-glass {
    background: rgba(10, 10, 10, 0.85) !important; /* semi-transparent dark like navbar */
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3) !important;
}

/* Enhanced Navigation Styles */
.nav-link {
    position: relative;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.025em;
}

.nav-link:hover {
    color: #00d4ff;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #00d4ff 0%, #a855f7 25%, #ff6b9d 50%, #fbbf24 75%, #84cc16 100%);
    transition: all 0.3s;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: #00d4ff;
}

/* Live Map special styling */
#navLiveMap {
    padding: 0.5rem 1rem;
    background: rgba(0, 212, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #00d4ff;
    border: 2px solid rgba(0, 212, 255, 0.6);
    border-radius: 8px;
    font-weight: bold;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

#navLiveMap:hover {
    background: rgba(0, 212, 255, 0.3);
    color: white;
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.6), 0 4px 20px rgba(0, 212, 255, 0.4);
    border-color: #00d4ff;
    transform: translateY(-2px);
}

#navLiveMap::after {
    display: none;
}

/* Main Action Buttons */
.btn-main-action {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    background: rgba(0, 212, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #00d4ff;
    border: 1px solid rgba(0, 212, 255, 0.5);
    border-radius: 5px;
    font-weight: bold;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.2);
    transition: all 0.3s;
    cursor: pointer;
}

.btn-main-action:hover {
    background: rgba(0, 212, 255, 0.4);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 212, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.8);
}

.mobile-nav-link {
    display: block;
    padding: 1rem 1.5rem;
    color: white;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
    font-weight: 500;
    font-size: 0.95rem;
}

.mobile-nav-link:hover {
    color: #00d4ff;
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.15) 0%, transparent 100%);
    border-left-color: #00d4ff;
}

/* Mobile Live Map Button */
#mobileLiveMap {
    display: block;
    margin: 1rem;
    padding: 0.8rem 1rem;
    background: rgba(0, 212, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #00d4ff;
    border: 2px solid rgba(0, 212, 255, 0.6);
    border-radius: 8px;
    font-weight: bold;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
    text-align: center;
    transition: all 0.3s;
}

#mobileLiveMap:hover {
    background: rgba(0, 212, 255, 0.3);
    color: white;
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.6);
    border-color: #00d4ff;
    transform: translateY(-2px);
}

/* Hamburger Menu Animation */
.hamburger-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: white;
    transition: all 0.3s;
}

#mobileMenuBtn.active .hamburger-line:nth-child(1) {
    top: 0.5rem;
    transform: rotate(45deg);
}

#mobileMenuBtn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

#mobileMenuBtn.active .hamburger-line:nth-child(3) {
    top: 0.5rem;
    transform: rotate(-45deg);
}

/* Mobile Menu Animation (expands in layout) */
#mobileMenu.show {
    /* Using a large max-height to ensure all items are visible on small screens.
       100vh can underflow in some nested/edge cases; 600px safely fits typical menus. */
    max-height: 600px;
    opacity: 1;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Mobile Menu Positioning (take space in layout under navbar) */
#mobileMenu {
    position: static;       /* in normal flow, below navbar */
    top: auto;
    left: 0;
    right: 0;
    width: 100%;
    z-index: auto;
    overflow: hidden;       /* hide while collapsed */
    overflow-y: auto;       /* allow scrolling if content is very tall */
    max-height: 0;          /* collapsed state height */
    opacity: 0;             /* visually hidden when collapsed */
    transition: max-height 300ms ease, opacity 250ms ease;
    padding-top: 0;
    padding-bottom: 0;
}

/* Text Gradient Utilities */
.text-gradient-cyan {
    background: linear-gradient(135deg, #00d4ff 0%, #a855f7 50%, #ff6b9d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-full {
    background: linear-gradient(135deg, #00d4ff 0%, #a855f7 25%, #ff6b9d 50%, #fbbf24 75%, #84cc16 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Mobile Menu List Styling */
#mobileMenu ul {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    min-height: fit-content;
}

#mobileMenu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: block;
    width: 100%;
}

#mobileMenu li:last-child {
    border-bottom: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    /* Fix navbar height on mobile */
    nav {
        height: auto !important;
        min-height: 4rem;
        --nav-height: 4rem; /* expose current navbar height for the mobile panel */
    }
    
    /* Ensure navbar content is properly aligned */
    nav .flex {
        height: 4rem;
    }
    
    /* Make mobile menu items easier to tap */
    .mobile-nav-link {
        padding: 1.2rem 1.5rem;
        font-size: 1rem;
    }
    
    #mobileLiveMap {
        margin: 1rem;
        padding: 1rem;
        font-size: 1rem;
    }
    
    /* Adjust hero section for mobile */
    .hero-section {
        margin-top: 0 !important;
        padding-top: 5rem !important;
        min-height: 100vh;
    }
    
    /* Fix button container on mobile */
    .hero-section > div:last-child {
        margin-top: 2rem;
    }
}

@media (min-width: 769px) {
    /* Hide mobile menu button on desktop */
    #mobileMenuBtn {
        display: none !important;
    }
    
    /* Ensure mobile menu is hidden on desktop */
    #mobileMenu {
        display: none !important;
    }
    
    /* Provide a sensible default height for the navbar variable on desktop */
    nav {
        --nav-height: 5rem; /* matches h-20 */
    }
}

/* Online status dot utility */
.status-dot {
    display: inline-block;
    width: 14px;   /* ~w-3.5 */
    height: 14px;  /* ~h-3.5 */
    border-radius: 9999px;
}

/* Mobile-specific fixes */
@media (max-width: 480px) {
    /* Extra small devices */
    nav {
        height: auto !important;
        min-height: 3.5rem;
    }
    
    nav .flex {
        height: 3.5rem;
        padding: 0.5rem 1rem;
    }
    
    /* Ensure logo and brand fit */
    nav img {
        width: 32px;
        height: 32px;
    }
    
    nav span {
        font-size: 1rem;
    }
    
    /* Fix hero section on small devices */
    .hero-section {
        margin-top: 0 !important;
        padding-top: 4rem !important;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Adjust logo size on very small screens */
    .hero-section img[alt="Logo"] {
        max-width: 90vw;
    }
    
    /* Make buttons stack properly */
    .btn-main-action {
        width: 100%;
        max-width: 300px;
    }
}
