:root {
    --shadow-text: 2px 2px 5px rgba(0, 0, 0, 0.2);
    --color-background-shadow: rgba(0, 0, 0, 0.5);
    --color-main: #f6b65f;
    --color-main-half-alpha: rgba(254, 122, 7, 0.5);
    --color-secondary: #A0220A;
    --color-button: hsl(35, 89%, 55%);
    --color-button-hover: hsl(35, 89%, 62%);
    --color-button-active: #f6b65f;
}

@font-face {
    font-family: 'zabras';
    src: url('fonts/Zabars.ttf');
}

* {
    box-sizing: border-box;
}

#loom-companion-mv3 {
    display: none;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    background-image: url('./img/background_body.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    height: 100vh;
    font-family: 'zabras', 'Arial', 'Helvetica', 'sans-serif';
    letter-spacing: 10px;
    flex: 1;
    justify-content: space-between;
}

h1 {
    font-size: 80px;
    text-shadow: var(--shadow-text);
    margin-block-end: 0.07em;
}

.text-align-center {
    text-align: center;
}

#gameContainer {
    position: relative;
    width: 720px;
    height: 480px;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: var(--color-secondary);
    color: #fff;
    font-size: 64px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

#chooseKeyOverlay {
    z-index: 4;
}

canvas {
    background-image: url('./img/9_intro_outro_screens/start/startscreen_1.png');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    display: block;
}

footer {
    width: 100%;
    padding: 20px;
    background-color: var(--color-main);
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}

footer>a {
    font-family: sans-serif;
    text-decoration: none;
    color: #000;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 3px;
}

footer>a:hover {
    color: var(--color-secondary);
}

.footerSeperator {
    font-size: 40px;
}

#controls {
    position: absolute;
    top: 0;
    width: 720px;
    height: 480px;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.iconsBox {
    width: 80%;
    display: flex;
    justify-content: space-evenly;
    margin-top: 10px;
}

.iconsBox>button {
    cursor: pointer;
}

.icon {
    width: 30px;
    height: 30px;
    background-color: var(--color-main-half-alpha);
    border-radius: 15px;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
}

.squareIcon {
    width: 30px;
    height: 30px;
    background-color: var(--color-background-shadow);
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
}

.startIcon {
    width: 150px;
    height: 100px;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    background-color: transparent;
    border: none;
    cursor: pointer;
}

.lowerIconsBox {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 5px;
}

.gameIconBoxLeft {
    display: flex;
    gap: 20px;
    margin-left: 20px;
}

.gameIconBoxRight {
    display: flex;
    gap: 20px;
    margin-right: 20px;
}

.gameIcon {
    width: 100px;
    height: 50px;
    border-radius: 40px
}

#restartButton {
    color: var(--color-main);
    font-family: inherit;
    font-size: 64px;
    letter-spacing: 3px;
    align-self: start;
    padding: 10px;
    text-decoration: underline;
}

#closeButton {
    color: var(--color-main);
    font-family: inherit;
    font-size: 64px;
    letter-spacing: 3px;
    align-self: end;
    padding: 10px;
    text-decoration: underline;
}

#muteButton {
    background-image: url('img/icons/loud.png');
}

#settingsButton {
    background-image: url('img/icons/settings.png');
}

#pauseButton {
    background-image: url('img/icons/pause.png');
}

#fullscreenButton {
    background-image: url('img/icons/fullscreen.png');
}

#startButton {
    background-image: url('img/icons/start.png');
}

#leftButton {
    background-image: url('img/icons/left.png');
}

#rightButton {
    background-image: url('img/icons/right.png');
}

#throwButton {
    background-image: url('img/icons/throw.png');
}

#jumpButton {
    background-image: url('img/icons/jump.png');
}

#settingsBox {
    border: 2px solid black;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    background-color: var(--color-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 24px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    padding: 20px 0;
    max-height: 75%;
    width: 75%;
    overflow-y: auto;
    max-width: 520px;
}

#settingsBox>h2 {
    margin-block-start: 0;
    font-size: 32px;
    align-self: flex-start;
    margin-left: 20px;
}

.settings-subpoints {
    width: 100%;
    display: flex;
    justify-content: space-between;
}

h3 {
    font-size: 26px;
    align-self: start;
    letter-spacing: 3px;
}

.settings-subpoints>button {
    background-color: transparent;
    border: unset;
    border: 1px solid black;
    border-bottom: unset;
    padding: 4px 20px;
    font-family: inherit;
    font-size: 24px;
    letter-spacing: 1px;
    cursor: pointer;
    background-color: var(--color-button);
}

.settings-subpoints>button:hover {
    background-color: var(--color-button-hover) !important;
}

.settings-option {
    border-top: 2px solid black;
    width: 100%;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
}

.settings-icons {
    width: 28px;
    height: 28px;
}

#settingsSoundButton {
    border-top-right-radius: 10px;
    border-left: unset;
}

#settingsKeysButton {
    border-top-left-radius: 10px;
    border-right: unset;
}

.active-button {
    background-color: var(--color-button-active) !important;
    transform: translateY(2px);
}

#settingsKeysWindow {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
}

table {
    box-sizing: border-box;
    letter-spacing: 1px;
}

th {
    font-size: 30px;
    text-align: start;
    padding-right: 4px;
}

td {
    border: #000 1px solid;
    font-size: 26px;
    padding: 4px;
    cursor: pointer;
}

.overflow-hidden {
    overflow: hidden;
}

.button-touch-field {
    padding-top: 100px;
}

@media only screen and (max-width: 720px) {

    canvas,
    #gameContainer,
    #controls {
        width: 100%;
        background-size: contain;
        height: 100vh;
    }

    h1 {
        display: none;
    }
}

@media only screen and (max-width: 500px),
(max-height: 500px) {
    footer {
        flex-direction: column;
        gap: 20px;
    }

    .footerSeperator {
        display: none;
    }

    .gameIcon {
        height: 30px;
    }

    #restartButton,
    #closeButton {
        font-size: 32px;
    }

    th {
        font-size: 20px;
    }

    td {
        font-size: 18px;
    }
}

@media only screen and (max-width: 500px) {
    .gameIcon {
        width: 75px;
    }
}

@media only screen and (max-width: 410px) {
    .gameIcon {
        width: 50px;
    }
}

@media only screen and (max-width: 360px) {
    .settings-icons {
        width: 18px;
        height: 18px;
    }
}

.fullscreen {
    height: 100% !important;
    width: 100% !important;
}

.visibility-hidden {
    visibility: hidden;
    max-width: 1px !important;
}

.visibility-hidden>* {
    max-width: 1px !important;
}

.display-none {
    display: none !important;
}