body { background-color: #f4f7fa; font-family: 'Inter', system-ui, sans-serif; }

/* --- ANIMACIONES DE TRANSICIÓN --- */
.fade-out {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* --- COLORES DE CATEGORÍAS (Sincronizados) --- */
.cat-bailador { background: linear-gradient(135deg, #10b981, #059669) !important; color: white !important; }
.cat-champion { background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important; color: white !important; }
.cat-master   { background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important; color: white !important; }
.cat-allstar  { background: linear-gradient(135deg, #f59e0b, #d97706) !important; color: white !important; }
.cat-legend   { background: linear-gradient(135deg, #ef4444, #dc2626) !important; color: white !important; }
.cat-all      { background: #1e293b !important; color: white !important; }

/* --- TARJETAS ELEGANTES --- */
.competitor-card {
    border: none;
    border-radius: 24px; /* Bordes más redondeados y elegantes */
    background: #ffffff;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.25rem;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.competitor-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* --- RESPONSIVIDAD DINÁMICA --- */
@media (max-width: 768px) {
    .card-body-flex { flex-direction: column; text-align: center; padding: 2.5rem 1.5rem; }
    .avatar-wrapper { margin-bottom: 1.5rem; }
    .rank-number { position: absolute; top: 20px; left: 20px; font-weight: 900; color: #f1f5f9; z-index: 0; }
}

@media (min-width: 769px) {
    .card-body-flex { flex-direction: row; align-items: center; padding: 1.5rem 3rem; }
    .rank-number { font-size: 2rem; font-weight: 900; color: #e2e8f0; min-width: 70px; }
    .data-section { flex-grow: 1; padding: 0 2.5rem; }
}

/* --- AVATAR Y DETALLES --- */
.avatar-wrapper { position: relative; width: 95px; height: 95px; z-index: 1; }
.avatar-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 5px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

.btn-filter {
    border-radius: 50px;
    padding: 0.6rem 1.3rem;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    opacity: 0.3;
    border: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-filter.active {
    opacity: 1;
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

.ig-icon { color: #E1306C; font-size: 1.6rem; transition: transform 0.3s; }
.ig-icon:hover { transform: rotate(15deg) scale(1.2); }





/* ranking.css (Adicional) */
#searchInput {
    transition: all 0.3s ease;
    caret-color: #3b82f6; /* Color del cursor elegante */
}

/* Deshabilitar la selección de texto dentro del input para reforzar el bloqueo de copia */
#searchInput::selection {
    background: transparent;
}

/* Animación sutil para los registros al aparecer */
#rankingList .competitor-card {
    animation: slideInUp 0.4s ease forwards;
}

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








/* Franja Superior */
.hero-brand {
    background-color: #089f6f;
    height: 150px;
    width: 100%;
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-icon {
    stroke: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.brand-text {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
}

/* Ajuste para que el buscador suba un poco sobre la franja (Efecto moderno) */
.mt-n4 {
    margin-top: -40px !important;
    position: relative;
    z-index: 10;
}

/* Responsividad para la franja */
@media (max-width: 768px) {
    .hero-brand { height: 120px; }
    .brand-text { font-size: 1.4rem; }
    .brand-icon { width: 35px; height: 35px; }
}


.btn-home-link {
    display: inline-flex;
    align-items: center;
    background-color: #089f6f; /* Tu color verde exacto */
    color: #ffffff !important;
    padding: 10px 25px;
    border-radius: 50px; /* Estilo redondeado elegante */
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(8, 159, 111, 0.3);
    transition: all 0.3s ease;
}

.btn-home-link:hover {
    background-color: #067d58; /* Un tono más oscuro al pasar el cursor */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(8, 159, 111, 0.4);
    color: #ffffff !important;
}

.btn-home-link i {
    font-size: 1rem;
}


.btn-like {
    transition: transform 0.2s ease;
    cursor: pointer;
    font-weight: bold;
    color: #64748b;
}
.btn-like:hover { transform: scale(1.2); }
/* Animación del botón de like */
.animate-like i {
    color: #ef4444 !important;
    animation: heartBeat 0.4s ease-out;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}











/* Contenedor principal del avatar */
.avatar-wrapper { 
    position: relative; 
    width: 95px; 
    height: 95px; 
    z-index: 1;
}


/* Contenedor circular */
.avatar-link {
    position: relative;
    display: block;
    width: 95px;
    height: 95px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    z-index: 1;
}

/* El destello diamante */
.diamond-shine {
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to right, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.7) 50%, 
        rgba(255,255,255,0) 100%
    );
    transform: skewX(-25deg);
    animation: shine 4s infinite;
    z-index: 5; /* Por encima de la imagen siempre */
    pointer-events: none; /* No interfiere con el click */
}
@keyframes shine {
    0% { left: -150%; }
    20% { left: 150%; }
    100% { left: 150%; }
}

/* La imagen que hace el zoom */
.avatar-img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    z-index: 1;
}

/* Hover manual */
.avatar-link:hover .avatar-img {
    transform: scale(1.25);
    z-index: 10;
}






@media (max-width: 768px) {
    /* Centrar todo el contenido de la tarjeta */
    .card-body-flex { 
        flex-direction: column; 
        align-items: center; /* Centra horizontalmente en columna */
        text-align: center; 
        padding: 2rem 1.5rem; 
    }

    /* Centrar el contenedor del avatar */
    .avatar-wrapper { 
        margin: 0 auto 1.5rem auto; /* El '0 auto' centra el bloque */
        display: block;
    }

    /* Ajustar la sección de datos para que sus hijos también se centren */
    .data-section {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0;
    }

    /* Forzar que el nombre y los iconos (IG/Like) se centren en la fila */
    .data-section > div:first-child {
        justify-content: center !important;
    }

    /* Reposicionar el número de ranking para que no estorbe */
    .rank-number { 
        position: absolute; 
        top: 15px; 
        right: 20px; /* Movido a la derecha para un look más limpio en móvil */
        font-size: 1.5rem;
        color: #e2e8f0;
    }
}