body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

:root {
    --container-length: 70vw;
    --max-length: 200px;
    --min-size: 150px;
}

.ai, .real {
    color: #fff;
    font-size: 10pt;
    width: min(max(calc(var(--min-size) / 10), calc(var(--container-length)/5/10)), calc(var(--max-length) / 10));
    height: min(max(calc(var(--min-size) / 10), calc(var(--container-length)/5/10)), calc(var(--max-length) / 10));
    margin: 0;
}

.ai {
    background-color: rgb(216, 16, 16);
}

.real {
    background-color: rgb(10, 189, 10);
}

.container {
    margin-top: 3rem;
    margin-bottom: 5rem;
    display: flex;
    flex-flow: row wrap;
    width: 95vw;
    max-width: 1400px;
    gap: 0.5vw;
    align-content: start;
    justify-content: center;
}

.match {
    width: max(var(--min-size), calc((var(--container-length)/5)));
    height: max(var(--min-size), calc(var(--container-length)/5));
    max-width: var(--max-length);
    max-height: var(--max-length);
    display: flex;
    flex-flow: row wrap;
    align-content: start;
}

input, button, select {
    border-radius: 0;
    border: 1px solid #222;
    font-size: 15pt;
    padding: 0.5rem;
}

button, select {
    transition: box-shadow 0.3s;
    border: 0;
    background-color: #222;
    color: #fff;
    box-shadow: #444 5px 5px;
    margin: 1rem;
}

button:hover, select:hover {
    box-shadow: #444 3px 3px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

h2 {
    margin-top: 5rem;
}

h4 {
    margin-top: 3rem;
}

p {
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    line-height: 2rem;
}

strong {
    color: #f00;
    font-weight: bold;
}

form {
    padding-bottom: 1rem;
}

footer {
    background-color: #222;
    color: #fff;
    font-size: 10pt;
    text-align: center;
    margin: 0;
}

footer p {
    margin: 5px;
    line-height: 1rem;
}

.centered {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.info_tile {
    transition: box-shadow 0.4s;
    border-radius: 0.5rem;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    overflow: hidden;
    background-color: #222;
    color: #fff;
}

.info_tile:hover {
    cursor: pointer;
    box-shadow: #000 0 0 16px;
}

.match_title {
    margin: 0;
}

a {
    text-decoration: none;
}

.current {
    text-decoration: underline;
}

code {
    background-color: #222;
    color: #fff;
    border-radius: 3px;
    padding: 5px;
}

nav {
    height: 5rem;
    align-content: center;
}

nav a {
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    transition: box-shadow 0.3s;
    background-color: #222;
    color: #fff;
    padding: 1rem;
    margin: 1rem;
    box-shadow: #444 5px 5px;
}

nav a.current {
    box-shadow: none;
}

nav a:hover {
    box-shadow: #444 3px 3px;
}

nav a.current:hover {
    box-shadow: none;
}

main {
    margin: 4rem auto;
    flex: 1;
}

img {
    max-width: 95vw;
}

.legend {
    width: 90vw;
    max-width: 250px;
    border: 1px dashed #777;
    padding: 1rem;
}

.legend h4 {
    margin: 0;
}

.legend div {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: space-between;
}

.legend div p {
    line-height: 0;
    margin-right: 2rem;
}

.player_kills, .ai_kills, .player_dmg, .ai_dmg {
    height: 1.5vh;
    font-size: 8pt;
    font-family: sans-serif;
    font-weight: bolder;
    overflow: hidden;
}

.player_kills, .player_dmg {
    background-color:#dd2;
    color: #000;
}

.ai_kills, .ai_dmg {
    background-color:#22d;
    color: #fff;
}

.subtitle {
    font-size: 8pt;
    line-height: 0;
    margin: 0.75vh;
    flex: 1;
}

#popup {
    visibility: hidden;
    position: fixed;
    color: #fff;
    background-color: #222;
    width: 90vw;
    height: 90vh;
    top: 5vh;
    border-radius: 1rem;
}

@media (orientation: portrait) {
    #popup {
        top: 0;
        border-radius: 0;
        width: 100vw;
        height: 100vh;
    }
}

#popup button {
    position: absolute;
    right: 0;
    box-shadow: none;
    background-color: #fff;
    color: #000;
    font-weight: bold;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
}

.loading {
    animation: 2s infinite linear spin;
    height: 15px;
    position: absolute;
    overflow: visible;
}

@keyframes spin {
    from {
        rotate: 0deg;
    }

    to {
        rotate: 360deg;
    }
}