/* CSS para /ranking - Tabela única com estilo do /mystats */
body {
    margin: 0;
    padding: 0;
    background: url('http://www.majesticsz.ihosts3.pt/adp3.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center center;
    font-family: Arial Black, Arial, sans-serif;
    color: #ffffff;
    min-height: 100vh;
    font-size: 13px;
}

/* Imagens flexíveis */
img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 96%;
    margin: 10px auto;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 8px;
    padding: 5px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    text-align: center;
}

/* Formulário de pesquisa */
.search-form {
    display: inline-block;
    padding: 8px;
    background: rgba(255, 107, 53, 0.1);
    border-bottom: 1px solid rgba(255, 107, 53, 0.3);
}

.search-form input {
    width: 150px;
    max-width: 300px;
    padding: 5px 10px;
    border: 1px solid #ff6b35;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    font-size: 11px;
    outline: none;
    display: inline-block;
    vertical-align: middle;
}

.search-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-form input:focus {
    border-color: #ffd700;
    box-shadow: none !important;
}

.search-form button {
    padding: 5px 10px;
    background: rgba(255, 107, 53, 0.2);
    border: 1px solid #ff6b35;
    border-radius: 4px;
    color: #ff6b35;
    font-size: 12px;
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
    margin-left: 5px;
}

.search-form button:hover {
    background: rgba(255, 107, 53, 0.4);
    color: #ffd700;
    border-color: #ffd700;
}

.search-form a {
    padding: 5px 10px;
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid #ffd700;
    border-radius: 4px;
    color: #ffd700;
    font-size: 10px;
    text-decoration: none;
    float: left;
    margin-left: 5px;
}

.search-form a:hover {
    background: rgba(255, 215, 0, 0.4);
}

h1 {
    text-align: center;
    color: #00ff88;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    text-transform: uppercase;
    
    /* Background styling */
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 14px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 2px solid #ffd700;
    display: inline-block;
    
    /* Yellow glow effect */
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    
    /* Icon positioning */
    position: relative;
    padding-left: 35px;
}

h1::before {
    content: "";
    background-image: url('http://www.majesticsz.ihosts3.pt/ranking_map_global/imagens/icons/icon-steam.png');
    background-size: 20px 20px;
    background-repeat: no-repeat;
    background-position: center;
    position: absolute;
    left: 15px;
    top: 35%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    opacity: 0.8;
}

table {
    width: 100%;
    table-layout: auto;
    word-wrap: break-word;
    border-collapse: collapse;
    line-height: 120%;
    font-family: Arial Black, Arial, sans-serif;
}

th {
    background: rgba(255, 107, 53, 0.2);
    color: #ff6b35;
    padding: 2px 3px;
    text-align: center;
    font-weight: bold;
    border-bottom: 2px solid #ff6b35;
    font-size: 13px;
    letter-spacing: 1px;
    vertical-align: middle;
    height: 25px;
}

th:nth-child(2) {
    width: 28px;
}

th:nth-child(3) {
    width: 28px;
}

th:nth-child(5) {
    width: 45px;
}

th:nth-child(6) {
    width: 45px;
}

th:nth-child(7) {
    width: 45px;
}

th:nth-child(8) {
    width: 45px;
}

th:nth-child(9) {
    width: 45px;
}

th:first-child {
    width: 50px;
}

th img {
    display: block;
    margin: 0 auto;
}

td {
    padding: 4px 2px;
    font-size: 13px;
    text-align: center;
    line-height: 1.2;
}

tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.15);
}

tr:hover {
    background: rgba(255, 107, 53, 0.2);
}

/* Cores específicas para colunas */
td:first-child {
    padding-left: 15px;
    padding-right: 5px;
    color: #ffd700;
    font-weight: bold;
    width: 25px;
}

td:nth-child(2) {
    padding-right: 5px;
    width: 28px;
    text-align: right;
}

td:nth-child(3) {
    color: #ff6b35;
    font-weight: bold;
    width: 28px;
    padding-right: 5px;
    text-align: left;
}

td:nth-child(4) {
    color: #ffffff;
    font-weight: bold;
    text-align: left;
    width: 100px;
}

td:nth-child(5) {
    color: #32CD32;
    font-weight: bold;
}

td:nth-child(6) {
    color: gold;
    font-weight: bold;
}

td:nth-child(7) {
    color: orangered;
    font-weight: bold;
}

td:nth-child(8) {
    color: plum;
    font-weight: bold;
}

td:nth-child(9) {
    color: #ffffff;
    font-weight: bold;
}

/* Links clicáveis */
a {
    color: #00ff88;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

a:hover {
    color: #ffd700;
    text-decoration: underline;
}

/* Paginação */
.nav {
    margin-top: 5px;
    padding: 5px 90px;
}

.pagination {
    display: inline-block;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    overflow: visible;
    margin: 10px 0;
}

.pagination a, .pagination span.current {
    display: inline-block;
    padding: 3px 6px;
    margin: 0 1px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 10px;
}

.pagination a {
    background: rgba(255, 107, 53, 0.2);
    color: #ff6b35;
    border: 1px solid #ff6b35;
}

.pagination a:hover {
    background: rgba(255, 107, 53, 0.4);
    color: #ffd700;
    border-color: #ffd700;
}

.pagination span.current {
    background: rgba(255, 215, 0, 0.3);
    color: #ffd700;
    border: 1px solid #ffd700;
}

.pagination a.jump {
    background: rgba(0, 191, 255, 0.2);
    color: #00bfff;
    border: 1px solid #00bfff;
    margin-left: 10px;
}

.pagination a.jump:hover {
    background: rgba(0, 191, 255, 0.4);
    color: #ffd700;
    border-color: #ffd700;
}

/* Formulário de pesquisa */
.search-form {
    display: inline-block;
    vertical-align: middle;
    white-space: nowrap;
    overflow: visible;
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 20px;
        padding: 10px 15px;
    }
    
    table {
        font-size: 11px;
    }
    
    th, td {
        padding: 6px 4px;
    }
    
    .pagination a {
        padding: 6px 12px;
        margin: 0 3px;
        font-size: 12px;
    }
}

/* Media queries para ajustar com base na altura do MOTD */
@media screen and (max-height: 500px) {
    table {
        line-height: 110%;
    }
    
    td {
        padding: 3px 2px;
        font-size: 10px;
    }
    
    th {
        height: 30px;
        font-size: 11px;
    }
    
    td:nth-child(3) {
        max-width: 130px;
    }
}

@media screen and (max-height: 450px) {
    table {
        line-height: 100%;
    }
    
    td {
        padding: 2px 1px;
        font-size: 10px;
    }
    
    th {
        height: 25px;
        font-size: 10px;
    }
    
    td:nth-child(3) {
        max-width: 120px;
    }
    
    .pagination a {
        padding: 2px 4px;
        font-size: 9px;
    }
    
    .search-form input {
        width: 120px;
        font-size: 10px;
    }
}
