/**
 * Interactive Login Animations
 * TondiPedia Admin Panel
 */

/* Entrance Animations */
.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.fade-in-down {
    animation: fadeInDown 0.8s ease-out;
}

/* Shake Animation for Errors */
.shake-animation {
    animation: shake 0.5s ease-in-out;
}

.error-shake {
    animation: errorShake 0.6s ease-in-out;
}

/* Bounce Animation for Success */
.bounce-animation {
    animation: bounce 0.6s ease-in-out;
}

.success-bounce {
    animation: successBounce 1s ease-in-out;
}

/* Pulse Animation */
.pulse-animation {
    animation: pulse 1s ease-in-out infinite;
}

.success-pulse {
    animation: successPulse 1.5s ease-in-out 3;
}

/* Scale Animation */
.scale-animation {
    animation: scaleUp 0.3s ease-in-out;
}

/* Highlight Animation */
.highlight-animation {
    animation: highlight 0.8s ease-in-out;
}

/* Hover Effects */
.hover-glow {
    box-shadow: 0 0 15px rgba(3, 172, 14, 0.3);
    transition: all 0.3s ease;
}

.button-hover-scale {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/* Loading Dots Animation */
.loading-dots {
    display: inline-block;
    min-width: 60px;
}

/* Fade Out Animation */
.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

/* Keyframes */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}

@keyframes bounce {
    0%, 20%, 60%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    80% { transform: translateY(-5px); }
}

@keyframes successBounce {
    0%, 20%, 53%, 80%, 100% { transform: translateY(0); }
    40%, 43% { transform: translateY(-20px); }
    70% { transform: translateY(-10px); }
    90% { transform: translateY(-4px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

@keyframes successPulse {
    0% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(3, 172, 14, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 20px rgba(3, 172, 14, 0);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(3, 172, 14, 0);
    }
}

@keyframes scaleUp {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes highlight {
    0%, 100% { 
        background-color: transparent;
        border-color: #ced4da;
    }
    50% { 
        background-color: rgba(3, 172, 14, 0.1);
        border-color: #03AC0E;
    }
}

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

/* Enhanced Input Field Animations */
.form-control.is-valid {
    border-color: #03AC0E !important;
    background-image: none !important;
    transition: all 0.3s ease;
}

.form-control.is-invalid {
    border-color: #ff5b57 !important;
    background-image: none !important;
    transition: all 0.3s ease;
}

.form-control:hover {
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

.form-control:focus {
    transform: translateY(0);
    transition: all 0.2s ease;
}

/* Button Enhanced Animations */
.btn-theme {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-theme:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(3, 172, 14, 0.3);
}

.btn-theme:active {
    transform: translateY(0);
}

.btn-theme::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-theme:hover::before {
    width: 300px;
    height: 300px;
}

/* Alert Animations */
.alert-custom {
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.5s ease-out;
}

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

/* Background Parallax Effect */
.news-image {
    transform: scale(1.1);
    transition: transform 10s ease-in-out;
}

.login:hover .news-image {
    transform: scale(1.05);
}

/* Brand Logo Animation */
.brand .logo {
    transition: all 0.3s ease;
}

.brand:hover .logo {
    transform: rotate(360deg) scale(1.1);
}

/* Loading Spinner Enhancement */
.fa-spinner.fa-spin {
    animation: spin 1s linear infinite;
}

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

/* Responsive Animations */
@media (max-width: 768px) {
    .slide-in-right {
        animation: slideInUp 0.8s ease-out;
    }
    
    @keyframes slideInUp {
        from {
            opacity: 0;
            transform: translateY(50px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}
