/* ==========================================================================
   FRONTIER MU - RANKINGS REDESIGN & HEROIC PODIUM (SCI-FI CYBER EMERALD)
   Template Hispano - Dedicated Module Styles
   ========================================================================== */

/* Variables locales heredadas y reforzadas */
:root {
  --rk-primary: #38bdf8;
  --rk-primary-rgb: 56, 189, 248;
  --rk-primary-glow: rgba(56, 189, 248, 0.4);
  --rk-gold: #ffd700;
  --rk-gold-glow: rgba(255, 215, 0, 0.5);
  --rk-silver: #c0d6df;
  --rk-silver-glow: rgba(57, 229, 196, 0.45);
  --rk-bronze: #e08b58;
  --rk-bronze-glow: rgba(224, 139, 88, 0.45);
  --rk-bg-card: rgba(10, 23, 44, 0.88);
  --rk-bg-card-hover: rgba(9, 36, 20, 0.95);
  --rk-border: rgba(56, 189, 248, 0.2);
  --rk-border-glow: rgba(56, 189, 248, 0.5);
  --rk-text-main: #eefbf4;
  --rk-text-muted: #84a28f;
}

/* --------------------------------------------------------------------------
   1. CONTENEDOR MAESTRO & ENCABEZADO TÁCTICO
   -------------------------------------------------------------------------- */
.rankings-rework-container {
  position: relative;
  width: 100%;
  margin: 0 auto 50px auto;
  font-family: 'Rajdhani', Arial, sans-serif !important;
  color: var(--rk-text-main);
}

.rankings-hero-header {
  text-align: center;
  margin-bottom: 30px;
  position: relative;
}

.rankings-hero-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0 0 6px 0;
  text-shadow: 0 0 20px rgba(var(--rk-primary-rgb), 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.rankings-hero-title i {
  color: var(--rk-primary);
  filter: drop-shadow(0 0 10px var(--rk-primary));
}

.rankings-hero-subtitle {
  font-size: 1rem;
  font-weight: 600;
  color: var(--rk-text-muted);
  letter-spacing: 1px;
  margin: 0;
}

/* --------------------------------------------------------------------------
   1.1. SHOWCASE TOP 5 (ESTILO HOME) EN RANKINGS
   -------------------------------------------------------------------------- */
.rankings-home-style-showcase {
  margin-bottom: 35px;
  position: relative;
}

.rankings-home-style-showcase .rank-three-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.rankings-home-style-showcase .rank-panel {
  position: relative;
  overflow: visible; /* Requerido para halo exterior de esquinas Sci-Fi */
  background: linear-gradient(180deg, rgba(11, 26, 48, 0.98), rgba(6, 12, 24, 0.98));
  border: 1px solid rgba(var(--rk-primary-rgb), 0.25);
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rankings-home-style-showcase .rank-panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.75), 0 0 20px rgba(var(--rk-primary-rgb), 0.25);
}

/* Esquinas biseladas con assets vectoriales dedicados (Regla del proyecto) */
.scifi-card-corners::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  width: 34px;
  height: 34px;
  background: url('../img/corner-top-left.svg') no-repeat center / contain;
  pointer-events: none;
  z-index: 5;
}

.scifi-card-corners::after {
  content: "";
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 34px;
  height: 34px;
  background: url('../img/corner-bottom-right.svg') no-repeat center / contain;
  pointer-events: none;
  z-index: 5;
}

.rankings-home-style-showcase .rank-panel header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(var(--rk-primary-rgb), 0.15);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px 12px 0 0;
}

.rankings-home-style-showcase .rank-panel header span {
  font-size: 1.25rem;
}

.rankings-home-style-showcase .rank-panel header h3 {
  margin: 0;
  font: 800 15px 'Rajdhani', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #ffffff;
}

.rankings-home-style-showcase .rank-panel header a {
  font-size: 11px;
  color: var(--rk-primary);
  text-transform: uppercase;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}

.rankings-home-style-showcase .rank-panel header a:hover {
  color: #ffffff;
  text-shadow: 0 0 10px var(--rk-primary);
}

.rankings-home-style-showcase .rank-panel ol {
  list-style: none;
  padding: 10px 12px;
  margin: 0;
}

.rankings-home-style-showcase .rank-panel li {
  display: grid;
  grid-template-columns: 24px 34px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.08);
}

.rankings-home-style-showcase .rank-panel li:last-child {
  border-bottom: 0;
}

.rankings-home-style-showcase .rank-panel li.winner {
  border: 1px solid rgba(255, 215, 0, 0.5);
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.08), rgba(56, 189, 248, 0.04));
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.15);
}

.rankings-home-style-showcase .rank-panel li b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
}

.rankings-home-style-showcase .rank-panel li.winner b {
  color: #ffd700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
}

.rankings-home-style-showcase .rank-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #000000;
  color: var(--rk-primary);
  border: 1.5px solid rgba(var(--rk-primary-rgb), 0.35);
  overflow: hidden;
}

.rankings-home-style-showcase .rank-panel li.winner .rank-avatar {
  border-color: #ffd700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.rankings-home-style-showcase .rank-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.rankings-home-style-showcase .rank-panel li strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.rankings-home-style-showcase .rank-panel li strong a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.rankings-home-style-showcase .rank-panel li strong a:hover {
  color: var(--rk-primary);
}

.rankings-home-style-showcase .rank-panel li small {
  display: block;
  color: var(--rk-text-muted);
  font-size: 11px;
  font-weight: 600;
}

.rankings-home-style-showcase .rank-panel li em {
  font-style: normal;
  font-weight: 800;
  font-size: 13px;
  color: var(--rk-primary);
}

.rankings-home-style-showcase .rank-panel.purple {
  color: #c084fc;
  border-color: rgba(192, 132, 252, 0.3);
}

.rankings-home-style-showcase .rank-panel.purple em {
  color: #c084fc;
}

.rankings-home-style-showcase .rank-panel.blue {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}

.rankings-home-style-showcase .rank-panel.blue em {
  color: #38bdf8;
}

.rankings-home-style-showcase .rank-panel.green {
  color: var(--rk-primary);
  border-color: rgba(var(--rk-primary-rgb), 0.3);
}

.rankings-home-style-showcase .rank-panel.green em {
  color: var(--rk-primary);
}

/* --------------------------------------------------------------------------
   2. NAVEGACIÓN HUD TÁCTICA (MENU DE RANKINGS)
   -------------------------------------------------------------------------- */
.rankings-hud-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 35px;
  padding: 10px 14px;
  background: rgba(3, 14, 8, 0.9);
  border: 1px solid rgba(var(--rk-primary-rgb), 0.25);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(0, 0, 0, 0.5);
}

.rankings-hud-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(var(--rk-primary-rgb), 0.15);
  border-radius: 8px;
  color: var(--rk-text-muted);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none !important;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.rankings-hud-tab i {
  font-size: 1rem;
  color: rgba(var(--rk-primary-rgb), 0.7);
  transition: transform 0.25s ease, color 0.25s ease;
}

.rankings-hud-tab:hover {
  background: rgba(var(--rk-primary-rgb), 0.14);
  border-color: rgba(var(--rk-primary-rgb), 0.55);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 18px rgba(var(--rk-primary-rgb), 0.3);
}

.rankings-hud-tab:hover i {
  color: var(--rk-primary);
  transform: scale(1.15);
}

.rankings-hud-tab.active {
  background: linear-gradient(135deg, #38bdf8 0%, #0d7a3a 100%);
  border-color: #ffffff;
  color: #060c18;
  font-weight: 800;
  box-shadow: 0 0 20px rgba(var(--rk-primary-rgb), 0.6);
  text-shadow: none;
}

.rankings-hud-tab.active i {
  color: #060c18;
}

/* --------------------------------------------------------------------------
   3. PODIO HEROICO 3D - TOP 3 CHAMPIONS
   -------------------------------------------------------------------------- */
.rankings-podium-wrapper {
  margin-bottom: 45px;
  position: relative;
}

.rankings-podium-grid {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
  position: relative;
}

/* Estructura Base de Tarjeta de Podio */
.podium-card {
  flex: 1 1 280px;
  max-width: 310px;
  position: relative;
  overflow: visible; /* Regla requerida para visualización del halo exterior */
  border-radius: 16px;
  padding: 24px 18px 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  backdrop-filter: blur(14px);
  background: var(--rk-bg-card);
}

/* Esquinas biseladas con assets vectoriales dedicados (Regla del proyecto) */
.podium-card::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  width: 38px;
  height: 38px;
  background: url('../img/corner-top-left.svg') no-repeat center / contain;
  pointer-events: none;
  z-index: 4;
}

.podium-card::after {
  content: "";
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 38px;
  height: 38px;
  background: url('../img/corner-bottom-right.svg') no-repeat center / contain;
  pointer-events: none;
  z-index: 4;
}

.podium-card:hover {
  transform: translateY(-8px);
}

/* --- TOP 1: ORO SUPREMO (CENTRO ELEVADO) --- */
.podium-card.rank-pos-1 {
  order: 2;
  z-index: 3;
  padding-top: 32px;
  padding-bottom: 26px;
  border: 2px solid rgba(255, 215, 0, 0.7);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.8),
              0 0 35px rgba(255, 215, 0, 0.35),
              inset 0 0 25px rgba(255, 215, 0, 0.08);
  background: linear-gradient(180deg, rgba(20, 35, 15, 0.95) 0%, rgba(5, 20, 10, 0.98) 100%);
}

.podium-crown-banner {
  position: absolute;
  top: -28px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  animation: crownFloat 2.8s ease-in-out infinite alternate;
}

.podium-crown-icon {
  font-size: 2.3rem;
  color: #ffd700;
  filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.9))
          drop-shadow(0 0 24px rgba(255, 170, 0, 0.7));
}

@keyframes crownFloat {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-6px) scale(1.06); }
}

/* Aura Girando Top 1 */
.podium-card.rank-pos-1 .podium-aura-ring {
  position: absolute;
  inset: -6px;
  border-radius: 20px;
  background: conic-gradient(
    from 0deg,
    rgba(255, 215, 0, 0.7),
    rgba(56, 189, 248, 0.5),
    rgba(255, 215, 0, 0.7)
  );
  filter: blur(10px);
  opacity: 0.65;
  animation: spinAura 4s linear infinite;
  z-index: -1;
}

@keyframes spinAura {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* --- TOP 2: PLATA / CYAN (IZQUIERDA) --- */
.podium-card.rank-pos-2 {
  order: 1;
  z-index: 2;
  border: 1.5px solid rgba(57, 229, 196, 0.55);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7),
              0 0 25px rgba(57, 229, 196, 0.25);
  background: linear-gradient(180deg, rgba(8, 28, 25, 0.92) 0%, rgba(4, 18, 15, 0.96) 100%);
}

/* --- TOP 3: BRONCE / AMBAR (DERECHA) --- */
.podium-card.rank-pos-3 {
  order: 3;
  z-index: 2;
  border: 1.5px solid rgba(224, 139, 88, 0.55);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7),
              0 0 25px rgba(224, 139, 88, 0.25);
  background: linear-gradient(180deg, rgba(28, 20, 12, 0.92) 0%, rgba(16, 10, 5, 0.96) 100%);
}

/* Medalla / Posición Badge en Podio */
.podium-badge-place {
  position: absolute;
  top: 14px;
  left: 16px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  z-index: 5;
}

.podium-card.rank-pos-1 .podium-badge-place {
  background: linear-gradient(135deg, #ffd700, #b8860b);
  color: #000000;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
}

.podium-card.rank-pos-2 .podium-badge-place {
  background: linear-gradient(135deg, #e0f2fe, #7dd3fc);
  color: #0c2a38;
  box-shadow: 0 0 12px rgba(125, 211, 252, 0.6);
}

.podium-card.rank-pos-3 .podium-badge-place {
  background: linear-gradient(135deg, #fed7aa, #ea580c);
  color: #2b1102;
  box-shadow: 0 0 12px rgba(234, 88, 12, 0.6);
}

/* Avatar en Podio */
.podium-avatar-box {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 10px 0 14px 0;
}

.podium-card.rank-pos-1 .podium-avatar-box {
  width: 105px;
  height: 105px;
}

.podium-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(var(--rk-primary-rgb), 0.6);
  background: #000000;
  transition: all 0.3s ease;
}

.podium-card.rank-pos-1 .podium-avatar-img {
  border: 3px solid #ffd700;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.7);
}

.podium-card.rank-pos-2 .podium-avatar-img {
  border: 3px solid #38bdf8;
  box-shadow: 0 0 18px rgba(57, 229, 196, 0.6);
}

.podium-card.rank-pos-3 .podium-avatar-img {
  border: 3px solid #ff9f6a;
  box-shadow: 0 0 18px rgba(255, 159, 106, 0.6);
}

/* Indicador Online/Offline directo con ::before (Regla del proyecto) */
.player-status-indicator {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #000000;
  border: 2px solid #000000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.player-status-indicator::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #64748b; /* offline default */
}

.player-status-indicator.is-online::before {
  background: #00ff88;
  box-shadow: 0 0 8px #00ff88;
}

/* Datos del Personaje en Podio */
.podium-player-name {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.podium-card.rank-pos-1 .podium-player-name a {
  color: #ffd700 !important;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.podium-player-name a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.podium-player-name a:hover {
  color: var(--rk-primary);
}

.podium-class-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--rk-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.podium-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(var(--rk-primary-rgb), 0.25);
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.podium-card.rank-pos-1 .podium-stat-pill {
  background: rgba(255, 215, 0, 0.15);
  border-color: rgba(255, 215, 0, 0.5);
  color: #ffd700;
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.2);
}

.podium-location-badge {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rk-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* --------------------------------------------------------------------------
   4. TOOLBAR INTERACTIVA (BUSCADOR EN VIVO + FILTRO DE CLASES)
   -------------------------------------------------------------------------- */
.rankings-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 14px 18px;
  background: rgba(4, 16, 9, 0.8);
  border: 1px solid rgba(var(--rk-primary-rgb), 0.2);
  border-radius: 12px;
}

.rankings-search-box {
  position: relative;
  flex: 1 1 260px;
  max-width: 360px;
}

.rankings-search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--rk-primary);
  font-size: 0.95rem;
  pointer-events: none;
}

.rankings-search-input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  background: rgba(1, 10, 5, 0.9);
  border: 1px solid rgba(var(--rk-primary-rgb), 0.3);
  border-radius: 8px;
  color: #ffffff;
  font-family: 'Rajdhani', Arial, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.25s ease;
}

.rankings-search-input:focus {
  border-color: var(--rk-primary);
  box-shadow: 0 0 15px rgba(var(--rk-primary-rgb), 0.4);
  background: rgba(2, 14, 7, 0.95);
}

.rankings-classes-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.rank-class-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(var(--rk-primary-rgb), 0.15);
  border-radius: 6px;
  color: var(--rk-text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.rank-class-btn:hover {
  background: rgba(var(--rk-primary-rgb), 0.12);
  border-color: var(--rk-primary);
  color: #ffffff;
  transform: translateY(-2px);
}

.rank-class-btn.active {
  background: var(--rk-primary);
  border-color: var(--rk-primary);
  color: #060c18;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(var(--rk-primary-rgb), 0.5);
}

.rank-class-btn img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   5. TABLA CIBERNÉTICA DE PUESTOS (#4 AL #100)
   -------------------------------------------------------------------------- */
.rankings-cyber-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  margin-bottom: 25px;
}

.rankings-cyber-table thead tr th {
  padding: 12px 16px;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--rk-primary);
  border-bottom: 2px solid rgba(var(--rk-primary-rgb), 0.3);
  background: transparent;
}

/* Filas tipo Tarjeta Flotante */
.ranking-row-card {
  background: var(--rk-bg-card);
  transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
}

.ranking-row-card:hover {
  background: var(--rk-bg-card-hover);
  transform: scale(1.006) translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5),
              0 0 15px rgba(var(--rk-primary-rgb), 0.2);
}

.ranking-row-card td {
  padding: 12px 16px;
  vertical-align: middle;
  border-top: 1px solid var(--rk-border);
  border-bottom: 1px solid var(--rk-border);
  font-weight: 600;
  font-size: 0.96rem;
  color: #dbebe1;
}

.ranking-row-card td:first-child {
  border-left: 1px solid var(--rk-border);
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

.ranking-row-card td:last-child {
  border-right: 1px solid var(--rk-border);
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

/* Badge de Posición */
.rank-pos-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(var(--rk-primary-rgb), 0.3);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--rk-primary);
}

.rank-pos-badge.pos-1 {
  background: linear-gradient(135deg, #ffd700, #b8860b);
  color: #000000;
  border-color: #ffd700;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.7);
}

.rank-pos-badge.pos-2 {
  background: linear-gradient(135deg, #e0f2fe, #7dd3fc);
  color: #0c2a38;
  border-color: #38bdf8;
  box-shadow: 0 0 14px rgba(57, 229, 196, 0.6);
}

.rank-pos-badge.pos-3 {
  background: linear-gradient(135deg, #fed7aa, #ea580c);
  color: #2b1102;
  border-color: #ff9f6a;
  box-shadow: 0 0 14px rgba(255, 159, 106, 0.6);
}

/* Avatar de Clase en Fila */
.ranking-table-avatar-wrapper {
  position: relative;
  display: inline-block;
  vertical-align: middle;
}

.ranking-table-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(var(--rk-primary-rgb), 0.4);
  background: #000;
}

/* Badge Online en Avatar */
.ranking-table-avatar-wrapper .char-online-indicator {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.ranking-table-avatar-wrapper .char-online-indicator::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748b;
}

.ranking-table-avatar-wrapper .char-online-indicator.is-online::before {
  background: #00ff88;
  box-shadow: 0 0 6px #00ff88;
}

/* Nombre de Personaje & Perfil */
.ranking-player-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 3px;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
}

.ranking-player-cell a {
  display: inline-block;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.3px;
  transition: color 0.2s ease;
}

.ranking-player-cell a:hover {
  color: var(--rk-primary);
  text-shadow: 0 0 8px rgba(var(--rk-primary-rgb), 0.5);
}

.ranking-class-subtitle {
  display: block;
  font-size: 0.75rem;
  color: var(--rk-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  line-height: 1;
}

/* Stat de Nivel Destacado */
.ranking-stat-val {
  font-weight: 800;
  font-size: 1.1rem;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.ranking-map-text {
  color: var(--rk-text-muted);
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* --------------------------------------------------------------------------
   6. SISTEMA DE RACHAS / TENDENCIAS (STREAKS)
   -------------------------------------------------------------------------- */
.rank-streak-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.rank-streak-hot {
  background: linear-gradient(135deg, #ff2a2a, #ff7b00);
  box-shadow: 0 0 12px rgba(255, 68, 0, 0.5);
  color: #ffffff;
}

.rank-streak-cold {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
  color: #ffffff;
}

.rank-streak-up {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #2bff88;
}

.rank-streak-down {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ff5b73;
}

.rank-streak-kp {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.75rem;
}

.rank-gif-hot {
  height: 9px;
  display: inline-block;
  vertical-align: middle;
}

.rank-gif-cold {
  height: 15px;
  display: inline-block;
  vertical-align: middle;
}

/* --------------------------------------------------------------------------
   7. FOOTER DE ACTUALIZACIÓN & DETALLES
   -------------------------------------------------------------------------- */
.rankings-footer-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--rk-text-muted);
}

.rankings-footer-info span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* --------------------------------------------------------------------------
   8. RESPONSIVE DESIGN (TABLETS & MÓVILES)
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  .rankings-home-style-showcase .rank-three-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .rankings-podium-grid {
    flex-direction: column;
    align-items: center;
    gap: 25px;
  }

  .podium-card {
    width: 100%;
    max-width: 360px;
  }

  .podium-card.rank-pos-1 {
    order: 1; /* Top 1 arriba en móvil */
  }

  .podium-card.rank-pos-2 {
    order: 2;
  }

  .podium-card.rank-pos-3 {
    order: 3;
  }
}

@media (max-width: 767px) {
  .rankings-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .rankings-search-box {
    max-width: 100%;
  }

  .rankings-cyber-table thead {
    display: none; /* Ocultar cabecera rígida */
  }

  .rankings-cyber-table,
  .rankings-cyber-table tbody,
  .ranking-row-card {
    display: block;
    width: 100%;
  }

  .ranking-row-card {
    margin-bottom: 12px;
    border-radius: 12px;
    padding: 12px;
  }

  .ranking-row-card td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
    padding: 6px 10px;
  }

  .ranking-row-card td::before {
    content: attr(data-label);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--rk-primary);
    text-transform: uppercase;
  }

  .ranking-row-card td:first-child,
  .ranking-row-card td:last-child {
    border-radius: 0;
  }
}

/* --------------------------------------------------------------------------
   8. ESTILOS DEDICADOS RANKING GENERAL: CLAN & MASTER LEVEL
   -------------------------------------------------------------------------- */
.ranking-guild-cell {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  vertical-align: middle;
}

.ranking-guild-emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 5px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(0, 240, 255, 0.3);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-row-card:hover .ranking-guild-emblem {
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.45);
}

.ranking-guild-emblem img {
  image-rendering: pixelated;
  width: 100%;
  height: 100%;
  display: block;
}

.ranking-guild-link a {
  color: #00f0ff !important;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.ranking-guild-link a:hover {
  color: #70ffff !important;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
}

.ranking-no-guild {
  color: #4b6279;
  font-size: 0.85rem;
  font-style: italic;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  opacity: 0.8;
}

.ranking-no-guild i {
  font-size: 0.75rem;
  opacity: 0.5;
}

.ranking-stat-master {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 5px;
  background: rgba(180, 0, 255, 0.12);
  border: 1px solid rgba(180, 0, 255, 0.35);
  color: #dc8aff;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 0 8px rgba(180, 0, 255, 0.15);
  letter-spacing: 0.3px;
}

.ranking-stat-master i {
  font-size: 0.75rem;
  color: #f1baff;
}

