/* Animations for Buildify */

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

.animate-fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.animate-fade-in-delay-1 {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 0.3s;
}

.animate-fade-in-delay-2 {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 0.6s;
}

/* Slide In Animations */
@keyframes slideInFromLeft {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

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

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

.slide-in-left {
    animation: slideInFromLeft 0.5s ease forwards;
}

.slide-in-right {
    animation: slideInFromRight 0.5s ease forwards;
}

.slide-in-top {
    animation: slideInFromTop 0.5s ease forwards;
}

.slide-in-bottom {
    animation: slideInFromBottom 0.5s ease forwards;
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(79, 70, 229, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
    }
}

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

/* Heart Pulse Animation */
@keyframes heartPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

.fa-heart.pulse {
    display: inline-block;
    animation: heartPulse 1.5s ease infinite;
}

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

.bounce-animation {
    animation: bounce 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 {
    animation: shake 0.8s ease-in-out;
}

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

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

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

.flip-animation {
    animation: flip 1.5s ease-in-out;
}

/* Zoom In Animation */
@keyframes zoomIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.zoom-in-animation {
    animation: zoomIn 0.5s ease forwards;
}

/* Zoom Out Animation */
@keyframes zoomOut {
    from {
        transform: scale(1);
        opacity: 1;
    }
    to {
        transform: scale(0);
        opacity: 0;
    }
}

.zoom-out-animation {
    animation: zoomOut 0.5s ease forwards;
}

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

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

.typing-animation {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--primary-color);
    animation: 
        typing 3.5s steps(40, end),
        blink 0.75s step-end infinite;
}

/* Gradient Animation */
@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-animation {
    background: linear-gradient(270deg, #4f46e5, #8b5cf6, #ec4899);
    background-size: 600% 600%;
    animation: gradientFlow 10s ease infinite;
}

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

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

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

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

/* Hover Effects */
.hover-grow {
    transition: transform 0.3s ease;
}

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

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

.hover-shrink:hover {
    transform: scale(0.95);
}

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

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

.hover-blur {
    transition: filter 0.3s ease;
}

.hover-blur:hover {
    filter: blur(2px);
}

.hover-brightness {
    transition: filter 0.3s ease;
}

.hover-brightness:hover {
    filter: brightness(1.2);
}

/* Button Hover Effects */
.btn-hover-slide {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-hover-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-hover-slide:hover::before {
    left: 0;
}

/* Transition Effects */
.transition-all {
    transition: all 0.3s ease;
}

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

.transition-opacity {
    transition: opacity 0.3s ease;
}

.transition-colors {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Loading Animations */
@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spinner 0.8s linear infinite;
}

.dark .loading-spinner {
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color);
}

/* Progress Bar Animation */
@keyframes progress {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

.progress-animation {
    animation: progress 2s linear forwards;
}

/* Staggered Animation for Lists */
.stagger-animation > * {
    opacity: 0;
    animation: fadeIn 0.5s 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; }
.stagger-animation > *:nth-child(9) { animation-delay: 0.9s; }
.stagger-animation > *:nth-child(10) { animation-delay: 1s; }