/* Animation Styles */

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

@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 fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.3);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

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

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

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

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

@keyframes wave {
    0%, 100% {
        transform: translateY(0);
    }
    25% {
        transform: translateY(-10px);
    }
    75% {
        transform: translateY(10px);
    }
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(6, 182, 212, 0.5),
                     0 0 20px rgba(6, 182, 212, 0.3),
                     0 0 30px rgba(6, 182, 212, 0.2);
    }
    50% {
        text-shadow: 0 0 20px rgba(6, 182, 212, 0.8),
                     0 0 30px rgba(6, 182, 212, 0.6),
                     0 0 40px rgba(6, 182, 212, 0.4);
    }
}

@keyframes borderAnimation {
    0%, 100% {
        border-color: var(--accent);
    }
    25% {
        border-color: var(--secondary);
    }
    50% {
        border-color: var(--primary);
    }
    75% {
        border-color: var(--secondary);
    }
}

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

@keyframes morphing {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
}

/* Animation Classes */
.animate-text {
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
}

.animate-text span:nth-child(1) {
    animation-delay: 0.1s;
}

.animate-text span:nth-child(2) {
    animation-delay: 0.3s;
}

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

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

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

.shimmer-effect {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

.text-glow {
    animation: textGlow 2s ease-in-out infinite;
}

.border-animated {
    border: 2px solid;
    animation: borderAnimation 3s ease infinite;
}

.gradient-animated {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

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

/* Parallax Effects */
.parallax {
    position: relative;
    overflow: hidden;
}

.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.parallax-layer-1 {
    transform: translateZ(-1px) scale(2);
}

.parallax-layer-2 {
    transform: translateZ(-2px) scale(3);
}

.parallax-layer-3 {
    transform: translateZ(-3px) scale(4);
}

/* Hover Effects */
.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

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

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

.hover-3d {
    transform-style: preserve-3d;
    transition: transform 0.3s;
}

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

/* Card Flip Animation */
.card-flip {
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.card-flip:hover {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

.card-back {
    transform: rotateY(180deg);
}

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

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

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

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

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

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

/* Stagger Animation */
.stagger-animation > * {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

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

/* Typewriter Effect */
.typewriter {
    overflow: hidden;
    border-right: 3px solid var(--accent);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--accent) }
}

/* Magnetic Button Effect */
.magnetic-button {
    position: relative;
    transition: transform 0.2s;
}

/* Liquid Button */
.liquid-button {
    position: relative;
    padding: 20px 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 14px;
    overflow: hidden;
}

.liquid-button::before {
    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;
}

.liquid-button:hover::before {
    width: 300px;
    height: 300px;
}

/* Neon Glow */
.neon-glow {
    animation: neon 1.5s ease-in-out infinite alternate;
}

@keyframes neon {
    from {
        box-shadow: 0 0 10px var(--accent),
                    0 0 20px var(--accent),
                    0 0 30px var(--accent),
                    0 0 40px var(--accent);
    }
    to {
        box-shadow: 0 0 20px var(--accent),
                    0 0 30px var(--accent),
                    0 0 40px var(--accent),
                    0 0 50px var(--accent);
    }
}

/* Particle Animation */
.particle {
    position: absolute;
    pointer-events: none;
    animation: particleFloat 10s infinite linear;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Blob Animation */
.blob {
    animation: blob 7s ease-in-out infinite;
    transform-origin: center;
}

@keyframes blob {
    0%, 100% {
        transform: scale(1) translate(0, 0);
    }
    33% {
        transform: scale(1.1) translate(30px, -50px);
    }
    66% {
        transform: scale(0.9) translate(-20px, 20px);
    }
}

/* Skeleton Loading */
.skeleton {
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    100% {
        transform: translateX(100%);
    }
}

/* Smooth Appear */
[data-aos] {
    opacity: 0;
    transition-property: transform, opacity;
    transition-duration: 0.8s;
}

[data-aos="fade-up"] {
    transform: translateY(50px);
}

[data-aos="fade-down"] {
    transform: translateY(-50px);
}

[data-aos="fade-left"] {
    transform: translateX(50px);
}

[data-aos="fade-right"] {
    transform: translateX(-50px);
}

[data-aos="zoom-in"] {
    transform: scale(0.6);
}

[data-aos="zoom-out"] {
    transform: scale(1.2);
}

[data-aos].aos-animate {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* Infinite Scroll Animation */
.infinite-scroll {
    animation: infiniteScroll 20s linear infinite;
}

@keyframes infiniteScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Responsive Animations */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}