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

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

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

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

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

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

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

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

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

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

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

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

@keyframes flipIn {
    from {
        transform: perspective(400px) rotateY(90deg);
        opacity: 0;
    }
    to {
        transform: perspective(400px) rotateY(0deg);
        opacity: 1;
    }
}

@keyframes flipOut {
    from {
        transform: perspective(400px) rotateY(0deg);
        opacity: 1;
    }
    to {
        transform: perspective(400px) rotateY(90deg);
        opacity: 0;
    }
}

@keyframes lightSpeedIn {
    from {
        transform: translate3d(100%, 0, 0) skewX(-30deg);
        opacity: 0;
    }
    60% {
        transform: skewX(20deg);
        opacity: 1;
    }
    80% {
        transform: skewX(-5deg);
    }
    to {
        transform: translate3d(0, 0, 0);
    }
}

/* Animation Classes */
.animate__fadeIn {
    animation: fadeIn 0.5s ease;
}

.animate__fadeOut {
    animation: fadeOut 0.5s ease;
}

.animate__fadeInUp {
    animation: slideInUp 0.5s ease;
}

.animate__fadeInDown {
    animation: slideInDown 0.5s ease;
}

.animate__fadeInLeft {
    animation: slideInLeft 0.5s ease;
}

.animate__fadeInRight {
    animation: slideInRight 0.5s ease;
}

.animate__bounce {
    animation: bounce 1s ease;
}

.animate__pulse {
    animation: pulse 2s infinite;
}

.animate__shake {
    animation: shake 0.5s ease;
}

.animate__rotate {
    animation: rotate 1s linear infinite;
}

.animate__zoomIn {
    animation: zoomIn 0.5s ease;
}

.animate__zoomOut {
    animation: zoomOut 0.5s ease;
}

.animate__flipIn {
    animation: flipIn 0.5s ease;
}

.animate__flipOut {
    animation: flipOut 0.5s ease;
}

.animate__lightSpeedIn {
    animation: lightSpeedIn 0.5s ease;
}

/* Delay Classes */
.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;
}

/* Duration Classes */
.duration-1 {
    animation-duration: 0.25s;
}

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

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

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

.duration-5 {
    animation-duration: 1.5s;
}

/* Hover Animations */
.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__lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover__lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

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

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

.page-transition-exit {
    opacity: 1;
    transform: translateY(0);
}

.page-transition-exit-active {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s, transform 0.3s;
}

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

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Animations */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

.loading-dots {
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-dots div {
    width: 10px;
    height: 10px;
    margin: 0 5px;
    background: #3498db;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

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

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

.loading-pulse {
    width: 40px;
    height: 40px;
    background: #3498db;
    border-radius: 50%;
    animation: pulse 1s ease-in-out infinite;
}

.loading-ripple {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}

.loading-ripple div {
    position: absolute;
    border: 4px solid #3498db;
    opacity: 1;
    border-radius: 50%;
    animation: ripple 1s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.loading-ripple div:nth-child(2) {
    animation-delay: -0.5s;
}

@keyframes ripple {
    0% {
        top: 36px;
        left: 36px;
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        top: 0px;
        left: 0px;
        width: 72px;
        height: 72px;
        opacity: 0;
    }
}