/* Animated Micro-interactions for User Engagement */

/* Button Animations */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Standard button hover effects (exclude feature navigation buttons) */
.btn:hover:not(.youtube-functions-list .btn) {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.btn:active:not(.youtube-functions-list .btn) {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Feature Navigation Button Styles - Only highlight on click */
.youtube-functions-list .btn {
    transition: background-color 0.2s ease, border-color 0.2s ease !important;
    transform: none !important;
}

.youtube-functions-list .btn:hover {
    background-color: #a855f7 !important;
    border-color: #a855f7 !important;
    transform: none !important;
    box-shadow: none !important;
}

.youtube-functions-list .btn:active {
    background-color: #7c3aed !important;
    border-color: #7c3aed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Ripple effect for buttons */
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: width 0.6s, height 0.6s;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn * {
    position: relative;
    z-index: 1;
}

/* Card Hover Effects */
.card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.pricing-card-modern:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.pricing-card-featured:hover {
    transform: translateY(-10px) scale(1.04);
    box-shadow: 0 25px 50px rgba(40, 167, 69, 0.3);
}

/* Feature Card Animations */
.feature-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover .feature-icon {
    transform: scale(1.2) rotate(5deg);
    color: var(--bs-primary);
}

/* Form Input Animations */
.form-control {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.form-control:focus {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
    border-color: var(--bs-primary);
}

/* Loading Animations */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spin {
    animation: spin 1s linear infinite;
}

/* Accordion Animations */
.accordion-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-button:hover {
    background-color: rgba(0, 123, 255, 0.1);
    transform: translateX(5px);
}

.accordion-collapse {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Navigation Animations */
.nav-link {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--bs-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    transform: translateY(-2px);
    color: var(--bs-primary);
}

/* Badge Animations */
.badge {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.badge:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

/* Toast Notifications */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

.toast {
    animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.hide {
    animation: slideOutRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Progress Bar Animations */
@keyframes progressGlow {
    0% { box-shadow: 0 0 5px rgba(0, 123, 255, 0.5); }
    50% { box-shadow: 0 0 20px rgba(0, 123, 255, 0.8); }
    100% { box-shadow: 0 0 5px rgba(0, 123, 255, 0.5); }
}

.progress-bar {
    animation: progressGlow 2s infinite;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modal Animations */
.modal.fade .modal-dialog {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(0.8) translateY(-50px);
}

.modal.show .modal-dialog {
    transform: scale(1) translateY(0);
}

/* Icon Animations */
.feather {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feather:hover {
    transform: scale(1.2);
}

/* Hover Glow Effects */
.glow-on-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glow-on-hover:hover {
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.6);
}

/* Floating Action Button removed per user request */

/* Stagger Animation for Lists */
.stagger-animation {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) 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; }

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

/* Heartbeat Animation for Important Elements */
@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.1); }
    28% { transform: scale(1); }
    42% { transform: scale(1.1); }
    70% { transform: scale(1); }
}

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

/* Shake Animation for Errors */
@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 cubic-bezier(0.4, 0, 0.2, 1);
}

/* Success Checkmark Animation */
@keyframes checkmark {
    0% {
        height: 0;
        width: 0;
        opacity: 1;
    }
    20% {
        height: 0;
        width: 7px;
        opacity: 1;
    }
    40% {
        height: 14px;
        width: 7px;
        opacity: 1;
    }
    100% {
        height: 14px;
        width: 7px;
        opacity: 1;
    }
}

.checkmark::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 8px;
    width: 7px;
    height: 14px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    animation: checkmark 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Page Transition */
.page-transition {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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