/* ==========================================================================
   HEXTECH RANKINGS - VIBRANT & ROUNDED EDITION
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@300;400;600&family=Roboto:wght@400;500&display=swap');

:root {
    --hex-neon: #a3e635;         /* Verde Lima Eléctrico */
    --hex-bright: #bef264;       /* Verde Claro */
    --hex-dark: #1a2e05;         /* Verde Oscuro */
    --hex-glass: rgba(10, 20, 10, 0.6); /* Cristal más transparente */
    --hex-glow: rgba(163, 230, 53, 0.6); /* Resplandor intenso */
}

/* --- OPTIMIZACIÓN DE RENDERIZADO --- */
.hybrid-rankings-wrapper, .ranking-gallery-wrapper {
    background: transparent !important;
    padding: 0;
    margin-bottom: 80px !important;
    -webkit-font-smoothing: antialiased;
    transform: translateZ(0); 
}

/* =========================================================
   1. NAVEGACIÓN DE PESTAÑAS (ESTILO PÍLDORA)
   ========================================================= */
.ranking-tabs-nav {
    display: flex; justify-content: center; gap: 15px; margin-bottom: 40px; position: relative;
}

/* Línea decorativa suave */
.ranking-tabs-nav::before {
    content: ''; position: absolute; bottom: 0; left: 10%; width: 80%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--hex-neon), transparent);
    opacity: 0.3;
}

.r-tab-btn {
    background: rgba(0, 0, 0, 0.4);
    color: #94a3b8;
    font-family: 'Oswald', sans-serif; font-size: 14px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 2px;
    padding: 10px 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px; /* REDONDO */
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative; overflow: hidden;
}

.r-tab-btn:hover {
    color: #fff; background: rgba(163, 230, 53, 0.1);
    border-color: var(--hex-neon);
    transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(163, 230, 53, 0.3);
}

.r-tab-btn.active {
    color: #000;
    background: linear-gradient(135deg, var(--hex-neon), #4d7c0f);
    border-color: var(--hex-neon);
    box-shadow: 0 0 25px var(--hex-glow);
    font-weight: bold;
}

/* =========================================================
   2. TARJETAS DE RANKING (HOME) - ESTILO VIBRANTE
   ========================================================= */
.ranking-grid { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; }
.ranking-tab-content { display: none; perspective: 1000px; }
.ranking-tab-content.active { display: block; animation: cinemaFadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }

@keyframes cinemaFadeIn {
    0% { opacity: 0; transform: translateY(30px) scale(0.95); filter: blur(5px); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.rect-card {
    width: 240px;
    background: linear-gradient(180deg, rgba(20, 30, 20, 0.8) 0%, rgba(5, 10, 5, 0.9) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 2px solid var(--hex-neon); /* Borde inferior neón */
    border-radius: 16px; /* BORDES SUAVES */
    position: relative;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    overflow: hidden;
}

.rect-card:hover {
    transform: translateY(-15px) scale(1.03);
    border-color: rgba(163, 230, 53, 0.5);
    box-shadow: 0 20px 50px rgba(0,0,0,0.7), 0 0 30px rgba(163, 230, 53, 0.2);
    z-index: 10;
}

/* Imagen del Personaje */
.rect-card-img-box {
    width: 100%; height: 240px; position: relative;
    background: radial-gradient(circle at center, rgba(163, 230, 53, 0.1), transparent 70%);
    border-radius: 16px 16px 0 0;
    overflow: hidden;
}
.rect-card-img-box img {
    width: 100%; height: 100%; object-fit: contain; object-position: bottom center;
    transition: transform 0.8s ease; filter: drop-shadow(0 0 10px rgba(0,0,0,0.5));
}
.rect-card:hover .rect-card-img-box img {
    transform: scale(1.15); filter: drop-shadow(0 0 20px var(--hex-neon));
}

/* Badge de Posición */
.rect-pos {
    position: absolute; top: 0; left: 0;
    background: linear-gradient(135deg, var(--hex-neon), #4d7c0f);
    color: #000; font-family: 'Oswald', sans-serif; font-size: 16px; font-weight: bold;
    padding: 6px 18px; border-bottom-right-radius: 12px;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.3); z-index: 5;
}

/* Info Card */
.rect-card-info { padding: 20px 15px; text-align: center; }
.rect-name {
    font-family: 'Oswald', sans-serif; font-size: 20px; color: #fff;
    font-weight: 700; text-transform: uppercase; margin-bottom: 2px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8); letter-spacing: 1px;
}
.rect-sub {
    font-family: 'Roboto', sans-serif; font-size: 12px; color: #94a3b8;
    text-transform: uppercase; margin-bottom: 10px; font-weight: 500;
}
.rect-stat {
    font-size: 18px; font-weight: bold; color: var(--hex-neon);
    text-shadow: 0 0 15px var(--hex-glow);
    background: rgba(0, 0, 0, 0.4);
    display: inline-block; padding: 5px 20px; border-radius: 20px;
    border: 1px solid rgba(163, 230, 53, 0.2);
}

/* Top 1 Especial */
.rect-card.rank-1 { border-color: var(--hex-neon); box-shadow: 0 0 20px var(--hex-glow); transform: scale(1.05); }
.rect-card.rank-1:hover { transform: translateY(-15px) scale(1.1); }


/* =========================================================
   3. INTERNAL RANKING MENU (Página de Rankings)
   ========================================================= */
.rankings_menu {
    display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 20px;
    margin-bottom: 30px;
    background: rgba(10, 15, 10, 0.6); 
    border-radius: 16px; /* Panel Redondo */
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.rankings_menu a {
    display: inline-block; padding: 12px 30px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8; font-family: 'Oswald', sans-serif; font-size: 14px; font-weight: bold;
    text-transform: uppercase; text-decoration: none !important; letter-spacing: 1px;
    transition: all 0.3s ease; min-width: 140px; text-align: center;
    border-radius: 30px; /* BOTONES REDONDOS */
}

.rankings_menu a:hover {
    background: rgba(163, 230, 53, 0.1); border-color: var(--hex-neon); color: #fff;
    transform: translateY(-3px); box-shadow: 0 0 15px rgba(163, 230, 53, 0.3);
}

.rankings_menu a.active {
    background: linear-gradient(135deg, var(--hex-neon), #4d7c0f);
    color: #000; border-color: var(--hex-neon);
    box-shadow: 0 0 25px rgba(163, 230, 53, 0.5);
}

/* =========================================================
   4. ESTILOS DE TABLA INTERNA (Modernas & Redondas)
   ========================================================= */
.hybrid-table {
    width: 100%; border-collapse: separate; border-spacing: 0 8px; /* Más espacio entre filas */
    margin-top: 20px; font-family: 'Roboto', sans-serif; color: #ccc;
}

/* Cabecera */
.hybrid-table thead tr th {
    background-color: rgba(163, 230, 53, 0.05);
    color: var(--hex-neon); font-family: 'Oswald', sans-serif; font-weight: bold;
    text-transform: uppercase; font-size: 14px; letter-spacing: 1px;
    padding: 15px; border-bottom: 2px solid var(--hex-neon); text-align: center;
    border-radius: 8px; /* Cabecera suave */
}

/* Filas del Cuerpo */
.hybrid-table tbody tr {
    background: linear-gradient(90deg, rgba(20, 30, 20, 0.6), rgba(10, 15, 10, 0.8));
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.hybrid-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(163, 230, 53, 0.15), rgba(10, 15, 10, 0.9));
    transform: scale(1.01); 
    box-shadow: 0 0 20px rgba(163, 230, 53, 0.1);
}

/* Celdas */
.hybrid-table tbody tr td {
    padding: 15px; text-align: center;
    border-top: 1px solid rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.03);
    vertical-align: middle;
}

/* Bordes redondeados en extremos de fila */
.hybrid-table tbody tr td:first-child {
    border-left: 1px solid rgba(255,255,255,0.03);
    border-top-left-radius: 12px; border-bottom-left-radius: 12px;
}
.hybrid-table tbody tr td:last-child {
    border-right: 1px solid rgba(255,255,255,0.03);
    border-top-right-radius: 12px; border-bottom-right-radius: 12px;
}

/* Top 3 Colores */
.hybrid-table tbody tr:nth-child(1) td { color: #ffd700; font-weight: bold; text-shadow: 0 0 10px rgba(255, 215, 0, 0.4); }
.hybrid-table tbody tr:nth-child(2) td { color: #e2e8f0; font-weight: bold; }
.hybrid-table tbody tr:nth-child(3) td { color: #cd7f32; font-weight: bold; }

/* Enlaces */
.hybrid-table a { color: #fff; text-decoration: none; font-weight: bold; transition: 0.2s; }
.hybrid-table a:hover { color: var(--hex-neon); text-shadow: 0 0 10px var(--hex-glow); }

/* Filtro Circular */
.rankings-class-filter-selection img { border-radius: 50%; border: 2px solid #333; transition: 0.4s; }
.rankings-class-filter-selection:hover img { border-color: var(--hex-neon); box-shadow: 0 0 15px var(--hex-glow); transform: scale(1.15); }


/* =========================================================
   MOBILE RESPONSIVE
   ========================================================= */
@media only screen and (max-width: 991px) {
    .ranking-tabs-nav { flex-direction: column !important; gap: 10px !important; }
    .r-tab-btn { width: 100% !important; text-align: center !important; }
    .ranking-grid { flex-direction: column !important; align-items: center !important; }
    .rect-card { width: 100% !important; max-width: 320px !important; transform: none !important; }
    .rankings_menu { flex-direction: column; }
    .rankings_menu a { width: 100%; display: block; margin-bottom: 5px; }
}
/* =========================================================
   5. FILTRO DE CLASES (CIRCULAR VIBRANTE)
   ========================================================= */

/* Contenedor principal de los filtros */
.rankings-class-filter {
    display: flex; 
    justify-content: center; 
    flex-wrap: wrap; 
    gap: 15px;
    list-style-type: none; 
    margin: 30px auto; 
    padding: 20px; 
    background: rgba(10, 15, 10, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px; /* Caja contenedora suave */
}

/* Cada opción individual */
.rankings-class-filter-selection {
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    width: 75px;
    cursor: pointer; 
    text-decoration: none !important;
    transition: 0.3s;
}

/* Imagen de la raza (Redonda y con opacidad por defecto) */
.rankings-class-filter-selection img {
    width: 50px; 
    height: 50px; 
    border-radius: 50%; 
    margin-bottom: 8px;
    border: 2px solid rgba(255, 255, 255, 0.1); 
    background: rgba(0, 0, 0, 0.8); 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: grayscale(100%); /* Gris por defecto */
    opacity: 0.6;
}

/* Nombre de la raza debajo de la imagen */
.rankings-class-filter-selection span {
    font-size: 10px; 
    color: #666; 
    font-weight: bold; 
    text-transform: uppercase; 
    transition: 0.3s;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 1px;
    text-align: center;
}

/* EFECTO HOVER: Color y Brillo Neón */
.rankings-class-filter-selection:hover img {
    filter: grayscale(0%); 
    opacity: 1;
    border-color: var(--hex-neon);
    box-shadow: 0 0 20px rgba(163, 230, 53, 0.5); 
    transform: scale(1.15);
}

.rankings-class-filter-selection:hover span { 
    color: var(--hex-neon); 
    text-shadow: 0 0 5px rgba(163, 230, 53, 0.5); 
}

/* CLASE JS: Cuando se hace click y otro se opaca */
.rankings-class-filter-grayscale img { 
    filter: grayscale(100%) !important; 
    opacity: 0.3 !important; 
    border-color: rgba(255,255,255,0.05) !important;
    box-shadow: none !important;
    transform: scale(0.9) !important;
}
.rankings-class-filter-grayscale span {
    color: #444 !important;
}