@import url(https://fonts.googleapis.com/css?family=Expletus+Sans);

/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: "Expletus Sans", Arial, sans-serif;
    font-size: 14px;
    color: #ffffff;
}

body {
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    background-color: #1a1a1a;
    padding: 15px;
    line-height: 1.4;
}

/* Container principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Cabeçalho */
.header {
    background: #222227;
    padding: 20px;
    text-align: center;
    border-bottom: 3px solid #ebc863;
}

.header h1 {
    color: #ebc863;
    font-size: 28px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.server-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.server-stats span {
    background: rgba(235, 200, 99, 0.1);
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 12px;
    border: 1px solid rgba(235, 200, 99, 0.3);
}

/* Navegação */
.navigation {
    background: #222227;
    padding: 0;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #333;
}

.nav-link {
    display: block;
    padding: 15px 20px;
    color: #ffffff;
    text-decoration: none;
    border-right: 1px solid #333;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    background: rgba(235, 200, 99, 0.1);
    color: #ebc863;
}

.nav-link.active {
    background: #ebc863;
    color: #222227;
    font-weight: bold;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #ebc863;
}

/* Filtros - Versão para Chrome 18 */
.filters {
    background: #2a2a2f;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #444;
    position: relative;
    overflow: visible;
}

.filter-form {
    display: block;
    position: relative;
    overflow: visible;
}

.filter-row {
    display: block;
    margin-bottom: 15px;
}

.filter-group {
    display: inline-block;
    margin-right: 15px;
    margin-bottom: 10px;
    vertical-align: top;
    position: relative;
    min-width: 140px;
}

.filter-group label {
    display: block;
    color: #ebc863;
    font-size: 12px;
    margin-bottom: 6px;
    font-weight: bold;
    text-align: left;
}

.filter-group input,
.filter-group select {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #555;
    background: #333;
    color: #ffffff;
    border-radius: 4px;
    font-size: 13px;
    height: 38px;
    box-sizing: border-box;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #ebc863;
    background: #3a3a3a;
}

.filter-group select {
    -webkit-appearance: menulist;
    -moz-appearance: menulist;
    appearance: menulist;
}

.filter-group select option {
    background: #1a1a1f;
    color: #fff;
    padding: 5px;
}

.filter-group.buttons {
    text-align: center;
    vertical-align: bottom;
    width: 180px;
}

.btn-filter,
.btn-reset {
    padding: 10px 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-size: 13px;
    font-weight: bold;
    height: 38px;
    line-height: 18px;
    vertical-align: top;
    margin: 0 3px;
}

.btn-filter {
    background: #ebc863;
    color: #222227;
    min-width: 70px;
}

.btn-filter:hover {
    background: #d4a94a;
}

.btn-reset {
    background: #666;
    color: #ffffff;
    min-width: 70px;
}

.btn-reset:hover {
    background: #777;
}

/* Tabela de ranking */
.ranking-table {
    overflow-x: auto;
}

/* Tabela - Chrome 18 Compatible */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #1a1a1f;
    border-radius: 8px;
}

/* Cabeçalhos da tabela - Chrome 18 Compatible */
th {
    background-color: #2a2a35;
    color: #fff;
    padding: 15px 5px;
    text-align: center;
    border-bottom: 2px solid #333;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
}

th a {
    color: #ebc863;
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
}

th a:hover {
    color: #ffffff;
}

td {
    padding: 12px 5px;
    border-bottom: 1px solid #333;
    vertical-align: middle;
    text-align: center;
}

.player-row {
    transition: background-color 0.2s ease;
}

.player-row:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.player-row:hover {
    background: rgba(235, 200, 99, 0.1) !important;
}

/* Colunas específicas */
.rank {
    font-weight: bold;
    color: #ebc863;
    text-align: center;
    width: 50px;
}

.player-name {
    min-width: 180px;
    text-align: left;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-avatar-mini {
    width: 24px;
    height: 24px;
    border-radius: 3px;
    object-fit: cover;
    border: 1px solid #444;
}

.player-name .name {
    font-weight: bold;
    color: #ffffff;
}

.player-name .victim {
    display: block;
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

.kills,
.deaths,
.headshots,
.xp {
    text-align: center;
    font-weight: bold;
    width: 80px;
}

.kills {
    color: #4CAF50;
}

.deaths {
    color: #f44336;
}

.kd {
    text-align: center;
    font-weight: bold;
    color: #2196F3;
    width: 80px;
}

.headshots {
    color: #FF9800;
}

.xp {
    color: #9C27B0;
}

.online-time {
    color: #4CAF50;
    font-weight: bold;
    text-align: center;
    width: 100px;
}



/* Patente */
.patente {
    min-width: 120px;
    text-align: left;
    padding-left: 15px;
}

.patente-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.patente-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.patente-name {
    font-size: 11px;
    color: #ebc863;
    font-weight: bold;
}

/* Ações */
.actions {
    text-align: center;
    width: 100px;
}

.btn-view {
    background: #2196F3;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 11px;
    transition: all 0.3s ease;
}

.btn-view:hover {
    background: #1976D2;
    transform: translateY(-1px);
}

/* Sem dados */
.no-data {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

/* Paginação */
.pagination {
    background: #2a2a2f;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #333;
}

.page-link {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    background: #333;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 13px;
}

.page-link:hover {
    background: #555;
    transform: translateY(-1px);
}

.page-link.active {
    background: #ebc863;
    color: #222227;
    font-weight: bold;
}

.page-info {
    display: block;
    margin-top: 15px;
    color: #999;
    font-size: 12px;
}

/* Rodapé */
.footer {
    background: #1a1a1a;
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 12px;
    border-top: 1px solid #333;
}

.footer p {
    margin: 5px 0;
}

/* Melhorias para MOTD - Chrome 18 compatível */

/* Layout horizontal otimizado para MOTD */

/* Layout de 3 colunas para seções principais */
.main-content {
    display: block;
    width: 100%;
    overflow: hidden;
}

.content-section {
    float: left;
    width: 32%;
    margin: 0 0.5%;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-sizing: border-box;
}

.content-section h3 {
    color: #ebc863;
    text-align: center;
    margin-bottom: 15px;
    font-size: 16px;
    border-bottom: 2px solid #ebc863;
    padding-bottom: 8px;
}

.clearfix:after {
    content: "";
    display: table;
    clear: both;
}

/* Estilo hover para links de jogadores */
.player-name a.name:hover,
.top-player-name a:hover {
    color: #ebc863 !important;
    text-decoration: underline !important;
}

/* Scroll horizontal para tabelas - Melhor para MOTD */
.table-container {
    overflow-x: auto;
    overflow-y: visible;
    width: 100%;
    border: 1px solid #333;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.8);
}

.table-container::-webkit-scrollbar {
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: rgba(235, 200, 99, 0.6);
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(235, 200, 99, 0.8);
}

/* Garantir largura mínima da tabela */
table {
    min-width: 800px;
    width: 100%;
}

@media (max-width: 800px) {
    body {
        padding: 5px;
    }
    
    .container {
        border-radius: 0;
    }
    
    .header h1 {
        font-size: 18px;
    }
    
    .server-stats span {
        font-size: 9px;
        padding: 3px 6px;
        margin: 0 3px;
    }
    
    .navigation {
        display: block; /* Para compatibilidade com navegadores antigos */
        white-space: nowrap; /* Impede que os itens quebrem a linha */
        overflow-x: auto;   /* Adiciona rolagem horizontal */
        overflow-y: hidden;
        padding-bottom: 8px; /* Espaço para a barra de rolagem não sobrepor o conteúdo */
    }

    /* Estilização da barra de rolagem para navegadores Webkit (Chrome, Safari) */
    .navigation::-webkit-scrollbar {
        height: 8px; /* Altura da barra de rolagem */
    }

    .navigation::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.3); /* Cor do trilho */
        border-radius: 4px;
    }

    .navigation::-webkit-scrollbar-thumb {
        background: rgba(235, 200, 99, 0.6); /* Cor da barra de rolagem */
        border-radius: 4px;
    }

    .navigation::-webkit-scrollbar-thumb:hover {
        background: rgba(235, 200, 99, 0.8);
    }

    .nav-link {
        display: inline-block; /* Coloca os links lado a lado */
        width: auto; /* Largura automática baseada no conteúdo */
        text-align: center;
        padding: 12px 15px;
        border-right: 1px solid #333;
        border-bottom: none;
        font-size: 12px;
        vertical-align: top; /* Alinha os itens pelo topo */
    }
    
    /* Tabela com scroll mantém todas as colunas */
    table {
        font-size: 10px;
        min-width: 900px;
    }
    
    th, td {
        padding: 4px 6px;
        white-space: nowrap;
    }
    
    .player-avatar-mini {
        width: 16px;
        height: 16px;
    }
    
    .patente-img {
        width: 16px;
        height: 16px;
    }
}

/* Para dispositivos muito pequenos - Mantém scroll */
@media (max-width: 600px) {
    .header h1 {
        font-size: 16px;
    }
    
    .server-stats span {
        font-size: 8px;
        padding: 2px 4px;
        margin: 0 2px;
    }
    
    table {
        font-size: 9px;
        min-width: 950px;
    }
    
    th, td {
        padding: 3px 4px;
        white-space: nowrap;
    }
    
    .player-avatar-mini {
        width: 14px;
        height: 14px;
    }
    
    .patente-img {
        width: 14px;
        height: 14px;
    }
    
    /* Scroll horizontal mantém todas as colunas visíveis */
    
    .filter-group {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .btn-filter, .btn-reset {
        width: 48%;
        margin: 0 1%;
    }
}

/* Para dispositivos extremamente pequenos - Sistema de scroll otimizado */
@media (max-width: 480px) {
    .header h1 {
        font-size: 14px;
    }
    
    .server-stats {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
    
    .server-stats span {
        font-size: 7px;
        padding: 2px 3px;
        margin: 0;
    }
    
    table {
        font-size: 8px;
        min-width: 1000px;
    }
    
    th, td {
        padding: 2px 3px;
        white-space: nowrap;
    }
    
    .player-avatar-mini {
        width: 12px;
        height: 12px;
    }
    
    .patente-img {
        width: 12px;
        height: 12px;
    }
    
    /* Scroll horizontal com todas as colunas */
    .table-container {
        border-radius: 4px;
    }
    
    .filter-row {
        display: block;
        margin-bottom: 10px;
    }
    
    .filter-group {
        display: block;
        width: 100%;
        margin-bottom: 10px;
        min-width: auto;
    }
    
    .filter-group.buttons {
        text-align: center;
        width: 100%;
    }
    
    .btn-filter,
    .btn-reset {
        width: 45%;
        margin: 0 2.5%;
        font-size: 10px;
        padding: 6px;
    }
}

/* Compatibilidade com Chrome 36 */
.filter-group input[type="number"] {
    -webkit-appearance: textfield;
    appearance: textfield;
}

.filter-group input[type="number"]::-webkit-outer-spin-button,
.filter-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

/* Fix para dropdowns em navegadores antigos */
.filter-group select {
    position: relative !important;
    z-index: 9999 !important;
}

.filters {
    position: relative;
    z-index: 1000;
    background: #2a2a2f;
}

.filter-form {
    position: relative;
    z-index: 1001;
}

/* Animações suaves */
.player-row,
.nav-link,
.btn-filter,
.btn-reset,
.btn-view,
.page-link {
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

/* Scrollbar customizada */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #222;
}

::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* Adições para o select no estilo de caixa de listagem */
.filter-group select[size] {
    height: auto; /* Permite que a altura se ajuste ao número de opções visíveis */
}

/* Estilo para quando o select está expandido (com mais de 1 item visível) */
.filter-group select[size]:not([size="1"]) {
    position: absolute; /* Faz com que ele flutue sobre outros elementos */
    z-index: 9999;      /* Garante que ele fique na frente de tudo */
    min-width: 200px;   /* Define uma largura mínima para a lista */
}
/* --- Início: Estilos para o Dropdown Customizado --- */

/* Esconde o select original de forma acessível */
.filter-group select {
    display: none;
}

/* O container do nosso novo dropdown */
.custom-select-container {
    position: relative;
    display: inline-block;
    vertical-align: top;
    width: 100%;
}

/* O "botão" que mostra a opção selecionada */
.select-selected {
    background-color: #333;
    color: #ffffff;
    padding: 10px 12px;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none; /* Previne seleção de texto */
    -webkit-user-select: none; /* Para navegadores mais antigos */
}

/* Estilo do botão quando o menu está aberto */
.select-selected.select-arrow-active {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* A lista de opções (inicialmente escondida) */
.select-items {
    position: absolute;
    background-color: #333;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid #555;
    border-top: none;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    z-index: 9999;
    max-height: 200px; /* Limita a altura para evitar overflow */
    overflow-y: auto;  /* Adiciona barra de rolagem se necessário */
}

.select-hide {
    display: none;
}

/* Estilo de cada item na lista de opções */
.select-items div {
    color: #ffffff;
    padding: 10px 12px;
    cursor: pointer;
    border-top: 1px solid #444;
}

/* Efeito ao passar o mouse sobre um item */
.select-items div:hover, .same-as-selected {
    background-color: rgba(235, 200, 99, 0.2);
}
/* --- Fim: Estilos para o Dropdown Customizado --- */

/* 1. O container que segura o ícone e o texto */
.patente-current {
    display: inline-block;  /* Permite que o bloco seja centrado pelo pai */
    vertical-align: middle;
    text-align: left;       /* Garante que o texto dentro dele não fique centralizado */
    padding: 10px 0;        /* Espaçamento vertical para respirar */
}

/* 2. O ícone e o texto como blocos inline para alinharem lado a lado */
.patente-img-large, .patente-info {
    display: inline-block;
    vertical-align: middle; /* Alinha ambos verticalmente pelo centro */
}

/* 3. Espaçamento entre o ícone e o texto */
.patente-img-large {
    margin-right: 15px;
}

/* Remove margens desnecessárias para um alinhamento limpo */
.patente-name, .patente-level {
    margin: 0;
    padding: 0;
     padding: 0;
}

/* Status online/offline indicators - Chrome 18 compatible */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 4px;
    margin-right: 6px;
    vertical-align: middle;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.status-online {
    background-color: #4CAF50;
}

.status-offline {
    background-color: #f44336;
}