/* ===== ANIMACIONES SUAVES - ARENA LEGENDARIA ===== */

/* Transiciones globales suaves */
* {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Excepciones para elementos que no deben animarse */
img, svg, canvas, video, .no-animate {
    transition: none;
}

/* ===== ANIMACIONES DE PÁGINA ===== */

/* Fade in para contenido principal */
.container {
    animation: fadeInUp 0.6s ease-out;
}

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

/* ===== ANIMACIONES DE TABLAS Y LISTAS ===== */

/* Fade in escalonado para filas de tabla */
.fila_jugador {
    animation: fadeInRow 0.4s ease-out;
    animation-fill-mode: both;
}

.fila_jugador:nth-child(1) { animation-delay: 0.1s; }
.fila_jugador:nth-child(2) { animation-delay: 0.15s; }
.fila_jugador:nth-child(3) { animation-delay: 0.2s; }
.fila_jugador:nth-child(4) { animation-delay: 0.25s; }
.fila_jugador:nth-child(5) { animation-delay: 0.3s; }

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

/* Hover effect para filas */
.fila_jugador:hover {
    background-color: rgba(255,255,255,0.1) !important;
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* ===== ANIMACIONES DE CARDS ===== */

/* Hover effects para cards */
.card, .sancion_card, .logro_box, .inscrito_equipo {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover, .sancion_card:hover, .logro_box:hover, .inscrito_equipo:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* ===== ANIMACIONES DE BOTONES ===== */

/* Botones con animación */
.btn, button, .btn_cambio_busqueda {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:hover, button:hover, .btn_cambio_busqueda:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn:active, button:active, .btn_cambio_busqueda:active {
    transform: translateY(0);
}

/* Efecto ripple para botones */
.btn::after, button::after {
    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:active::after, button:active::after {
    width: 300px;
    height: 300px;
}

/* ===== ANIMACIONES DE PAGINACIÓN ===== */

/* Transición suave para cambios de página */
.pagination-list li a {
    transition: all 0.3s ease;
}

.pagination-list li a:hover {
    transform: scale(1.1);
    background-color: #007bff;
    color: white;
}

.pagination-list li a.act {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0,123,255,0.7); }
    70% { box-shadow: 0 0 0 10px rgba(0,123,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(0,123,255,0); }
}

/* ===== ANIMACIONES DE BÚSQUEDA ===== */

/* Fade out para elementos filtrados */
.fila_jugador.hidden, .logro_fila.hidden {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

/* ===== ANIMACIONES DE LOADING ===== */

/* Spinner mejorado */
.loadingSpinner {
    animation: fadeIn 0.3s ease-out;
}

.loadingSpinner .loadingMSG {
    animation: pulse 1.5s ease-in-out infinite;
}

/* ===== ANIMACIONES DE NAVEGACIÓN ===== */

/* Transición suave para cambios de página */
body {
    animation: pageLoad 0.5s ease-out;
}

@keyframes pageLoad {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===== ANIMACIONES DE ESTADOS ESPECIALES ===== */

/* Animación para elementos que aparecen después de AJAX */
.ajax-loaded {
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animación para elementos que se eliminan */
.removing {
    animation: fadeOutScale 0.3s ease-out forwards;
}

@keyframes fadeOutScale {
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

/* ===== ANIMACIONES RESPONSIVE ===== */

/* En móviles, reducir animaciones para mejor performance */
@media (max-width: 768px) {
    * {
        transition: all 0.2s ease;
    }
    
    .fila_jugador {
        animation-duration: 0.2s;
    }
    
    .card:hover, .sancion_card:hover, .logro_box:hover, .inscrito_equipo:hover {
        transform: translateY(-2px);
    }
}

/* ===== ANIMACIONES PARA ELEMENTOS ESPECÍFICOS ===== */

/* Animación para el banner principal */
.banner_principal {
    animation: slideInDown 0.8s ease-out;
}

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

/* Animación para títulos */
.txtTopInscripcion, #rankingJugadoresTitulo, #rankingEquiposTitulo {
    animation: fadeInLeft 0.6s ease-out;
}

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

/* Animación para inputs de búsqueda */
.txtBuscador {
    transition: all 0.3s ease;
}

.txtBuscador:focus {
    transform: scale(1.02);
    box-shadow: 0 0 15px rgba(0,123,255,0.3);
} 