/* ==========================================================================
   PVP STATISTICS MODULE - MODERNO Y ELEGANTE
   ========================================================================== */

.pvp-statistics-module {
    background: rgba(9, 10, 13, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    margin-bottom: 2rem;
}

/* Header con gradiente */
.pvp-header {
    background: linear-gradient(135deg, #4e86ff 0%, #2755b9 50%, #1a2f66 100%);
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pvp-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.pvp-title {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    font-family: var(--font-quadrat);
    position: relative;
}

.pvp-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin-top: 0.5rem;
    font-weight: 500;
    position: relative;
}

/* Controles y Tabs */
.pvp-controls {
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
}

/* Estilos específicos para las tabs PvP */
.nav-pills-pvp {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item-pvp {
    display: inline-block;
}

.nav-link-pvp {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

.nav-link-pvp i {
    font-size: 0.9rem;
    opacity: 0.7;
}

.nav-link-pvp:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    transform: translateY(-1px);
    text-decoration: none;
}

.nav-link-pvp.active {
    background: linear-gradient(45deg, #ffc000, #ffed4e);
    border-color: rgba(255, 192, 0, 0.3);
    color: #000;
    box-shadow: 0 4px 12px rgba(255, 192, 0, 0.3);
}

.nav-link-pvp.active i {
    opacity: 1;
    color: #000;
}

/* Realm Selector específico para PvP */
.nav-item-pvp.realm-selector {
    margin-left: auto;
}

/* Realm Selector */
.realm-selector {
    margin-left: auto;
}

.realm-dropdown {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-width: 200px;
}

.realm-dropdown:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.realm-dropdown:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    border-color: #4e86ff;
    box-shadow: 0 0 0 2px rgba(78, 134, 255, 0.3);
}

/* Contenedor de tablas */
.pvp-table-container {
    padding: 2rem;
}

.pvp-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    overflow: hidden;
}

.pvp-table thead {
    background: linear-gradient(135deg, rgba(78, 134, 255, 0.2), rgba(39, 85, 185, 0.3));
}

.pvp-table th {
    color: #fff;
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

/* Filas y celdas */
.pvp-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.pvp-row:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

.pvp-row.top-player,
.pvp-row.top-team {
    background: linear-gradient(90deg, rgba(255, 192, 0, 0.1), transparent);
    border-left: 3px solid #ffc000;
}

.pvp-table td {
    padding: 1rem;
    color: rgba(255, 255, 255, 0.8);
    vertical-align: middle;
}

/* Badges de ranking */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.rank-1 {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #000;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.rank-2 {
    background: linear-gradient(45deg, #c0c0c0, #e0e0e0);
    color: #000;
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.4);
}

.rank-3 {
    background: linear-gradient(45deg, #cd7f32, #e09e56);
    color: #000;
    box-shadow: 0 2px 8px rgba(205, 127, 50, 0.4);
}

/* Nombres de personajes destacados */
.character-link {
    color: #66a6ff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.character-link:hover {
    color: #89f7fe;
    text-shadow: 0 0 10px rgba(137, 247, 254, 0.5);
}

.character-name {
    font-size: 1.1rem;
}

.team-name {
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Badges y contadores */
.level-badge {
    background: rgba(78, 134, 255, 0.2);
    color: #4e86ff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
}

.kills-count,
.wins-count,
.rating-value {
    color: #ffc000;
    font-weight: 700;
    font-size: 1.1rem;
}

.kills-cell small,
.rating-cell small {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.7rem;
    margin-left: 0.25rem;
}

/* Iconos */
.race-icon,
.class-icon,
.faction-icon,
.member-icon {
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.member-link:hover .member-icon {
    transform: scale(1.2);
}

.faction-icon.alliance {
    box-shadow: 0 0 8px rgba(0, 112, 255, 0.5);
}

.faction-icon.horde {
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
}

.team-members {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

/* Estado vacío */
.pvp-empty-state {
    text-align: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
}

.pvp-empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Tooltips mejorados */
.tooltip-content {
    text-align: left;
    font-size: 0.8rem;
}

.tooltip-content strong {
    color: #ffc000;
}

/* Responsive */
@media (max-width: 768px) {
    .pvp-header {
        padding: 1.5rem;
    }
    
    .pvp-title {
        font-size: 2rem;
    }
    
    .nav-pills {
        flex-direction: column;
        align-items: stretch;
    }
    
    .realm-selector {
        margin-left: 0;
        margin-top: 1rem;
    }
    
    .realm-dropdown {
        width: 100%;
    }
    
    .pvp-table-container {
        padding: 1rem;
        overflow-x: auto;
    }
    
    .pvp-table {
        min-width: 800px;
    }
    
    .pvp-table th,
    .pvp-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .team-members {
        justify-content: center;
    }
}

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

.pvp-statistics-module {
    animation: fadeInUp 0.5s ease;
}

.pvp-row {
    animation: fadeInUp 0.3s ease;
}

/* Nuevos estilos para las tabs corregidas */
.pvp-tabs-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.pvp-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pvp-tab {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    font-size: inherit;
}

.pvp-tab i {
    font-size: 0.9rem;
    opacity: 0.7;
}

.pvp-tab:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    transform: translateY(-1px);
}

.pvp-tab.active {
    background: linear-gradient(45deg, #ffc000, #ffed4e);
    border-color: rgba(255, 192, 0, 0.3);
    color: #000;
    box-shadow: 0 4px 12px rgba(255, 192, 0, 0.3);
}

.pvp-tab.active i {
    opacity: 1;
    color: #000;
}