/* ========================== Performance Optimization ========================== */
/* Disable heavy animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body.reduce-animations *,
body.reduce-animations *::before,
body.reduce-animations *::after {
    animation-duration: 0.1ms !important;
    transition-duration: 0.1ms !important;
}

/* Disable expensive backdrop blurs/filters on low-end and reduced motion devices */
body.perf-low,
body.perf-low *,
body.reduce-animations,
body.reduce-animations * {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Reduce animation complexity for low-end devices */
@media (max-width: 768px), (max-height: 600px) {
    .dark body::before {
        filter: blur(30px) !important; /* Reduced from 60px */
    }
    
    .dark body::after {
        filter: drop-shadow(0 0 1px rgba(168, 85, 247, 0.3)) !important; /* Reduced from 3px */
    }
}

/* Disable expensive filters on very low-end devices */
@media (max-width: 480px) {
    .dark body::before,
    .dark body::after {
        filter: none !important;
    }
}

/* ==========================================================================
   Mobile Dropdown Z-Index Safety Net
   Ensures all navbar dropdowns (notification, profile, etc.) always float
   above page content on mobile where grid stacking contexts differ.
   ========================================================================== */
@media (max-width: 768px) {
    .grid-navbar [class*="absolute"] {
        z-index: 9000 !important;
    }
}

.dark body {
    background-color: #000000;
    background: 
        radial-gradient(circle at center, rgba(49, 19, 83, 0.95) 0%, rgba(0, 0, 0, 0) 20%),
        radial-gradient(circle at top left, rgba(13, 42, 88, 0.95) 0%, rgba(0, 0, 0, 0) 30%),
        radial-gradient(circle at bottom right, rgba(44, 67, 116, 0.95) 0%, rgba(0, 0, 0, 0) 30%),
        #000000;
    background-blend-mode: normal;
}

/* ==========================================================================
   Base Layout Styles
   ========================================================================== */
html,
body {
    padding: 0;
    margin: 0;
}

/* ==========================================================================
   Golden Border Container Effect
   Adds a subtle golden border around the main content area
   ========================================================================== */
body {
    position: relative;
}

.dark body {
    background-color: #000000 !important;
    background:
        /* Neon purple-blue gradient orbs with glow */
        radial-gradient(ellipse 90% 60% at 50% -20%, rgba(138, 43, 226, 0.35) 0%, rgba(75, 0, 130, 0.15) 40%, transparent 60%),
        radial-gradient(ellipse 70% 50% at 0% 50%, rgba(0, 102, 255, 0.25) 0%, rgba(0, 51, 153, 0.15) 35%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 100% 50%, rgba(147, 51, 234, 0.3) 0%, rgba(126, 34, 206, 0.15) 40%, transparent 60%),
        radial-gradient(ellipse 90% 60% at 50% 120%, rgba(79, 70, 229, 0.3) 0%, rgba(67, 56, 202, 0.15) 35%, transparent 55%),
        /* Electric grid overlay with neon glow */
        linear-gradient(rgba(139, 92, 246, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.08) 1px, transparent 1px),
        /* Deep space base with purple-black gradient */
        linear-gradient(135deg, #000000 0%, #0f0420 20%, #1a0933 40%, #120828 60%, #0a0315 80%, #000000 100%);
    background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 60px 60px, 60px 60px, 100% 100%;
    background-attachment: fixed;
    background-position: center;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Add floating electric aurora effect for dark mode */
.dark body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        /* Neon purple glows */
        radial-gradient(circle at 15% 20%, rgba(147, 51, 234, 0.15) 0%, transparent 30%),
        radial-gradient(circle at 85% 80%, rgba(79, 70, 229, 0.18) 0%, transparent 35%),
        radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.12) 0%, transparent 40%),
        /* Electric blue accents */
        radial-gradient(circle at 20% 70%, rgba(59, 130, 246, 0.15) 0%, transparent 30%),
        radial-gradient(circle at 80% 30%, rgba(0, 102, 255, 0.12) 0%, transparent 35%),
        /* Neon cyan highlights */
        radial-gradient(circle at 40% 90%, rgba(34, 211, 238, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 60% 10%, rgba(168, 85, 247, 0.1) 0%, transparent 30%);
    background-attachment: fixed;
    pointer-events: none;
    z-index: -1;
    animation: electricAurora 25s ease-in-out infinite alternate;
    filter: blur(35px); /* Reduced from 60px for better performance */
}

/* Enhanced neon star particles with glow */
.dark body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        /* Bright neon purple stars */
        radial-gradient(2px 2px at 10% 15%, rgba(168, 85, 247, 0.9) 40%, transparent 50%),
        radial-gradient(1.5px 1.5px at 25% 35%, rgba(147, 51, 234, 0.7) 45%, transparent 50%),
        radial-gradient(2.5px 2.5px at 40% 70%, rgba(139, 92, 246, 0.95) 35%, transparent 50%),
        /* Electric blue stars */
        radial-gradient(1.5px 1.5px at 60% 20%, rgba(59, 130, 246, 0.8) 40%, transparent 50%),
        radial-gradient(2px 2px at 75% 85%, rgba(37, 99, 235, 0.85) 40%, transparent 50%),
        /* Cyan neon accents */
        radial-gradient(2px 2px at 15% 60%, rgba(34, 211, 238, 0.75) 45%, transparent 50%),
        radial-gradient(1.5px 1.5px at 85% 45%, rgba(6, 182, 212, 0.7) 40%, transparent 50%),
        /* White sparkles */
        radial-gradient(1px 1px at 30% 90%, rgba(255, 255, 255, 0.6) 50%, transparent 50%),
        radial-gradient(1.5px 1.5px at 70% 55%, rgba(255, 255, 255, 0.5) 45%, transparent 50%),
        radial-gradient(1px 1px at 90% 75%, rgba(255, 255, 255, 0.4) 50%, transparent 50%),
        /* Purple-pink stars */
        radial-gradient(2px 2px at 50% 25%, rgba(217, 70, 239, 0.8) 40%, transparent 50%),
        radial-gradient(1.5px 1.5px at 20% 80%, rgba(192, 132, 252, 0.7) 45%, transparent 50%);
    background-size: 300px 300px, 250px 250px, 350px 350px, 280px 280px, 320px 320px, 
                     290px 290px, 310px 310px, 270px 270px, 330px 330px, 300px 300px,
                     260px 260px, 340px 340px;
    background-attachment: fixed;
    pointer-events: none;
    z-index: -1;
    animation: neonTwinkle 10s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 3px rgba(168, 85, 247, 0.5));
}

@keyframes electricAurora {
    0% {
        opacity: 0.7;
        filter: blur(40px) hue-rotate(0deg); /* Reduced from 60px */
    }
    33% {
        opacity: 0.85;
        filter: blur(45px) hue-rotate(5deg); /* Reduced from 70px, simplified rotation */
    }
    66% {
        opacity: 0.75;
        filter: blur(42px) hue-rotate(-3deg); /* Reduced from 65px */
    }
    100% {
        opacity: 0.7;
        filter: blur(40px) hue-rotate(4deg); /* Reduced from 60px */
    }
}

@keyframes neonTwinkle {
    0% {
        opacity: 0.5;
        filter: drop-shadow(0 0 2px rgba(168, 85, 247, 0.4)); /* Reduced from 3px */
    }
    25% {
        opacity: 0.75;
        filter: drop-shadow(0 0 3px rgba(139, 92, 246, 0.5)); /* Reduced from 5px */
    }
    50% {
        opacity: 0.9;
        filter: drop-shadow(0 0 4px rgba(59, 130, 246, 0.4)); /* Reduced from 6px */
    }
    75% {
        opacity: 0.65;
        filter: drop-shadow(0 0 3px rgba(34, 211, 238, 0.3)); /* Reduced from 4px */
    }
    100% {
        opacity: 0.5;
        filter: drop-shadow(0 0 2px rgba(168, 85, 247, 0.4)); /* Reduced from 3px */
    }
}

@keyframes twinkle {
    0% {
        opacity: 0.4;
    }
    100% {
        opacity: 0.7;
    }
}

/* Enhanced dark mode text with subtle glow */
.dark .text-blue-400 {
    color: rgba(168, 85, 247, 0.9)!important;
    text-shadow: 0 0 8px rgba(168, 85, 247, 0.3);
}

.dark h1, .dark h2, .dark h3 {
    text-shadow: 0 0 20px rgba(168, 85, 247, 0.15);
}
.glass-card {
    @apply bg-white/20 dark:bg-dark-200/30 backdrop-blur-md border border-white/10 dark:border-white/5 shadow-lg hover:shadow-xl transition-all duration-300 rounded-xl;
}
/* ==========================================================================
   Background Effects & Canvas
   Controls the tech-themed background and its positioning
   ========================================================================== */
.tech-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

#canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow-x: hidden;
}

/* ==========================================================================
   Content Layout
   Main content container styling
   ========================================================================== */
.content {
    position: relative;
    z-index: 2;
    padding: 2.5rem;
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: visible; /* Allow content to breathe */
}

@keyframes neonPulse {
    0%, 100% {
        box-shadow: 
            0 0 15vh rgba(139, 92, 246, 0.2),
            0 0 8vh rgba(168, 85, 247, 0.3),
            inset 0 0 2vh rgba(139, 92, 246, 0.1);
    }
    50% {
        box-shadow: 
            0 0 20vh rgba(168, 85, 247, 0.3),
            0 0 12vh rgba(139, 92, 246, 0.4),
            inset 0 0 5vh rgba(192, 132, 252, 0.15);
    }
}

/* ==========================================================================
   Theme-Specific Background Patterns
   Light Mode (Sage Mode) and Dark Mode (Rinnegan) inspired patterns
   ========================================================================== */
/* Light mode - Sage Mode inspired */
.hex-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(120deg, rgba(255, 165, 0, 0.01) 0%, rgba(255, 255, 255, 0.05) 100%),
        url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='rgba(255, 165, 0, 0.25)'%3E%3Ccircle cx='40' cy='40' r='35'/%3E%3Ccircle cx='40' cy='40' r='25'/%3E%3Ccircle cx='40' cy='40' r='15'/%3E%3Cpath d='M40 5L40 75M5 40L75 40' stroke-width='0.5'/%3E%3C/g%3E%3C/svg%3E"),
        radial-gradient(circle at 50% 50%, rgba(255, 165, 0, 0.05) 0%, transparent 60%);
    background-size: 100% 100%, 60px 60px, 100% 100%;
    animation: rinneganPulse 5s 1 linear;
}

.hex-grid::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50' cy='50' r='45' fill='none' stroke='rgba(255, 140, 0, 0.15)' stroke-width='0.5'%3E%3Canimate attributeName='r' /%3E%3C/circle%3E%3C/svg%3E");
    background-size: 100px 100px;
    animation: rinneganSpin 2s 1 linear;
}

/* Dark mode - Rinnegan inspired */
.dark .hex-grid {
    background:
        linear-gradient(120deg, rgba(138, 43, 226, 0.05) 0%, rgba(75, 0, 130, 0.05) 100%),
        url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='rgba(147, 112, 219, 0.1)'%3E%3Ccircle cx='40' cy='40' r='35'/%3E%3Ccircle cx='40' cy='40' r='25'/%3E%3Ccircle cx='40' cy='40' r='15'/%3E%3Cpath d='M40 5L40 75M5 40L75 40' stroke-width='0.5'/%3E%3C/g%3E%3C/svg%3E"),
        radial-gradient(circle at 50% 50%, rgba(138, 43, 226, 0.08) 0%, transparent 70%);
    background-size: 100% 100%, 80px 80px, 100% 100%;
    animation: rinneganPulse 5s 1 linear;
}

.dark .hex-grid::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='rgba(147, 112, 219, 0.05)'%3E%3Ccircle cx='60' cy='60' r='50'/%3E%3Ccircle cx='60' cy='60' r='40'/%3E%3Ccircle cx='60' cy='60' r='30'/%3E%3Ccircle cx='60' cy='60' r='20'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 120px 120px;
    animation: rinneganSpin 2s 1 linear;
}

/* ==========================================================================
   UI Component Styles
   Reusable component styles with neo-morphic effects
   ========================================================================== */
.neo-glass {
    @apply bg-white/10 dark:bg-dark-200/50 backdrop-blur-3xl border border-white/10 dark:border-white/5;
}

.gradient-bg {
    @apply bg-gradient-to-br from-gray-100 to-gray-200 dark:from-dark-300 dark:to-dark-200;
    background-size: 200% 200%;
    animation: gradient 15s ease 1;
}

/* ==========================================================================
   Custom Scrollbar Styling
   Enhanced scrollbar styling for both light and dark modes
   ========================================================================== */
/* Base scrollbar styles */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

/* Light mode scrollbar */
::-webkit-scrollbar-track {
    background: linear-gradient(to bottom, rgba(59, 130, 246, 0.05), rgba(147, 197, 253, 0.05));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #60a5fa, #93c5fd);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #3b82f6, #60a5fa);
    border: 2px solid rgba(255, 255, 255, 0.9);
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* Dark mode scrollbar with neon purple-blue theme */
.dark ::-webkit-scrollbar-track {
    background: linear-gradient(to bottom, 
        rgba(139, 92, 246, 0.15), 
        rgba(79, 70, 229, 0.12), 
        rgba(99, 102, 241, 0.15));
    border-radius: 10px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.dark ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, 
        #8b5cf6 0%, 
        #6366f1 25%,
        #3b82f6 50%,
        #22d3ee 75%,
        #8b5cf6 100%);
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    box-shadow: 
        0 0 10px rgba(139, 92, 246, 0.6),
        inset 0 0 6px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, 
        #a78bfa 0%, 
        #818cf8 25%,
        #60a5fa 50%,
        #34d399 75%,
        #a78bfa 100%);
    border: 2px solid rgba(0, 0, 0, 0.4);
    box-shadow: 
        0 0 15px rgba(168, 85, 247, 0.9),
        0 0 25px rgba(139, 92, 246, 0.6),
        inset 0 0 8px rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

/* Add smooth hover animation for scrollbar */
::-webkit-scrollbar-thumb:active {
    transform: scale(0.95);
}

/* Add shine effect on hover */
::-webkit-scrollbar-thumb::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg,
            transparent 25%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 75%);
    background-size: 200% 200%;
    animation: shine 3s linear 1;
}

/* Custom styling for horizontal scrollbar */
::-webkit-scrollbar:horizontal {
    height: 8px;
}

::-webkit-scrollbar-thumb:horizontal {
    background: linear-gradient(90deg, #60a5fa, #93c5fd);
}

.dark ::-webkit-scrollbar-thumb:horizontal {
    background: linear-gradient(90deg, 
        #8b5cf6 0%, 
        #6366f1 33%,
        #3b82f6 66%,
        #22d3ee 100%);
    box-shadow: 
        0 0 10px rgba(139, 92, 246, 0.6),
        inset 0 0 6px rgba(255, 255, 255, 0.3);
}

/* Add scrollbar corner styling */
::-webkit-scrollbar-corner {
    background: transparent;
    border-radius: 10px;
}

/* ==========================================================================
   Interactive Elements - Neon Theme
   Button and card hover effects with purple-blue neon
   ========================================================================== */
.neo-button {
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.neo-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.neo-button:hover::before {
    left: 100%;
}
.dark .neo-button{
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.25), 
        rgba(99, 102, 241, 0.2), 
        rgba(59, 130, 246, 0.25));
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 
        0 0 15px rgba(139, 92, 246, 0.3),
        inset 0 0 15px rgba(168, 85, 247, 0.1);
    transition: all 0.3s ease;
}

.dark .neo-button:hover {
    background: linear-gradient(135deg, 
        rgba(168, 85, 247, 0.35), 
        rgba(139, 92, 246, 0.3), 
        rgba(79, 70, 229, 0.35));
    border: 1px solid rgba(168, 85, 247, 0.5);
    box-shadow: 
        0 0 25px rgba(168, 85, 247, 0.6),
        0 0 40px rgba(139, 92, 246, 0.4),
        inset 0 0 20px rgba(192, 132, 252, 0.2);
    transform: translateY(-2px);
}

.hover-card {
    transition: all 300ms ease-in-out 150ms;
    backdrop-filter: blur(10px); /* Reduced from 20px for better performance */
    background-color: #ffffff!important;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.hover-card:hover {
    transform: translateY(-5px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.dark .hover-card{
    background-color: rgba(0, 0, 0, 0.3)!important;
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(139, 92, 246, 0.05);
}

.dark .hover-card:hover {
    transform: translateY(-8px) scale(1.01);
    border: 1px solid rgba(168, 85, 247, 0.5);
    background-color: rgba(15, 4, 32, 0.4)!important;
    box-shadow: 
        0 0 30px rgba(168, 85, 247, 0.4),
        0 0 50px rgba(139, 92, 246, 0.3),
        0 15px 40px rgba(0, 0, 0, 0.6),
        inset 0 0 30px rgba(139, 92, 246, 0.1);
}

/* Neon glow effects for dark mode */
.dark .glass-card {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px); /* Reduced from 20px for better performance */
    border: 1px solid rgba(139, 92, 246, 0.25);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 0 20px rgba(139, 92, 246, 0.08);
}

.dark .glass-card:hover {
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 
        0 0 20px rgba(168, 85, 247, 0.3),
        0 8px 40px rgba(0, 0, 0, 0.5),
        inset 0 0 25px rgba(139, 92, 246, 0.12);
}

/* Add this to ensure content appears above background */
.container {
    position: relative;
    z-index: 1;
}

/* Update nav z-index */
nav {
    position: relative;
    z-index: 100;
}

/* Update footer z-index */
footer {
    position: relative;
    z-index: 0;
}

/* ==========================================================================
   Modal Styles - Proper z-index layering
   ========================================================================== */

/* Target modals by ID pattern (loanModal, leaveModal, etc.) */
[id*="Modal"],
[id*="modal"] {
    z-index: 9998 !important;
}

/* Also target by class for compatibility */
.modal {
    z-index: 9998 !important;
}

/* Modal backdrop should be below modal content but above everything else */
.modal-backdrop,
.modal-overlay {
    z-index: 9997 !important;
}

/* Modal content should be on top */
.modal-content,
.modal-dialog {
    z-index: 9999 !important;
    position: relative;
}

/* Utility class for fixed modals - target Tailwind z-50 */
.fixed.z-50,
.fixed[class*="z-50"] {
    z-index: 9998 !important;
}

/* Specifically target common modal ID patterns with position and z-index */
#loanModal,
#leaveModal,
#loanDetailsModal,
#timeOffDetailsModal,
#cancelConfirmModal,
#checkinRequestModal,
#previousDayModal,
#reportCheckModal,
#earlyLeaveModal,
#forgottenCheckoutModal,
#newSessionModal,
#createTeamModal,
#editTeamModal,
#deleteTeamModal,
#reportPreviewModal,
#portfolioModal,
#createProjectModal,
#editProjectModal,
#deleteProjectModal {
    z-index: 9998 !important;
    inset: 0 !important;
}

/* Force navbar to z-index 100 for dropdowns on desktop */
@media (min-width: 769px) {
    nav,
    .navbar,
    #navbar,
    .grid-navbar {
        z-index: 100 !important;
    }
    
    footer,
    .footer,
    #footer,
    .grid-footer {
        z-index: 0 !important;
    }
    
    .grid-sidebar {
        z-index: 0 !important;
    }
}

/* Mobile sidebar must be above everything */
@media (max-width: 768px) {
    /* Remove positioning from grid container */
    .grid-sidebar {
        position: static !important;
        z-index: auto !important;
    }
    
    /* Sidebar itself is fixed and on top */
    #sidebar,
    .sidebar {
        z-index: 10001 !important;
        position: fixed !important;
    }
    
    /* Overlay below sidebar */
    #sidebar-overlay,
    .sidebar-overlay {
        z-index: 10000 !important;
        position: fixed !important;
    }
    
    /* Everything else uses auto z-index */
    nav,
    .navbar,
    #navbar,
    .grid-navbar,
    footer,
    .footer,
    #footer,
    .grid-footer,
    main,
    .grid-main {
        z-index: auto !important;
    }
}

/* Body scroll lock */
body.modal-open {
    overflow: hidden;
    padding-right: 0;
}

/* ==========================================================================
   Animations
   All animation keyframes
   ========================================================================== */
@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-1000px) rotate(360deg); }
}

@keyframes shine {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.1;
    }

    100% {
        transform: scale(0.8);
        opacity: 0.3;
    }
}

@keyframes natureSage {
    0% {
        background-position: 0% 0%, 0 0, center;
    }

    100% {
        background-position: 100% 100%, 60px 60px, center;
    }
}

@keyframes chakraPulse {
    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.7;
    }
}

@keyframes rinneganPulse {
    0% {
        background-position: 0% 0%, 0 0, center;
    }

    100% {
        background-position: -100% -100%, 80px 80px, center;
    }
}

@keyframes rinneganSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes chakraFloat {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Additional chakra particles effect */
.tech-background::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 166, 0, 0.18) 0%, transparent 10%),
        radial-gradient(circle at 70% 60%, rgba(255, 166, 0, 0.18) 0%, transparent 10%),
        radial-gradient(circle at 40% 80%, rgba(255, 165, 0, 0.18) 0%, transparent 10%);
    filter: blur(2px); /* Reduced from 4px for better performance */
    animation: shine 2s 1 ease-in-out;
}

.dark .tech-background::after {
    background:
        radial-gradient(circle at 30% 20%, rgba(147, 112, 219, 0.1) 0%, transparent 10%),
        radial-gradient(circle at 70% 60%, rgba(138, 43, 226, 0.1) 0%, transparent 10%),
        radial-gradient(circle at 40% 80%, rgba(147, 112, 219, 0.1) 0%, transparent 10%);
}

/* Add shine effect on hover */
::-webkit-scrollbar-thumb::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg,
            transparent 25%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 75%);
    background-size: 200% 200%;
    animation: shine 3s linear 1;
}

/* Custom styling for horizontal scrollbar */
::-webkit-scrollbar:horizontal {
    height: 8px;
}

::-webkit-scrollbar-thumb:horizontal {
    background: linear-gradient(90deg, #60a5fa, #93c5fd);
}

.dark ::-webkit-scrollbar-thumb:horizontal {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

/* Add scrollbar corner styling */
::-webkit-scrollbar-corner {
    background: transparent;
    border-radius: 10px;
}

/* Section Title Animations with Neon Glow */
.section-title {
    position: relative;
    padding-left: 1rem;
    transition: transform 300ms ease-in-out 150ms, color 300ms ease-in-out 150ms, text-shadow 300ms ease-in-out;
    transform-origin: left;
}

.hover-card:hover .section-title {
    transform: translateY(-5px);
    color: #60a5fa;
}

.dark .hover-card:hover .section-title {
    color: #a78bfa;
    text-shadow: 
        0 0 10px rgba(168, 85, 247, 0.6),
        0 0 20px rgba(139, 92, 246, 0.4),
        0 0 30px rgba(168, 85, 247, 0.3);
}

/* Animated underline effect with neon glow */
.section-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 1rem;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #60a5fa, #3b82f6);
    transition: width 1s ease, box-shadow 300ms ease;
}

.dark .section-title::after {
    background: linear-gradient(90deg, 
        #8b5cf6 0%, 
        #6366f1 33%,
        #3b82f6 66%,
        #22d3ee 100%);
}

.hover-card:hover .section-title::after {
    width: calc(100% - 1rem);
}

.dark .hover-card:hover .section-title::after {
    box-shadow: 
        0 0 10px rgba(139, 92, 246, 0.8),
        0 0 20px rgba(168, 85, 247, 0.6);
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

a {
    cursor: pointer;
}

/* Electric pulse animation */
@keyframes electricPulse {
    0%, 100% {
        box-shadow: 
            0 0 15px rgba(168, 85, 247, 0.4),
            0 0 30px rgba(139, 92, 246, 0.3);
    }
    50% {
        box-shadow: 
            0 0 25px rgba(168, 85, 247, 0.6),
            0 0 50px rgba(139, 92, 246, 0.5),
            0 0 75px rgba(168, 85, 247, 0.3);
    }
}

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

/* Neon input focus effects */
.dark input:focus,
.dark textarea:focus,
.dark select:focus {
    outline: none;
    border-color: rgba(168, 85, 247, 0.6) !important;
    box-shadow: 
        0 0 15px rgba(168, 85, 247, 0.4),
        0 0 25px rgba(139, 92, 246, 0.3),
        inset 0 0 10px rgba(168, 85, 247, 0.1) !important;
}

/* Holographic shimmer effect */
@keyframes holographicShimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

@keyframes matrixRain {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(50%);
    }
}