/* ===================================================================
   TOP 10 GLOBAL RANKING - CSS PARA CS 1.6 MOTD (BASEADO NO AK47)
   Autor: MAJESTIC S+Z
   Versão: 2025 - OTIMIZADO
   Compatível com: Counter-Strike 1.6 MOTD
   =================================================================== */

/* Reset básico e configurações globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Tahoma', 'Arial', sans-serif;
    font-size: 12px;
    line-height: 1.4;
    color: #ffffff;
    background: url('http://www.majesticsz.ihosts3.pt/adp3.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center center;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Container principal - AUMENTADO para nomes longos */
.container {
    max-width: 900px; /* Aumentado de 700px para 900px */
    margin: 20px auto;
    padding: 15px;
    background: rgba(5, 10, 30, 0.9);
    border-radius: 8px;
    box-shadow: 0 0 25px rgba(0, 191, 255, 0.5);
    border: 2px solid rgba(0, 255, 255, 0.8);
    position: relative;
}

/* Título principal */
h1 {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #00FFFF;
    margin-bottom: 15px;
    padding: 10px;
    background: linear-gradient(90deg, transparent, rgba(0, 50, 100, 0.3), transparent);
    border-radius: 4px;
}

/* Layout 2 colunas - USANDO TABLE PARA MÁXIMA COMPATIBILIDADE */
.two-columns {
    display: table;
    width: 100%;
    table-layout: fixed;
    border-spacing: 10px;
}

.column {
    display: table-cell;
    width: 50%;
    vertical-align: top;
}

/* Tabela principal - BASEADO NO CSS AK47 FUNCIONAL */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    background: rgba(0, 30, 60, 0.9);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.5);
    table-layout: fixed;
}

/* Larguras específicas das colunas - OTIMIZADO para nomes longos */
th:nth-child(1), td:nth-child(1) { width: 10%; }  /* Pos - reduzido */
th:nth-child(2), td:nth-child(2) { width: 50%; } /* Jogador - AUMENTADO para nomes longos */
th:nth-child(3), td:nth-child(3) { width: 20%; } /* Premier */
th:nth-child(4), td:nth-child(4) { width: 20%; } /* Kills - ajustado */

/* Cabeçalho da tabela */
th {
    background: linear-gradient(135deg, #003366 0%, #0066CC 50%, #00FFFF 100%);
    color: #ffffff;
    font-weight: bold;
    font-size: 11px;
    padding: 8px 4px;
    text-align: center;
    border-bottom: 1px solid #654321;
}

th:first-child {
    border-top-left-radius: 8px;
}

th:last-child {
    border-top-right-radius: 8px;
}

/* Linhas da tabela */
td {
    padding: 8px 4px;
    text-align: center;
    font-size: 11px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

/* Estilo das linhas alternadas - IGUAL AO AK47 */
tr.a {
    background: linear-gradient(90deg, rgba(0, 50, 100, 0.2), rgba(0, 50, 100, 0.1));
    border-left: 3px solid #0066CC;
}

tr.b {
    background: linear-gradient(90deg, rgba(0, 255, 255, 0.15), rgba(0, 255, 255, 0.08));
    border-left: 3px solid #00FFFF;
}

/* Hover effect nas linhas */
tr:hover {
    background: linear-gradient(90deg, rgba(0, 191, 255, 0.25), rgba(0, 191, 255, 0.15)) !important;
    transform: scale(1.01);
    box-shadow: 0 2px 10px rgba(0, 255, 255, 0.4);
}

/* Coluna de posição - UNIFORME */
td:first-child {
    font-weight: bold;
    font-size: 13px;
    color: #00FFFF; /* Cor única para todas as posições */
}

/* Coluna do nome do jogador - OTIMIZADA para nomes longos */
td:nth-child(2) {
    font-weight: bold;
    color: #ffffff;
    text-align: left; /* Alinhamento à esquerda para nomes longos */
    padding: 8px 8px 8px 12px; /* Mais padding à esquerda */
    white-space: normal; /* Permite quebra de linha */
    word-wrap: break-word; /* Quebra palavras muito longas */
    overflow-wrap: break-word;
    line-height: 1.3; /* Melhor espaçamento para múltiplas linhas */
}

/* Premier Rating - SEM IMAGENS (otimizado para buffer) */
td:nth-child(3) {
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    text-align: center;
    vertical-align: middle;
    padding: 8px 4px;
}

/* Kills */
td:nth-child(4) {
    font-weight: bold;
    color: #66B2FF;
}

/* ========== PREMIER TIER COLORS ========== */
/* Sistema unificado - apenas cores de tier diferenciam os jogadores */

/* Responsividade para CS 1.6 MOTD */
@media screen and (max-width: 700px) {
    body {
        font-size: 10px;
    }
    
    .container {
        max-width: 95%;
        margin: 5px auto;
        padding: 8px;
        border-radius: 4px;
    }
    
    h1 {
        font-size: 14px;
        margin-bottom: 8px;
        padding: 5px;
    }
    
    th, td {
        font-size: 9px;
        padding: 4px 2px;
    }
    
    table {
        border-radius: 4px;
    }
    
    .two-columns {
        border-spacing: 5px;
    }
    
    /* Ajustar larguras em mobile - OTIMIZADO para nomes longos */
    th:nth-child(1), td:nth-child(1) { width: 10%; }  /* Pos - reduzido */
    th:nth-child(2), td:nth-child(2) { width: 45%; } /* Jogador - AUMENTADO */
    th:nth-child(3), td:nth-child(3) { width: 22%; } /* Premier */
    th:nth-child(4), td:nth-child(4) { width: 23%; } /* Kills */
}

/* ===== SISTEMA PREMIER - 7 TIER COLORS (OTIMIZADO) ===== */
.p1 { color: #909090 !important; text-shadow: 0 0 5px rgba(144, 144, 144, 0.5) !important; }
.p2 { color: #87CEEB !important; text-shadow: 0 0 5px rgba(135, 206, 235, 0.5) !important; }
.p3 { color: #4169E1 !important; text-shadow: 0 0 5px rgba(65, 105, 225, 0.5) !important; }
.p4 { color: #9370DB !important; text-shadow: 0 0 5px rgba(147, 112, 219, 0.5) !important; }
.p5 { color: #FF69B4 !important; text-shadow: 0 0 5px rgba(255, 105, 180, 0.5) !important; }
.p6 { color: #FF4500 !important; text-shadow: 0 0 5px rgba(255, 69, 0, 0.5) !important; }
.p7 { color: #FFD700 !important; text-shadow: 0 0 5px rgba(255, 215, 0, 0.5) !important; }

/* Compatibilidade CS 1.6 - Fallbacks */
@media screen and (max-width: 500px) {
    .two-columns {
        display: block;
    }
    
    .column {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
}
