/* SangrisPack Ranking V3 - Interface Moderna */

/* Container principal - estilo gamer moderno */
.sangris-ranking,
.sangris-ranking-v3 {
    background: linear-gradient(145deg, #1B1B1B 0%, #2a2a2a 50%, #1B1B1B 100%);
    border-radius: 12px;
    padding: 0;
    margin: 20px 0;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 40, 41, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Borda superior destacada - sempre vermelha */
.sangris-ranking::before,
.sangris-ranking-v3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #FF2829;
    z-index: 1;
}

@keyframes borderGlow {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 0%; }
}

/* Título do ranking */
.ranking-title {
    background: linear-gradient(135deg, #1B1B1B 0%, #0f0f0f 100%);
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    padding: 16px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 40, 41, 0.3);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    position: relative;
}

.ranking-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #FF2829, transparent);
}

/* Lista de rankings */
.ranking-list {
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
}

/* Item individual do ranking - estilo estruturado melhorado */
.ranking-item {
    display: grid;
    grid-template-columns: 50px 1fr auto auto;
    grid-template-areas: "position name value server";
    align-items: center;
    background: linear-gradient(135deg, rgba(27, 27, 27, 0.8) 0%, rgba(15, 15, 15, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 6px;
    padding: 12px 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    gap: 12px;
}

/* Efeitos de interação melhorados */
.ranking-item:hover {
    background: linear-gradient(135deg, rgba(27, 27, 27, 0.9) 0%, rgba(15, 15, 15, 0.95) 100%);
    border-color: rgba(255, 40, 41, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255, 40, 41, 0.15);
}

.ranking-item:hover .position,
.ranking-item:hover .rank-position {
    background: rgba(255, 40, 41, 0.2);
    color: #FF2829;
}

.ranking-item:hover .player-name {
    color: #FF2829;
}

.ranking-item:hover .player-currency {
    border-color: rgba(255, 40, 41, 0.5);
    box-shadow: 0 2px 8px rgba(255, 40, 41, 0.2);
}

/* Efeito de click */
.ranking-item.clicked {
    transform: translateY(-2px) scale(0.98);
    transition: all 0.1s ease;
}

/* Loading state */
.ranking-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #FFFFFF;
    font-size: 16px;
    background: linear-gradient(145deg, #1B1B1B 0%, #2a2a2a 50%, #1B1B1B 100%);
    border-radius: 12px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Posição/medalha - estilo rank melhorado */
.ranking-item .position,
.rank-position {
    grid-area: position;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #FFFFFF;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    background: rgba(255, 40, 41, 0.1);
    border-radius: 6px;
    padding: 3px 6px;
    min-width: 32px;
}

/* Nome do jogador - estilo melhorado */
.ranking-item .name,
.player-name {
    grid-area: name;
    font-size: 14px;
    font-weight: 500;
    color: #FFFFFF;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
}

/* Valor (sangricoins/primordiais) - estilo currency melhorado */
.ranking-item .value,
.player-currency {
    grid-area: value;
    font-size: 14px;
    font-weight: 600;
    color: #1B1B1B;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 40, 41, 0.3);
    text-shadow: none;
    white-space: nowrap;
}

/* Badge do servidor - estilo melhorado */
.server-badge {
    grid-area: server;
    font-size: 9px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Boss stats removido - usar mesmo layout dos outros rankings */

/* Layout especial para rankings de boss - igual aos outros rankings */
.boss-ranking .ranking-item {
    grid-template-columns: 50px 1fr auto auto;
    grid-template-areas: "position name value server";
    padding: 12px 16px;
    margin-bottom: 6px;
}

/* Badge consolidado (multi-servidor) */
.server-badge.server-consolidated {
    background: rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 9px;
    font-weight: 500;
}

/* Badge servidor específico */
.server-badge.server-specific {
    background: rgba(255, 40, 41, 0.2);
    color: #FF2829;
    border: 1px solid rgba(255, 40, 41, 0.4);
    text-transform: none;
    font-size: 10px;
    padding: 5px 10px;
    letter-spacing: 0.3px;
    font-weight: 500;
}

/* Estilos especiais para as 3 primeiras posições */
.ranking-item.position-1 {
    background: linear-gradient(135deg, rgba(255, 40, 41, 0.15) 0%, rgba(27, 27, 27, 0.9) 100%);
    border-color: rgba(255, 40, 41, 0.5);
}

.ranking-item.position-1 .position {
    color: #FF2829;
    font-size: 18px;
}

.ranking-item.position-1 .value {
    background: rgba(255, 40, 41, 0.9);
    border-color: rgba(255, 40, 41, 0.8);
    color: #FFFFFF;
}

.ranking-item.position-2 {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(27, 27, 27, 0.9) 100%);
    border-color: rgba(255, 255, 255, 0.3);
}

.ranking-item.position-2 .position {
    color: #FFFFFF;
    font-size: 17px;
}

.ranking-item.position-3 {
    background: linear-gradient(135deg, rgba(27, 27, 27, 0.2) 0%, rgba(27, 27, 27, 0.9) 100%);
    border-color: rgba(255, 255, 255, 0.2);
}

.ranking-item.position-3 .position {
    color: #FFFFFF;
    font-size: 16px;
    opacity: 0.8;
}

/* Info do clan */
.clan-info {
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    opacity: 0.7;
}

/* Footer do ranking - removido o texto "Atualizado em tempo real" */
.ranking-footer {
    display: none; /* Oculta completamente o footer */
}

/* Estados de erro */
.sangris-ranking-error {
    background: rgba(255, 40, 41, 0.1);
    border: 1px solid rgba(255, 40, 41, 0.3);
    border-radius: 8px;
    color: #FF2829;
    padding: 20px;
    text-align: center;
    font-weight: 500;
}

/* Animações de entrada */
.ranking-item {
    animation: fadeInUp 0.4s ease-out forwards;
    opacity: 0;
    transform: translateY(10px);
}

.ranking-item:nth-child(1) { animation-delay: 0.05s; }
.ranking-item:nth-child(2) { animation-delay: 0.1s; }
.ranking-item:nth-child(3) { animation-delay: 0.15s; }
.ranking-item:nth-child(4) { animation-delay: 0.2s; }
.ranking-item:nth-child(5) { animation-delay: 0.25s; }
.ranking-item:nth-child(n+6) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsividade melhorada para manter estrutura */
@media (max-width: 768px) {
    .sangris-ranking,
    .sangris-ranking-v3 {
        margin: 15px 0;
    }
    
    .ranking-title {
        font-size: 16px;
        padding: 14px 16px;
    }
    
    .ranking-list {
        padding: 6px;
    }
    
    .ranking-item {
        padding: 10px 12px;
        grid-template-columns: 50px 1fr auto;
        grid-template-areas: 
            "position name server"
            "position value server";
        gap: 8px;
    }
    
    .ranking-item .position,
    .rank-position {
        font-size: 14px;
        grid-row: 1 / 3;
    }
    
    .ranking-item .name,
    .player-name {
        font-size: 14px;
    }
    
    .ranking-item .value,
    .player-currency {
        font-size: 13px;
        padding: 5px 10px;
        grid-area: value;
    }
    
    .server-badge {
        font-size: 10px;
        padding: 3px 6px;
        grid-row: 1 / 3;
    }    /* Boss ranking responsivo - igual aos outros rankings */
    .boss-ranking .ranking-item {
        grid-template-columns: 50px 1fr auto;
        grid-template-areas: 
            "position name server"
            "position value server";
        padding: 10px 12px;
        margin-bottom: 6px;
    }
}

@media (max-width: 480px) {
    .ranking-item {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .ranking-item .name {
        flex-basis: 100%;
        order: 2;
    }
    
    .ranking-item .position {
        order: 1;
        margin-right: 0;
    }
    
    .ranking-item .value {
        order: 3;
        margin-left: auto;
    }
    
    .server-badge {
        order: 4;
        margin-left: 0;
    }
}

/* Compatibilidade com temas escuros */
.wp-dark-mode .sangris-ranking,
.wp-dark-mode .sangris-ranking-v3,
body.dark .sangris-ranking,
body.dark .sangris-ranking-v3 {
    background: linear-gradient(145deg, #0a0a0a 0%, #1B1B1B 50%, #0a0a0a 100%);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 40, 41, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Estilo para containers antigos (compatibilidade) */
.sangris-ranking-container {
    /* Herda os estilos dos novos containers */
    background: linear-gradient(145deg, #1B1B1B 0%, #2a2a2a 50%, #1B1B1B 100%);
    border-radius: 12px;
    padding: 0;
    margin: 20px 0;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 40, 41, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

.sangris-ranking-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #FF2829, #FFFFFF, #FF2829);
    background-size: 200% 100%;
    animation: borderGlow 3s ease-in-out infinite;
}

.ranking-header {
    background: linear-gradient(135deg, #1B1B1B 0%, #0f0f0f 100%);
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 40, 41, 0.3);
}

.ranking-header h3 {
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* ==================== ESTILOS ESPECÍFICOS PARA RANKING DE BOSSES ==================== */

/* Container de ranking de bosses */
.boss-ranking {
    background: linear-gradient(145deg, #1B1B1B 0%, #2a2a2a 50%, #1B1B1B 100%);
    border: 1px solid rgba(255, 40, 41, 0.3); /* Cor vermelha para bosses */
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 40, 41, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.boss-ranking::before {
    background: linear-gradient(90deg, #FF2829, #FFFFFF, #FF2829);
    background-size: 200% 100%;
    animation: bossGlow 3s ease-in-out infinite;
}

@keyframes bossGlow {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 0%; }
}

/* Título específico para bosses */
.boss-ranking .ranking-title {
    background: linear-gradient(135deg, #1B1B1B 0%, #0f0f0f 100%);
    border-bottom: 1px solid rgba(255, 40, 41, 0.4);
}

/* Estatísticas de bosses - estilos removidos para usar apenas grid layout */

/* Layout específico para itens de ranking de bosses - removido para usar apenas grid */

/* Hover effect para ranking de bosses */
.boss-ranking .ranking-item:hover {
    background: linear-gradient(135deg, rgba(27, 27, 27, 0.9) 0%, rgba(255, 40, 41, 0.1) 100%);
    border-color: rgba(255, 40, 41, 0.5);
    box-shadow: 0 4px 16px rgba(255, 40, 41, 0.2);
}

/* Primeira posição no ranking de bosses */
.boss-ranking .ranking-item.position-1 {
    background: linear-gradient(135deg, rgba(255, 40, 41, 0.15) 0%, rgba(27, 27, 27, 0.9) 100%);
    border-color: rgba(255, 40, 41, 0.6);
}

.boss-ranking .ranking-item.position-1 .position {
    color: #FF2829;
    font-size: 18px;
    text-shadow: 0 0 8px rgba(255, 40, 41, 0.5);
}

/* Seções de servidor para consolidado */
.boss-ranking.consolidado .servidor-section {
    margin-bottom: 20px;
    border: 1px solid rgba(255, 40, 41, 0.2);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
}

.boss-ranking.consolidado .servidor-header {
    background: linear-gradient(135deg, #2a2a2a 0%, #1B1B1B 100%);
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 40, 41, 0.3);
}

.boss-ranking.consolidado .servidor-header h4 {
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.boss-ranking.consolidado .ranking-list {
    padding: 8px;
}

/* Animações para ranking de bosses */
.boss-ranking .ranking-item {
    animation: bossItemFadeIn 0.5s ease-out forwards;
    opacity: 0;
    transform: translateX(-10px);
}

.boss-ranking .ranking-item:nth-child(1) { animation-delay: 0.1s; }
.boss-ranking .ranking-item:nth-child(2) { animation-delay: 0.2s; }
.boss-ranking .ranking-item:nth-child(3) { animation-delay: 0.3s; }
.boss-ranking .ranking-item:nth-child(4) { animation-delay: 0.4s; }
.boss-ranking .ranking-item:nth-child(5) { animation-delay: 0.5s; }
.boss-ranking .ranking-item:nth-child(n+6) { animation-delay: 0.6s; }

@keyframes bossItemFadeIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsividade para ranking de bosses */
@media (max-width: 768px) {
    .boss-stats {
        flex-direction: column;
        gap: 4px;
        align-items: stretch;
    }
    
    .boss-stats .score,
    .boss-stats .kills,
    .boss-stats .unique {
        font-size: 11px;
        padding: 3px 6px;
        text-align: center;
    }
    
    .boss-ranking .ranking-item {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .boss-ranking .ranking-item .name {
        flex-basis: 100%;
        order: 2;
        margin-bottom: 4px;
    }
    
    .boss-ranking .ranking-item .position {
        order: 1;
    }
    
    .boss-ranking .ranking-item .boss-stats {
        order: 3;
        flex-basis: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .boss-ranking.consolidado .servidor-header h4 {
        font-size: 14px;
    }
    
    .boss-stats {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 4px;
    }
    
    .boss-stats .score,
    .boss-stats .kills,
    .boss-stats .unique {
        font-size: 10px;
        padding: 2px 4px;
    }
}

/* Estados de carregamento e erro para bosses */
.boss-ranking .ranking-loading {
    text-align: center;
    padding: 40px 20px;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 500;
}

.boss-ranking .ranking-error {
    background: rgba(255, 40, 41, 0.1);
    border: 1px solid rgba(255, 40, 41, 0.3);
    border-radius: 8px;
    color: #FF2829;
    padding: 20px;
    text-align: center;
    font-weight: 500;
    margin: 10px;
}

.boss-ranking .no-data {
    text-align: center;
    padding: 30px 20px;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* ==================== FIM DOS ESTILOS DE BOSSES ==================== */
