body{
    font-family: "Luckiest Guy", cursive;
    font-size: larger;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100dvw;
    height: 100dvh;
    background-image: url("./img/3. Background/Layers/5. Water/D1.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    overflow: hidden;
}

.screenButton img{
    width: 28px;
    height: 28px;
}

.legal{
    display: flex;
    flex-direction: column;
    align-items: center;
}

.legal h2{
    margin-bottom: 10px;
}

.links::-webkit-scrollbar {
    display: none;
}

.sources{
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    box-sizing: border-box;
}

.links{
    color: aliceblue;
    cursor: default;
    display: flex;
    flex-direction: column;
    width: 90%;
    gap: 8px;
    overflow-y: scroll;
    padding: 20px;
}

.links a:hover{
    color: rgb(126, 191, 249);
}

.links a{
    color: aliceblue;
}

.links div{
display: flex;
border: 1px solid #ffffff;
padding: 4px;
border-radius: 8px;
flex-wrap: wrap;
}

.imprint{
    width: 80vw;
    height: 90vh;
    border: 2px aliceblue solid;
    background-color: #4100b7;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    border-radius: 24px;
}

.turnDevice{
    display: none;
}

.resetGame{
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 30;
}

.win_Position{
    top: 0;
    position: absolute;
    z-index: 20;
}

h1{ 
    margin: 0;
    font-weight: bolder;
    font-size: xxx-large;
    border-radius: 24px;
    border: solid aliceblue;
    background-color: #4100b7;
    padding: 0 24px;
    box-shadow: 0 0 3vh 1.5vh #4100b7;
    color: aliceblue;
    z-index: 1;
    cursor: pointer;
    text-align: center;
}

h2{ 
    margin: 0;
    font-weight: bolder;
    font-size: x-large;
    border-radius: 24px;
    border: solid aliceblue;
    background-color: #4100b7;
    padding: 0 24px;
    box-shadow: 0 0 3vh 1.5vh #4100b7;
    color: aliceblue;
    z-index: 1;
    cursor: pointer;
    text-align: center;
}

h3{ 
    margin: 0;
    font-weight: bolder;
    font-size: large;
    border-radius: 24px;
    border: solid aliceblue;
    background-color: #4100b7;
    padding: 0 24px;
    box-shadow: 0 0 3vh 1.5vh #4100b7;
    color: aliceblue;
    z-index: 1;
    cursor: pointer;
    text-align: center;
}

h4{ 
    margin: 0;
    font-size: small;
    border-radius: 4px;
    border: solid aliceblue;
    background-color: #4100b7;
    padding: 0 4px;
    color: aliceblue;
    z-index: 1;
    cursor: pointer;
    text-align: center;
}

canvas{
    display: block;
    border: 4px solid;
    border-radius: 24px;
    border-color: aliceblue;
    box-shadow: 0 0 3vh 1.5vh #4100b7;
    transition: 1s ease-in-out;
    aspect-ratio: auto 720 / 480;
    z-index: 1;
    width: 720px;
    height: 480px;
}

.content{
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 2s ease-in-out;
    position: absolute;
    aspect-ratio: auto 720 / 480;
    z-index: 2;
    overflow: hidden;
    width: 720px;
    height: 480px;
    overflow: hidden;
}

img{
    height: 480px;
    aspect-ratio: auto 720 / 480;
    z-index: 10;
}

.scaleImg{
    box-sizing: border-box;
    padding: 10%;
    height: 50%;
    max-height: 50%;
    max-width: 100%;
}

.options{
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 32px;
    z-index: 20;
    width: 720px;
    height: 480px;
    align-items: center;
    justify-content: center;
    aspect-ratio: auto 720 / 480;
}

.keys_left{
    width: 20px;
    height: 20px;
    padding: 0px 0px;
    border: solid aliceblue;
    background-color: #4100b7;
    box-shadow: 0 0 3vh 1.5vh #4100b7;
    border-radius: 24px;
    color: aliceblue;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    transition:1s ease-in-out;
    gap: 8px;
    transform: translateX(-20px);
}

.keys_right{
    width: 20px;
    height: 20px;
    padding: 0px 0px;
    border: solid aliceblue;
    background-color: #4100b7;
    box-shadow: 0 0 3vh 1.5vh #4100b7;
    border-radius: 24px;
    color: aliceblue;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    gap: 8px;
    transition: 1s ease-in-out;
    transform: translateX(20px);
}

.leftMove{
    transform: translateX(-40px);
}

.rightMove{
    transform: translateX(40px);
}

.optionsFullSize{
    height: 200px;
    width: 220px;
}

.instruction{
    height: 200px;
    width: 220px;
    border: solid aliceblue;
    background-color: #4100b7;
    box-shadow: 0 0 3vh 1.5vh #4100b7;
    border-radius: 24px;
    color: aliceblue;
    display: flex;
}

.d_none{
    display: none;
}

.d_none p{
    display: none;
}

p{    
    box-sizing: content-box;
    border: solid aliceblue;
    background-color: #4100b7;
    border-radius: 8px 8px 0 0;
    color: aliceblue;
    margin: 0;
    padding: 0 4px;
    width: fit-content;
    text-align: center;
}

.hud{
    position:absolute;
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 720px;
    height: 480px;
    aspect-ratio: auto 720 / 480;
}

.mute_button{
    display: flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}

.mute_button:hover{
    border: 2px solid aliceblue;
}

.move_buttons{
    display: none;
    width: 40px;
    height: 40px;
}

.left_side{
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.right_side{
    position: absolute;
    display: flex;
    gap: 20px;
    top: 0;
}

button{
    color: aliceblue;
    background-color: #4100b7;
    padding: 8px;
    width: 40px;
    height: 40px;
    border-radius: 20px;
    z-index: 30;
}

@media (pointer: coarse) {
    .hud{
        position:absolute;
        z-index: 20;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 720px;
        height: 480px;
    }

    .move_buttons{
        display: block;
    }

    .left_side{
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    
    .right_side{
        position: relative;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }    
}

.pulse{
    animation: pulse-animation 2s infinite;
}

.pulse:hover{
    animation: pulse-animation 0s;
    border-color: aqua;
    color: aqua;
}

.endGame{
    cursor: pointer;
}

.move_img{
    height: 50px;
    width: 200px;
    z-index: 1;
}

.mute{
    width: 28px;
    height: 28px;
}

.screenButton{
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: aliceblue;
}

.screenButton:hover{
    border: 2px solid aliceblue;
}

.move_keys{
    display: flex;
    box-sizing: border-box;
    justify-content: center;
    gap: 8px;
    align-items: center;
    flex-direction: column;    
}

.move_keys_secondary{
    display: flex;
    justify-content: space-around;
    gap: 8px;
    width: 100%;
}

.fullscreen{
    width: 100vw;
    max-width: 100vw!important;
    height: auto !important;
    max-height: 100vh;
    border: none !important;
    border-radius: 0 !important;
    scale: 1 !important;
    aspect-ratio: auto 720/480 !important;
}

@keyframes pulse-animation {
    0% {
        box-shadow: 0 0 0 0 #4100b7;
    }
    100% {
        box-shadow: 0 0 2vh 1vh #4100b7;
    }
}

@media only screen and (max-width: 480px){
    canvas{
        display: none;
    }
    .content{
        display: none;
    }
    .hud{
        display: none;
    }

    .turnDevice{
        padding: 50px;
        box-sizing: border-box;
        display: flex;
        justify-content: center;
        align-items: center;
        position: absolute;
        width: 100vw;
        height: 100vh;
        background-color: black;
        z-index: 10;
        color: aliceblue;
        font-weight: bolder;
        font-size: xxx-large;
        text-align: center;
    }
}

@media only screen and (max-width: 940px){
    canvas{
        scale: 0.8;
    }
    .content{
        scale: 0.8;
    }

    .keys_left{
        scale: 0.8;
    }

    .keys_right{
        scale: 0.8;
    }

    @media only screen and (max-height: 440px){
        canvas{
            scale: 0.7;
        }
        .content{
            scale: 0.7;
        }
    }

    .move_img {
        scale: 0.8;
    }

    .endgame {
        scale: 0.8;
    }

    .rightMove{
        transform: translateX(0);
    }

    .leftMove{
        transform: translateX(0);
    }

    .optionsFullSize {
        padding: 10px;
    }

    h1{
        scale: 0.8;
    }

    h2{
        scale: 0.8;
    }

    h3{
        scale: 0.8;
    }
    .options {
        gap: 12px;
    }
    
    @media only screen and (max-width: 680px){
        canvas{
            scale: 0.5;
        }
        .content{
            scale: 0.5;
        }
        @media only screen and (max-height: 400px){
            canvas{
                scale: 0.7;
            }
            .content{
                scale: 0.7;
            }    
        }
    }
}