/* ==========================================================================
   ESTILOS PARA MÓDULO DE RANKINGS - TEMPLATE BLADE9
   ========================================================================== */

/* Contenedor principal de rankings */
.rankings-container {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    border: none;
    width: 100%;
}

/* Título principal de rankings */
.rankings-title {
    background: linear-gradient(135deg, #ff6b35 0%, #ff4500 100%);
    color: #ffffff;
    padding: 20px 30px;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.rankings-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.1) 75%, transparent 75%, transparent);
    background-size: 20px 20px;
    opacity: 0.3;
}

.rankings-title span {
    position: relative;
    z-index: 1;
}

/* Menú de navegación de rankings mejorado */
.rankings_menu {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 107, 53, 0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.rankings_menu a {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #495057;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #e9ecef;
    position: relative;
    overflow: hidden;
    flex: 0 1 auto;
    min-width: 140px;
    text-align: center;
    white-space: nowrap;
}

.rankings_menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.1), transparent);
    transition: left 0.6s ease;
}

.rankings_menu a:hover {
    background: linear-gradient(135deg, #ff6b35 0%, #ff4500 100%);
    color: #ffffff;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
    border-color: #ff6b35;
    text-decoration: none;
}

.rankings_menu a:hover::before {
    left: 100%;
}

.rankings_menu a.active {
    background: linear-gradient(135deg, #ff6b35 0%, #ff4500 100%);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
    border-color: #ff6b35;
    transform: translateY(-2px);
}

.rankings_menu a.active::before {
    display: none;
}

.rankings_menu a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #ffffff;
}

/* Responsive para el menú de rankings */
@media (max-width: 992px) {
    .rankings_menu {
        gap: 6px;
        padding: 12px;
    }
    
    .rankings_menu a {
        min-width: 120px;
        padding: 10px 16px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .rankings_menu {
        flex-direction: column;
        gap: 8px;
        padding: 15px;
    }
    
    .rankings_menu a {
        flex: none;
        min-width: auto;
        padding: 14px 20px;
        font-size: 14px;
        border-radius: 10px;
    }
}

@media (max-width: 480px) {
    .rankings_menu a {
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* Tabla de rankings */
.rankings-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    margin: 0;
    table-layout: fixed;
    overflow: hidden;
}

/* Contenedor de tabla responsivo */
.rankings-container .table-responsive {
    width: 100%;
    overflow-x: auto;
    margin: 0;
    padding: 0;
}

.rankings-container .table-responsive .rankings-table {
    min-width: 100%;
    margin: 0;
}

.rankings-table th {
    background: linear-gradient(135deg, #333 0%, #555 100%);
    color: #ffffff;
    padding: 15px 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
    border: none;
    text-align: left;
}

.rankings-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    font-size: 14px;
    color: #666;
}

.rankings-table tr:last-child td {
    border-bottom: none;
}

.rankings-table tr:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: translateX(2px);
    transition: all 0.3s ease;
}

/* Columna de posición */
.rankings-table .rank-position {
    font-weight: 700;
    font-size: 16px;
    color: #ff6b35;
    text-align: center;
    width: 60px;
}

/* Imagen de personaje */
.rankings-table .character-image {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.rankings-table .character-image:hover {
    transform: scale(1.1);
}

/* Nombre del personaje */
.rankings-table .character-name {
    font-weight: 600;
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.rankings-table .character-name:hover {
    color: #ff6b35;
    text-decoration: none;
}

/* Estado online */
.online-status {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-left: 8px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

.online-status.online {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.5);
}

.online-status.offline {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
    box-shadow: 0 0 8px rgba(220, 53, 69, 0.5);
}

/* Información de actualización */
.rankings-update-info {
    background: #f8f9fa;
    padding: 15px 20px;
    border-top: 1px solid #f0f0f0;
    font-size: 12px;
    color: #666;
    text-align: center;
}

/* Banderas de países */
.country-flag {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    margin-right: 8px;
    vertical-align: middle;
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .rankings-title {
        padding: 15px 20px;
        font-size: 1.2rem;
    }
    
    .rankings-table th,
    .rankings-table td {
        padding: 12px 15px;
        font-size: 13px;
    }
    
    .rankings-table .rank-position {
        width: 50px;
        font-size: 14px;
    }
    
    .character-image {
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 480px) {
    .rankings-title {
        padding: 12px 15px;
        font-size: 1rem;
    }
    
    .rankings-table th,
    .rankings-table td {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .rankings-table .rank-position {
        width: 40px;
        font-size: 12px;
    }
    
    .character-image {
        width: 30px;
        height: 30px;
    }
    
    .character-level {
        padding: 3px 6px !important;
        font-size: 10px !important;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rankings-container {
    animation: fadeInUp 0.6s ease-out;
}

.rankings-table tr {
    animation: fadeInUp 0.4s ease-out;
    animation-fill-mode: both;
}

.rankings-table tr:nth-child(1) { animation-delay: 0.1s; }
.rankings-table tr:nth-child(2) { animation-delay: 0.15s; }
.rankings-table tr:nth-child(3) { animation-delay: 0.2s; }
.rankings-table tr:nth-child(4) { animation-delay: 0.25s; }
.rankings-table tr:nth-child(5) { animation-delay: 0.3s; }
.rankings-table tr:nth-child(6) { animation-delay: 0.35s; }
.rankings-table tr:nth-child(7) { animation-delay: 0.4s; }
.rankings-table tr:nth-child(8) { animation-delay: 0.45s; }
.rankings-table tr:nth-child(9) { animation-delay: 0.5s; }
.rankings-table tr:nth-child(10) { animation-delay: 0.55s; }