* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    height: 100vh;
    background: linear-gradient(0deg,
            rgb(0, 255, 255) 50%,
            rgb(2, 0, 143) 100%)
}

#gameCanvas {
    margin-top: 50px;
    box-shadow: 10px 10px 20px black;
    background-color: black;
    border-radius: 5px;
    max-width: 100%;
    max-height: 100vh;
    display: none;
    touch-action: pan-y;
    touch-action: pan-x;
}

#start-screen {
    position: absolute;
    width: 400px;
    top: 42%;
    bottom: 0;
    left: 50%;
    background: url('images/startscreen.png');
    border-radius: 50px;
    background-size: contain;
    background-repeat: no-repeat;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    justify-content: center;
}

h1 {
    position: absolute;
    text-align: center;
    width: 300px;
    font-family: comic sans MS;
    color: yellow;
    text-shadow: 5px 5px 5px black;
    margin-top: -100px;
}

#instructions {
    text-align: center;
    font-family: comic sans MS;
    font-size: 16px;
    color: rgb(163, 0, 0);
    text-shadow: 1px 1px 2px black;
    padding-bottom: 60px;
    margin-top: 350px;
}

#controls-button {
    position: absolute;
    border-radius: 50px;
    padding: 3px;
    width: 90px;
    background: rgb(43, 255, 0);
    text-align: center;
    text-decoration: none;
    text-shadow: 1px 1px 1px black;
    box-shadow: 8px 8px 18px black;
    margin-top: 280px;
    cursor: pointer;
}

.buttons {
    display: block;
    line-height: 50px;
}

#start-button {
    border-style: solid;
    border-width: 2px;
    border-color: red;
    border-radius: 50px;
    padding: 5px;
    width: 150px;
    margin-top: 20px;
    background: blue;
    color: yellow;
    font-weight: 700;
    font-family: comic sans MS;
    text-shadow: 2px 2px 1px black;
    box-shadow: 8px 8px 18px black;
    cursor: pointer;
}

#easy-button-wrapper {
    display: inline-block;
    -webkit-animation: pulsate 2s infinite;
    -moz-animation: pulsate 2s infinite;
    -ms-animation: pulsate 2s infinite;
    -o-animation: pulsate 2s infinite;
    animation: pulsate 2s infinite;
}

#easy-button {
    align-items: center;
    border-style: solid;
    border-width: 2px;
    border-color: red;
    border-radius: 50px;
    padding: 4px;
    padding-left: 20px;
    padding-right: 20px;
    width: 150px;
    background: blue;
    color: rgb(43, 255, 0);
    font-weight: 700;
    font-family: comic sans MS;
    text-shadow: 2px 2px 1px black;
    box-shadow: 8px 8px 18px black;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

@-webkit-keyframes pulsate {
    0% {
        -webkit-transform: scale(1);
        transform: scale(1);
        filter: brightness(100%);
    }

    50% {
        -webkit-transform: scale(1.3);
        transform: scale(1.3);
        filter: brightness(230%);
    }

    100% {
        -webkit-transform: scale(1);
        transform: scale(1);
        filter: brightness(100%);
    }
}

@-moz-keyframes pulsate {
    0% {
        -moz-transform: scale(1);
        transform: scale(1);
        filter: brightness(100%);
    }

    50% {
        -moz-transform: scale(1.1);
        transform: scale(1.1);
        filter: brightness(200%);
    }

    100% {
        -moz-transform: scale(1);
        transform: scale(1);
        filter: brightness(100%);
    }
}

@-ms-keyframes pulsate {
    0% {
        -ms-transform: scale(1);
        transform: scale(1);
        filter: brightness(100%);
    }

    50% {
        -ms-transform: scale(1.1);
        transform: scale(1.1);
        filter: brightness(200%);
    }

    100% {
        -ms-transform: scale(1);
        transform: scale(1);
        filter: brightness(100%);
    }
}

@-o-keyframes pulsate {
    0% {
        -o-transform: scale(1);
        transform: scale(1);
        filter: brightness(100%);
    }

    50% {
        -o-transform: scale(1.1);
        transform: scale(1.1);
        filter: brightness(200%);
    }

    100% {
        -o-transform: scale(1);
        transform: scale(1);
        filter: brightness(100%);
    }
}

#h1-hard {
    color: red;
    margin-top: -50px;
}

#gameover-screen {
    position: absolute;
    width: 300px;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: url('images/sad-pacman.png');
    border-radius: 50px;
    background-size: contain;
    background-repeat: no-repeat;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    justify-content: center;
}

#gameover-title {
    position: absolute;
    text-align: center;
    width: 300px;
    font-family: comic sans MS;
    color: yellow;
    text-shadow: 5px 5px 5px black;
    margin-top: -70px;
}

#gameover-restart-button {
    position: absolute;
    border-radius: 50px;
    padding: 5px;
    width: 200px;
    margin-top: 330px;
    background: blue;
    color: yellow;
    text-shadow: 2px 2px 1px black;
    box-shadow: 8px 8px 18px black;
    cursor: pointer;
}

#win-screen {
    position: absolute;
    width: 300px;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: url('images/happy-pacman.png');
    border-radius: 50px;
    background-size: contain;
    background-repeat: no-repeat;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    justify-content: center;
}

#win-title {
    position: absolute;
    width: 300px;
    font-family: comic sans MS;
    color: yellow;
    text-shadow: 5px 5px 5px black;
    margin-top: -110px;
}

#win-restart-button {
    position: absolute;
    border-radius: 50px;
    padding: 5px;
    width: 200px;
    margin-top: 330px;
    background: blue;
    color: yellow;
    text-shadow: 2px 2px 1px black;
    box-shadow: 8px 8px 18px black;
    cursor: pointer;
}


@media all and (max-width:900px) {

    body {
        height: 900px;
    }

    #start-screen {
        border-radius: 0%;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
        width: 250px;
        margin-top: 20px;
    }

    h1 {
        width: 300px;
        padding-top: 30px;
    }

    #controls-button {
        margin-top: 180px;
    }

    #instructions {
        font-size: 13px;
        margin-top: 220px;
    }

    #gameover-screen {
        width: 200px;
        border-radius: 0%;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
    }

    #gameover-title {
        margin-top: -90px;
    }

    #gameover-restart-button {
        margin-top: 220px;
    }

    #win-screen {
        height: 200px;
        width: 200px;
        border-radius: 0%;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
    }

    #win-title {
        margin-top: -90px;
    }

    #win-restart-button {
        margin-top: 220px;
    }
}

@media all and (max-width: 500px) {

    #start-screen {
        width: 300px;
    }

    h1 {
        width: 300px;
        padding-top: 30px;
    }

    #controls-button {
        margin-top: 200px;
    }

    #instructions {
        font-size: 13px;
        margin-top: 250px;
    }

    #gameover-title {
        margin-top: -100px;
    }
}