* {
    padding: 0;
    margin: 0;
    font-family: monospace;
    box-sizing: border-box;
    
}

.body {
    background: #1a1a2e;;
    min-height: 100vh;
    background-size: 100vw 100vh;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}
#scoreBox{
    width: 50%;
}
#HighScoreBox{
    width: 50%;
}
#board {
    background: linear-gradient(rgb(196, 245, 196), rgb(215, 170, 231));
    width: 90vmin;
    height: 92vmin;
    border: 2px solid black;
    display: grid;
    margin: 0 auto;
    grid-template-rows: repeat(18, 1fr);
    grid-template-columns: repeat(18, 1fr);
}

.container {
    width: 90%;
    height: fit-content;
    overflow: hidden;
}

.buttons {
    /* z-index: 10;
    color: green; 
    display: none;
    margin: 1em auto;
    position: absolute;
    left: 50%;
    top: 80%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1em;*/
    display: grid;
    width: 0;
    grid-template-rows: repeat(1fr,2fr,1fr);
    gap: 0px;
    justify-content: center;
    box-sizing:unset;
    
    margin: 0;
    
}
.tog{
    margin-left: 14%;
    display: flex;
    gap: 24%;
}
#up,
#down,
#right,
#left {
    /* padding-left: 50px; */
    
    width: 15%;
}
#up{
    transform:  scale(1.4);
    margin-left: 30%;
}
#down {
    margin-left: 30%;
    transform: rotateX(180deg) scale(1.4);
}

#right {
    transform: rotateZ(90deg) scale(1.6);
    
}

#left {
    transform: rotateZ(-90deg) scale(1.6);
    
}

.scores {
    width: 90vmin;
    margin: 0 auto;
    display: flex;
    font-size: 2rem;
    /* gap: 23%; */
    font-weight: 800;
    background: #9af97d;
    padding: 5px;
    border: 2px solid black;
    text-align: center;
}

.head {
    background: url(head.svg);
    background-size: cover;
}

.food {
    background: url(apple.svg) no-repeat;
    transform: scale(0.78);
    border-radius: 12px;
}

.snake {
    border-radius: 10px;
    border: 5px solid black;
    background-size: cover;
    background: url(snake.svg);
}

/* Media query for max-width 600px */
@media (max-width: 487px){
    .scores{
        font-size: 1.4em;
    }
    .body{
        width: 100vw;
        height: 100vw;
        display: block;
    }
    .buttons{
        width: 100vw;
        margin: 8%;
        gap: 10px;
    }
    #board{
        width: 100vmin;
        
    }
    .container,
    .buttons,
    .scores{
        /* background-size: 100% 100%; */
        width: 100vw;
    }
}
