/* Animation Keyframes */

/* Glitch Effect */
@keyframes glitch {
    0% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
    100% {
        transform: translate(0);
    }
}

@keyframes glitch-text {
    0% {
        text-shadow: 
            0.05em 0 0 #00ffff,
            -0.05em -0.025em 0 #ff00ff,
            0.025em 0.05em 0 #ffff00;
    }
    15% {
        text-shadow: 
            0.05em 0 0 #00ffff,
            -0.05em -0.025em 0 #ff00ff,
            0.025em 0.05em 0 #ffff00;
    }
    16% {
        text-shadow: 
            -0.05em -0.025em 0 #00ffff,
            0.025em 0.025em 0 #ff00ff,
            -0.05em -0.05em 0 #ffff00;
    }
    49% {
        text-shadow: 
            -0.05em -0.025em 0 #00ffff,
            0.025em 0.025em 0 #ff00ff,
            -0.05em -0.05em 0 #ffff00;
    }
    50% {
        text-shadow: 
            0.025em 0.05em 0 #00ffff,
            0.05em 0 0 #ff00ff,
            0 -0.05em 0 #ffff00;
    }
    99% {
        text-shadow: 
            0.025em 0.05em 0 #00ffff,
            0.05em 0 0 #ff00ff,
            0 -0.05em 0 #ffff00;
    }
    100% {
        text-shadow: 
            0.05em 0 0 #00ffff,
            -0.05em -0.025em 0 #ff00ff,
            0.025em 0.05em 0 #ffff00;
    }
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-30px) rotate(5deg);
    }
    66% {
        transform: translateY(-15px) rotate(-3deg);
    }
}

@keyframes float-large {
    0%, 100% {
        transform: translateY(0px) rotate(0deg) scale(1);
    }
    50% {
        transform: translateY(-50px) rotate(10deg) scale(1.1);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 255, 255, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 20px rgba(0, 255, 255, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 255, 255, 0);
    }
}

/* Typing Animation */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-cursor {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--primary-color);
    }
}

/* Morphing Animation */
@keyframes morph {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
        transform: translate3d(0, 0, 0) rotateZ(0deg);
    }
    34% {
        border-radius: 70% 60% 50% 40% / 50% 60% 30% 60%;
        transform: translate3d(0, -20px, 0) rotateZ(-1deg);
    }
    67% {
        border-radius: 100% 60% 60% 100% / 100% 100% 60% 60%;
        transform: translate3d(0, 20px, 0) rotateZ(1deg);
    }
}

/* Hologram Effect */
@keyframes hologram {
    0%, 100% {
        opacity: 0.8;
        filter: hue-rotate(0deg);
    }
    50% {
        opacity: 0.4;
        filter: hue-rotate(180deg);
    }
}

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

/* Data Visualization */
@keyframes data-flow {
    0% {
        transform: translateX(-100%) rotate(0deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%) rotate(360deg);
        opacity: 0;
    }
}

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

/* 3D Transformations */
@keyframes rotate-3d {
    0% {
        transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
    }
    25% {
        transform: perspective(1000px) rotateY(90deg) rotateX(10deg);
    }
    50% {
        transform: perspective(1000px) rotateY(180deg) rotateX(0deg);
    }
    75% {
        transform: perspective(1000px) rotateY(270deg) rotateX(-10deg);
    }
    100% {
        transform: perspective(1000px) rotateY(360deg) rotateX(0deg);
    }
}

@keyframes flip-3d {
    0% {
        transform: perspective(1000px) rotateX(0deg);
    }
    50% {
        transform: perspective(1000px) rotateX(-90deg);
    }
    100% {
        transform: perspective(1000px) rotateX(0deg);
    }
}

/* Neon Glow */
@keyframes neon-glow {
    0%, 100% {
        text-shadow: 
            0 0 5px #fff,
            0 0 10px #fff,
            0 0 15px #fff,
            0 0 20px #00ffff,
            0 0 35px #00ffff,
            0 0 40px #00ffff;
    }
    50% {
        text-shadow: 
            0 0 2px #fff,
            0 0 5px #fff,
            0 0 8px #fff,
            0 0 12px #00ffff,
            0 0 18px #00ffff,
            0 0 25px #00ffff;
    }
}

/* Particle System */
@keyframes particle-float {
    0% {
        transform: translateY(100vh) translateX(0px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

/* Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Loading Animations */
@keyframes loading-dots {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

@keyframes progress-bar {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

/* Text Reveal */
@keyframes text-reveal {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

/* Bounce In */
@keyframes bounce-in {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Slide In Animations */
@keyframes slide-in-left {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slide-in-right {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Animation Classes */
.glitch-text {
    animation: glitch-text 2s linear infinite;
    position: relative;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-text::before {
    animation: glitch 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
    color: #00ffff;
    z-index: -1;
}

.glitch-text::after {
    animation: glitch 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) reverse both infinite;
    color: #ff00ff;
    z-index: -2;
}

.floating-shape {
    animation: float 6s ease-in-out infinite;
}

.floating-shape:nth-child(2) {
    animation: float-large 8s ease-in-out infinite;
    animation-delay: -2s;
}

.floating-shape:nth-child(3) {
    animation: float 4s ease-in-out infinite;
    animation-delay: -4s;
}

.pulse-animation {
    animation: pulse 2s infinite;
}

.typing-animation {
    overflow: hidden;
    border-right: 2px solid var(--primary-color);
    white-space: nowrap;
    margin: 0 auto;
    animation: 
        typing 3.5s steps(40, end),
        blink-cursor 0.75s step-end infinite;
}

.morphing-text {
    animation: morph 8s ease-in-out infinite;
}

.hologram-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 255, 255, 0.1) 50%,
        transparent 100%
    );
    animation: hologram 3s ease-in-out infinite;
}

.hologram-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(0, 255, 255, 0.5);
    animation: scan-lines 2s linear infinite;
}

.data-visualization {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.data-visualization::before {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: data-flow 3s linear infinite;
}

.data-visualization::after {
    content: '';
    position: absolute;
    width: 1px;
    height: 20px;
    background: var(--secondary-color);
    animation: matrix-rain 2s linear infinite;
    animation-delay: 1s;
}

.glitch-title {
    position: relative;
    animation: neon-glow 2s ease-in-out infinite alternate;
}

.icon-3d {
    animation: rotate-3d 10s linear infinite;
}

.icon-ai::before {
    content: '🤖';
    font-size: 2rem;
}

.icon-social::before {
    content: '🌐';
    font-size: 2rem;
}

.icon-startup::before {
    content: '🚀';
    font-size: 2rem;
}

.icon-move::before {
    content: '⚡';
    font-size: 2rem;
}

.icon-future::before {
    content: '🔮';
    font-size: 2rem;
}

.button-particles {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.button-particles::before,
.button-particles::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: particle-float 3s linear infinite;
}

.button-particles::before {
    top: 20%;
    left: 20%;
    animation-delay: -1s;
}

.button-particles::after {
    top: 70%;
    left: 80%;
    animation-delay: -2s;
}

.button-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.submit-button:active .button-ripple {
    animation: ripple 0.6s linear;
}

.input-animation {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-tech);
    transition: width 0.3s ease;
}

.form-group input:focus ~ .input-animation,
.form-group textarea:focus ~ .input-animation {
    width: 100%;
}

/* Scroll-based Animations */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Performance Optimizations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* GPU Acceleration */
.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Complex Animation Combinations */
.mega-animation {
    animation: 
        float 6s ease-in-out infinite,
        rotate-3d 12s linear infinite,
        pulse 3s ease-in-out infinite;
}

.tech-showcase {
    animation: 
        neon-glow 2s ease-in-out infinite alternate,
        morphing-text 8s ease-in-out infinite;
}

/* Interactive Hover Animations */
.hover-3d {
    transition: transform 0.3s ease;
}

.hover-3d:hover {
    transform: perspective(1000px) rotateX(10deg) rotateY(10deg) translateZ(20px);
}

.hover-glitch:hover {
    animation: glitch 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.hover-morph:hover {
    animation: morph 2s ease-in-out;
}

/* Loading Screen Animations */
.loading-container {
    animation: bounce-in 1s ease-out;
}

.progress-bar {
    animation: progress-bar 3s ease-in-out;
}

/* Advanced Effects */
.matrix-effect {
    position: relative;
    overflow: hidden;
}

.matrix-effect::before {
    content: '01001001011010010110111001100011';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    color: var(--primary-color);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    opacity: 0.3;
    animation: matrix-rain 5s linear infinite;
}

.cyber-grid {
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    animation: data-flow 10s linear infinite;
}

/* Text Effects */
.text-shadow-neon {
    text-shadow: 
        0 0 5px currentColor,
        0 0 10px currentColor,
        0 0 15px currentColor,
        0 0 20px var(--primary-color);
}

.text-gradient-animated {
    background: linear-gradient(-45deg, #ff0000, #00ff00, #0000ff, #ffff00);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}