body {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
    background-color: #f0f0f0;
}

header {
    width: 100%;
    background-color: #fff;
    border-bottom: 2px solid #000;
    text-align: center;
}

#menu {
    margin-top: 0;
}

#background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

#background-svg {
    width: 100%;
    height: 100%;
}

#game-container {
    position: relative;
    width: 820px;
    height: 620px;
    background-color: #d3d3d3;
    border: 2px solid #000;
    margin-top: 2px;
}

.hidden {
    display: none;
}

#player,
.block,
#flag {
    position: absolute;
    width: 50px;
    height: 50px;
}

#player {
    left: 0;
    top: 0;
    width: 70px;
    height: 116px;
    font-size: 75px;
    background-image: url('sprites.png');
    background-size: 350px 232px;
    /* 5 columns * 70px, 2 rows * 116px */
}

.block {
    background-color: brown;
    /* Change block color back to brown */
    transition: transform 0.2s;
    /* Add transition for smooth lifting */
}

#flag {
    left: 300px;
    top: 400px;
    background-color: red;
}

@keyframes walk {
    0% {
        background-position: 0 0;
    }

    25% {
        background-position: -70px 0;
    }

    50% {
        background-position: -140px 0;
        /* background-position: -164px 0; */
    }

    75% {
        background-position: -210px 0;
    }

    100% {
        background-position: -280px 0;
    }
}

@keyframes holdWalk {
    0% {
        background-position: 0 -116px;
    }

    25% {
        background-position: -70px -116px;
    }

    50% {
        background-position: -140px -116px;
    }

    75% {
        background-position: -210px -116px;
    }

    100% {
        background-position: -280px -116px;
    }
}

.standing {
    background-position: 0 0;
}

.holding {
    background-position: 0 -116px;
}

.walking {
    animation: walk 1s steps(1) infinite;
}

.holding-walking {
    animation: holdWalk 1s steps(1) infinite;
}

.rotated {
    transform: scaleX(-1);
}