/* FlexTrize - Advanced Animations & Effects */

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Slide Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Glow Animations */
@keyframes neonGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(99, 102, 241, 0.8),
                     0 0 20px rgba(99, 102, 241, 0.6),
                     0 0 30px rgba(99, 102, 241, 0.4);
    }
    50% {
        text-shadow: 0 0 20px rgba(99, 102, 241, 1),
                     0 0 40px rgba(99, 102, 241, 0.8),
                     0 0 60px rgba(99, 102, 241, 0.6);
    }
}

@keyframes borderGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(99, 102, 241, 0.3),
                    inset 0 0 10px rgba(99, 102, 241, 0.1);
    }
    50% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.6),
                    inset 0 0 20px rgba(99, 102, 241, 0.2);
    }
}

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

.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 3s infinite;
}

/* Pulse Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

@keyframes pulseRing {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Rotate Animations */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes rotateY {
    from {
        transform: rotateY(0deg);
    }
    to {
        transform: rotateY(360deg);
    }
}

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

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

.animated-gradient {
    background: linear-gradient(270deg, #667eea, #764ba2, #f093fb, #4facfe);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

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

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* Particle Animation */
@keyframes particleFloat {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

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

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

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

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

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

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

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

.animate-bounce {
    animation: bounce 2s ease-in-out infinite;
}

.animate-rotate {
    animation: rotate 20s linear infinite;
}

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

/* Delay Classes */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.3);
}

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

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.6);
}

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

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

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

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* Reveal on Scroll */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Parallax Effects */
.parallax {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(99, 102, 241, 0.1);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

/* Progress Bar */
@keyframes progressBar {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

.progress-bar {
    height: 4px;
    background: var(--gradient-primary);
    animation: progressBar 2s ease-out forwards;
}

/* 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.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

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

/* Floating Elements */
.floating {
    animation: float 6s ease-in-out infinite;
}

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

/* Glitch Effect */
@keyframes glitch {
    0% {
        text-shadow: 2px 2px 0 rgba(255, 0, 0, 0.7),
                     -2px -2px 0 rgba(0, 255, 255, 0.7);
    }
    25% {
        text-shadow: -2px 2px 0 rgba(255, 0, 0, 0.7),
                     2px -2px 0 rgba(0, 255, 255, 0.7);
    }
    50% {
        text-shadow: 2px -2px 0 rgba(255, 0, 0, 0.7),
                     -2px 2px 0 rgba(0, 255, 255, 0.7);
    }
    75% {
        text-shadow: -2px -2px 0 rgba(255, 0, 0, 0.7),
                     2px 2px 0 rgba(0, 255, 255, 0.7);
    }
    100% {
        text-shadow: 2px 2px 0 rgba(255, 0, 0, 0.7),
                     -2px -2px 0 rgba(0, 255, 255, 0.7);
    }
}

.glitch {
    animation: glitch 1s infinite;
}

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

/* Page Transition */
.page-transition {
    animation: fadeIn 0.5s ease-in;
}

/* Card Stack Effect */
.card-stack {
    position: relative;
}

.card-stack::before,
.card-stack::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    z-index: -1;
}

.card-stack::before {
    transform: translate(-8px, -8px);
    opacity: 0.3;
}

.card-stack::after {
    transform: translate(-4px, -4px);
    opacity: 0.6;
}


