/* ========== ANIMATIONS ========== */

/* Gradient Animation */
.animated-gradient {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        rgba(102, 126, 234, 0.1) 0%,
        rgba(118, 75, 162, 0.1) 25%,
        rgba(102, 126, 234, 0.1) 50%,
        rgba(118, 75, 162, 0.1) 75%,
        rgba(102, 126, 234, 0.1) 100%);
    animation: gradientRotate 20s linear infinite;
    z-index: 0;
}

@keyframes gradientRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Floating Animation */
@keyframes float {
    0%, 100% { transform: perspective(1000px) rotateY(-10deg) rotateX(5deg) translateY(0); }
    50% { transform: perspective(1000px) rotateY(-10deg) rotateX(5deg) translateY(-20px); }
}

.dashboard-preview {
    animation: float 6s ease-in-out infinite;
}

/* Fade In Up Animation */
[data-animate="fade-up"] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate="fade-up"].animate {
    opacity: 1;
    transform: translateY(0);
}

/* Fade In Animation */
[data-animate="fade-in"] {
    opacity: 0;
    transition: opacity 0.8s ease;
}

[data-animate="fade-in"].animate {
    opacity: 1;
}

/* Slide In Left Animation */
[data-animate="slide-left"] {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease;
}

[data-animate="slide-left"].animate {
    opacity: 1;
    transform: translateX(0);
}

/* Slide In Right Animation */
[data-animate="slide-right"] {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s ease;
}

[data-animate="slide-right"].animate {
    opacity: 1;
    transform: translateX(0);
}

/* Scale In Animation */
[data-animate="scale-in"] {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s ease;
}

[data-animate="scale-in"].animate {
    opacity: 1;
    transform: scale(1);
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

.bounce {
    animation: bounce 2s infinite;
}

/* Pulse Animation */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Shake Animation */
@keyframes shake {
    0%, 100% {transform: translateX(0);}
    10%, 30%, 50%, 70%, 90% {transform: translateX(-5px);}
    20%, 40%, 60%, 80% {transform: translateX(5px);}
}

.shake {
    animation: shake 0.5s;
}

/* Rotate Animation */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.rotate {
    animation: rotate 2s linear infinite;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-300);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Progress Bar Animation */
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: var(--radius-full);
    width: 0%;
    transition: width 1s ease;
}

/* Typing Animation */
.typing-animation {
    overflow: hidden;
    border-right: 2px solid var(--primary);
    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(--primary); }
}

/* Hover Animations */
.hover-lift {
    transition: transform var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-scale {
    transition: transform var(--transition-base);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: transform var(--transition-base);
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* Staggered Animation Delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }
.delay-7 { animation-delay: 0.7s; }
.delay-8 { animation-delay: 0.8s; }
.delay-9 { animation-delay: 0.9s; }
.delay-10 { animation-delay: 1s; }