* {
    box-sizing: border-box;
}

body{
    width: 100dvw;
    height: 100vh;
    background-color: rgb(255, 218, 10);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

section{
    margin: 0 auto;
    position: relative;
}

#game{
    box-shadow: 0px 0px 50px 20px rgba(0, 0, 0, 40%);
}

#score-board{
    display: flex;
    flex-wrap: wrap;
    width: 450px;
    height: 100px;
    background-color: black;
    color: white;
    margin: 0 auto;
    padding: 10px;
}


#score-board > *{
    margin: 0;
    flex-basis: 50%;
    font-family: "Tiny5";
}

#game-grid{
    display: flex;
    flex-wrap: wrap;
    width: 450px;
    height: 570px;
}

#lives{
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: black;
    width: 450px;
    height: 100px;
    padding-left: 10px;
}

#game-over{
    position: fixed;
    display: none;
    font-family: 'Tiny5';
    color: red;
    font-size: 30px;
}

#game-over.show{
    display: block;
}

#start{
    position: fixed;
    display: flex;
    height: 60px;
    background-color: rgb(255, 218, 10);
    border-radius: 5px;
    box-shadow: 0px 0px 3px 3px red;
    align-items: center;
    padding-left: 5px;
    padding-right: 5px;
    font-family: "Tiny5";
    font-size: 20px;
}

#start.hide{
    display: none;
}

#start:hover{
    cursor: pointer;
}

.life{
    width: 50px;
    height: 50px;
    background-image: url(../images/lives.png);
    background-position: center;
    background-size: cover;
}

.cell{
    width: 30px;
    height: 30px;
    color: white;
    position: relative;
}

.wall{
    background-color: blue;
}

.open{
    background-color: black;
}

.pacdot{
    background-image: url(../images/pacdot.png);
}

.power-pellet{
    background-image: url(../images/powerpellet.png);
    animation: blink .5s infinite;
}

@keyframes blink{
    1%{
        background-image: none;
    }
}

.pacman::after{
    content: '';
    position: absolute;
    inset: 0;
    background-image: url(../images/pacman\ eating.webp);
    background-position: center;
    background-size: cover;
    animation: none;
    /* transform: rotate(180deg); */
}

.pacman.up::after{
    transform: rotate(-90deg);
}
.pacman.down::after{
    transform: rotate(90deg);
}
.pacman.right::after{
    transform: none;
}
.pacman.left::after{
    transform: rotate(180deg);
}

.red{
    background-image: url(../images/redleft.gif);
    background-position: center;
    background-size:cover;
    animation: none;

}

.blue{
    background-image: url(../images/blueghost.gif);
    background-position: center;
    background-size:cover;
    animation: none;

}

.pink{
    background-image: url(../images/pinkghost.gif);
    background-position: center;
    background-size:cover;
    animation: none;

}

.orange{
    background-image: url(../images/orangeghost.gif);
    background-position: center;
    background-size:cover;
    animation: none;

}

.frightened{
    background-image: url(../images/frightenedghost.gif);
    background-position: center;
    background-size:cover;
    animation: none;
}
