/* Reset default padding and margin
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

/* Body styling */
body {
    overflow: hidden;
    font-family: Arial, sans-serif;
    background: url('img.jpg') no-repeat center center fixed;
    background-size: cover;
}

/* Main container */
.body {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

/* Game board */
#board {
    background: linear-gradient(rgb(204, 230, 204), rgb(216, 216, 75));
    width: 90vmin;
    height: 85vmin;
    border: 2px solid black;
    border-radius: 5px;
    display: grid;
    grid-template-rows: repeat(18, 1fr);
    grid-template-columns: repeat(18, 1fr);
}

/* Snake head */
.head {
    background-color: red;
    border: 2px solid white;
    border-radius: 8px;
}

/* Snake body */
.snake {
    background-color: purple;
    border: 2px solid white;
    border-radius: 12px;
}

/* Food */
.food {
    background: linear-gradient(red, purple);
    border: 2px solid white;
    border-radius: 8px;
}

/* Control buttons */
.controls {
    display: flex;
    gap: 10px;
}

.controls button {
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border: 2px solid black;
    border-radius: 8px;
    background-color: #f0f0f0;
    transition: 0.2s;
}

.controls button:hover {
    background-color: #ddd;
} 
.game-over {
    position: absolute;
    top: 40%;
    left: 40%;
    transform: translate(-30%, -35%);
    font-size: 3rem;
    font-weight: bold;
    color: rgb(255, 51, 0);
    text-shadow: 2px 2px black;
    z-index: 0;
}