a.animated-link {
    display: inline-block;
    transition: transform 0.3s ease, color 0.3s ease;
}

a.animated-link:active {
    transform: scale(0.95);
    color: red;
}

/* 🔄 Spinner circular */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader {
    width: 50px;
    height: 50px;
    border: 6px solid rgba(0, 0, 0, 0.1);
    border-top: 6px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    display: none; /* Oculto por defecto */
}

/* Fondo oscuro mientras carga */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none; /* Oculto por defecto */
}