@font-face {
    font-family: 'zabars';
    src: url('fonts/zabars.ttf')  format('truetype'), /* Safari, Android, iOS */
}
         

body{
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-image: url('img/10_other/background_desert.png');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    font-family: 'zabars', Arial, Helvetica, sans-serif;
}

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

h1{
    font-size: 64px;
    letter-spacing: 3px;
}

.panel img{
    width: 24px;
    background-color: #e5e55c;
    padding: 4px;
    border: 1px solid black;
}


.arrow-left{
    transform: rotate(90deg);
}
.arrow-right{
    transform: rotate(270deg);
}

.panel{
    display: flex;
    margin: 12px;
}
#panel1{
    justify-content: flex-end;
}
#panel2{
    justify-content: space-between;
}

.overlay{
    aspect-ratio: 720/480;
    height: 480px;
    margin-top: -480px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 99;
}
.panel-inside{
    display: flex;
    gap: 16px;
}

.d-none{
    display: none;
}

button{
    position: relative;
    background: #e5e55c;
    padding: 14px;
    border: 1px solid black;
    width: 130px;
    border-radius: 10px;
    font-family: 'zabars';
    font-size: 24px;
}

#how-to-play{
    background-color: #a9b99bf5;
    z-index: 99;
    justify-content: unset !important;
}

#how-to-play img{
    height: 32px;
}

.key-panels{
    display: flex;
    justify-content: flex-end;
    align-items: center;
    font-size: 40px;
    gap: 32px;
    margin-right: calc(50% - 144px);
}

#backslash{
    margin-left: -15px;
}

#close-how-to-play{
    font-size: 20px;
    background-color: white;
    padding: 4px;
    border: 1px solid black;
    text-align: center;
    width: 22px;
}

#close-panel{
    display: flex;
    align-items: center;
    font-size: 46px;
    margin-top: 12px;
    margin-right: 12px;
    justify-content: space-between;
    margin-left: calc(50% - 66px);
}

#how-to-play-title{
    text-decoration: underline;
    text-underline-offset: 10px;
}

#key-panel{
    display: flex;
    justify-content: space-evenly;
    flex-direction: column;
    gap: 35px;
    margin-top: 60px;
}
#buttons{
    position: relative;
    top: -30%;
    left: calc(50% - 150px);
    width: 303px;
}

#start-game{
    margin-right: 40px;
}

#restart-game{
    left: calc(50% - 60px);
    top: -40%;
}

.hover:hover{
    background: #c3c339 !important;
    cursor: pointer;
}

#turn-device{
    font-size: 36px;
    padding: 10px;
    background: white;
}

@media only screen and (max-width: 720px){
    canvas{
        width: 100%
    }

    .overlay{
        width: 100%;
        margin-top: -66.66vw;
        height: 66.66vw;
    }
    h1{
        display: none;
    }
}

@media only screen and (max-width: 600px){
    button{
        padding: 10px;
        width: 106px;
        font-size: 20px;
        border-radius: 8px;
    }

    #restart-game{
        left: calc(50% - 53px);
    }

    .panel img{
        width: 20px;
        padding: 2px;

    }

    .panel-inside{
        gap: 12px;
    }

    #close-panel{
        font-size: 32px;
        margin-left: calc(50% - 60px);
    }

    .key-panels{
        font-size: 24px;
        gap: 20px;
        margin-right: calc(50% - 93px);
    }
    #key-panel{
        gap: 20px;
        margin-top: 40px;
    }
    #how-to-play-title{
        text-underline-offset: 5px;
    }
    #buttons{
        width: 255px;
        left: calc(50% - 122px);
    }
}

@media only screen and (max-width: 550px){
    #panel1{
        display: none;
    }
    #buttons{
        display: none;
    }
    #panel2{
        display: none;
    }
    #turn-device{
        display: block;
    }
    .overlay{
        justify-content: center;
        align-items: center;
    }
}

@media only screen and (max-width: 450px){
    button{
        padding: 5px;
        width: 82px;
        font-size: 16px;
        border-radius: 6px;
    }

    #restart-game{
        left: calc(50% - 41px);
    }

    .panel img{
        width: 10px;
    }

    .panel-inside{
        gap: 8px;
    }
    #close-panel{
        font-size: 18px;
        margin-left: calc(50% - 34px);
    }
    .key-panels{
        font-size: 16px;
        margin-right: calc(50% - 55px);
    }
    #how-to-play img{
        height: 16px;
    }
    #key-panel{
        gap: 15px;
    }

    #backslash{
        margin-left: -8px;
    }

    #close-how-to-play{
        font-size: 16px;
        width: 20px;
        padding: 2px;
    }
    #start-game{
        margin-right: 20px;
    }
    #buttons{
        width: 187px;
        left: calc(50% - 93px);
    }
}

@media only screen and (max-height: 635px){
    h1{
        display: none;
    }
}

@media only screen and (max-height: 480px){
    canvas{
        height: 100vh;
    }
    .overlay{
        margin-top: -100vh;
    }
    h1{
        display: none;
    }

    #how-to-play{
        aspect-ratio: 720/480;
    }
    #close-panel{
        font-size: 32px;
        margin-left: calc(50% - 60px);
    }
    #key-panel{
        gap: 20px;
        margin-top: 40px;
    }
    .key-panels{
        font-size: 24px;
        gap: 20px;
        margin-right: calc(50% - 93px);
    }
    #how-to-play-title{
        text-underline-offset: 5px;
    }

    #full-screen{
        display: none;
    }
}

@media only screen and (max-height: 480px) and (max-width: 720px){
    .overlay{
        margin-top: -118vh;
    }
    #buttons{
        top: -35%;
    }

    #restart-game{
        top: -30%;
    }

    #close-panel {
        margin-top: 90px;
    }

    #panel1{
        margin: 80px 12px;
    }
}