/* Animations.css */

/* Float Animation */
@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
    100% {
        transform: translateY(0);
    }
}

/* Scroll Bounce Animation */
@keyframes scroll-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 99, 235, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

/* Shake Animation */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Scale Animation */
@keyframes scale {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

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

/* Slide In Animation */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* Highlight Animation */
@keyframes highlight {
    0% {
        background-position: -100% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 1s ease forwards;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

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

.animate-shake {
    animation: shake 0.8s ease-in-out;
}

.animate-scale {
    animation: scale 2s ease infinite;
}

.animate-rotate {
    animation: rotate 4s linear infinite;
}

.animate-slide-left {
    animation: slideInLeft 0.8s ease forwards;
}

.animate-slide-right {
    animation: slideInRight 0.8s ease forwards;
}

.animate-highlight {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0) 0%, rgba(37, 99, 235, 0.2) 50%, rgba(37, 99, 235, 0) 100%);
    background-size: 200% 100%;
    animation: highlight 2s ease infinite;
}

/* Delay Classes */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

.delay-1000 {
    animation-delay: 1s;
}

/* Duration Classes */
.duration-300 {
    animation-duration: 0.3s;
}

.duration-500 {
    animation-duration: 0.5s;
}

.duration-1000 {
    animation-duration: 1s;
}

.duration-2000 {
    animation-duration: 2s;
}

.duration-3000 {
    animation-duration: 3s;
}

/* Page Transition Animations */
.page-enter {
    opacity: 0;
    transform: translateY(20px);
}

.page-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 500ms, transform 500ms;
}

.page-exit {
    opacity: 1;
}

.page-exit-active {
    opacity: 0;
    transition: opacity 500ms;
}

/* Stagger Animation for Lists */
.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }
.stagger-item:nth-child(7) { animation-delay: 0.7s; }
.stagger-item:nth-child(8) { animation-delay: 0.8s; }
.stagger-item:nth-child(9) { animation-delay: 0.9s; }
.stagger-item:nth-child(10) { animation-delay: 1s; }

/* Scroll Animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Hover Animations */
.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-grow {
    transition: transform 0.3s ease;
}

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

.hover-rotate {
    transition: transform 0.3s ease;
}

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

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

.ripple::after {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.5s, opacity 1s;
}

.ripple:active::after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}

/* Loading Animations */
.loading-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary-color);
    animation: loadingDots 1.4s infinite ease-in-out;
}

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

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

@keyframes loadingDots {
    0%, 80%, 100% { 
        transform: scale(0);
    }
    40% { 
        transform: scale(1.0);
    }
}

/* Success Animation */
.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    position: relative;
}

.success-checkmark .check-icon {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 50%;
    box-sizing: content-box;
    border: 4px solid var(--accent-color);
}

.success-checkmark .check-icon::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 14px;
    transform: rotate(45deg);
    transform-origin: 100% 100%;
    width: 36px;
    height: 4px;
    background-color: var(--accent-color);
    animation: successCheck 0.8s ease;
}

.success-checkmark .check-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 14px;
    transform: rotate(45deg);
    transform-origin: 100% 100%;
    width: 4px;
    height: 22px;
    background-color: var(--accent-color);
    animation: successCheck 0.8s ease;
    animation-delay: 0.3s;
}

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

/* Error Animation */
.error-x {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    position: relative;
}

.error-x .x-icon {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 50%;
    box-sizing: content-box;
    border: 4px solid #ff4d4d;
}

.error-x .x-icon::before,
.error-x .x-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 40px;
    background-color: #ff4d4d;
}

.error-x .x-icon::before {
    transform: translate(-50%, -50%) rotate(45deg);
    animation: errorX 0.5s ease;
}

.error-x .x-icon::after {
    transform: translate(-50%, -50%) rotate(-45deg);
    animation: errorX 0.5s ease;
    animation-delay: 0.2s;
}

@keyframes errorX {
    0% {
        transform: translate(-50%, -50%) rotate(45deg) scale(0);
    }
    100% {
        transform: translate(-50%, -50%) rotate(45deg) scale(1);
    }
}

/* Typing Animation */
.typing {
    width: 0;
    white-space: nowrap;
    overflow: hidden;
    border-right: 3px solid var(--primary-color);
    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-color) }
}

/* Gradient Animation */
.gradient-animation {
    background-size: 400% 400%;
    animation: gradientAnimation 8s ease infinite;
}

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

/* Heart Beat Animation */
.heart-beat {
    animation: heartBeat 1.5s ease infinite;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.1); }
    28% { transform: scale(1); }
    42% { transform: scale(1.1); }
    70% { transform: scale(1); }
}

/* Wobble Animation */
.wobble {
    animation: wobble 2s ease infinite;
}

@keyframes wobble {
    0% { transform: translateX(0%); }
    15% { transform: translateX(-5%) rotate(-5deg); }
    30% { transform: translateX(5%) rotate(3deg); }
    45% { transform: translateX(-5%) rotate(-3deg); }
    60% { transform: translateX(5%) rotate(2deg); }
    75% { transform: translateX(-5%) rotate(-1deg); }
    100% { transform: translateX(0%); }
}

/* Shimmer Animation */
.shimmer {
    background: linear-gradient(90deg, var(--gray-200) 0%, var(--gray-100) 50%, var(--gray-200) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

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

/* Pop Animation */
.pop {
    animation: pop 0.5s ease;
}

@keyframes pop {
    0% { transform: scale(0.8); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* Progressive Loading Animation */
.progress-animation {
    position: relative;
    overflow: hidden;
}

.progress-animation::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;
    width: 0%;
    background: var(--gradient-primary);
    animation: progressLoad 2s ease forwards;
}

@keyframes progressLoad {
    0% { width: 0; }
    100% { width: 100%; }
}

/* Swing Animation */
.swing {
    transform-origin: top center;
    animation: swing 1s ease infinite;
}

@keyframes swing {
    20% { transform: rotate(15deg); }
    40% { transform: rotate(-10deg); }
    60% { transform: rotate(5deg); }
    80% { transform: rotate(-5deg); }
    100% { transform: rotate(0deg); }
}

/* Flip Animation */
.flip {
    animation: flip 2s ease infinite;
}

@keyframes flip {
    0% { transform: perspective(400px) rotateY(0); }
    100% { transform: perspective(400px) rotateY(360deg); }
}

/* Reveal Animation */
.reveal {
    position: relative;
    overflow: hidden;
}

.reveal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    transform: translateX(0);
    animation: reveal 1.5s ease forwards;
}

@keyframes reveal {
    0% { transform: translateX(0); }
    100% { transform: translateX(100%); }
}

/* Circular Progress Animation */
.circular-progress {
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    animation: circularProgress 2s ease forwards;
    transform-origin: center;
    transform: rotate(-90deg);
}

@keyframes circularProgress {
    0% { stroke-dashoffset: 283; }
    100% { stroke-dashoffset: 0; }
}