@import url('https://fonts.googleapis.com/css2?family=New+Tegomin&display=swap');

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: relative;
}

#scoreBox, #hiscoreBox {
    font-size: 2rem;
    font-weight: bold;
    font-family: 'New Tegomin', serif;
    color: white;
    text-shadow: 2px 2px 4px #000;
}

#scoreBox {
    position: absolute;
    top: 20px;
    right: 20px;
}

#hiscoreBox {
    position: absolute;
    top: 70px;
    right: 20px;
}

#board {
    background: linear-gradient(rgb(236, 236, 167), rgb(176, 170, 236));
    width: 90vmin;
    height: 90vmin;
    border: 10px solid black;
    display: grid;
    grid-template-rows: repeat(18, 1fr);
    grid-template-columns: repeat(18, 1fr);
    opacity: 0.8;
}

.head {
    background: linear-gradient(rgb(240, 124, 124), rgb(228, 228, 129));
    border: 2px solid rgb(34, 4, 34); 
    transform: scale(1.02);
    border-radius: 9px;
}

.snake {
    background-color: black;
    border: 0.25vmin solid white;
    border-radius: 12px;
}

.food {
    background: linear-gradient(red, black);
    border: 0.25vmin solid black;
    border-radius: 8px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    #scoreBox, #hiscoreBox {
        font-size: 1.5rem;
    }

    #board {
        width: 90vw;
        height: 90vw;
    }
}
