/* Animations - Deep Darkness Studios™ */

/* Entrance Animations */
@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromTop {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInFromBottom {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Cyberpunk Specific Animations */
@keyframes neonPulse {
    0%, 100% {
        text-shadow: 
            0 0 5px currentColor,
            0 0 10px currentColor,
            0 0 15px currentColor,
            0 0 20px currentColor;
    }
    50% {
        text-shadow: 
            0 0 2px currentColor,
            0 0 5px currentColor,
            0 0 8px currentColor,
            0 0 12px currentColor;
    }
}

@keyframes borderGlow {
    0%, 100% {
        box-shadow: 
            0 0 5px var(--primary-cyan),
            0 0 10px var(--primary-cyan),
            0 0 15px var(--primary-cyan);
    }
    50% {
        box-shadow: 
            0 0 10px var(--primary-cyan),
            0 0 20px var(--primary-cyan),
            0 0 30px var(--primary-cyan);
    }
}

@keyframes dataStream {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

@keyframes holographicFlicker {
    0%, 100% {
        opacity: 1;
        filter: hue-rotate(0deg);
    }
    25% {
        opacity: 0.8;
        filter: hue-rotate(90deg);
    }
    50% {
        opacity: 0.9;
        filter: hue-rotate(180deg);
    }
    75% {
        opacity: 0.7;
        filter: hue-rotate(270deg);
    }
}

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

/* Loading Animations */
@keyframes loadingDots {
    0%, 20% {
        color: var(--primary-cyan);
        transform: scale(1);
    }
    50% {
        color: var(--neon-pink);
        transform: scale(1.2);
    }
    100% {
        color: var(--primary-cyan);
        transform: scale(1);
    }
}

@keyframes circuitTrace {
    0% {
        stroke-dashoffset: 1000;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

/* Hover Animations */
@keyframes buttonHover {
    0% {
        transform: translateY(0);
        box-shadow: 0 5px 15px rgba(0, 255, 255, 0.3);
    }
    50% {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(0, 255, 255, 0.5);
    }
    100% {
        transform: translateY(-2px);
        box-shadow: 0 10px 30px rgba(0, 255, 255, 0.4);
    }
}

@keyframes cardHover {
    0% {
        transform: translateY(0) rotateX(0);
    }
    100% {
        transform: translateY(-10px) rotateX(5deg);
    }
}

/* Text Animations */
@keyframes typewriter {
    0% {
        width: 0;
    }
    100% {
        width: 100%;
    }
}

@keyframes blinkCursor {
    0%, 50% {
        border-color: transparent;
    }
    51%, 100% {
        border-color: var(--primary-cyan);
    }
}

/* Background Animations */
@keyframes backgroundShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes particleFloat {
    0% {
        transform: translateY(0px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
    }
}

/* Utility Animation Classes */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-slide-in-left {
    animation: slideInFromLeft 0.8s ease-out;
}

.animate-slide-in-right {
    animation: slideInFromRight 0.8s ease-out;
}

.animate-slide-in-top {
    animation: slideInFromTop 0.8s ease-out;
}

.animate-slide-in-bottom {
    animation: slideInFromBottom 0.8s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.5s ease-out;
}

.animate-neon-pulse {
    animation: neonPulse 2s ease-in-out infinite;
}

.animate-border-glow {
    animation: borderGlow 2s ease-in-out infinite;
}

.animate-holographic-flicker {
    animation: holographicFlicker 3s ease-in-out infinite;
}

.animate-typewriter {
    animation: typewriter 3s steps(40, end), blinkCursor 0.75s step-end infinite;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--primary-cyan);
}

/* Delayed Animations */
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }

/* Scroll-triggered Animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.scroll-animate.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Interactive Elements */
.interactive-glow:hover {
    animation: borderGlow 1s ease-in-out;
}

.interactive-pulse:hover {
    animation: neonPulse 1s ease-in-out;
}

.interactive-flicker:hover {
    animation: holographicFlicker 2s ease-in-out;
}

/* Loading States */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 255, 255, 0.3);
    border-top: 3px solid var(--primary-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-dots {
    display: inline-flex;
    gap: 4px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-cyan);
    animation: loadingDots 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.loading-dots span:nth-child(3) { animation-delay: 0s; }

/* Particle System */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary-cyan);
    border-radius: 50%;
    animation: particleFloat 10s linear infinite;
}

.particle:nth-child(odd) {
    background: var(--neon-pink);
    animation-duration: 12s;
}

.particle:nth-child(3n) {
    background: var(--neon-green);
    animation-duration: 8s;
}

/* Scan Line Effect */
.scan-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--primary-cyan), 
        transparent);
    animation: scanLine 3s linear infinite;
    z-index: 1000;
    pointer-events: none;
}

/* Data Stream Effect */
.data-stream {
    position: fixed;
    width: 2px;
    height: 20px;
    background: linear-gradient(180deg, 
        transparent, 
        var(--neon-green), 
        transparent);
    animation: dataStream 2s linear infinite;
    z-index: -1;
}

/* Responsive Animation Adjustments */
@media (max-width: 768px) {
    .animate-slide-in-left,
    .animate-slide-in-right {
        animation-name: fadeIn;
    }
    
    .hologram-container {
        animation-duration: 15s;
    }
    
    .animate-typewriter {
        animation: fadeIn 1s ease-out;
        border-right: none;
        overflow: visible;
        white-space: normal;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .scroll-animate {
        opacity: 1;
        transform: none;
    }
}

