/* Animações Avançadas para MyNexus */

/* Animação de entrada para cards */
@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.card {
    animation: slideInUp 0.6s ease-out;
}

/* Animação de hover para cards */
.card:hover {
    transform: translateY(-5px) scale(1.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animação de loading */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    animation: spin 1s linear infinite;
}

/* Animação de pulse para notificações */
@keyframes notificationPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(255, 107, 107, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0);
    }
}

.notification-badge {
    animation: notificationPulse 2s infinite;
}

/* Animação de fade in para mensagens */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.message {
    animation: fadeIn 0.5s ease-out;
}

/* Animação de typing para botões */
@keyframes typing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

.btn-primary:hover {
    animation: typing 0.6s ease-in-out;
}

/* Animação de shake para erros */
@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.6s ease-in-out;
}

/* Animação de bounce para sucessos */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

.bounce {
    animation: bounce 1s ease-in-out;
}

/* Animação de glow para elementos importantes */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(108, 99, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(108, 99, 255, 0.8), 0 0 30px rgba(108, 99, 255, 0.6);
    }
}

.glow {
    animation: glow 2s ease-in-out infinite alternate;
}

/* Animação de slide para navegação */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.navbar-nav .nav-item {
    animation: slideInLeft 0.5s ease-out;
}

/* Animação de zoom para ícones */
@keyframes iconZoom {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.fas:hover {
    animation: iconZoom 0.3s ease-in-out;
}

/* Animação de wave para botões */
@keyframes wave {
    0% { transform: rotate(0deg); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-8deg); }
    30% { transform: rotate(14deg); }
    40% { transform: rotate(-4deg); }
    50% { transform: rotate(10deg); }
    60% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}

.btn:hover .fas {
    animation: wave 0.6s ease-in-out;
}

/* Animação de float para cards especiais */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* Animação de gradient para backgrounds */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-bg {
    background: linear-gradient(-45deg, #6c63ff, #ff6b6b, #4ecdc4, #ffe66d);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* Animação de heartbeat para elementos críticos */
@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;
}

/* Animação de tada para celebrações */
@keyframes tada {
    0% { transform: scale(1); }
    10%, 20% { transform: scale(0.9) rotate(-3deg); }
    30%, 50%, 70%, 90% { transform: scale(1.1) rotate(3deg); }
    40%, 60%, 80% { transform: scale(1.1) rotate(-3deg); }
    100% { transform: scale(1) rotate(0); }
}

.tada {
    animation: tada 1s ease-in-out;
}

/* Animação de flip para cards */
@keyframes flip {
    0% { transform: perspective(400px) rotateY(0); }
    100% { transform: perspective(400px) rotateY(360deg); }
}

.flip {
    animation: flip 1s ease-in-out;
}

/* Animação de slide para modais */
@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal.show .modal-dialog {
    animation: slideInDown 0.3s ease-out;
}

/* Animação de shimmer para loading */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* Classes utilitárias para animações */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animação de entrada para formulários */
.form-control:focus {
    animation: glow 0.3s ease-in-out;
}

/* Animação de sucesso para badges */
.badge.bg-success {
    animation: bounce 0.6s ease-in-out;
}

/* Animação de erro para alerts */
.alert-danger {
    animation: shake 0.6s ease-in-out;
}

/* Animação de loading para botões */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Animação de progresso */
@keyframes progress {
    0% { width: 0%; }
    100% { width: 100%; }
}

.progress-bar {
    animation: progress 2s ease-in-out;
}

/* Responsive animations */
@media (max-width: 768px) {
    .card {
        animation: slideInUp 0.4s ease-out;
    }
    
    .float {
        animation: none;
    }
} 