*{
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
    position: relative;
    box-sizing: border-box;
    text-decoration: none;
    font-family: "Gorditas", serif;
}

body{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-image: url("img/5_background/background_img.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    height: 100vh;
}

#rotateOverlay{
    background-color: black;
    color: white;
    font-size: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 200;
    position: fixed;
    inset: 0;
}

h1{
    font-size: 3rem;
    margin-bottom: 40px;
}

body.mobile h1{
    display: none;
}

#contentarea{
    width: 100%;
    max-width: 1920px;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#canvasarea{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    @media (max-width: 720px) or (max-height: 480px){
        width: 100%;
        height: 100%;
    }
}

canvas{
    display: block;
    background-color: black;

    @media (max-width: 720px) or (max-height: 480px){
        width: 100%;
        height: 100%;
    }
}

#muteButton{
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 1000;
    padding: 5px;
    color: white;
    background-color: orange;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

#moveButtons{
    display: none;
    position: absolute;
    z-index: 97;
    left: 40px;
    bottom: 2px;
    gap: 10px;

    button{
        padding: 10px;
        padding-left: 20px;
        padding-right: 20px;
        margin: 5px;
        font-size: 1.5rem;
        background-color: rgb(255, 165, 0, 0.5);
        color: white;
        border-radius: 15px;
        border: none;
    }
}

#actionButtons{
    display: none;
    position: absolute;
    z-index: 97;
    right: 40px;
    bottom: 2px;

    button{
        padding: 10px;
        padding-left: 20px;
        padding-right: 20px;
        margin: 5px;
        font-size: 1.5rem;
        background-color: rgb(255, 165, 0, 0.5);
        color: white;
        border-radius: 15px;
        border: none;
    }
}

body.mobile #moveButtons,
body.mobile #actionButtons {
    display: flex;
}

#startOverlay{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-image: url("img/9_intro_outro_screens/start/startscreen_1.png");
    background-position: center;
    background-size: cover;
    display: flex;
    align-items: center;
    z-index: 100;


    #controlsButton{
        position: absolute;
        top: 50px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 1.5rem;
        padding: 5px;
        color: white;
        background-color: orange;
        border: none;
        border-radius: 10px;
        cursor: pointer;

        &&:hover{
            background-color: rgb(160, 104, 0);
            color: black;
        }
    }

    #imprintButton{
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 1.5rem;
        padding: 5px;
        color: white;
        background: none;
        border: none;
        border-radius: 10px;
        cursor: pointer;

        &&:hover{
            color: orange;
        }
    }
}

#controlsOverlay{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-image: url("img/5_background/background_img.png");
    background-position: center;
    background-size: 100% 100%;
    flex-direction: column;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99;

    #startButton{
        font-size: 1.5rem;
        padding: 5px;
        background-color: white;
        border: none;
        border-radius: 10px;
        cursor: pointer;

        &&:hover{
            background-color: rgb(255, 181, 44);
            color: black;
        }
    }

    h2{
        margin-bottom: 30px;
        font-size: 2rem;

        @media(max-height: 380px){
            margin-bottom: 10px;
        }
    }

    #controlsTable{
        flex-direction: column;
        display: flex;
        align-items: center;

        td{
            padding: 10px;

            @media (max-width: 550px) or (max-height: 380px){
                padding: 5px;
            }

            span{
                font-size: 1.5rem;
            }
        }

        button{
            font-size: 1.5rem;
            padding-left: 5px;
            padding-right: 5px;
        }
    }
}

#imprintOverlay{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-image: url("img/5_background/imprint_background.jpg");
    background-position: center;
    background-size: 100% 100%;
    flex-direction: column;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    display: none;

    h2{
        margin-bottom: 30px;
        font-size: 2rem;
    }

    p{
        padding-bottom: 10px;
    }

    #closeButton{
        position: absolute;
        top: 70px;
        right: 100px;
        font-size: 1.5rem;
        background: none;
        border: none;
        cursor: pointer; 

        &&:hover{
            color: orange;
        }
    }
}

#winOverlay{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-image: url("img/You won, you lost/You win B.png");
    background-color: black;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100%;
    display: flex;
    z-index: 98;

    #restartGameButton{
        position: absolute;
        bottom: 30px;
        right: 100px;
        font-size: 1.5rem;
        padding: 5px;
        color: white;
        background-color: orange;
        border: none;
        border-radius: 8px;
        cursor: pointer;

        &&:hover{
            background-color: rgb(160, 104, 0);
            color: black;
        }
    }

    #backToMainScreenButton{
        position: absolute;
        bottom: 30px;
        left: 100px;
        font-size: 1.5rem;
        padding: 5px;
        color: white;
        background-color: orange;
        border: none;
        border-radius: 10px;
        cursor: pointer;

        &&:hover{
            background-color: rgb(160, 104, 0);
            color: black;
        }
    }
}

#loseOverlay{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-image: url("img/You won, you lost/You lost b.png");
    background-color: black;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100%;
    display: flex;
    z-index: 98;

    #restartGameButton{
        position: absolute;
        bottom: 30px;
        right: 100px;
        font-size: 1.5rem;
        padding: 5px;
        color: white;
        background-color: orange;
        border: none;
        border-radius: 10px;
        cursor: pointer;

        &&:hover{
            background-color: rgb(160, 104, 0);
            color: black;
        }
    }

    #backToMainScreenButton{
        position: absolute;
        bottom: 30px;
        left: 100px;
        font-size: 1.5rem;
        padding: 5px;
        color: white;
        background-color: orange;
        border: none;
        border-radius: 10px;
        cursor: pointer;

        &&:hover{
            background-color: rgb(160, 104, 0);
            color: black;
        }
    }
}