/* ==========================================
   ANIMATIONS & KEYFRAMES
   ========================================== */

/* Scroll Bounce Animation */
@keyframes scroll-bounce {
    0%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(10px);
        opacity: 0.5;
    }
}

/* Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Left */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fade In Right */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale In */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Pulse Glow */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 229, 204, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 229, 204, 0.6);
    }
}

/* Gradient Shift */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Rotate Device Mockup */
@keyframes rotateDevice {
    from {
        transform: rotate(-5deg);
    }
    to {
        transform: rotate(5deg);
    }
}

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Slide In From Bottom */
@keyframes slideInBottom {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Line Draw */
@keyframes lineDraw {
    from {
        height: 0;
    }
    to {
        height: 40px;
    }
}

/* Number Count Up - handled by JavaScript */

/* Blur In */
@keyframes blurIn {
    from {
        opacity: 0;
        filter: blur(10px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

/* ==========================================
   HOVER ANIMATIONS
   ========================================== */

.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
}

.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    filter: brightness(1.2);
    box-shadow: 0 10px 40px rgba(0, 229, 204, 0.4);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* ==========================================
   LOADING ANIMATIONS
   ========================================== */

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 229, 204, 0.3);
    border-top-color: var(--cyber-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================
   TEXT ANIMATIONS
   ========================================== */

.text-glitch {
    position: relative;
    color: var(--cyber-cyan);
}

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

.text-glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--cyber-red);
    animation: glitch-1 2s infinite;
}

.text-glitch::after {
    left: -2px;
    text-shadow: 2px 0 var(--cyber-blue);
    animation: glitch-2 2s infinite;
}

@keyframes glitch-1 {
    0%, 100% {
        clip-path: inset(50% 0 0 0);
    }
    25% {
        clip-path: inset(0 0 70% 0);
    }
    50% {
        clip-path: inset(30% 0 50% 0);
    }
    75% {
        clip-path: inset(10% 0 80% 0);
    }
}

@keyframes glitch-2 {
    0%, 100% {
        clip-path: inset(0 0 50% 0);
    }
    25% {
        clip-path: inset(70% 0 0 0);
    }
    50% {
        clip-path: inset(50% 0 30% 0);
    }
    75% {
        clip-path: inset(80% 0 10% 0);
    }
}

/* ==========================================
   BACKGROUND ANIMATIONS
   ========================================== */

.animated-gradient {
    background: linear-gradient(
        45deg,
        var(--cyber-cyan),
        var(--cyber-purple),
        var(--cyber-pink),
        var(--cyber-cyan)
    );
    background-size: 300% 300%;
    animation: gradientShift 5s ease infinite;
}

/* Grid Pattern Animation */
.grid-pattern {
    background-image:
        linear-gradient(rgba(0, 229, 204, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 204, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 50px 50px;
    }
}

/* ==========================================
   SCROLL REVEAL ANIMATIONS
   ========================================== */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s ease;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s ease;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.6s ease;
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* ==========================================
   PARTICLE ANIMATIONS
   ========================================== */

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--cyber-cyan);
    border-radius: 50%;
    animation: particleFloat 3s infinite ease-in-out;
}

@keyframes particleFloat {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(50px);
        opacity: 0;
    }
}

/* ==========================================
   BUTTON RIPPLE EFFECT
   ========================================== */

.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* ==========================================
   CYBERPUNK EFFECTS
   ========================================== */

.cyber-border {
    position: relative;
    border: 2px solid transparent;
}

.cyber-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--cyber-cyan), var(--cyber-purple), var(--cyber-pink), var(--cyber-cyan));
    background-size: 300% 300%;
    border-radius: inherit;
    z-index: -1;
    animation: gradientShift 3s ease infinite;
}

/* Scanline Effect */
.scanlines {
    position: relative;
    overflow: hidden;
}

.scanlines::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 229, 204, 0.03),
        rgba(0, 229, 204, 0.03) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    animation: scanlineMove 8s linear infinite;
}

@keyframes scanlineMove {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(100%);
    }
}

/* ==========================================
   STAGGER DELAYS FOR LISTS
   ========================================== */

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }
.stagger-item:nth-child(7) { animation-delay: 0.7s; }
.stagger-item:nth-child(8) { animation-delay: 0.8s; }

/* ==========================================
   TRANSITION UTILITIES
   ========================================== */

.transition-fast { transition: all 0.2s ease; }
.transition-normal { transition: all 0.3s ease; }
.transition-slow { transition: all 0.6s ease; }
