/* Global CSS (classificacao) - Versão Otimizada para Fase de Liga */
/* ===== CORREÇÃO DO LAYOUT PARA FOOTER SEMPRE NO FINAL ===== */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #f0f0f0;
    background: linear-gradient(to bottom, #0a0a0a, #1c1c1c);
    background-attachment: fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ===== CORREÇÃO DO WRAPPER PRINCIPAL ===== */
.classificacao-wrapper {
    flex: 1 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: calc(100vh - 100px);
}

/* Container principal */
.container {
    width: 90%;
    max-width: 1300px;
    margin: 40px auto;
    padding: 30px;
    background-color: rgba(30,30,30,0.95);
    border-radius: 14px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    position: relative;
    margin-bottom: 20px;
}

/* ===== CORREÇÃO DA TABELA DE CLASSIFICAÇÃO ===== */
.classificacao-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.tabela-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    margin-bottom: 20px;
}

.tabela {
    width: 100%;
    min-width: 1000px;
    border-collapse: separate;
    border-spacing: 0 4px;
    table-layout: fixed;
    box-sizing: border-box;
}

.tabela th,
.tabela td {
    box-sizing: border-box;
}

/* ===== LAYOUT PRINCIPAL ===== */
.cabecalho-liga {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    width: 100%;
}

.logo-liga {
    height: 80px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
}

.titulo-liga {
    display: flex;
    align-items: center;
    gap: 10px;
}

.titulo-liga h1 {
    margin: 0;
    font-size: 24px;
    color: white;
}

.season-selector {
    background-color: #2e2e2e;
    color: #eee;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.season-selector:hover {
    background-color: #444;
    color: #fff;
}

/* ===== BOTÕES ===== */
.botoes-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0 auto 20px auto;
    padding: 0;
}

.botoes {
    display: flex;
    gap: 10px;
}

.botoes button {
    padding: 8px 20px;
    background-color: #2e2e2e;
    color: #eee;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.botoes button:hover {
    background-color: #444;
    color: #fff;
}

.botoes button.ativo {
    background-color: #1a1a1a;
    color: #aaa;
    border-color: #333;
    transform: translateY(1px);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* ===== NOVO LAYOUT ESTRUTURAL ===== */
.linha-principal {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 30px;
    width: 100%;
}

.linha-inferior {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

.partidas-container-empilhadas {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

/* Remove o antigo conteudo-principal e secao-inferior */
.conteudo-principal,
.secao-inferior {
    display: none;
}

/* ===== CORREÇÃO DA TABELA COMPACTA - 100% LARGURA ===== */
.tabela-container {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.tabela-compacta {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    box-sizing: border-box;
}

.tabela-compacta th,
.tabela-compacta td {
    box-sizing: border-box;
    padding: 10px 8px;
    background-color: #1b1b1b;
    border-bottom: 1px solid #2a2a2a;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tabela-compacta .col-jogador { 
    width: 50%;
    min-width: 120px;
}

.tabela-compacta .col-equipe { 
    width: 30%;
    min-width: 100px;
}

.tabela-compacta .col-gols,
.tabela-compacta .col-assistencias { 
    width: 20%;
    min-width: 60px;
    text-align: center;
    font-weight: bold;
}

.tabela-compacta th {
    background-color: #222;
    color: #f5f5f5;
    border-bottom: 2px solid #444;
    padding: 12px 8px;
    text-align: left;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== CORREÇÕES ESPECÍFICAS PARA LACUNAS ===== */
.box-inferior {
    width: 100%;
    max-width: 100%;
    background: #151515;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0,0,0,0.4);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.box-inferior h2 {
    text-align: center;
    margin-bottom: 18px;
    font-size: 1.2rem;
    border-bottom: 1px solid #555;
    padding-bottom: 6px;
    color: #f9f9f9;
}

.box-inferior .tabela-container {
    flex: 1;
    width: 100%;
}

.tabela-compacta {
    min-width: 100% !important;
}

/* ===== MELHORIAS PARA NOMES DE TIMES EM TELAS PEQUENAS ===== */
.nome-equipe-tabela {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
    display: inline-block;
}

/* ===== TABELA DE CLASSIFICAÇÃO ===== */
.tabela th {
    background-color: #222;
    color: #f5f5f5;
    border-bottom: 2px solid #444;
    padding: 12px 14px;
    text-align: center;
}

.tabela td {
    padding: 8px 10px;
    background-color: #1b1b1b;
    border-bottom: 1px solid #2a2a2a;
    vertical-align: middle;
    text-align: center;
}

/* Larguras específicas das colunas */
.tabela th:nth-child(1),
.tabela td:nth-child(1) {
    width: 40px;
    min-width: 40px;
    text-align: center;
    padding-left: 8px;
}

.tabela th:nth-child(2),
.tabela td:nth-child(2) {
    width: 200px;
    min-width: 200px;
    text-align: left;
    padding-left: 15px;
}

.tabela th:nth-child(3),
.tabela td:nth-child(3),
.tabela th:nth-child(4),
.tabela td:nth-child(4),
.tabela th:nth-child(5),
.tabela td:nth-child(5),
.tabela th:nth-child(6),
.tabela td:nth-child(6) {
    width: 45px;
    min-width: 45px;
    text-align: center;
}

.tabela th:nth-child(7),
.tabela td:nth-child(7),
.tabela th:nth-child(8),
.tabela td:nth-child(8),
.tabela th:nth-child(9),
.tabela td:nth-child(9) {
    width: 55px;
    min-width: 55px;
    text-align: center;
}

.tabela th:nth-child(10),
.tabela td:nth-child(10) {
    width: 50px;
    min-width: 50px;
    text-align: center;
    font-weight: bold;
}

.tabela th:nth-child(11),
.tabela td:nth-child(11) {
    width: 100px;
    min-width: 100px;
    text-align: center;
}

/* Bordas coloridas para classificações */
.tabela tr:nth-child(-n+4) td:first-child {
    border-left: 4px solid rgb(19, 85, 22);
}

.tabela tr:nth-child(5) td:first-child,
.tabela tr:nth-child(6) td:first-child {
    border-left: 4px solid rgb(7, 83, 247);
}

.tabela tr:nth-child(7) td:first-child {
    border-left: 4px solid rgb(11, 192, 247);
}

.tabela tr:nth-last-child(-n+4) td:first-child {
    border-left: 4px solid #F44336;
}

/* ===== EQUIPES E LOGOS ===== */
.equipe-com-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    text-align: left;
    padding-left: 5px;
}

.logo-time {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: contain;
    margin-right: 5px;
}

/* ===== FORMA DOS TIMES ===== */
.forma {
    letter-spacing: 0;
}

.tabela td.forma {
    display: table-cell;
    height: auto;
    min-height: 40px;
    padding-top: 8px;
    padding-bottom: 8px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.tabela td.forma > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    line-height: 16px;
    font-size: 10px;
    border-radius: 4px;
    margin: 0 2px;
}

.vitoria {
    background-color: #4CAF50;
    color: white;
}

.empate {
    background-color: #FFC107;
    color: black;
}

.derrota {
    background-color: #F44336;
    color: white;
}

/* ===== LINKS ===== */
a.equipe-link,
.tabela a,
.tabela-compacta a {
    color: inherit !important;
    text-decoration: none !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

a.equipe-link:hover,
.tabela a:hover,
.tabela-compacta a:hover {
    text-decoration: underline !important;
}

/* ===== BOX DE PARTIDAS ===== */
.box-partidas {
    background: #151515;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0,0,0,0.4);
}

.box-partidas h3 {
    text-align: center;
    margin-bottom: 18px;
    font-size: 1.2rem;
    border-bottom: 1px solid #555;
    padding-bottom: 6px;
    color: #f9f9f9;
}

.partida {
    background: #1c1c1c;
    border-radius: 12px;
    padding: 14px 12px 10px;
    color: #eee;
    box-shadow: 0 4px 14px rgba(0,0,0,.35);
    margin-bottom: 18px;
    cursor: pointer;
}

.partida:hover {
    background: #2c2c2c;
    box-shadow: 0 6px 16px #0003;
    transform: translateY(-1px);
    transition: background .2s ease, box-shadow .2s ease, transform .15s ease;
}

.data-partida {
    font-size: .85rem;
    color: #a8a8a8;
    text-align: center;
    margin-bottom: 8px;
}

.detalhes-partida {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 520px;
    margin: 0 auto 6px auto;
}

.time-casa, .time-fora {
    width: 150px;
    display: flex;
    flex-direction: row;
    align-items: center;
    min-width: 0;
}

.time-casa {
    justify-content: flex-end;
    text-align: right;
    padding-right: 10px;
}

.time-fora {
    justify-content: flex-start;
    text-align: left;
    padding-left: 10px;
}

.placar {
    width: 60px;
    flex-shrink: 0;
    text-align: center;
    font-weight: bold;
    font-size: 1rem;
}

.local-partida {
    font-size: 0.8rem;
    color: #888;
    text-align: center;
    line-height: 1.3;
}

.nome-time {
    font-size: 0.9rem;
    font-weight: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.time-casa .nome-time {
    margin-right: 8px;
}

.time-fora .logo-time {
    margin-right: 8px;
}

.partida .logo-time {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

/* ===== NAVEGAÇÃO PARTIDAS ===== */
.navegacao-partidas {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.seta-navegacao {
    background: none;
    border: none;
    color: #ddd;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #333;
}

.seta-navegacao:hover {
    background-color: rgba(255,255,255,0.1);
}

.seta-navegacao.desabilitada {
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Elementos internos */
.rank {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    width: 100%;
}

.nome-jogador {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.jogador-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    width: 100%;
}

.nome-equipe {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.rank-number {
    min-width: 20px;
    text-align: center;
    font-weight: 700;
    opacity: .7;
    flex-shrink: 0;
}

.rank-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ===== LEGENDA ===== */
.legenda-classificacao {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
    padding: 10px;
    background-color: rgba(30, 30, 30, 0.7);
    border-radius: 6px;
}

.item-legenda {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.cor-legenda {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

.csp-5fb14063 { background-color: rgb(19, 85, 22); }
.csp-b10cf466 { background-color: rgb(7, 83, 247); }
.csp-61813737 { background-color: rgb(11, 192, 247); }
.csp-cdb2064a { background-color: #F44336; }

/* ===== CRITÉRIOS ===== */
.secao-criterios {
    margin-top: 30px;
    padding: 15px;
    background-color: rgba(30, 30, 30, 0.7);
    border-radius: 8px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.subtitulo-criterios {
    color: #f0f0f0;
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.1rem;
    border-bottom: 1px solid #555;
    padding-bottom: 8px;
}

.lista-criterios {
    color: #ddd;
    padding-left: 20px;
    margin: 0;
}

.lista-criterios li {
    margin-bottom: 8px;
    line-height: 1.4;
}

.lista-criterios li:last-child {
    margin-bottom: 0;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
    background-color: #2c2c2c;
}

::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 6px;
    border: 2px solid #2c2c2c;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #777;
}

/* ===== STATES ===== */
#proximas-content, #ultimas-content {
    transition: opacity 0.3s ease;
}

.sem-partidas {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 10px;
}

/* ===== SOLUÇÃO DEFINITIVA PARA O FOOTER ===== */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.classificacao-wrapper {
    flex: 1 0 auto;
    width: 100%;
    position: relative;
}

footer {
    background: #151515;
    color: #f0f0f0;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #333;
    width: 100%;
    flex-shrink: 0;
    margin-top: auto;
    z-index: 100;
    position: relative;
}

/* Ícones de ranking */
.rank-icon.bola {
    background-image: url('/assets/img/artilheiro.png');
}

.rank-icon.chuteira {
    background-image: url('/assets/img/assistente.png');
}

.tabela-compacta tr.rank-1 td {
    background: rgba(255, 215, 0, 0.1);
    border-left: 3px solid #FFD700;
    font-weight: 600;
}

/* ===== GARANTIA FINAL - FORÇA MÁXIMA ===== */
.tabela-compacta {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
}

.tabela-container {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
}

.tabela-wrapper {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
}

.classificacao-container {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
}

/* SOLUÇÃO DEFINITIVA - Estrutura Flex correta */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.classificacao-wrapper {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
    margin-top: auto;
}

/* ===== RESPONSIVIDADE ===== */

/* Tablets e telas médias (1024px - 769px) */
@media screen and (max-width: 1024px) {
    .linha-principal {
        gap: 25px;
    }
    
    .linha-inferior {
        gap: 25px;
    }
    
    .container {
        width: 95%;
        padding: 25px;
        margin: 25px auto;
        margin-bottom: 15px;
    }

    .tabela-compacta .col-jogador { 
        width: 45%;
        min-width: 110px;
    }
    
    .tabela-compacta .col-equipe { 
        width: 35%;
        min-width: 90px;
    }
    
    .tabela-compacta .col-gols,
    .tabela-compacta .col-assistencias { 
        width: 20%;
        min-width: 50px;
    }

    .tabela {
        min-width: 900px;
    }
    
    footer {
        padding: 18px;
    }
}

/* Telas pequenas (768px - 481px) */
@media screen and (max-width: 768px) {
    body {
        font-size: 14px;
        overflow-x: hidden;
    }

    .linha-principal {
        gap: 20px;
    }
    
    .linha-inferior {
        gap: 20px;
    }
    
    .container {
        width: 98%;
        padding: 15px;
        margin: 15px auto;
        margin-bottom: 10px;
        border-radius: 10px;
    }

    .tabela-compacta {
        table-layout: fixed;
    }
    
    .tabela-compacta .col-jogador { 
        width: 50%;
        min-width: 100px;
    }
    
    .tabela-compacta .col-equipe { 
        width: 30%;
        min-width: 80px;
    }
    
    .tabela-compacta .col-gols,
    .tabela-compacta .col-assistencias { 
        width: 20%;
        min-width: 40px;
    }

    .tabela {
        min-width: 800px;
    }

    .cabecalho-liga {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
        margin-bottom: 20px;
    }

    .logo-liga {
        height: 60px;
        max-width: 80px;
    }

    .titulo-liga {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        align-items: center;
    }

    .titulo-liga h1 {
        font-size: 20px;
        line-height: 1.3;
    }

    .season-selector {
        margin-left: 0;
        width: 100%;
        max-width: 200px;
        padding: 10px 15px;
        font-size: 0.95rem;
    }

    .botoes-container {
        margin-bottom: 15px;
        padding: 0 5px;
    }

    .botoes {
        display: flex;
        width: 100%;
        gap: 8px;
        justify-content: space-between;
    }

    .botoes button {
        flex: 1;
        padding: 10px 12px;
        font-size: 0.9rem;
        min-height: 44px;
        white-space: nowrap;
    }

    .tabela {
        font-size: 0.85rem;
        margin-bottom: 20px;
    }

    .tabela th,
    .tabela td {
        padding: 10px 6px;
        font-size: 0.85rem;
    }

    .tabela th:nth-child(1),
    .tabela td:nth-child(1) {
        width: 35px;
        min-width: 35px;
        padding-left: 6px;
    }

    .tabela th:nth-child(2),
    .tabela td:nth-child(2) {
        width: 140px;
        min-width: 140px;
        padding-left: 10px;
    }

    .tabela th:nth-child(3),
    .tabela td:nth-child(3),
    .tabela th:nth-child(4),
    .tabela td:nth-child(4),
    .tabela th:nth-child(5),
    .tabela td:nth-child(5),
    .tabela th:nth-child(6),
    .tabela td:nth-child(6) {
        width: 38px;
        min-width: 38px;
    }

    .tabela th:nth-child(7),
    .tabela td:nth-child(7),
    .tabela th:nth-child(8),
    .tabela td:nth-child(8),
    .tabela th:nth-child(9),
    .tabela td:nth-child(9) {
        width: 42px;
        min-width: 42px;
    }

    .tabela th:nth-child(10),
    .tabela td:nth-child(10) {
        width: 45px;
        min-width: 45px;
    }

    .tabela th:nth-child(11),
    .tabela td:nth-child(11) {
        width: 90px;
        min-width: 90px;
    }

    .equipe-com-logo {
        max-width: 130px;
        overflow: visible;
    }

    .equipe-com-logo span {
        white-space: nowrap;
        overflow: visible;
        text-overflow: clip;
        display: block;
        max-width: 100px;
        font-size: 0.8rem;
    }

    .logo-time {
        width: 20px;
        height: 20px;
        margin-right: 4px;
        flex-shrink: 0;
    }

    .forma {
        letter-spacing: 1px;
        font-size: 0.8rem;
    }

    .tabela td.forma > span {
        width: 15px;
        height: 15px;
        line-height: 15px;
        font-size: 9px;
        margin: 0 1px;
    }

    .box-partidas {
        padding: 15px;
        width: 100%;
        overflow: visible;
    }

    .box-partidas h3 {
        font-size: 1.1rem;
        margin-bottom: 15px;
        padding-bottom: 5px;
    }

    .partida {
        padding: 12px 8px 10px 8px;
        margin-bottom: 12px;
        font-size: 0.85rem;
    }

    .data-partida {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }

    .detalhes-partida {
        max-width: 100%;
        gap: 8px;
        margin-bottom: 6px;
    }

    .time-casa,
    .time-fora {
        min-width: 0;
        flex: 1;
        overflow: visible;
        width: auto;
    }

    .time-casa .nome-time,
    .time-fora .nome-time {
        white-space: nowrap;
        overflow: visible;
        text-overflow: clip;
        max-width: 90px;
        font-size: 0.8rem;
    }

    .placar {
        width: 45px;
        flex-shrink: 0;
        font-size: 0.9rem;
        padding: 0 3px;
    }

    .partida .logo-time {
        width: 24px;
        height: 24px;
        flex-shrink: 0;
    }

    .local-partida {
        font-size: 0.75rem;
        line-height: 1.3;
        word-break: break-word;
    }

    .navegacao-partidas {
        margin-top: 10px;
    }

    .seta-navegacao {
        font-size: 1.1rem;
        padding: 8px 12px;
        min-width: 44px;
        min-height: 44px;
    }

    .box-inferior {
        padding: 15px;
        width: 100%;
        overflow: visible;
    }

    .box-inferior h2 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }

    .tabela-compacta th,
    .tabela-compacta td {
        padding: 8px 6px;
        white-space: nowrap;
    }

    .rank {
        gap: 5px;
    }

    .rank-icon {
        width: 18px;
        height: 18px;
        min-width: 18px;
    }

    .rank-number {
        font-size: 0.8rem;
        min-width: 18px;
    }

    .jogador-info {
        gap: 5px;
        font-size: 0.8rem;
    }

    .jogador-info .logo-time {
        width: 16px;
        height: 16px;
    }

    .legenda-classificacao {
        flex-direction: row;
        gap: 15px;
        padding: 12px;
        font-size: 0.8rem;
        justify-content: space-around;
    }

    .item-legenda {
        font-size: 0.8rem;
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }

    .cor-legenda {
        width: 14px;
        height: 14px;
    }

    .secao-criterios {
        margin-top: 20px;
        padding: 15px;
    }

    .subtitulo-criterios {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .lista-criterios {
        font-size: 0.85rem;
    }
    
    footer {
        padding: 15px;
        font-size: 0.9rem;
    }
}

/* Telas muito pequenas (480px ou menos) */
@media screen and (max-width: 480px) {
    .linha-principal {
        gap: 15px;
    }
    
    .linha-inferior {
        gap: 15px;
    }
    
    .container {
        width: 100%;
        padding: 12px;
        margin: 10px auto;
        margin-bottom: 5px;
        border-radius: 8px;
    }

    .tabela-compacta .col-jogador { 
        width: 50%;
        min-width: 90px;
    }
    
    .tabela-compacta .col-equipe { 
        width: 30%;
        min-width: 70px;
    }
    
    .tabela-compacta .col-gols,
    .tabela-compacta .col-assistencias { 
        width: 20%;
        min-width: 35px;
    }

    .tabela {
        min-width: 700px;
    }

    .logo-liga {
        height: 50px;
        max-width: 70px;
    }

    .titulo-liga h1 {
        font-size: 18px;
    }

    .season-selector {
        max-width: 180px;
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .botoes {
        gap: 5px;
    }

    .botoes button {
        padding: 8px 10px;
        font-size: 0.8rem;
        min-height: 42px;
    }

    .tabela {
        font-size: 0.8rem;
    }

    .tabela th,
    .tabela td {
        padding: 8px 4px;
        font-size: 0.8rem;
    }

    .tabela th:nth-child(1),
    .tabela td:nth-child(1) {
        width: 30px;
        min-width: 30px;
        padding-left: 4px;
    }

    .tabela th:nth-child(2),
    .tabela td:nth-child(2) {
        width: 110px;
        min-width: 110px;
        padding-left: 8px;
    }

    .tabela th:nth-child(3),
    .tabela td:nth-child(3),
    .tabela th:nth-child(4),
    .tabela td:nth-child(4),
    .tabela th:nth-child(5),
    .tabela td:nth-child(5),
    .tabela th:nth-child(6),
    .tabela td:nth-child(6) {
        width: 32px;
        min-width: 32px;
    }

    .tabela th:nth-child(7),
    .tabela td:nth-child(7),
    .tabela th:nth-child(8),
    .tabela td:nth-child(8),
    .tabela th:nth-child(9),
    .tabela td:nth-child(9) {
        width: 36px;
        min-width: 36px;
    }

    .tabela th:nth-child(10),
    .tabela td:nth-child(10) {
        width: 38px;
        min-width: 38px;
    }

    .tabela th:nth-child(11),
    .tabela td:nth-child(11) {
        width: 75px;
        min-width: 75px;
    }

    .equipe-com-logo {
        max-width: 100px;
    }

    .equipe-com-logo span {
        max-width: 70px;
        font-size: 0.75rem;
    }

    .logo-time {
        width: 18px;
        height: 18px;
        margin-right: 3px;
    }

    .tabela td.forma > span {
        width: 14px;
        height: 14px;
        line-height: 14px;
        font-size: 8px;
        margin: 0 1px;
    }

    .box-partidas,
    .box-inferior {
        padding: 12px;
    }

    .box-partidas h3,
    .box-inferior h2 {
        font-size: 1rem;
        margin-bottom: 12px;
        padding-bottom: 4px;
    }

    .partida {
        padding: 10px 6px 8px 6px;
        margin-bottom: 10px;
        font-size: 0.8rem;
    }

    .data-partida {
        font-size: 0.75rem;
        margin-bottom: 6px;
    }

    .detalhes-partida {
        gap: 6px;
        margin-bottom: 4px;
    }

    .time-casa .nome-time,
    .time-fora .nome-time {
        max-width: 75px;
        font-size: 0.75rem;
    }

    .placar {
        width: 40px;
        font-size: 0.85rem;
        padding: 0 2px;
    }

    .partida .logo-time {
        width: 20px;
        height: 20px;
    }

    .local-partida {
        font-size: 0.7rem;
    }

    .tabela-compacta th,
    .tabela-compacta td {
        padding: 7px 5px;
    }

    .jogador-info {
        max-width: none;
    }

    .jogador-info span {
        max-width: 70px;
        font-size: 0.75rem;
    }

    .rank span:last-child {
        max-width: 60px;
        font-size: 0.75rem;
    }

    .rank-icon {
        width: 16px;
        height: 16px;
        min-width: 16px;
    }

    .jogador-info {
        font-size: 0.75rem;
    }

    .legenda-classificacao {
        padding: 10px;
        gap: 10px;
        flex-direction: column;
    }

    .item-legenda {
        font-size: 0.75rem;
        min-width: auto;
        justify-content: flex-start;
    }

    .cor-legenda {
        width: 12px;
        height: 12px;
    }

    .secao-criterios {
        padding: 12px;
        margin-top: 15px;
    }

    .lista-criterios {
        font-size: 0.75rem;
        padding-left: 18px;
    }
    
    footer {
        padding: 12px;
        font-size: 0.85rem;
    }
}

/* ===== MELHORIAS DE TOQUE PARA DISPOSITIVOS MÓVEIS ===== */
@media (hover: none) and (pointer: coarse) {
    .botoes button,
    .seta-navegacao,
    .equipe-link {
        min-height: 44px;
    }

    .seta-navegacao {
        min-width: 44px;
        min-height: 44px;
    }

    .season-selector {
        min-height: 44px;
    }

    .botoes button:active {
        transform: scale(0.97);
        background-color: #555;
    }

    .seta-navegacao:active:not(.desabilitada) {
        transform: scale(0.95);
        background-color: rgba(255, 255, 255, 0.15);
    }

    .equipe-link:active {
        background-color: rgba(255, 255, 255, 0.05);
        border-radius: 4px;
    }
}

/* ===== SUPORTE PARA NOTCH ===== */
@supports (padding: max(0px)) {
    @media screen and (max-width: 768px) {
        .container {
            padding-left: max(15px, env(safe-area-inset-left));
            padding-right: max(15px, env(safe-area-inset-right));
            padding-top: max(15px, env(safe-area-inset-top));
        }
        
        footer {
            padding-left: max(15px, env(safe-area-inset-left));
            padding-right: max(15px, env(safe-area-inset-right));
            padding-bottom: max(15px, env(safe-area-inset-bottom));
        }
    }

    @media screen and (max-width: 480px) {
        .container {
            padding-left: max(10px, env(safe-area-inset-left));
            padding-right: max(10px, env(safe-area-inset-right));
        }
        
        footer {
            padding-left: max(10px, env(safe-area-inset-left));
            padding-right: max(10px, env(safe-area-inset-right));
        }
    }
}