/* ===================================
   ANIMATIONS
   =================================== */

/* Spin animation for loading spinner */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Floating animation for avatar */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

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

/* Fade and slide in for sections */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide up for AI panel */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Decorations float */
.deco {
    animation: decoFloat 4s ease-in-out infinite;
}

.deco-1 {
    animation-delay: 0s;
}

.deco-2 {
    animation-delay: 1s;
}

.deco-3 {
    animation-delay: 2s;
}

.deco-4 {
    animation-delay: 0.6s;
}

@keyframes decoFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* Pulse animation for typing indicator */
@keyframes pulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

.typing-indicator {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

/* Floating drift animation - AI bot moves around screen */
@keyframes floatAround {
    0% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(-30px, -40px) scale(1.05);
    }

    50% {
        transform: translate(20px, -30px) scale(1);
    }

    75% {
        transform: translate(-20px, 20px) scale(1.05);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* Pulse animation for AI bot button */
@keyframes pulseFab {

    0%,
    100% {
        box-shadow: 0 4px 12px rgba(255, 153, 102, 0.3);
    }

    50% {
        box-shadow: 0 6px 20px rgba(255, 153, 102, 0.6);
    }
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ripple effect for button clicks */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.6;
    }

    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 153, 102, 0.6);
    pointer-events: none;
    animation: ripple 0.6s ease-out;
}

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

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Toast notification animations */
.toast {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: white;
    border: 3px solid var(--brown);
    border-radius: 16px;
    padding: 16px 24px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    transform: translateX(400px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    font-size: 14px;
    font-weight: 600;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    border-color: #4CAF50;
    background: linear-gradient(135deg, #fff, #e8f5e9);
}

.toast-error {
    border-color: #f44336;
    background: linear-gradient(135deg, #fff, #ffebee);
}

.toast-info {
    border-color: var(--accent);
    background: linear-gradient(135deg, #fff, #ffe8cc);
}