/**
 * EPIC DRAGON NAVBAR BACKGROUND 🐉🔥
 * Pure Power & Energy Effects for Main Navigation Bar
 * @package team-exciting
 * @version 1.0.0
 */

/* ===================================
   CSS VARIABLES - EPIC COLOR SCHEME
   =================================== */
:root {
    --epic-cyan: #00d9ff;
    --epic-purple: #8a2be2;
    --epic-pink: #ff1493;
    --epic-gradient: linear-gradient(135deg, var(--epic-cyan), var(--epic-purple));
    --epic-gradient-triple: linear-gradient(135deg, var(--epic-cyan), var(--epic-purple), var(--epic-pink));
}

/* ===================================
   MAIN NAVBAR - EPIC BACKGROUND 🌌
   =================================== */

.navbar,
header.navbar,
.header-area,
nav.navbar,
.main-navigation {
    position: relative !important;
    background: linear-gradient(145deg, rgba(26, 26, 26, 0.98), rgba(37, 37, 37, 0.98)) !important;
    border-bottom: 2px solid rgba(0, 217, 255, 0.3) !important;
    box-shadow:
        0 5px 30px rgba(0, 0, 0, 0.7),
        0 0 40px rgba(0, 217, 255, 0.2) !important;
    backdrop-filter: blur(15px) !important;
    overflow: visible !important;
    z-index: 1000 !important;
}

/* Cosmic Dust Background - Layer 1 */
.navbar::before,
header.navbar::before,
nav.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(0, 217, 255, 0.12) 2px, transparent 2px),
        radial-gradient(circle at 85% 30%, rgba(138, 43, 226, 0.12) 2px, transparent 2px),
        radial-gradient(circle at 50% 70%, rgba(255, 20, 147, 0.12) 1.5px, transparent 1.5px),
        radial-gradient(circle at 25% 50%, rgba(0, 217, 255, 0.08) 1px, transparent 1px),
        radial-gradient(circle at 75% 80%, rgba(138, 43, 226, 0.08) 1px, transparent 1px);
    background-size: 80px 80px, 120px 120px, 100px 100px, 60px 60px, 90px 90px;
    animation: cosmicDust 25s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
    opacity: 0.8;
}

/* Animated Grid - Layer 2 */
.navbar::after,
header.navbar::after,
nav.navbar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(0, 217, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 217, 255, 0.06) 1px, transparent 1px);
    background-size: 25px 25px;
    animation: gridMove 3s linear infinite;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

/* Ensure navbar content stays above effects */
.navbar > *,
header.navbar > *,
nav.navbar > * {
    position: relative;
    z-index: 10;
}

/* ===================================
   ENERGY LINES - TOP & BOTTOM 🌟
   =================================== */

/* Top Energy Line */
.navbar {
    border-top: 3px solid transparent !important;
    border-image: linear-gradient(90deg,
        transparent 0%,
        var(--epic-cyan) 20%,
        var(--epic-purple) 50%,
        var(--epic-pink) 80%,
        transparent 100%) 1 !important;
    animation: energyFlow 6s linear infinite;
}

@keyframes energyFlow {
    0% {
        border-image-source: linear-gradient(90deg,
            transparent 0%,
            var(--epic-cyan) 20%,
            var(--epic-purple) 50%,
            var(--epic-pink) 80%,
            transparent 100%);
    }
    50% {
        border-image-source: linear-gradient(90deg,
            transparent 0%,
            var(--epic-pink) 20%,
            var(--epic-cyan) 50%,
            var(--epic-purple) 80%,
            transparent 100%);
    }
    100% {
        border-image-source: linear-gradient(90deg,
            transparent 0%,
            var(--epic-cyan) 20%,
            var(--epic-purple) 50%,
            var(--epic-pink) 80%,
            transparent 100%);
    }
}

/* Bottom Glow Line */
.navbar {
    position: relative;
}

.navbar-container::after,
.navbar .container::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--epic-cyan) 25%,
        var(--epic-purple) 50%,
        var(--epic-pink) 75%,
        transparent 100%);
    animation: glowPulse 3s ease-in-out infinite;
    border-radius: 2px;
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.5);
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.6;
        box-shadow: 0 0 15px rgba(0, 217, 255, 0.5);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 25px rgba(0, 217, 255, 0.8);
    }
}

/* ===================================
   SCROLLED STATE - ENHANCED EFFECTS 📜
   =================================== */

.navbar.scrolled,
header.navbar.scrolled,
nav.navbar.scrolled {
    box-shadow:
        0 8px 40px rgba(0, 0, 0, 0.9),
        0 0 60px rgba(0, 217, 255, 0.3),
        inset 0 -1px 0 rgba(0, 217, 255, 0.3) !important;
    backdrop-filter: blur(20px) !important;
}

.navbar.scrolled::before,
header.navbar.scrolled::before {
    opacity: 1;
    animation-duration: 20s;
}

.navbar.scrolled::after,
header.navbar.scrolled::after {
    opacity: 0.6;
}

/* ===================================
   PARTICLE EFFECTS - FLOATING ENERGY ✨
   =================================== */

/* Energy Particles Container */
.navbar {
    overflow: visible !important;
}

/* Floating Energy Orbs */
.navbar-energy-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.navbar-energy-particles::before,
.navbar-energy-particles::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, var(--epic-cyan), transparent);
    border-radius: 50%;
    animation: particleFloat1 8s ease-in-out infinite;
    opacity: 0.6;
}

.navbar-energy-particles::before {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.navbar-energy-particles::after {
    top: 60%;
    right: 15%;
    animation-delay: 2s;
    background: radial-gradient(circle, var(--epic-purple), transparent);
}

@keyframes particleFloat1 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translate(20px, -15px) scale(1.5);
        opacity: 0.8;
    }
    50% {
        transform: translate(0, -30px) scale(1);
        opacity: 0.5;
    }
    75% {
        transform: translate(-20px, -15px) scale(1.2);
        opacity: 0.7;
    }
}

/* ===================================
   NAVBAR CONTAINER 📦
   =================================== */

.navbar .container,
.navbar .container-fluid,
header.navbar .container {
    position: relative;
    z-index: 10;
}

/* ===================================
   DRAGON AURA EFFECT 🐉
   =================================== */

/* Aura Glow on Hover over Navbar */
.navbar:hover::before {
    opacity: 1;
    animation-duration: 15s;
}

.navbar:hover::after {
    opacity: 0.7;
}

.navbar:hover {
    box-shadow:
        0 5px 35px rgba(0, 0, 0, 0.8),
        0 0 50px rgba(0, 217, 255, 0.3),
        inset 0 1px 0 rgba(0, 217, 255, 0.2),
        inset 0 -1px 0 rgba(0, 217, 255, 0.2) !important;
}

/* ===================================
   CORNER ACCENTS 💎
   =================================== */

/* Top Left Corner */
.navbar {
    position: relative;
}

.navbar-corner-accent {
    position: absolute;
    width: 60px;
    height: 60px;
    pointer-events: none;
    z-index: 5;
}

.navbar-corner-accent::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top left, var(--epic-cyan) 0%, transparent 70%);
    opacity: 0.3;
    animation: cornerPulse 4s ease-in-out infinite;
}

.navbar-corner-accent.top-left {
    top: 0;
    left: 0;
}

.navbar-corner-accent.top-right {
    top: 0;
    right: 0;
}

.navbar-corner-accent.top-right::before {
    background: radial-gradient(circle at top right, var(--epic-purple) 0%, transparent 70%);
}

@keyframes cornerPulse {
    0%, 100% {
        opacity: 0.2;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* ===================================
   ENERGY WAVE EFFECT 🌊
   =================================== */

/* Animated Wave Overlay */
.navbar-energy-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent,
        var(--epic-cyan),
        var(--epic-purple),
        var(--epic-pink),
        transparent);
    background-size: 200% 100%;
    animation: waveFlow 8s linear infinite;
    opacity: 0.4;
    pointer-events: none;
    z-index: 5;
}

@keyframes waveFlow {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 200% 0%;
    }
}

/* ===================================
   NAVBAR BRAND / LOGO AREA 🎯
   =================================== */

.navbar-brand,
.navbar .logo {
    position: relative;
    z-index: 15;
}

/* Logo Container Glow Enhancement */
.navbar-brand::before,
.navbar .logo::before {
    content: '';
    position: absolute;
    inset: -15px;
    background: radial-gradient(circle, rgba(0, 217, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: -1;
}

.navbar-brand:hover::before,
.navbar .logo:hover::before {
    opacity: 1;
}

/* ===================================
   NAVBAR MENU ITEMS BACKGROUND 📋
   =================================== */

.navbar-nav {
    position: relative;
    z-index: 10;
}

/* Menu Items Container Subtle Glow */
.navbar-nav::before {
    content: '';
    position: absolute;
    inset: -10px;
    background: radial-gradient(ellipse at center, rgba(0, 217, 255, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: -1;
    border-radius: 15px;
}

.navbar-nav:hover::before {
    opacity: 1;
}

/* ===================================
   DROPDOWN MENU BACKGROUND 📜
   =================================== */

.navbar .dropdown-menu,
.navbar .sub-menu {
    background: linear-gradient(145deg, rgba(26, 26, 26, 0.98), rgba(37, 37, 37, 0.98)) !important;
    border: 2px solid rgba(0, 217, 255, 0.3) !important;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(0, 217, 255, 0.2) !important;
    backdrop-filter: blur(15px) !important;
    position: relative;
    overflow: hidden;
}

/* Dropdown Cosmic Dust */
.navbar .dropdown-menu::before,
.navbar .sub-menu::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(0, 217, 255, 0.08) 1px, transparent 1px),
        radial-gradient(circle at 80% 70%, rgba(138, 43, 226, 0.08) 1px, transparent 1px);
    background-size: 30px 30px, 50px 50px;
    animation: cosmicDust 15s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

/* ===================================
   MOBILE MENU BACKGROUND 📱
   =================================== */

.navbar-collapse,
.mobile-menu {
    position: relative;
}

/* Mobile Menu Epic Background */
@media (max-width: 991px) {
    .navbar-collapse {
        background: linear-gradient(145deg, rgba(20, 20, 20, 0.98), rgba(30, 30, 30, 0.98)) !important;
        border: 2px solid rgba(0, 217, 255, 0.3) !important;
        border-radius: 15px !important;
        margin-top: 15px;
        padding: 20px !important;
        box-shadow:
            0 10px 40px rgba(0, 0, 0, 0.8),
            0 0 30px rgba(0, 217, 255, 0.2) !important;
        backdrop-filter: blur(15px) !important;
    }

    .navbar-collapse::before {
        content: '';
        position: absolute;
        inset: 0;
        background:
            radial-gradient(circle at 30% 40%, rgba(0, 217, 255, 0.1) 2px, transparent 2px),
            radial-gradient(circle at 70% 60%, rgba(138, 43, 226, 0.1) 2px, transparent 2px);
        background-size: 50px 50px, 70px 70px;
        animation: cosmicDust 20s ease-in-out infinite;
        pointer-events: none;
        z-index: 0;
        border-radius: 15px;
    }
}

/* ===================================
   KEYFRAME ANIMATIONS
   =================================== */

@keyframes cosmicDust {
    0% {
        background-position: 0% 0%, 50% 50%, 100% 0%, 25% 75%, 75% 25%;
    }
    33% {
        background-position: 50% 50%, 100% 100%, 50% 50%, 75% 25%, 25% 75%;
    }
    66% {
        background-position: 100% 100%, 0% 50%, 0% 100%, 25% 75%, 75% 25%;
    }
    100% {
        background-position: 0% 0%, 50% 50%, 100% 0%, 25% 75%, 75% 25%;
    }
}

@keyframes gridMove {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(25px);
    }
}

/* ===================================
   STICKY NAVBAR - ENHANCED EFFECTS 📌
   =================================== */

.navbar.sticky,
.navbar.fixed-top {
    animation: navbarSlideIn 0.4s ease-out;
}

@keyframes navbarSlideIn {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.navbar.sticky::before,
.navbar.fixed-top::before {
    opacity: 1;
}

/* ===================================
   TRANSPARENT NAVBAR VARIANT 🌈
   =================================== */

.navbar.transparent {
    background: rgba(26, 26, 26, 0.5) !important;
    backdrop-filter: blur(10px) !important;
}

.navbar.transparent::before {
    opacity: 0.5;
}

.navbar.transparent::after {
    opacity: 0.3;
}

.navbar.transparent:hover {
    background: rgba(26, 26, 26, 0.8) !important;
}

.navbar.transparent:hover::before {
    opacity: 0.8;
}

/* ===================================
   PERFORMANCE OPTIMIZATIONS ⚡
   =================================== */

.navbar,
.navbar::before,
.navbar::after {
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .navbar *,
    .navbar::before,
    .navbar::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===================================
   RESPONSIVE DESIGN 📱
   =================================== */

@media (max-width: 768px) {
    .navbar::before {
        background-size: 60px 60px, 90px 90px, 80px 80px, 50px 50px, 70px 70px;
    }

    .navbar::after {
        background-size: 20px 20px;
    }
}

@media (max-width: 576px) {
    .navbar {
        border-top-width: 2px !important;
    }

    .navbar::before {
        opacity: 0.6;
    }

    .navbar::after {
        opacity: 0.3;
    }
}

/* ===================================
   PRINT STYLES 🖨️
   =================================== */

@media print {
    .navbar::before,
    .navbar::after,
    .navbar-energy-wave,
    .navbar-energy-particles {
        display: none !important;
    }

    .navbar {
        background: #fff !important;
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
}

/* ===================================
   🐉 EPIC NAVBAR BACKGROUND - COMPLETE! 🔥
   =================================== */
