:root {
    --color-background: #1a1a1a;
    --color-text: #ffffff;
    --color-text-highlight: #af1010;
    --color-text-dark: #1a1a1a;
    --color-highlight: #ff5151;
    --color-error: #ff5e5e;
    --color-overlay: rgba(0, 0, 0, 0.75);
    --color-hover: rgba(255, 255, 255, 0.15);
    --color-popup: #21365f;
    --base-font-size: 16px;
    --mobile-font-size: 12px;
    --border-radius: 4px;
    --border-radius-l: 8px;
    --shadow: -2px -2px 4px var(--color-text-dark), 2px -2px 4px var(--color-text-dark), -2px 2px 4px var(--color-text-dark), 2px 2px 4px var(--color-text-dark);
    --shadow-light: -2px -2px 2px var(--color-text), 2px -2px 2px var(--color-text), -2px 2px 2px var(--color-text), 2px 2px 2px var(--color-text);
    --shadow-light-s: -1px -1px 8px var(--color-text), 1px -1px 8px var(--color-text), -1px 1px 8px var(--color-text), 1px 1px 8px var(--color-text);
}

/* Fonts */
@font-face {
    font-family: 'Roboto Mono';
    font-style: normal;
    font-weight: 200;
    src: local(''),
        url('../fonts/roboto-mono-v22-latin-200.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
        url('../fonts/roboto-mono-v22-latin-200.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
@font-face {
    font-family: 'Roboto Mono';
    font-style: normal;
    font-weight: 400;
    src: local(''),
        url('../fonts/roboto-mono-v22-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
        url('../fonts/roboto-mono-v22-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
@font-face {
    font-family: 'Roboto Mono';
    font-style: normal;
    font-weight: 700;
    src: local(''),
        url('../fonts/roboto-mono-v22-latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
        url('../fonts/roboto-mono-v22-latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
@font-face {
    font-family: 'Roboto Mono';
    font-style: italic;
    font-weight: 200;
    src: local(''),
        url('../fonts/roboto-mono-v22-latin-200italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
        url('../fonts/roboto-mono-v22-latin-200italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
@font-face {
    font-family: 'Roboto Mono';
    font-style: italic;
    font-weight: 400;
    src: local(''),
        url('../fonts/roboto-mono-v22-latin-italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
        url('../fonts/roboto-mono-v22-latin-italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
@font-face {
    font-family: 'Roboto Mono';
    font-style: italic;
    font-weight: 700;
    src: local(''),
        url('../fonts/roboto-mono-v22-latin-700italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
        url('../fonts/roboto-mono-v22-latin-700italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

/* General */
:not(:root):fullscreen {
    overflow: auto;
}
html {
    font-size: var(--base-font-size);
}
body {
    height: 100vh;
    background-color: var(--color-background);
    margin: 0;
}
@media only screen and (max-width: 999px) {
    html {
        font-size: var(--mobile-font-size);
    }
}
html, input, button, select {
    font-family: 'Roboto Mono', Courier, monospace;
}
h1 {
    color: var(--color-text);
    text-shadow: var(--shadow);
}
:is(button, a):hover {
    background-color: var(--color-hover);
    text-shadow: var(--shadow);
}
button, a {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--color-text);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: var(--border-radius);
    font-size: inherit;
    text-align: center;
}
hr {
    border: none;
    border-top: 2px solid var(--color-text);
}
select {
    background: var(--color-text);
    border-radius: var(--border-radius);
    border: 2px solid var(--color-text-dark);
    color: var(--color-text-dark);
    padding: 2px 4px;
}
input {
    background: none;
    border-radius: var(--border-radius);
    height: 1.5rem;
    border: 2px solid var(--color-text);
    color: var(--color-text);
    padding-left: 5px;
}
input::placeholder {
    color: var(--color-text);
    opacity: 0.6;
}
:disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Hide */
.dn {
    display: none !important;
}
[data-visible="false"] {
    display: none !important;
}

/* Margin */
.mt-1 {
    margin-top: 1rem;
}
.mb-1 {
    margin-bottom: 1rem;
}
.mr-1 {
    margin-right: 1rem;
}

/* Popups */
.PageOverlay {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100dvh;
    background: var(--color-overlay);
    z-index: 5;
}
.Popup {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: var(--color-popup);
    min-width: 50vw;
    min-height: 25vh;
    border-radius: var(--border-radius-l);
    padding: 1rem;
    z-index: 10;
    box-shadow: var(--shadow-light-s);
    text-align: center;
}
.Popup__Header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.Popup__Content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    margin: auto;
    padding-bottom: 1rem;
}

@media (min-width: 576px) {
    .Popup {
        min-width: 25vw;
    }
}

/* Page loading */
.Loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    z-index: 100;
    background: var(--color-background);
    color: var(--color-text);
}
.Loading__Content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    text-align: center;
}
.Loading__Text {
    margin: 1rem;
    font-size: 2rem;
}
.Loading__Progress {
    display: flex;
    width: fit-content;
    margin: auto;
}
.Loading__Bar {
    border: 2px solid var(--color-text);
    height: 1rem;
    width: 20vw;
    padding: 2px;
}
.Loading__Bar--Inner {
    height: 100%;
    width: 0%;
    background: var(--color-text);
    transition: width 0.2s;
}
.Loading__Step {
    margin-top: 0.25rem;
    line-height: 1.5;
    font-size: 1rem;
}

/* Loading */
.loading {
    color: transparent !important;
    position: relative;
}
.loading::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    border: 3px solid rgb(97, 97, 97);
    border-top: 3px solid rgb(45, 40, 78);
    animation: loading-circle 1s linear 0s infinite;
}
@keyframes loading-circle {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Buttons */
.Button__Primary {
    background-color: var(--color-text);
    color: var(--color-text-dark);
    font-weight: bold;
    box-shadow: var(--shadow);
}
.Button__Primary:hover {
    color: var(--color-text);
}

/* Container */
.Background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    z-index: -1;
    background-image: url(/images/Background.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}
.Container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}
.MainMenu {
    position: absolute;
    top: 0;
    left: 0;
    margin: 2rem;
}

/* Settings */
[data-action="toggle-sound"] {
    background-image: url(/images/SoundOn.png);
    background-size: contain;
    background-repeat: no-repeat;
    width: 2rem;
    height: 2rem;
    padding: 5px;
}
[data-action="toggle-sound"][data-sounds="off"] {
    background-image: url(/images/SoundOff.png);
}
[data-action="toggle-fullscreen"] {
    background-image: url(/images/FullscreenOn.png);
    background-size: contain;
    background-repeat: no-repeat;
    width: 2rem;
    height: 2rem;
    padding: 5px;
}
[data-action="toggle-fullscreen"][data-fullscreen="off"] {
    background-image: url(/images/FullscreenOff.png);
}