:root {
    --title-font: "Playfair Display", serif;
    --body-font: "Comme", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--body-font);
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    background: #eeeeee;
    color: #212125;
}

h1, h2, h3, h4, h5 {
    font-family: var(--title-font);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0;
    padding: 0;
}

h1 {
    font-size: 24px;
    white-space: nowrap;
    overflow: hidden;
    max-width: 100%;
    padding: 0 4rem;
}

h2 {
    font-size: 30px;
    margin-bottom: 1.25rem;
}

h6, .game__tla {
    font-size: 14px;
    font-weight: normal;
    text-transform: uppercase;
    margin: 0;
}

section {
    max-width: 100vw;
    padding: 1rem 4rem 2rem;
}

.games {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.games--live {
    grid-template-columns: repeat(1, 1fr);
}

.games--upcoming {
    grid-template-columns: repeat(2, 1fr);
}

.games--last-32 {
    grid-template-columns: repeat(2, 1fr);
}

.games--last-16 {
    grid-template-columns: repeat(2, 1fr);
}

.games--quarter-finals {
    grid-template-columns: repeat(2, 1fr);
}

.games--semi-finals {
    grid-template-columns: repeat(2, 1fr);
}

.games--third-place {
    grid-template-columns: repeat(1, 1fr);
}

.games--final {
    grid-template-columns: repeat(1, 1fr);
}

.game img {
    max-width: 100%;
    min-width: 50px;
    /*border: 1px solid #dadada;*/
}

.game {
    font-size: 1.5rem;
    display: grid;
    grid-template-columns: 1fr 10fr 1fr;
    align-items: center;
    text-align: center;
    gap: 1rem;
    border: 1px solid #dadada;
    border-radius: 8px;
    padding: 2rem;
    height: 100%;
    background: white;
}

.game__details {
    font-family: var(--title-font);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0;
    padding: 0;
    font-size: 30px;
}

.game__score {
    /*font-family: var(--body-font);*/
    font-size: 130%;
    font-variant-numeric: proportional-nums;
    font-width: condensed;
}

.game__details--winner--HOME_TEAM .game__score--home {
    color: #009879;
}

.game__details--winner--HOME_TEAM .game__team-name--home {
    color: #009879;
}

.game__details--winner--HOME_TEAM .game__score--away {
    color: #980035;
}

.game__details--winner--HOME_TEAM .game__team-name--away {
    color: #980035;
}

.game__details--winner--AWAY_TEAM .game__score--away {
    color: #009879;
}

.game__details--winner--AWAY_TEAM .game__team-name--away {
    color: #009879;
}

.game__details--winner--AWAY_TEAM .game__score--home {
    color: #980035;
}

.game__details--winner--AWAY_TEAM .game__team-name--home {
    color: #980035;
}

/*.game__details--winner--DRAW .game__score--home {*/
/*    color: #858585;*/
/*}*/

/*.game__details--winner--DRAW .game__team-name--home {*/
/*    color: #858585;*/
/*}*/

/*.game__details--winner--DRAW .game__score--away {*/
/*    color: #858585;*/
/*}*/

/*.game__details--winner--DRAW .game__team-name--away {*/
/*    color: #858585;*/
/*}*/

.teams {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.team {
    display: flex;
}

.team img {
    width: 200px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 0.9em;
    min-width: 400px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

table.leaderboard-table {
    width: auto;
}

thead tr {
    background-color: #009879;
    color: #ffffff;
    text-align: left;
}

th,
td {
    padding: 12px 15px;
}

tbody tr {
    border-bottom: 1px solid #dddddd;
}

tbody tr:nth-of-type(even) {
    background-color: #f3f3f3;
}

tbody tr:last-of-type {
    border-bottom: 2px solid #009879;
}

td.position {
    text-align: center;
}

td.player {
    text-align: center;
}

.titlebar {
    background: white;
    color: black;
    position: fixed;
    width: 100%;
    height: 72px;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
}

.titlebar img {
    height: 50px;
}

nav {
    margin-right: 5vw;
    margin-left: auto;
}

nav ul {
    display: flex;
    align-items: center;
    list-style: none;
    padding: 0;
    gap: 1rem;
}

nav ul li a {
    color: black;
}

main {
    margin-top: 72px;
}

.table__player {
    font-family: var(--title-font);
    font-size: 1.25rem;
    font-weight: 700;
}

@media (width <= 900px) {
    h1 {
        font-size: 1.15rem;
        white-space: normal;
    }

    table {
        min-width: 100%;
        max-width: 100%;
        overflow: hidden;
        overflow-x: scroll;
    }

    table.leaderboard-table {
        min-width: 98%;
        max-width: 98%;
    }

    .table__player {
        font-size: 1rem;
    }

    .section--standings {
        overflow: hidden;
        overflow-x: scroll;
    }

    .section--nav {
        padding: 3rem 0 4rem;
    }

    section {
        padding: 1rem 0;
    }

    .games {
        grid-template-columns: repeat(1, 1fr);
    }

    .game {
        padding: 1rem;
    }

    .game__details {
        font-size: 20px;
    }

    nav {
        position: fixed;
        bottom: 0;
        left: 0;
        height: 50px;
        width: 100%;
        background: #009879;
    }

    nav ul {
        display: flex;
        align-items: center;
        justify-content: space-around;
    }

    nav ul li a {
        color: white;
    }
}
