/* Page transitions */
.page-transition {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card animations */
.card-animate {
    animation: slideInUp 0.6s ease-out;
}

.card-animate:nth-child(2) { animation-delay: 0.1s; }
.card-animate:nth-child(3) { animation-delay: 0.2s; }
.card-animate:nth-child(4) { animation-delay: 0.3s; }

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button interactions */
.btn-animate {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn-animate:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-animate:active {
    transform: translateY(0);
    transition: all 0.1s ease;
}

/* Enhanced Bootstrap button animations with Breaking Bad theme */
.btn {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn:not(:disabled):active {
    transform: translateY(0);
    transition: all 0.1s ease;
}

/* Breaking Bad themed button enhancements */
.btn-primary {
    background: linear-gradient(45deg, var(--abq-green), #2d7a2d);
    border: none;
    box-shadow: 0 2px 8px rgba(26, 95, 26, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(45deg, #0e4a0e, var(--abq-green));
    box-shadow: 0 6px 16px rgba(26, 95, 26, 0.4);
}

.btn-warning {
    background: linear-gradient(45deg, var(--abq-yellow), #f39c12);
    border: none;
    color: #1a1a1a;
    box-shadow: 0 2px 8px rgba(244, 208, 63, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(45deg, #f1c40f, var(--abq-yellow));
    box-shadow: 0 6px 16px rgba(244, 208, 63, 0.4);
    color: #1a1a1a;
}

/* Form field focus animations */
.form-control {
    transition: all 0.2s ease;
    border: 2px solid #e0e0e0;
}

.form-control:focus {
    border-color: var(--abq-green);
    box-shadow: 0 0 0 0.2rem rgba(26, 95, 26, 0.25);
    transform: scale(1.01);
}

/* List item animations */
.list-item-animate {
    transition: all 0.2s ease;
}

.list-item-animate:hover {
    background: #f8f9fa;
    padding-left: 1.5rem;
}

/* Card hover effects */
.card {
    transition: all 0.2s ease;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* Loading animations */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-line {
    height: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.skeleton-line:last-child {
    width: 60%;
}

/* Navigation link animations */
.nav-link {
    transition: all 0.2s ease;
    border-radius: 6px;
}

.nav-link:hover {
    background: rgba(26, 95, 26, 0.1);
    transform: translateX(2px);
}

.nav-link.active {
    background: var(--abq-green);
    color: white;
    box-shadow: 0 2px 8px rgba(26, 95, 26, 0.3);
}

/* Mobile navigation animations */
.mobile-nav-link {
    transition: all 0.2s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
    background: rgba(26, 95, 26, 0.1);
    transform: translateX(4px);
}

/* Success/Error message entrance animations - enhanced */
.alert {
    animation: slideInDown 0.4s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Input focus ripple effect */
.form-control {
    position: relative;
}

.form-control:focus::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: radial-gradient(circle at center, rgba(26, 95, 26, 0.1) 0%, transparent 70%);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Staggered list animations */
.list-stagger > *:nth-child(1) { animation-delay: 0.1s; }
.list-stagger > *:nth-child(2) { animation-delay: 0.2s; }
.list-stagger > *:nth-child(3) { animation-delay: 0.3s; }
.list-stagger > *:nth-child(4) { animation-delay: 0.4s; }
.list-stagger > *:nth-child(5) { animation-delay: 0.5s; }

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .btn:hover,
    .card:hover,
    .nav-link:hover {
        transform: none;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .skeleton {
        background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
    }
    
    .form-control:focus {
        box-shadow: 0 0 0 0.2rem rgba(26, 95, 26, 0.4);
    }
}