/*------------------------------Global CSS--------------------------------*/

* {
    font-family: 'Zabars', sans-serif;
}

.d-none {
    display: none;
}

body {
    height: 100vh;
    margin: 0;
    background-image: url(img/10_specific_images/desert-bg.jpg);
    background-position: top;
    background-repeat: no-repeat;
    background-size: cover;
    backdrop-filter: blur(10px);
}

h1 {
    display: flex;
    justify-content: center;
    color: white;
    font-size: 100px;
    letter-spacing: 8px;
    margin-block-end: 0;
    text-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
    position: absolute;
    left: 50%;
    transform: translate(-50%);
    width: 100%;
}

.setOpacity1 {
    opacity: 1;
}


.start-end-screen-img {
    position: relative;
    width: 720px;
    aspect-ratio: 3 / 2;
    border-radius: 16px;
}

/*------------------------------Mobile movement--------------------------------*/
.mobile-movement {
    display: none;
    align-items: center;
    justify-content: space-between;
    position: relative;
    top: 42%;
    width: 100%;
    aspect-ratio: 3 / 2;
    opacity: 0;
}

.action-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-movement-buttons {
    height: 60px;
    width: 60px;
    background-color: white;
    border-radius: 13px;
    margin: 0 14px;
}

.bottle-size {
    width: 6vw;
    height: 6vw;
    margin-top: 0.6vw;;
    background-color: white;
    border-radius: 12px;
    border: 2px solid black;
    border-bottom: 7px solid black;
    margin-right: 12px;
}

.action-buttons {
    gap: 10px;

}

/*------------------------------Global Overlay--------------------------------*/
#gameOverlay {
    width: 100%;
    aspect-ratio: 3 / 2;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 19;
}

.fullscreen-icon {
    position: absolute;
    top: 10px;
    right: 5px;
    height: 24px;
    width: 24px;
    background-color: transparent;
    border: none;
    color: white;
    font-size: 46px;
    font-family: 'Zabars', sans-serif;
    letter-spacing: 3px;
    padding: 2px 12px;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: 0.1s all ease-in-out;
    z-index: 1;
}

.audio-off-icon {
    position: absolute;
    top: 10px;
    right: 40px;
    height: 24px;
    width: 24px;
    background-color: transparent;
    border: none;
    color: white;
    font-size: 46px;
    font-family: 'Zabars', sans-serif;
    letter-spacing: 3px;
    padding: 2px 12px;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: 0.1s all ease-in-out;
    z-index: 1;
}

.controlls-icon {
    position: absolute;
    top: 10px;
    right: 80px;
    height: 24px;
    width: 24px;
    background-color: transparent;
    border: none;
    color: white;
    font-size: 46px;
    font-family: 'Zabars', sans-serif;
    letter-spacing: 3px;
    padding: 2px 12px;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: 0.1s all ease-in-out;
    z-index: 1; 
    user-select: none;
    -moz-user-select: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.fullscreen-icon:hover,
.audio-off-icon:hover,
.controlls-icon:hover {
    transform: scale(1.1);
}

#rotate-device {
    z-index: 30;
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    flex-direction: column;
    align-items: center;
    z-index: 50;
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}


#rotate-device-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    background-color: transparent;
    border-radius: 20px;
    color: white;
    flex-direction: column;
    align-items: center;
    z-index: 50;
}

/*------------------------------Controlls--------------------------------*/

#controlls {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 90%;
    background-image: url(img/10_specific_images/controlls-bg.png);
    background-position: left;
    border-radius: 20px;
    color: white;
    flex-direction: column;
    align-items: center;
    z-index: 50;
}

#controlls h2 {
    margin-block-start: 0.5em;
    margin-block-end: 0.2em;
    font-size: 50px;
    text-decoration: underline;
    text-underline-offset: 4px;
    letter-spacing: 2px;
}

#controlls h3 {
    margin-block-start: 0em;
    margin-block-end: 0em;
    font-size: 30px;
    text-decoration: underline;
    text-underline-offset: 4px;
    letter-spacing: 2px;
}

.controlls-text {
    font-size: 30px;
    letter-spacing: 2px;
    margin: 8px 0;
}

#controlls td {
    padding: 6px 30px;
}

.controlls-text td:nth-child(2) {
    text-align: right;
    text-decoration: underline;
}

.mission {
    padding: 0 30px;
    font-size: 20px;
    width: 60%;
}

#close-controlls {
    position: absolute;
    top: 10px;
    right: 10px;
    height: 24px;
    width: 24px;
    background-color: transparent;
    border: none;
    color: white;
    font-size: 46px;
    font-family: 'Zabars', sans-serif;
    letter-spacing: 3px;
    padding: 2px 12px;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: 0.1s all ease-in-out;
}

/*-------------------------------Main-Content-------------------------------*/

canvas {
    background-color: black;
    display: none;
    border-radius: 16px;
}

#content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 720px;
    height: 480px;
    border-radius: 16px;
    box-shadow: rgba(0, 0, 0, .2) 0 3px 5px -1px,rgba(0, 0, 0, .14) 0 6px 10px 0,rgba(0, 0, 0, .12) 0 1px 18px 0;
}

/*------------------------------Start Screen--------------------------------*/

#startscreen {
    width: 100%;
    height: 100%;
    position: relative;
}

.game-start-button {
    z-index: 20;
    position: absolute;
    top: 18%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: transparent;
    border: none;
    color: white;
    font-size: 40px;
    font-family: 'Zabars', sans-serif;
    text-decoration: underline;
    text-underline-offset: 4px;
    padding: 4px 16px 12px 16px;
    text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.8);
    cursor: pointer;
    transition: 0.1s all ease-in-out;
}

.game-start-button:hover {
    font-size: 42px;
}

.start-sign {
    position: absolute;
    top: -0.5%;
    left: 50%;
    transform: translate(-50%);
    width: 210px;
}

/*------------------------------End Screen--------------------------------*/

#endscreen {
    width: 720px;
    aspect-ratio: 3 / 2;
    position: absolute;
}

#endscreen button {
    position: absolute;
    top: 18%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: transparent;
    border: none;
    color: white;
    font-size: 46px;
    font-family: 'Zabars', sans-serif;
    letter-spacing: 3px;
    padding: 2px 12px;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: 0.1s all ease-in-out;
    z-index: 20;
}

#endscreen button:hover {
    font-size: 50px;
    box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.5);
    border-radius: 20px;
}



@media only screen and (max-width: 720px) {

    h1 {
        display: none;
    }

    #content {
        width: 100%;
        height: unset;
    }

    .start-end-screen-img {
        width: 100%;
    }

    #fullscreen {
        width: 100%;
    }

    #startscreen {
        width: 100%;
    }

    #endscreen {
        width: 100%;
    }


    #controlls {
        width: 100%;
    }

    canvas {
        width: 100%;
    }

    .start-sign {
        width: 29vw;
    }

    .game-start-button {
        top: 12vw;
        font-size: 6vw;
        padding: 1vw 1vw 2vw 1vw;
    }

    .game-start-button:hover {
        font-size: 7vw;
    }

    #endscreen button {
        font-size: 6vw;
    }

    #endscreen button:hover {
        font-size: 7vw;
    }

    .fullscreen-icon,
    .audio-off-icon,
    .controlls-icon {
        width: 4vw;
        height: 4vw;
    }

    .mobile-movement {
        display: flex;
    }


    .mobile-movement img {
        width: 6vw;
        height: 6vw;
        border-radius: 1.3vw;
    }

    .bottle-size {
        width: 5.3vw!important;
        height: 4.7vw!important;
        margin-top: 0.6vw;;
    }

    #rotate-device {
        display: block;
    }
}

@media only screen and (max-height: 480px) {
    #content {
        height: 100vh;
        aspect-ratio: 3 / 2;
        width: 100%;
    }

    .start-end-screen-img {
        height: 100vh;
        aspect-ratio: 3 / 2;
        width: 100%;
    }

    #fullscreen {
        height: 100vh;
        aspect-ratio: 3 / 2;
        width: 100%;
    }

    #startscreen {
        height: 100vh;
        aspect-ratio: 3 / 2;
        width: 100%;
    }

    #endscreen {
        height: 100vh;
        aspect-ratio: 3 / 2;
        width: 100%;
    }

    canvas {
        height: 100vh;
        aspect-ratio: 3 / 2;
        width: 100%;
    }

    h1 {
        display: none;
    }

    .mobile-movement {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100%;
        height: 100%;
        align-items: end;
        display: flex;
    }

    .action-buttons {
        margin-bottom: 4px;
        gap: 0px;
    }

    #gameOverlay {
        width: 100%;
        height: 100%;
    }

    .start-sign {
        width: 42vh;
    }

    .game-start-button {
        top: 17vh;
        font-size: 8vh;
        padding: 1vh 1vh 2vh 1vh;
    }

    #rotate-device {
        display: none;
    }
}

@media all and (display-mode: fullscreen) {
    .start-end-screen-img {
        width: 100%;
        height: 100%;
    }

    canvas {
        width: 100%;
        height: 100%;
    }

    .start-end-screen-img {
        width: 100%;
        height: 100%;
    }

    #endscreen {
        width: 100%;
        height: 100%;
    }

    .game-start-button {
        top: 8%;
    }

    .fullscreen-icon,
    .audio-off-icon,
    .controlls-icon {
        width: 4vw;
        height: 4vw;
        top: 4%;
    }

    .fullscreen-icon {
        right: 2%;
    }
    
    .audio-off-icon {
        right: 7%;
    }
    
    .controlls-icon {
        right: 12%;
    }
    
}