* {
    font-family: 'system-ui', 'open-sans';
    color: white;
    font-size: 1.5rem;
    margin: 0;
    text-transform: uppercase;
    -webkit-tap-highlight-color: transparent;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-height: 100vh;
    height: 100vh;
    max-width: 100vw;
    background-image: url('img/3.Background/Layers/5. Water/D1.png');
    background-size: cover;
    background-repeat: no-repeat;
}

#title {
    color: #531A82;
    font-size: 3rem;
    margin: 2rem;
    filter: brightness(1.3) drop-shadow(0 0 10px #fff);
}

.startButton-image {
    height: 70px;
    transition: transform 0.3s ease, filter 0.3s ease;
    z-index: 999;
}

.startButton-image:hover {
    transform: scale(1.05);
    filter: brightness(1.1) drop-shadow(0 0 8px #fff);
}

.keybindings {
    height: 240px;
}

.d-none {
    display: none !important;
}


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

button {
    padding: 5px 10px;
    background-color: #0077CC;
    border: none;
    border-radius: 5px;
    color: white;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s ease;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
}

#musicButton {
    left: 10rem;
}

button:hover {
    background-color: #005FA3;
}

button:active {
    background-color: #003157;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}



#main-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 720px;
}

#start-game {
    padding: 10px 20px;
    font-size: 20px;
    cursor: pointer;
    z-index: 999;
}

#gameOverScreen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    background-image: linear-gradient(#40C5DB90 5%, #35459690 50%, #5a1d9690 90%);
    position: absolute;
    width: 720px;
    height: 100vh;
    z-index: 999;

}

#gameWonScreen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    background-image: linear-gradient(#40C5DB90 5%, #35459690 50%, #5a1d9690 90%);
    width: 720px;
    height: 480px;
    position: absolute;
    z-index: 999;
}

#switchSoundMuteButton {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 10px;
    font-size: 14px;
    background-color: #0000005b;
    border-radius: 50%;
    margin-bottom: 0.5rem;
    transition: background-color 0.3s;
    cursor: pointer;
}

#switchSoundMuteButton.muted {
    background-color: #ff00005b;
}

.tryAgainImage {
    height: 2.5rem;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.tryAgainImage:hover {
    transform: scale(1.05);
    filter: brightness(1.1) drop-shadow(0 0 8px #fff);
}

#gameOverImage {
    height: 3rem;
}

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

#restart {
    cursor: pointer;
}

#restartIfWon {
    cursor: pointer;
    position: absolute;
    top: center;
    margin-bottom: 4rem;
}

.buttonDiv {
    display: flex;
    gap: 2rem;
    position: absolute;
    z-index: 999;
    bottom: calc(50% - 240px);
}

#playButton {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 10px;
    font-size: 14px;
    background-color: #0000005b;
    border-radius: 50%;
    margin-bottom: 0.5rem;
}

.turnDevice {
    position: fixed;
    height: 100vh;
    width: 100vw;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10%;
    top: 0;
    left: 0;
    background-color: rgba(0,0,0,0.8);
    color: white;
    z-index: 999;
}

.turnDevice p {
    text-align: center;
}

.landscapeModeImage {
    width: 70%;
    filter: invert();
}

.mobilePanel {
    position: fixed;
    bottom: 0;
    display: none;
    justify-content: space-between;
    align-items: center;
    width: calc(100vw - 10%);
    margin-bottom: 8px;
    z-index: 0;
    width: 97%;
}

.left {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.4;
}

.left-left {
    display: flex;
    align-items: center;
}

.left-middle {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.left-right {
    display: flex;
    align-items: center;
}

.right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    opacity: 0.8;
}

.arrowKeys-img {
    width: 40px;
    aspect-ratio: 1 / 1;
    filter: invert();
    background-color: #ffffff5b;
    border-radius: 50%;
    padding: 2px;
}

.sword-img{
    width: 55px!important;
}

.icons {
    width: 16px;
    height: 16px;
    filter: invert();
}



/* Smartphones------------*/
@media only screen and (max-width: 720px) {
    canvas {
        max-width: 100vw;
    }
    .buttonDiv {
        position: absolute;
        max-height: min-content;
        margin: unset;
        bottom: 0;
    }

    #main-menu {
        height: 100vh;
        width: 100%;
    }

    #title {
        color: #531A82;
        font-size: 2rem;
        margin: 2rem;
        filter: brightness(1.3) drop-shadow(0 0 10px #fff);
    }

    .keybindings {
        display: none;
    }

    #gameOverImage {
        height: 2rem;
    }

    #gameOverScreen {
        gap: 2rem;
        width: 100%;
        height: 100vh;
    }

    .tryAgainImage {
        height: 2rem;
        transition: transform 0.3s ease, filter 0.3s ease;
    }

    body {
        max-width: 100vw;
        height: 100vh;
    }
}


/* Smartphones------------*/
@media only screen and (max-height: 1050px) {
    .buttonDiv {
        position: absolute;
        max-height: min-content;
        margin: unset;
        bottom: 0;
    }
}

/* Smartphones------------*/
@media only screen and (max-height: 720px) {
    .buttonDiv {
        position: absolute;
        max-height: min-content;
        margin: unset;
        bottom: 0;
    }

    .keybindings {
        display: none;
    }
}


@media only screen and (max-height: 480px) {
    canvas {
        height: 100vh;
    }
    .buttonDiv {
        position: absolute;
        max-height: min-content;
        margin: unset;
        bottom: unset;
        display: flex;
        flex-direction: column;
        right: 0;
        top: 5px;
        gap: 0px;
        margin-right: 5px;
    }
}