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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

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

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

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

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

.spinner-red {
    border: 3px solid rgba(255, 68, 68, 0.3);
    border-top-color: #ff4444;
}

/* Button Loading State */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

/* Form Submission Success Animation */
.form-success {
    animation: scaleIn 0.3s ease-out;
}

/* Input Focus Animation */
@keyframes inputGlow {
    0%, 100% { box-shadow: 0 0 0 3px rgba(255, 68, 68, 0.1); }
    50% { box-shadow: 0 0 0 3px rgba(255, 68, 68, 0.2); }
}

/* Card Hover Animation */
.card-animate {
    animation: fadeIn 0.4s ease-out;
}

/* Smooth Slide Animations */
.slide-in-left {
    animation: slideIn 0.5s ease-out;
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Checkbox Custom Animation */
.form-checkbox {
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-checkbox:checked {
    transform: scale(1.1);
}

/* Alert Animations */
.alert {
    animation: slideIn 0.3s ease-out;
}

/* Feature Card Stagger Animation */
.feature-card {
    animation: fadeIn 0.6s ease-out backwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }
.feature-card:nth-child(7) { animation-delay: 0.7s; }

/* Progress Bar Animation */
@keyframes progressBar {
    0% { width: 0%; }
    100% { width: 100%; }
}

.progress-bar {
    animation: progressBar 2s ease-in-out;
}

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

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

/* Bounce Animation for Notifications */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.bounce {
    animation: bounce 1s ease;
}
