/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #09090b;
}

::-webkit-scrollbar-thumb {
    background: #27272a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3f3f46;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 0.8s ease-out forwards;
}

.animate-slide-up {
    animation: slide-up 0.8s ease-out forwards;
    opacity: 0;
    animation-delay: 0.2s;
}

.animate-slide-up-delayed {
    animation: slide-up 0.8s ease-out forwards;
    opacity: 0;
    animation-delay: 0.4s;
}

.animate-fade-in-delayed {
    animation: fade-in 0.8s ease-out forwards;
    opacity: 0;
    animation-delay: 0.6s;
}

/* Gallery item hover enhancement */
.gallery-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 40%, rgba(6, 182, 212, 0.1) 50%, transparent 60%);
    background-size: 200% 200%;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 1;
}

.gallery-item:hover::before {
    opacity: 1;
    animation: shimmer 1.5s infinite;
}

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

/* Focus styles */
input:focus, textarea:focus {
    box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

/* Selection color */
::selection {
    background: #06b6d4;
    color: #09090b;
}

/* Image loading placeholder */
img {
    background: linear-gradient(110deg, #18181b 8%, #27272a 18%, #18181b 33%);
    background-size: 200% 100%;
    animation: shimmer-bg 1.5s linear infinite;
}

img[src] {
    animation: none;
    background: transparent;
}

@keyframes shimmer-bg {
    to {
        background-position-x: -200%;
    }
}
/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* JARVIS Specific Animations */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(6, 182, 212, 0.8);
    }
}

.jarvis-active {
    animation: pulse-glow 2s infinite;
}

/* Voice wave animation for JARVIS */
@keyframes sound-wave {
    0% { height: 10px; }
    50% { height: 40px; }
    100% { height: 10px; }
}

/* Ensure proper z-index for fixed elements */
custom-navbar {
    position: relative;
    z-index: 50;
}

/* Glass morphism enhancement */
.glass-panel {
    background: rgba(24, 24, 27, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Custom selection for JARVIS page */
::selection {
    background: rgba(6, 182, 212, 0.3);
    color: #fff;
}
