html {
    scroll-behavior: smooth;
    height: 100vh;
}

body {
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-image: url('./img/background.jpg');
    background-position: center;
    margin-top: 100px;
    overflow: hidden;
}

canvas {
    background-color: black;
    z-index: 1;
}

.poster {
    width: 720px;
    height: 480px;
}

.startButton {
    z-index: 15;
}

#startButton {
    width: 400px;
    margin-top: 370px;
    cursor: pointer;
}

#startButton:hover, .soundIcons:hover, .restart:hover {
    filter: drop-shadow(0px 0px 10px black);
}

.title {
    width: 700px;
    position: relative;
    opacity: 0;
}

.iconsBar {
    position: relative;
    display: flex;
    width: 700px;
    z-index: 2;
    margin-top: -483px;
    justify-content: flex-end;
}

.icons {
    width: 30px;
    cursor: pointer;
}

.controllerBar {
    position: relative;
    display: flex;
    width: 700px;
    z-index: 2;
    margin-top: 500px;
    justify-content: space-between;
}

.leftSide {
    display: flex;
    width: 150px;
    justify-content: space-between;
}

.rightSide {
    display: flex;
    width: 210px;
    justify-content: space-between;
}

.controllerButtons {
    height: 70px;
    width: 70px;
}

.pushUp {
    margin-top: -30px;
}

#screen {
    z-index: 1;
    display: flex;
    justify-content: center;
    border-width: 5px;
    margin-top: 120px;
    border-style: solid;
    border-image: linear-gradient(to right, green, white, red) 1;
}

.infoContainer {
    display: none;
    justify-content: center;
    width: 80%;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 8px;
    margin-top: 50px;
    text-align: center;
}

.soundBar {
    display: flex;
    flex-direction: column;
    position: relative;
    margin-top: 295px;
    margin-left: 380px;
    z-index: 35;
    gap: 15px;
}

.soundIcons {
    height: 55px;
    cursor: pointer;
}

.restart {
    width: 300px;
    z-index: 25;
    position: relative;
    cursor: pointer;
}

.gameOver {
    margin-top: -225px;
    margin-left: 150px;
}

.restartSettings {
    margin-top: -90px;
    margin-left: -420px;
    width: 240px;
}

.nextLevel {
    width: 300px;
    z-index: 25;
    position: relative;
    cursor: pointer;
    margin-top: -180px;
    margin-left: 35px;
}

.d-none {
    display: none;
}

.counterValue {
    z-index: 30;
    font-family: 'Berlin Sans FB';
    font-weight: bold;
    filter: drop-shadow(0px 0px 4px black);
}

#countResultCoins {
    position: relative;
    margin-top: -194px;
    margin-left: 237px;
    font-size: 45px;
    color: rgb(255, 174, 0);
}

#countResultLife {
    position: relative;
    margin-top: -90px;
    margin-left: 428px;
    font-size: 45px;
    color: rgb(240, 99, 172);
}

#countResult {
    position: relative;
    margin-top: -33px;
    margin-left: 223px;
    font-size: 60px;
    color: rgb(255, 255, 255);
}

.lastScreenResult {
    margin-top: -135px;
}

.popUp {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 30;
    height: 100vh;
    width: 100%;
    background-color: rgba(255,255,255,0.8);
    text-align: center;
    padding: 45px;
    overflow-x: scroll;
}

.introduction {
    max-width: 80%;
    max-height: 90vh;
    filter:drop-shadow(0px 0px 5px black);
}

.ppContainer {
    width: 90%;
}

header {
    display: flex;
    width: 90%;
    max-width: 1000px;
    justify-content: space-between;
    margin-top: -150px;
    padding: 10px;
    background-color: rgba(255,255,255,0.5);
    border-radius: 5px;
}

header img {
    height: 30px;
    filter: drop-shadow(0px 0px 5px white);
    cursor: pointer;
}

header img:hover {
    filter: drop-shadow(0px 0px 5px black);
}

@media (max-width: 800px) {
    #startImage {
        width: 100%;
        height: auto;
    }

    #screen {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    canvas {
        width: 100%;
        height: auto;
        position: absolute;
        top: 0;
        left: 0;
    }

    .title {
        display: none;
    }

    .title {
        display: none;
    }

    .controllerBar {
        width: 90%;
        position: fixed;
        bottom: 10px;
    }

    .poster {
        width: 100%;
        height: auto;
    }

    .iconsBar {
        width: 95%;
    }

    header img{
        height: 17px;
    }
}

@media (max-height: 500px) {
    body {
        background-image: none;
        background-color: black;
        overflow: visible;
    }

    #startButton {
        margin-top: 0 !important;
        top: 250px;
        position: fixed;
        left: 230px;
    }

    #screen {
        position: fixed;
        top: 0;
        border-width: 0;
        height: 100vh !important;
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        margin-top: 0;
    }

    canvas {
        height: 100vh !important;
        top: 0 !important;
    }

    .controllerBar {
        position: fixed;
        width: 90%;
        z-index: 10;
        bottom: 5px;
    }

    .soundBar {
        position: fixed;
        bottom: 15px;
        gap: 5px;
    }

    .soundIcons {
        height: 45px;
    }

    .title, #fullscreenIcon {
        display: none;
    }

    .iconsBar {
        margin-top: 15px !important;
    }

    .poster {
        height: 100vh;
    }

    .restart {
        position: fixed;
        top: 375px;
    }

    .gameOver {
        margin-top: 0;
        margin-left: 0;
        top: 210px;
        right: 150px;
    }

    .nextLevel {
        margin-top: 0;
        margin-left: 0px;
        position: fixed;
        top: 222px;
    }

    .iconsBar {
        position: fixed;
        margin-top: 0;
        top: 0;
    }

    #countResultCoins {
        position: fixed;
        margin-top: 0;
        margin-left: 0;
        top: 135px;
        left: 390px;
    }

    #countResultLife {
        position: fixed;
        margin-top: 0;
        margin-left: 0;
        top: 135px;
        left: 580px;
    }

    #countResult {
        position: fixed;
        margin-top: 0;
        margin-left: 0;
        top: 275px;
        left: 440px;
    }
}

@media (max-width: 500px) {
    #screen, .controllerBar, #startButton, #counts, header, #restartButton, .soundBar, #iconsBar, .nextLevel {
        display: none;
    }

    body {
        overflow: hidden;
        width: 100%;
        height: 100vh;
    }

    .infoContainer {
        display: block;
    }
}