/* ===== Advanced Animations & 3D Effects ===== */

/* Keyframes */
@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(15, 32, 39, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(15, 32, 39, 0.6);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotate3d {
    from {
        transform: perspective(1000px) rotateY(0deg);
    }

    to {
        transform: perspective(1000px) rotateY(360deg);
    }
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes morphShape {

    0%,
    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
}

@keyframes textGlow {

    0%,
    100% {
        text-shadow: 0 0 10px rgba(15, 32, 39, 0.5);
    }

    50% {
        text-shadow: 0 0 30px rgba(15, 32, 39, 0.8), 0 0 60px rgba(15, 32, 39, 0.4);
    }
}

/* Animation Classes */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-glow {
    animation: glow 3s ease-in-out infinite;
}

.animate-morph {
    animation: morphShape 8s ease-in-out infinite;
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradientMove 5s ease infinite;
}

.animate-text-glow {
    animation: textGlow 3s ease-in-out infinite;
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delays */
.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

.delay-5 {
    transition-delay: 0.5s;
}

.delay-6 {
    transition-delay: 0.6s;
}

/* 3D Card Effect */
.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-3d:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(-5deg) translateZ(20px);
}

.card-3d-content {
    transform: translateZ(30px);
}

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Neumorphism */
.neu {
    background: #f0f0f3;
    box-shadow: 8px 8px 16px #d1d1d4, -8px -8px 16px #ffffff;
}

.neu-inset {
    background: #f0f0f3;
    box-shadow: inset 8px 8px 16px #d1d1d4, inset -8px -8px 16px #ffffff;
}

/* Gradient Borders */
.gradient-border {
    position: relative;
    background: white;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: -3px;
    background: linear-gradient(135deg, #0F2027, #25d366, #C5A059);
    border-radius: inherit;
    z-index: -1;
}

/* Shine Effect */
.shine {
    position: relative;
    overflow: hidden;
}

.shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg) translateX(-100%);
    transition: 0.6s;
}

.shine:hover::after {
    transform: rotate(45deg) translateX(100%);
}

/* Particle Background */
.particles {
    position: relative;
    overflow: hidden;
}

.particles::before,
.particles::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 8s ease-in-out infinite;
}

.particles::before {
    background: var(--primary);
    top: -100px;
    right: -100px;
}

.particles::after {
    background: var(--secondary);
    bottom: -100px;
    left: -100px;
    animation-delay: -4s;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #0F2027, #25d366);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hover Lift */
.hover-lift {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Icon Spin */
.icon-spin:hover .icon {
    animation: rotate3d 1s ease-in-out;
}

/* Loading Shimmer */
.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Blob Shapes */
.blob {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: morphShape 8s ease-in-out infinite;
}

/* Parallax */
.parallax {
    transform: translateZ(0);
    will-change: transform;
}

/* Typing Effect Container */
.typewriter {
    overflow: hidden;
    white-space: nowrap;
    border-left: 3px solid var(--primary);
    animation: typing 3s steps(40) 1s forwards, blink 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}