/* Ultra-Modern Animation Effects
 * Copyright (C) 2025, Shyamal Chandra
 */

/* PDF Card Hover Animation */
.pdf-card-hover {
    animation: pdfCardPulse 0.6s ease-in-out;
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 0 25px 50px rgba(37, 99, 235, 0.25),
                0 0 0 1px rgba(37, 99, 235, 0.1) !important;
}

@keyframes pdfCardPulse {
    0%, 100% {
        transform: translateY(-8px) scale(1.02);
    }
    50% {
        transform: translateY(-12px) scale(1.03);
    }
}

/* PDF Icon Float Animation */
@keyframes pdfIconFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

.pdf-icon-float {
    animation: pdfIconFloat 3s ease-in-out infinite;
}

/* Modal Entrance */
@keyframes modalEntrance {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-visible .pdf-modal-container {
    animation: modalEntrance 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 3D Card Effects */
.card-3d {
    perspective: 1000px;
    transform-style: preserve-3d;
}

.card-3d:hover {
    transform: rotateY(5deg) rotateX(-5deg) scale(1.02);
}

/* Magnetic Button Effect */
.magnetic-btn {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Glow Pulse */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(37, 99, 235, 0.4),
                    0 0 40px rgba(37, 99, 235, 0.2);
    }
    50% {
        box-shadow: 0 0 30px rgba(37, 99, 235, 0.6),
                    0 0 60px rgba(37, 99, 235, 0.4);
    }
}

.glow-pulse {
    animation: glowPulse 3s ease-in-out infinite;
}

/* Text Reveal */
.text-reveal {
    overflow: hidden;
    position: relative;
}

/* 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.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Morphing Blob */
@keyframes morph {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
}

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

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

.gradient-border {
    position: relative;
    background: var(--bg-primary);
    border-radius: 1rem;
    padding: 2px;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 1rem;
    padding: 2px;
    background: var(--gradient-rainbow);
    background-size: 200% 200%;
    animation: gradientBorder 3s ease infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
}

/* Liquid Wave */
@keyframes wave {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

.liquid-wave {
    animation: wave 4s ease-in-out infinite;
}

/* Neon Glow */
.neon-glow {
    text-shadow: 
        0 0 10px rgba(37, 99, 235, 0.8),
        0 0 20px rgba(37, 99, 235, 0.6),
        0 0 30px rgba(37, 99, 235, 0.4);
    animation: neonPulse 2s ease-in-out infinite;
}

@keyframes neonPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Stagger Animation */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-item.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Fade In Up Stagger */
.fade-in-up-stagger > * {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-up-stagger > *.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced 3D Tilt */
@keyframes tilt {
    0%, 100% {
        transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
    }
    25% {
        transform: perspective(1000px) rotateX(2deg) rotateY(2deg);
    }
    50% {
        transform: perspective(1000px) rotateX(-2deg) rotateY(-2deg);
    }
    75% {
        transform: perspective(1000px) rotateX(1deg) rotateY(-1deg);
    }
}

.feature-card:hover,
.doc-card:hover {
    animation: tilt 0.5s ease-out;
}

/* Glitch Effect */
@keyframes glitch {
    0%, 100% {
        transform: translate(0);
        filter: hue-rotate(0deg);
    }
    20% {
        transform: translate(-2px, 2px);
        filter: hue-rotate(90deg);
    }
    40% {
        transform: translate(-2px, -2px);
        filter: hue-rotate(180deg);
    }
    60% {
        transform: translate(2px, 2px);
        filter: hue-rotate(270deg);
    }
    80% {
        transform: translate(2px, -2px);
        filter: hue-rotate(360deg);
    }
}

.code-block:hover pre {
    animation: glitch 0.3s ease;
}

/* Pulse Glow */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(37, 99, 235, 0.5),
                    0 0 10px rgba(37, 99, 235, 0.3);
    }
    50% {
        box-shadow: 0 0 10px rgba(37, 99, 235, 0.8),
                    0 0 20px rgba(37, 99, 235, 0.6);
    }
}

.btn-primary,
.feature-card:hover,
.doc-card:hover {
    animation: pulseGlow 2s ease-in-out infinite;
}

/* Smooth Scale */
.interactive {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.interactive:active {
    transform: scale(0.95);
}

/* Slide In 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);
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

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

.bounce-in {
    animation: bounceIn 0.6s ease-out;
}

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

.feature-icon,
.doc-icon {
    animation: float 6s ease-in-out infinite;
}

.feature-icon:nth-child(2n) {
    animation-delay: -2s;
}

.feature-icon:nth-child(3n) {
    animation-delay: -4s;
}

/* Reveal on Scroll */
.reveal-on-scroll {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

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

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

.animated-gradient-text {
    background: var(--gradient-rainbow);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGradient 5s ease infinite;
}

/* Ripple Effect */
@keyframes ripple {
    to {
        transform: translate(-50%, -50%) scale(4);
        opacity: 0;
    }
}

.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%);
    animation: ripple 0.6s ease-out;
}

/* Removed morphing blob - too resource intensive */

/* Glass Morphism Effect */
.glass-morphism {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Simplified neon text - removed animation for performance */
.neon-text {
    color: #fff;
    text-shadow: 
        0 0 5px rgba(37, 99, 235, 0.8),
        0 0 10px rgba(37, 99, 235, 0.8),
        0 0 15px rgba(37, 99, 235, 0.8);
    /* Removed flicker animation for better performance */
}

/* 3D Card Flip Effect */
.card-3d-flip {
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.card-3d-flip:hover {
    transform: rotateY(10deg) rotateX(-5deg);
}

/* Removed gradient orb - too resource intensive */

/* Removed particle trail - too resource intensive */

/* Removed holographic effect - too resource intensive */
