@font-face {
    font-family: "Pixelated MS Sans Serif";
    src: url("https://cdn.jsdelivr.net/npm/98.css@0.1.18/fonts/converted/ms_sans_serif.woff") format("woff");
    src: url("https://cdn.jsdelivr.net/npm/98.css@0.1.18/fonts/converted/ms_sans_serif.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Twemoji Country Flags";
    unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
    src: url('https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1/dist/TwemojiCountryFlags.woff2') format('woff2');
}  

body {
    margin: 0;
    touch-action: none;
    overflow: hidden;
    font-family: "Pixelated MS Sans Serif", sans-serif;
}

body.is-windows {
    font-family: "Twemoji Country Flags", "Pixelated MS Sans Serif", sans-serif;
}

canvas {
    display: block;
}

#topbar, #bottombar {
    position: absolute;
    width: 100%;
    background: rgba(0,0,0,0.75);
}
#topbar, #bottombar, header, footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    box-sizing: border-box;
    z-index: 1;
}
#topbar, #bottombar {
    justify-content: center;    
}
#bottombar {
    bottom: 0;
}
header, footer {
    justify-content: space-between;    
    width: 1080px;
    max-width: 100vw;
}

h1, p, a {
    color: white;
    font-weight: normal;
}

h1, p {
    margin: 16px;
}
a, span {
    margin: 8px;
}

h1 {
    font-size: 24pt;
}

p, a, ol, li {
    font-size: 12pt;
}

ol {
    list-style: decimal;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    overflow-y: auto;
}

li {
    margin-left: 48px;
    width: fit-content;
}

@media screen and (min-width:960px) {
    h1 {
        font-size: 32pt;
    }
    p, a, ol, li {
        font-size: 16pt;
    }
}

#zoomControls {
    margin: 8px;
}
#zoomControls>button {
    padding: 4px;
}
#zoomControls svg {
    width: 16pt;
    height: 16pt;
    fill: white;
}
#zoomControls>button.active svg {
    fill: gray;
}
#cameraControlIcon {
    display: none
}

#clientCount.connecting::after {
    content: "   ";
    white-space: pre;
    animation: ellipsis;
    animation-duration: 2s;
    animation-iteration-count: infinite;
}
@keyframes ellipsis {
    0% { content:"   " }
   25% { content:".  " }
   50% { content:".. " }
   75% { content:"..." }
}

#joystick-outer {
    position: absolute;
    display: none;
    transform: translateX(-50%) translateY(-50%);
    width: 20vw; height: 20vw;
    border: 2vw solid white;
    border-radius: 100%;
    background: rgba(0,0,0,0.75)
}
#joystick-inner {
    position: relative;
    top: 50%; left: 50%;
    transform: translateX(-50%) translateY(-50%);
    width: 10vw;
    height: 10vw;
    border: 2vw solid white;
    border-radius: 100%;
}
#joystick-inner.w {
    top: 25%;
}
#joystick-inner.a {
    left: 25%;
}
#joystick-inner.s {
    top: 75%;
}
#joystick-inner.d {
    left: 75%;
}
@media screen and (min-width:960px) {
    #joystick-outer {
        width: 100px; height: 100px;
        border-width: 10px;
    }
    #joystick-inner {
        width: 50px; height: 50px;
        border-width: 10px;
    }
}

.modal {
    position: fixed;
    width: 100vw;
    height: 100vh;
    opacity: 0;
    visibility: hidden;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.open {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;    
}

.modal-bg {
    position: absolute;
    background: rgba(0,0,0,0.8);
    width: 100%;
    height: 100%;
}

.modal-container {
    border-radius: 10px;
    background: #fff;
    position: relative;
    padding: 30px;
    margin: 30px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-container h2,
.modal-container p,
.modal-container a {
    font-family: sans-serif;
    color: black;
    margin: 0;
}

.modal-container p {
    margin-top: 1rem;
}

.modal-container a {
    color: #000;
    text-decoration: underline;
}

.modal-container h2 {
    font-size: 2rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.modal-close {
    outline: none;
    appearance: none;
    font-weight: bold;
    font-size: 2rem;
}