/* 🛸 EXTRATERRESTRIAL NAVIGATION - Mind-Blowing UI/UX */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;900&family=Noto+Sans+Tamil:wght@400;600;700&family=Noto+Sans+Devanagari:wght@400;600;700&family=Orbitron:wght@400;500;600;700;800;900&display=swap');

/* ========================================
   MENU BUTTON - Futuristic Holographic
   ======================================== */
#navMenuBtn {
    position: fixed !important;
    left: 25px !important;
    top: 25px !important;
    width: 80px !important;
    height: 80px !important;
    background: linear-gradient(135deg, 
        rgba(138, 43, 226, 0.9) 0%, 
        rgba(75, 0, 130, 0.9) 50%,
        rgba(138, 43, 226, 0.9) 100%) !important;
    border: 3px solid rgba(255, 255, 255, 0.5) !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    z-index: 9999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 0 30px rgba(138, 43, 226, 0.6),
                0 0 60px rgba(138, 43, 226, 0.4),
                inset 0 0 20px rgba(255, 255, 255, 0.1) !important;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    backdrop-filter: blur(10px);
    border: none;
    outline: none;
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 30px rgba(138, 43, 226, 0.6),
                    0 0 60px rgba(138, 43, 226, 0.4),
                    inset 0 0 20px rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow: 0 0 50px rgba(138, 43, 226, 0.8),
                    0 0 100px rgba(138, 43, 226, 0.6),
                    inset 0 0 30px rgba(255, 255, 255, 0.2);
    }
}

#navMenuBtn:hover {
    transform: scale(1.2);
    box-shadow: 0 0 60px rgba(138, 43, 226, 1),
                0 0 120px rgba(138, 43, 226, 0.8),
                inset 0 0 40px rgba(255, 255, 255, 0.3) !important;
}

#navMenuBtn span {
    display: block;
    width: 35px;
    height: 4px;
    background: linear-gradient(90deg, #fff, #00ffff);
    position: relative;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

#navMenuBtn span::before,
#navMenuBtn span::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #fff, #00ffff);
    left: 0;
    border-radius: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

#navMenuBtn span::before {
    top: -12px;
}

#navMenuBtn span::after {
    top: 12px;
}

#navMenuBtn.active span {
    background: transparent;
    box-shadow: none;
}

#navMenuBtn.active span::before {
    top: 0;
    transform: rotate(45deg);
    background: linear-gradient(90deg, #ff00ff, #00ffff);
}

#navMenuBtn.active span::after {
    top: 0;
    transform: rotate(-45deg);
    background: linear-gradient(90deg, #ff00ff, #00ffff);
}

/* ========================================
   LANGUAGE SELECTOR - Right Side (Above WhatsApp)
   ======================================== */
#navLangSelector {
    position: fixed !important;
    right: 25px !important;
    bottom: 110px !important;
    z-index: 9999999 !important;
    display: flex !important;
    gap: 15px !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    pointer-events: auto !important;
}

.lang-option {
    width: 65px !important;
    height: 65px !important;
    border-radius: 50% !important;
    border: 3px solid rgba(255, 255, 255, 0.5) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    font-weight: 900 !important;
    color: white !important;
    backdrop-filter: blur(10px);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    font-family: 'Orbitron', 'Montserrat', 'Noto Sans Tamil', 'Noto Sans Devanagari', sans-serif;
    position: relative;
    z-index: 9999999 !important;
    pointer-events: auto !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.lang-option.en {
    background: linear-gradient(135deg, #00c9ff 0%, #0066ff 100%) !important;
    box-shadow: 0 0 20px rgba(0, 102, 255, 0.5), 0 8px 25px rgba(0, 0, 0, 0.3);
}

.lang-option.ta {
    background: linear-gradient(135deg, #ff0080 0%, #ff0000 100%) !important;
    box-shadow: 0 0 20px rgba(255, 0, 128, 0.5), 0 8px 25px rgba(0, 0, 0, 0.3);
}

.lang-option.hi {
    background: linear-gradient(135deg, #ff8800 0%, #ff4400 100%) !important;
    box-shadow: 0 0 20px rgba(255, 136, 0, 0.5), 0 8px 25px rgba(0, 0, 0, 0.3);
}

.lang-option:hover {
    transform: scale(1.25) translateY(-5px);
    box-shadow: 0 0 40px currentColor, 0 12px 35px rgba(0, 0, 0, 0.5);
}

.lang-option.active {
    transform: scale(1.3);
    border-color: white !important;
    border-width: 4px !important;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.3),
                0 0 50px currentColor,
                0 15px 45px rgba(0, 0, 0, 0.6);
    animation: activePulse 2s ease-in-out infinite;
}

@keyframes activePulse {
    0%, 100% {
        box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.3),
                    0 0 50px currentColor,
                    0 15px 45px rgba(0, 0, 0, 0.6);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.5),
                    0 0 80px currentColor,
                    0 20px 55px rgba(0, 0, 0, 0.7);
    }
}

.lang-option::after {
    content: attr(data-lang);
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lang-option:hover::after {
    opacity: 1;
}

/* ========================================
   WHATSAPP BUTTON - Bottom Right (Fixed Position)
   ======================================== */
.floating-whatsapp {
    position: fixed !important;
    right: 25px !important;
    bottom: 25px !important;
    width: 65px !important;
    height: 65px !important;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 0 30px rgba(37, 211, 102, 0.6),
                0 8px 25px rgba(0, 0, 0, 0.3) !important;
    z-index: 9999998 !important;
    color: white !important;
    text-decoration: none !important;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 3px solid rgba(255, 255, 255, 0.5);
    animation: whatsappPulse 3s ease-in-out infinite;
}

@keyframes whatsappPulse {
    0%, 100% {
        box-shadow: 0 0 30px rgba(37, 211, 102, 0.6),
                    0 8px 25px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 50px rgba(37, 211, 102, 0.9),
                    0 12px 35px rgba(0, 0, 0, 0.4);
    }
}

.floating-whatsapp:hover {
    transform: scale(1.2) rotate(15deg);
    box-shadow: 0 0 60px rgba(37, 211, 102, 1),
                0 15px 45px rgba(0, 0, 0, 0.5) !important;
}

.floating-whatsapp svg {
    width: 35px !important;
    height: 35px !important;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

/* ========================================
   EXTRATERRESTRIAL SIDEBAR
   ======================================== */
#navSidebar {
    position: fixed !important;
    left: -550px;
    top: 0;
    width: 500px;
    height: 100vh;
    background: linear-gradient(180deg, 
        rgba(10, 0, 30, 0.98) 0%, 
        rgba(25, 0, 50, 0.98) 25%,
        rgba(40, 0, 80, 0.98) 50%,
        rgba(25, 0, 50, 0.98) 75%,
        rgba(10, 0, 30, 0.98) 100%);
    backdrop-filter: blur(20px);
    box-shadow: 0 0 100px rgba(138, 43, 226, 0.8),
                inset 0 0 100px rgba(138, 43, 226, 0.1);
    z-index: 9999998 !important;
    overflow-y: auto;
    overflow-x: hidden;
    transition: left 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-right: 2px solid rgba(138, 43, 226, 0.5);
}

#navSidebar.open {
    left: 0 !important;
}

/* Animated border effect */
#navSidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(0, 255, 255, 0.8) 20%,
        rgba(255, 0, 255, 0.8) 50%,
        rgba(0, 255, 255, 0.8) 80%,
        transparent 100%);
    animation: borderFlow 3s linear infinite;
}

@keyframes borderFlow {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}

/* Custom Scrollbar - Alien Style */
#navSidebar::-webkit-scrollbar {
    width: 10px;
}

#navSidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.5);
    border-left: 1px solid rgba(138, 43, 226, 0.3);
}

#navSidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, 
        rgba(138, 43, 226, 0.8) 0%, 
        rgba(0, 255, 255, 0.8) 50%,
        rgba(138, 43, 226, 0.8) 100%);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.8);
}

#navSidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, 
        rgba(0, 255, 255, 1) 0%, 
        rgba(138, 43, 226, 1) 50%,
        rgba(0, 255, 255, 1) 100%);
    box-shadow: 0 0 20px rgba(0, 255, 255, 1);
}

/* Brand Header - Holographic */
#navSidebar h2 {
    color: white;
    text-align: center;
    padding: 50px 30px;
    background: linear-gradient(135deg, 
        rgba(138, 43, 226, 0.3) 0%, 
        rgba(0, 255, 255, 0.3) 50%,
        rgba(255, 0, 255, 0.3) 100%);
    font-size: 32px;
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    letter-spacing: 5px;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.8),
                 0 0 40px rgba(138, 43, 226, 0.6),
                 0 4px 10px rgba(0, 0, 0, 0.8);
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid rgba(0, 255, 255, 0.5);
}

#navSidebar h2::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.4) 50%, 
        transparent 100%);
    animation: shimmer 4s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* Navigation Sections - Alien Glow */
#navSidebar .nav-section {
    padding: 25px 0;
    border-bottom: 1px solid rgba(138, 43, 226, 0.2);
    position: relative;
}

#navSidebar .nav-section::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 0;
    background: linear-gradient(180deg, 
        rgba(0, 255, 255, 0.8),
        rgba(255, 0, 255, 0.8));
    transition: height 0.5s ease;
    box-shadow: 0 0 15px currentColor;
}

#navSidebar .nav-section:hover::before {
    height: 100%;
}

/* Section Headers - Holographic */
#navSidebar .nav-section h3 {
    color: rgba(0, 255, 255, 0.8);
    font-size: 13px;
    text-transform: uppercase;
    padding: 15px 30px 10px;
    margin: 0;
    letter-spacing: 3px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 15px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

#navSidebar .nav-section h3::before {
    content: '';
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(0, 255, 255, 0.8), 
        transparent);
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.8);
}

/* Navigation Links - Extraterrestrial Glow */
#navSidebar a {
    display: flex;
    align-items: center;
    gap: 15px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 18px 30px;
    font-size: 16px;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    border-left: 3px solid transparent;
}

#navSidebar a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, 
        rgba(0, 255, 255, 0.8),
        rgba(255, 0, 255, 0.8));
    transform: translateX(-5px);
    transition: transform 0.4s ease;
    box-shadow: 0 0 15px currentColor;
}

#navSidebar a::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(138, 43, 226, 0.2) 0%,
        transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

#navSidebar a:hover {
    color: #00ffff;
    padding-left: 45px;
    background: rgba(138, 43, 226, 0.2);
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.8),
                 0 0 30px rgba(138, 43, 226, 0.6);
    border-left-color: rgba(0, 255, 255, 0.8);
}

#navSidebar a:hover::before {
    transform: translateX(0);
}

#navSidebar a:hover::after {
    transform: translateX(0);
}

/* Active Link - Glowing */
#navSidebar a.active {
    color: #00ffff;
    background: rgba(138, 43, 226, 0.3);
    border-left: 5px solid rgba(0, 255, 255, 1);
    font-weight: 800;
    text-shadow: 0 0 20px rgba(0, 255, 255, 1);
    box-shadow: inset 0 0 30px rgba(0, 255, 255, 0.2);
}

/* Overlay with Cosmic Effect */
#navOverlay {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center,
        rgba(10, 0, 30, 0.8) 0%,
        rgba(0, 0, 0, 0.95) 100%);
    backdrop-filter: blur(10px);
    z-index: 9999997 !important;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#navOverlay.show {
    display: block !important;
    opacity: 1;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    #navSidebar {
        width: 90%;
        max-width: 400px;
        left: -100%;
    }
    
    #navSidebar.open {
        left: 0 !important;
    }
    
    #navMenuBtn {
        width: 65px !important;
        height: 65px !important;
        left: 15px !important;
        top: 15px !important;
    }
    
    #navLangSelector {
        left: 15px !important;
        bottom: 15px !important;
        gap: 10px !important;
    }
    
    .lang-option {
        width: 55px !important;
        height: 55px !important;
        font-size: 16px !important;
    }
    
    .lang-option::after {
        display: none;
    }
    
    .floating-whatsapp {
        width: 55px !important;
        height: 55px !important;
        right: 15px !important;
        bottom: 15px !important;
    }
    
    .floating-whatsapp svg {
        width: 28px !important;
        height: 28px !important;
    }
    
    /* Better touch targets */
    button, .btn, a {
        min-height: 44px;
    }
}

/* Small phones (480px and below) */
@media (max-width: 480px) {
    #navSidebar {
        width: 95%;
        max-width: 320px;
    }
    
    #navMenuBtn {
        width: 55px !important;
        height: 55px !important;
        left: 10px !important;
        top: 10px !important;
    }
    
    #navLangSelector {
        right: 10px !important;
        bottom: 80px !important;
        gap: 8px !important;
    }
    
    .lang-option {
        width: 48px !important;
        height: 48px !important;
        font-size: 14px !important;
    }
    
    .floating-whatsapp {
        width: 48px !important;
        height: 48px !important;
        right: 10px !important;
        bottom: 10px !important;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .lang-option,
    .floating-whatsapp,
    #navMenuBtn {
        min-width: 48px !important;
        min-height: 48px !important;
    }
    
    * {
        -webkit-tap-highlight-color: rgba(138, 43, 226, 0.3);
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    #navMenuBtn,
    #navLangSelector,
    #navSidebar,
    #navOverlay,
    .floating-whatsapp {
        display: none !important;
    }
}

/* ========================================
   STAGGER ANIMATIONS
   ======================================== */
#navSidebar.open .nav-section:nth-child(1) a {
    animation: slideInAlien 0.5s ease forwards;
}

#navSidebar.open .nav-section:nth-child(2) a {
    animation: slideInAlien 0.6s ease forwards;
}

#navSidebar.open .nav-section:nth-child(3) a {
    animation: slideInAlien 0.7s ease forwards;
}

#navSidebar.open .nav-section:nth-child(4) a {
    animation: slideInAlien 0.8s ease forwards;
}

@keyframes slideInAlien {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
