/* App Animations - Transitions and animations */

/* Screen Transitions */
@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

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

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

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

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

/* Scale Animations */
@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

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

/* Circular Navigation Animations */
@keyframes zoomIn {
    from {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    to {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

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

.nav-level.zoom-in {
    animation: zoomIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.nav-level.zoom-out {
    animation: zoomOut 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Pulse Animation for Active Elements */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 215, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

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

.rotating {
    animation: rotate 20s linear infinite;
}

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

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

/* Loading Spinner */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Success Check Animation */
@keyframes checkmark {
    0% {
        stroke-dashoffset: 100;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

.checkmark-animation {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: checkmark 0.3s ease-out forwards;
}

/* Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: scale(0);
    animation: ripple 0.6s ease-out;
}

/* Slide Up Animation */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.3s ease-out forwards;
}

/* Slide Down Animation */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-down {
    animation: slideDown 0.3s ease-out forwards;
}

/* Glow Animation */
@keyframes glow {
    0% {
        box-shadow: 0 0 5px var(--accent-gold);
    }
    50% {
        box-shadow: 0 0 20px var(--accent-gold), 0 0 30px var(--accent-gold);
    }
    100% {
        box-shadow: 0 0 5px var(--accent-gold);
    }
}

.glow {
    animation: glow 2s ease-in-out infinite;
}

/* Notification Badge Animation */
@keyframes badge-pop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.badge-pop {
    animation: badge-pop 0.3s ease-out;
}

/* Progress Bar Fill Animation */
@keyframes progress-fill {
    from {
        width: 0;
    }
}

.progress-animate {
    animation: progress-fill 1s ease-out forwards;
}

/* Text Fade In */
@keyframes text-fade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.text-fade {
    animation: text-fade 0.5s ease-out forwards;
}

/* Circle Expand */
@keyframes circle-expand {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.circle-expand {
    animation: circle-expand 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}