/* ========================================
   Keyframe Animations
   ======================================== */

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

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

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

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

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

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotateX(0deg) rotateY(0deg);
    }
    25% {
        transform: translateY(-20px) rotateX(5deg) rotateY(5deg);
    }
    50% {
        transform: translateY(0) rotateX(0deg) rotateY(0deg);
    }
    75% {
        transform: translateY(-20px) rotateX(-5deg) rotateY(-5deg);
    }
}

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

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

/* Glow Animation */
@keyframes glow {
    from {
        box-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
    }
    to {
        box-shadow: 0 0 20px rgba(255, 107, 53, 0.8), 0 0 30px rgba(255, 107, 53, 0.4);
    }
}

/* Text Glow */
@keyframes textGlow {
    from {
        text-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
    }
    to {
        text-shadow: 0 0 20px rgba(255, 107, 53, 0.8), 0 0 30px rgba(255, 107, 53, 0.4);
    }
}

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

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

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

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

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

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

/* Circuit Line Animation */
@keyframes circuitLine {
    0% {
        stroke-dashoffset: 1000;
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

/* ========================================
   Floating Shapes Animation
   ======================================== */
.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    background: var(--gradient-primary);
    opacity: 0.1;
    animation: floatShape 20s infinite;
}

.shape-1 {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    top: 60%;
    right: 10%;
    animation-delay: 5s;
}

.shape-3 {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    bottom: 20%;
    left: 50%;
    animation-delay: 10s;
}

@keyframes floatShape {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    33% {
        transform: translateY(-30px) rotate(120deg);
    }
    66% {
        transform: translateY(30px) rotate(240deg);
    }
}

/* ========================================
   Scroll Animations
   ======================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Animation */
.stagger-animation {
    opacity: 0;
    transform: translateY(30px);
}

.stagger-animation.animated {
    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; }

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

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.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) scale(1.05);
}

/* ========================================
   Loading Dots
   ======================================== */
.loading-dots {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 20px;
}

.loading-dots span {
    position: absolute;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--color-orange);
    animation: loadingDots 1.4s linear infinite;
}

.loading-dots span:nth-child(1) {
    left: 8px;
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    left: 32px;
    animation-delay: -0.16s;
}

.loading-dots span:nth-child(3) {
    left: 56px;
    animation-delay: 0;
}

@keyframes loadingDots {
    0%, 60%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    30% {
        transform: scale(1.3);
        opacity: 0.5;
    }
}

/* ========================================
   Gradient Animation
   ======================================== */
.gradient-animation {
    background: linear-gradient(270deg, #ff6b35, #ff8c5a, #4a90e2, #6c5ce7);
    background-size: 800% 800%;
    animation: gradientShift 15s ease infinite;
}

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

/* ========================================
   Ripple Effect
   ======================================== */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::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;
}

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

/* ========================================
   Parallax Effect
   ======================================== */
.parallax {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}

.parallax:hover {
    transform: rotateY(10deg) rotateX(10deg);
}

/* ========================================
   Neon Effect
   ======================================== */
.neon-text {
    animation: neonGlow 2s ease-in-out infinite alternate;
}

@keyframes neonGlow {
    from {
        text-shadow:
            0 0 10px #ff6b35,
            0 0 20px #ff6b35,
            0 0 30px #ff6b35,
            0 0 40px #ff8c5a,
            0 0 70px #ff8c5a,
            0 0 80px #ff8c5a,
            0 0 100px #ff8c5a,
            0 0 150px #ff8c5a;
    }
    to {
        text-shadow:
            0 0 5px #ff6b35,
            0 0 10px #ff6b35,
            0 0 15px #ff6b35,
            0 0 20px #ff8c5a,
            0 0 35px #ff8c5a,
            0 0 40px #ff8c5a,
            0 0 50px #ff8c5a,
            0 0 75px #ff8c5a;
    }
}

/* ========================================
   Glitch Effect
   ======================================== */
.glitch {
    position: relative;
    animation: glitchAnimation 2s infinite;
}

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

.glitch::before {
    animation: glitchBefore 0.3s infinite;
    color: #ff6b35;
    z-index: -1;
}

.glitch::after {
    animation: glitchAfter 0.3s infinite;
    color: #4a90e2;
    z-index: -1;
}

@keyframes glitchAnimation {
    0%, 100% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
}

@keyframes glitchBefore {
    0%, 100% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 0);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 0);
    }
    80% {
        transform: translate(2px, -2px);
    }
}

@keyframes glitchAfter {
    0%, 100% {
        transform: translate(0);
    }
    20% {
        transform: translate(2px, 0);
    }
    40% {
        transform: translate(2px, 2px);
    }
    60% {
        transform: translate(-2px, 0);
    }
    80% {
        transform: translate(-2px, 2px);
    }
}