*{
    margin: 0;
    padding: 0;
}

:root{
    --background: rgba(0, 0, 0, 0.9);
    --darkGray: rgba(255, 255, 255, 0.25);
    --lightGray: rgba(255, 255, 255, 0.75);
}

html{
    font-family: "Courier New", monospace;
    font-size: 0.9em;
}

body{
    background-color: var(--background);
    color: var(--lightGray);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin: 2em;
    text-align: center;
}

hr{
    width: 100%;
    border: none;
    border-top: 3px solid var(--lightGray);
    margin: 2em 0;
}

h1{
    font-size: 2em;
    /* text-shadow:
    -1px -1px 0 red,
    1px -1px 0 red,
    -1px 1px 0 red,
    1px 1px 0 red; */
}

h2{
    font-size: 1.5em;
    margin-top: 1em;
}

/* p{
    text-align: left;
} */

a, a:hover{
    text-decoration: none;
    color: var(--lightGray);
}

/* div{
    position: relative;
	width: 100%; 
} */

table, canvas{
    margin: 2em auto;
    /* justify-content: center; */
}

canvas {
    max-width: 1920px;
}

table{
    max-width: 1920px;
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;   
    overflow-x: auto;
    display: flex;
}

th, td{
    text-align: center;
    border-bottom: 1px solid var(--lightGray);
    padding: 1em;
    min-width: 64px;
    max-width: 64px;
    box-sizing: border-box;
}

table tr th:first-child, table tr td:first-child, table tr th:nth-child(2), table tr td:nth-child(2){
    border-right: 3px solid var(--lightGray);
}

table tr th:last-child, table tr td:last-child, table tr th:nth-last-child(2), table tr td:nth-last-child(2){
    border-left: 3px solid var(--lightGray);
}

table tr:first-child{
    border-bottom: 3px solid var(--lightGray);
}

table tr:last-child{
    border-bottom: 3px solid rgba(255, 255, 255, 0);
}

#archiveTable{
    display: inline-block;
}

#archiveTable td{
    min-width: 96px;
    border-top: 3px solid var(--lightGray);
    border-right: none;
    border-left: none;
}

#archiveTable td:nth-child(3), #archiveTable td:nth-child(4){
    border-right: 3px solid var(--lightGray);
}

#archiveTable img{
    margin: 4px 0;
}

#archiveTable td:nth-child(1) img, #archiveTable td:nth-child(2) img, #archiveTable td:nth-child(6) img, #archiveTable td:nth-child(7) img{
    width: 48px;
}

/* #driversTable, #teamsTable{
    box-sizing: border-box;
} */

/* table tr:last-child{
    border-bottom: none;
} */

.flag th{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.flag img{
    width: 32px;
    border: 1px solid var(--darkGray);
}

/* Cards */

.card{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.card a{
    border: 2px solid var(--lightGray);
    border-radius: 5px;
    padding: 1.5em;
    margin: 1em;
    text-decoration: none;
    color: var(--lightGray);
    text-align: center;
    flex-direction: column;
}

.card a:hover{
    background-color: var(--darkGray);
}

.card a:active{
    background-color: var(--lightGray);
}

.drivers img, .teams img{
    padding-bottom: 2px;
}

.card h2{
    margin-bottom: 0.5em;
}

.drivers p, .teams p{
    margin-top: 0.5em;
}

.drivers, .teams{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.driver1 img, .team1 img{
    margin-top: 0px;
    border-bottom: 24px solid var(--lightGray);
}

.driver2 img, .team2 img{
    margin-top: 8px;
    border-bottom: 16px solid var(--lightGray);
}

.driver3 img, .team3 img{
    margin-top: 16px;
    border-bottom: 8px solid var(--lightGray);
}

/* Legend */

.legend{
    text-align: center;
    margin: 0 auto;
    max-width: 256px;
}

.winner{
    color: rgb(255, 128, 0);
}

.podium{
    background-color: rgba(255, 128, 0, 0.25);
    padding: 1px 3px;
    /* display: inline; */
}

.pole{
    text-decoration: underline;
    text-decoration-color: rgb(255, 0, 255);
}

.sprint{
    background-color: rgba(255, 255, 255, 0.05);
    padding: 1px 3px;
    /* display: inline; */
}

.dnf, .dsq, .dns{
    color:rgba(255, 0, 0, 0.5);
}
