/* ===========================
   CABEÇALHO DA LIGA
   =========================== */
.league-header {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
}

.league-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.league-header h1 {
    font-size: 2rem; /* ~32px */
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.muted {
    color: #666;
    font-size: 14px;
}

/* ===========================
   RESPONSIVIDADE DO CABEÇALHO
   =========================== */
@media (max-width: 768px) {
    .league-logo {
        width: 40px;
        height: 40px;
    }

    .league-header h1 {
        font-size: 1.6rem; /* ~25px */
    }
}

@media (max-width: 480px) {
    .league-logo {
        width: 32px;
        height: 32px;
    }

    .league-header h1 {
        font-size: 1.4rem; /* ~22px */
    }
}

/* ===========================
   GRUPOS (Classificação com grupos)
   =========================== */
.group-block {
    margin-bottom: 30px;
}

.group-title, .results-block h2 {
    font-size: 18px;
    margin: 0 0 10px;
    font-weight: 600;
}

/* ===========================
   TABELA DE CLASSIFICAÇÃO
   =========================== */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;

    /* larguras fixas para colunas stickies */
    --col-rank: 40px;
    --col-team: 180px;
    --col-points: 60px;
}

.standings-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 14px;
    min-width: calc(var(--col-rank) + var(--col-team) + var(--col-points) + 400px);
    table-layout: auto;
}

.standings-table th,
.standings-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #eee;
    text-align: center;
    white-space: nowrap;
    background: #fff;
    box-sizing: border-box;
}

/* Header */
.standings-table thead th {
    font-weight: 600;
    background: #f9f9f9;
    z-index: 4;
}

/* Linhas alternadas */
.standings-table tbody tr:nth-child(even) td:not(.sticky):not(.sticky-2):not(.sticky-3) {
    background: #fcfcfc;
}

/* Hover */
.standings-table tbody tr:hover td {
    background: #f5f5f5;
}

/* Colunas fixas */
.standings-table th.sticky,
.standings-table td.sticky {
    position: sticky;
    left: 0;
    z-index: 3;
    width: var(--col-rank);
    background: #fff;
    text-align: center;
    border-right: 1px solid #eee;
}

.standings-table th.sticky-2,
.standings-table td.sticky-2 {
    position: sticky;
    left: var(--col-rank);
    z-index: 3;
    width: var(--col-team);
    background: #fff;
    text-align: left;
    border-right: 1px solid #eee;
}

.standings-table th.sticky-3,
.standings-table td.sticky-3 {
    position: sticky;
    left: calc(var(--col-rank) + var(--col-team));
    z-index: 3;
    width: var(--col-points);
    background: #fff;
    text-align: center;
    border-right: 1px solid #eee;
}

/* Célula do Time */
.standings-table .team-cell {
    display: flex;
    align-items: center;
    gap: 6px;
}

.standings-table .team-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.standings-table .team-name {
    display: inline-block;
    max-width: calc(var(--col-team) - 30px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Responsividade da classificação */
@media (max-width: 900px) {
    .table-wrapper {
        --col-rank: 36px;
        --col-team: 150px;
        --col-points: 56px;
    }

    .standings-table {
        font-size: 13px;
    }

    .standings-table .team-logo {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .table-wrapper {
        --col-rank: 32px;
        --col-team: 130px;
        --col-points: 52px;
    }

    .standings-table {
        font-size: 12.5px;
        min-width: calc(var(--col-rank) + var(--col-team) + var(--col-points) + 360px);
    }
}

/* Forma recente */
.form-dot {
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    font-size: 12px;
    border-radius: 50%;
    margin-right: 2px;
    color: #fff;
    font-weight: bold;
}

.form-dot.win {
    background: #28a745;
}

/* verde */
.form-dot.draw {
    background: #6c757d;
}

/* cinza */
.form-dot.lose {
    background: #dc3545;
}

/* vermelho */

.legend {
    margin-top: 10px;
    font-size: 10px;
    color: #555;
}

.legend .form-dot {
    margin-left: 8px;
}

/* ===========================
   LISTA DE JOGOS
   =========================== */
.round-block {
    margin-bottom: 30px;
}

.round-title {
    background: #b3d9e8;
    padding: 8px 12px;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    margin-bottom: 15px;
    border-radius: 3px;
}

.match-card {
    text-align: center;
    border-bottom: 1px solid #eee;
    padding: 15px 10px;
}

.match-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.match-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 600px;
    margin: 0 auto;
}

.team {
    display: flex;
    align-items: center;
    flex-direction: column;
    width: 35%;
}

.team-logo {
    width: 55px;
    height: 55px;
    object-fit: contain;
    margin-bottom: 6px;
}

.team-name {
    font-size: 14px;
    font-weight: 500;
    color: #222;
}

.team-name.mobile {
    display: none;
}

.score {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.score strong {
    font-size: 2.5rem;
    min-width: 28px;
    text-align: center;
}

.score-separator {
    margin: 0 6px;
    font-size: 1rem;
    font-weight: normal;
}

.penalty {
    font-size: 0.6em; /* menor que o placar */
    font-weight: normal;
    position: relative;
    top: -0.4em; /* sobe os penaltis */
    margin: 0 2px;
    white-space: nowrap;
    display: block; /* evita quebra no mobile */
}

/* Mobile */
@media (max-width: 600px) {
    .penalty {
        font-size: 0.55em;
        top: -0.3em;
    }
}

.match-venue {
    font-size: 12px;
    color: #777;
    margin-top: 6px;
}

/* Responsividade jogos */
@media (max-width: 640px) {
    .team-name.desktop {
        display: none;
    }

    .team-name.mobile {
        display: inline;
    }

    .team-logo {
        width: 40px;
        height: 40px;
    }

    .score strong {
        font-size: 2.5rem;
    }
}

/* Próximos jogos (sem placar ainda) */
.score.upcoming {
    font-size: 26px;
    font-weight: normal;
    color: #888;
}

/* ===========================
   TABELA DE ARTILHARIA
   =========================== */
.scorers-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .95rem;
    text-align: center;
}

.scorers-table th,
.scorers-table td {
    padding: 8px 6px;
    border-bottom: 1px solid #ddd;
    vertical-align: middle;
    white-space: nowrap;
}

/* Célula jogador */
.scorers-table .player-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    /*min-width: 220px;*/
    min-width: 170px;
}

.scorers-table .player-photo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.scorers-table .player-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.scorers-table .player-name {
    font-weight: 500;
    white-space: normal;
}

.scorers-table .club-name {
    color: #666;
    font-size: .85rem;
    margin-top: 2px;
}

.desktop {
    display: inline;
}

.mobile {
    display: none;
}

/* Responsivo + sticky */
@media (max-width: 768px) {
    .desktop {
        display: none;
    }

    .mobile {
        display: inline;
    }

    .scorers-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    :root {
        --col1w: 44px;
    }

    .scorers-table th.sticky,
    .scorers-table td.sticky {
        position: sticky;
        left: 0;
        z-index: 2;
        background: #fff;
    }

    .scorers-table th.sticky-2,
    .scorers-table td.sticky-2 {
        position: sticky;
        left: var(--col1w);
        z-index: 2;
        background: #fff;
    }

    .scorers-table th:first-child,
    .scorers-table td:first-child {
        min-width: var(--col1w);
        text-align: center;
    }

    .scorers-table .player-cell {
        min-height: 40px; /* respiro p/ nomes longos */
    }
}

/* ===========================
   BOTÃO "CARREGAR MAIS"
   =========================== */
.load-more-wrapper {
    text-align: center;
    margin: 20px 0;
}

#load-more {
    background: #0066cc;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

#load-more:hover {
    background: #005bb5;
}

#load-more:active {
    transform: scale(0.97);
}

@media (max-width: 768px) {
    #load-more {
        width: 100%;
        font-size: 1.1rem;
        padding: 12px;
    }
}
