/* =========================================================
   PERFIL BATTLEGROUND (player_bg.php) - LAYOUT CENTRALIZADO
   ========================================================= */

.bg-profile-container {
    position: relative;
    width: 100%;
    max-width: 1000px; /* Aumentado para acomodar 3 colunas confortavelmente */
    margin: 0 auto;
    /* Imagem de fundo da cidade */
    background: url('images/bg_town.jpg') no-repeat center top; 
    background-size: cover;
    font-family: Tahoma, Arial, sans-serif;
    color: #ffffff;
    /* Efeito de borda preta no texto característico do RO */
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 2px 2px 2px rgba(0,0,0,0.8);
    padding: 30px 20px 60px 20px;
    min-height: 600px;
    box-sizing: border-box;
    border: 2px solid #333;
}

/* Container de Layout 3 Colunas */
.ro-layout-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
}

/* Colunas de Estatísticas (Esquerda e Direita) */
.ro-stats-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px; /* Espaço vertical entre os blocos */
    max-width: 400px; /* Limite para não esticar demais */
}

/* Coluna Central (Personagem) */
.ro-char-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 180px;
    flex-shrink: 0;
    text-align: center;
    margin-top: 20px;
}

.ro-sprite {
    max-height: 150px;
    image-rendering: pixelated;
    filter: drop-shadow(2px 2px 0px rgba(0,0,0,0.6));
}

.ro-char-name {
    color: #66b2ff;
    font-size: 13px;
    font-weight: bold;
    margin-top: 10px;
}

.ro-char-level {
    color: #ff4d4d;
    font-size: 15px;
    font-weight: bold;
    margin-top: 4px;
}

/* Linhas e Blocos Internos */
.ro-row-split {
    display: flex;
    gap: 8px;
    width: 100%;
}

.ro-row-full {
    width: 100%;
}

.ro-col {
    flex: 1;
}

.ro-header {
    text-align: center;
    font-weight: bold;
    font-size: 11px;
    padding: 3px 0;
    text-shadow: none; /* Sem borda preta na barra */
    box-shadow: 1px 1px 3px rgba(0,0,0,0.6);
    text-transform: uppercase;
}

.ro-header.yellow { background-color: #ffb800; color: #000; }
.ro-header.red { background-color: #cc0000; color: #fff; text-shadow: 1px 1px 0 #000; }
.ro-header.blue { background-color: #3366ff; color: #fff; text-shadow: 1px 1px 0 #000; }

.ro-data-flex {
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
}

.ro-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
}

.ro-label { 
    width: 25%; 
    font-weight: 500;
    text-shadow: none !important;
    
    /* Flexbox evita que o texto e a imagem se sobreponham */
    display: flex;
    align-items: center; 
    gap: 8px; /* Espaço cravado entre o ícone e o texto */
    
    /* Remove bordas extras que o flexbox pode gerar no layout da tabela em alguns navegadores */
    border-right: none !important; 
}

.ro-label img {
    width: 16px;
    height: 16px;
    image-rendering: pixelated;
}

.ro-value {
    font-weight: bold;
    font-size: 14px;
    margin-top: 3px;
    color: #ffffff;
}

/* Responsividade: Empilha tudo em telas menores */
@media (max-width: 850px) {
    .ro-layout-wrapper {
        flex-direction: column;
        align-items: center;
    }
    .ro-char-column {
        order: -1; /* Força o personagem a ir pro topo no celular */
        margin-bottom: 20px;
    }
    .ro-stats-column {
        width: 100%;
        max-width: 100%;
    }
}

/* =========================================================
   PERFIL BATTLEGROUND (player_bg.php) - LAYOUT TABELAS CLARO
   ========================================================= */

.bg-profile-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    font-family: Tahoma, Arial, sans-serif;
    padding: 0 20px 60px 20px;
    box-sizing: border-box;
    text-shadow: none; /* Garante que o container não aplique sombra */
}

/* Cabeçalho da Página */
.bg-page-header {
    margin-bottom: 25px;
    text-align: center;
}
.bg-page-header h2 {
    color: #1e3a8a;
    font-size: 26px;
    margin: 0;
    font-weight: bold;
}
.bg-page-header p {
    color: #64748b;
    margin-top: 5px;
    font-size: 14px;
}

/* Card Superior (Identidade e Avatar) */
.bg-profile-top-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    background: #ffffff;
    border: 1px solid #bfdbfe;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.05);
}
.bg-profile-identity-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.bg-profile-avatar {
    background: #f8fafc;
    border-radius: 8px;
    padding: 5px;
    border: 1px solid #e2e8f0;
}
.bg-profile-avatar img {
    max-height: 110px;
    margin: 0;
    display: block;
    image-rendering: pixelated;
}
.bg-profile-name {
    color: #1e3a8a;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 4px;
}
.bg-profile-class {
    color: #3b82f6;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
}
.bg-profile-class span.separator {
    color: #cbd5e1;
    margin: 0 6px;
}
.bg-profile-guild {
    color: #1e293b;
    font-size: 12px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
}

/* Card de Rank (Direita) */
.bg-profile-rank-card {
    text-align: right;
    background: #f8fafc;
    padding: 15px 25px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    min-width: 140px;
}
.bg-profile-rank-label {
    color: #64748b;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 2px;
}
.bg-profile-points-val {
    color: #2563eb;
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 10px;
}
.bg-profile-rank-val {
    color: #1e3a8a;
    font-size: 24px;
    font-weight: bold;
}
.bg-profile-rank-na {
    font-size: 16px;
    color: #94a3b8;
}

/* Container das Tabelas (2 Colunas) */
.bg-profile-tables-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}
.bg-profile-table-column {
    flex: 1;
    min-width: 350px;
}

/* Estilos da Tabela de Estatísticas */
.ro-tabela {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    font-size: 12px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    box-shadow: 0 4px 6px rgba(0,0,0,0.03);
}
.ro-tabela th {
    padding: 10px;
    font-size: 12px;
    text-transform: uppercase;
    background-color: #1e3a8a;
    color: #ffffff !important;
    border: 1px solid #1e3a8a;
    letter-spacing: 0.5px;
    text-shadow: none !important; /* Força a remoção da sombra */
}
.ro-tabela td {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    color: #334155;
    white-space: nowrap;
    text-shadow: none !important; /* Força a remoção da sombra no texto */
}
.ro-tabela td img {
    width: 20px;  /* Tamanho aumentado (antes era 15px) */
    height: 20px; /* Tamanho aumentado */
    object-fit: contain; /* Garante que o ícone não distorça */
    flex-shrink: 0; /* Impede que o ícone seja esmagado pelo texto */
    image-rendering: pixelated; /* Mantém o estilo clássico do Ragnarok */
    margin: 0; /* Margem zerada pois o 'gap' do .ro-label já faz o espaçamento */
}
.ro-val {
    font-weight: bold;
    color: #0f172a !important;
    text-align: right;
    width: 25%;
    text-shadow: none !important;
}

.bg-sub { 
    color: #2563eb; 
    font-weight: 800; 
    margin-left: 5px; 
    font-size: 11px; 
    text-shadow: none !important;
}

/* Botões e Telas de Status */
.empty-ranking-card {
    text-align: center;
    padding: 40px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}
.empty-ranking-card i {
    font-size: 30px;
    color: #94a3b8;
    margin-bottom: 15px;
}
.empty-ranking-card p {
    color: #475569;
    font-size: 16px;
    margin-bottom: 15px;
}
.bg-error-msg {
    text-align: center;
    padding: 20px;
    color: #dc2626;
    background: #fee2e2;
    border: 1px solid #f87171;
    border-radius: 8px;
}
.btn-bg-back {
    display: inline-block;
    padding: 10px 30px;
    background: #2563eb;
    color: #ffffff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
    transition: background 0.3s;
}
.btn-bg-back:hover {
    background: #1d4ed8;
    color: #ffffff;
}
.bg-back-container {
    text-align: center;
    margin-top: 20px;
    padding-bottom: 20px;
}

/* =========================================================
   REMOÇÃO DO CÍRCULO E EXIBIÇÃO COMPLETA DAS CABEÇAS
   ========================================================= */

/* 1. Remove o fundo cinza, bordas, formato circular e o corte de bordas */
.pvp-list .list-avatar,
.avatar-container {
    background: transparent !important; /* Remove a cor do círculo */
    border: none !important;            /* Remove qualquer borda */
    border-radius: 0 !important;        /* Remove o formato arredondado */
    box-shadow: none !important;       /* Remove sombras do círculo */
}

/* 2. Ajuste do sprite da cabeça nas listas (sem zoom forçado, mostrando inteira) */
.pvp-list .list-avatar img,
.list-head-sprite {
    max-width: 70px !important;  /* Ajuste a largura máxima se quiser maior/menor */
    max-height: 70px !important; /* Ajuste a altura máxima se quiser maior/menor */
    width: auto !important;
    height: auto !important;
    transform: none !important;  /* Remove o zoom da versão anterior */
    image-rendering: pixelated !important; /* Mantém os pixels definidos e nítidos */
    margin: 0 auto !important;
    display: block !important;
}

/* 3. Ajuste dos sprites do Pódio (Top 1, 2 e 3) */
.pvp-podium .avatar-container {
    min-width: 70px !important;
    min-height: 70px !important;
}

.pvp-podium .char-sprite-head {
    max-width: 75px !important;
    max-height: 75px !important;
    width: auto !important;
    height: auto !important;
    transform: none !important;
    image-rendering: pixelated !important;
}

/* =========================================================
   RANKING ALQUIMISTAS (ranking_alchemist.php)
   ========================================================= */

/* Cabeçalho da Página de Alquimistas */
.alchemist-header {
    margin-bottom: 20px;
    text-align: center;
}

.alchemist-header h2 {
    color: var(--kro-blue, #1e3a8a);
    font-size: 24px;
    margin: 0;
}

.alchemist-header p {
    color: #64748b;
    margin-top: 5px;
    font-size: 14px;
}

/* Mensagens de Erro e Vazio */
.alchemist-empty {
    text-align: center;
    padding: 40px;
    background: #ffffff;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.alchemist-empty i {
    font-size: 30px;
    color: #94a3b8;
    margin-bottom: 15px;
}

.alchemist-error {
    text-align: center;
    padding: 20px;
    color: #dc2626;
    background: #fee2e2;
    border: 1px solid #f87171;
    border-radius: 8px;
}

/* Estrutura da Tabela/Lista */
.alchemist-list-header {
    background: #1e3a8a;
    color: #ffffff;
    padding: 10px;
    display: flex;
    font-weight: bold;
    border-radius: 6px 6px 0 0;
    font-size: 12px;
    text-transform: uppercase;
}

.alchemist-col-rank {
    width: 80px;
    text-align: center;
}

.alchemist-col-char {
    flex: 1;
    padding-left: 15px;
}

.alchemist-col-fame {
    width: 120px;
    text-align: center;
}

/* Linhas dos Jogadores */
.alchemist-list-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    transition: background 0.2s;
}

.alchemist-list-item:hover {
    background: #f8fafc;
}

/* Detalhes do Rank e Medalhas */
.alchemist-rank-val {
    width: 80px;
    text-align: center;
    font-weight: bold;
}

.alchemist-medal-gold { color: #eab308; font-size: 16px; }
.alchemist-medal-silver { color: #94a3b8; font-size: 16px; }
.alchemist-medal-bronze { color: #d97706; font-size: 16px; }
.alchemist-rank-number { color: #64748b; }

/* Detalhes do Personagem */
.alchemist-char-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    padding-left: 15px;
}

.alchemist-char-details strong {
    font-size: 14px;
    color: #1e293b;
}

.alchemist-char-meta {
    font-size: 11px;
    color: #64748b;
    margin-top: 3px;
}

.alchemist-meta-sep {
    margin: 0 4px;
}

/* Guilda e Emblema */
.alchemist-guild-text {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #475569;
    margin-top: 3px;
}

.alchemist-guild-emblem {
    width: 16px;
    height: 16px;
    image-rendering: pixelated;
    object-fit: contain;
}

.alchemist-guild-icon {
    font-size: 10px;
}

/* Valor de Fama */
.alchemist-fame-val {
    width: 120px;
    text-align: center;
    font-weight: bold;
    color: #2563eb;
    font-size: 16px;
}

/* =========================================================
   HALL DA FAMA: WOE
   ========================================================= */

.woe-page-header {
    text-align: center;
    margin-bottom: 20px;
}

.woe-filter-container {
    text-align: center;
    margin-bottom: 30px;
}

.woe-filter-form {
    display: inline-flex;
    gap: 15px;
    align-items: center;
}

.woe-select {
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    font-weight: bold;
    color: #1e3a8a;
}

.woe-col-stats {
    width: 250px;
    text-align: center;
}

.woe-stats-wrapper {
    width: 250px;
    font-size: 12px;
    text-align: center;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.woe-stat-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: bold;
}

.woe-stat-item.kill { color: #dc2626; }
.woe-stat-item.death { color: #64748b; }
.woe-stat-item.emp { color: #eab308; }

.woe-stat-icon {
    width: 16px;
    height: 16px;
    image-rendering: pixelated;
}

/* =========================================================
   RANKING DE CURA (HEALING)
   ========================================================= */
.healing-podium-wrapper {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.healing-card {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 20px;
    width: 280px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.03);
}

.healing-card-body-sprite {
    max-height: 120px;
    image-rendering: pixelated;
    margin: 10px 0;
}

.healing-table-avatar {
    width: 24px; 
    height: 24px; 
    image-rendering: pixelated;
}