@import url('https://fonts.googleapis.com/css2?family=New+Tegomin&display=swap');

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.logo {
    top: 20px;
    left: -20px;
    position: fixed;
    height: 100px;
    width: auto;
}

.body {
    background: url("../img/bg.png"); 
    min-height: 100vh;
    background-size: 100vw 100vh;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
}

#scoreBox {
    position: absolute;
    top: 9px;
    right: 200px;
    font-size: 39px;
    font-weight: bold;
    font-family: 'New Tegomin', serif;
}

#hiscoreBox {
    position: absolute;
    top: 59px;
    right: 140px;
    font-size: 39px;
    font-weight: bold;
    font-family: 'New Tegomin', serif;
}

#board {
    background: linear-gradient(rgb(170, 236, 170), rgb(236, 236, 167));
    width: 90vmin;
    height: 92vmin;
    border: 2px solid black;
    display: grid;
    grid-template-rows: repeat(18, 1fr);
    grid-template-columns: repeat(18, 1fr);
}

.head {
    background: linear-gradient(rgb(4, 180, 27), red);
    border: 2px solid rgb(34, 4, 34); 
    transform: scale(1.02);
    border-radius: 15px;
}

.snake {
    background: linear-gradient(rgb(2, 74, 12), rgb(91, 234, 78));
    border: .25vmin solid black;
    border-radius: 18px;
}

.food {
    background: linear-gradient(red, rgb(196, 42, 68));
    border: .30vmin solid black;
    border-radius: 30px;
}

/* Touch control buttons */
.touch-controls {
    position: fixed;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 10px;
}

.touch-button {
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease;
}

.touch-button:active {
    background-color: rgba(0, 0, 0, 0.9);
}

/* Media queries for responsiveness */
@media (max-width: 768px) {
    #scoreBox, #hiscoreBox {
        font-size: 4vw; /* Increase font size on smaller screens */
    }

    .touch-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    #scoreBox, #hiscoreBox {
        font-size: 6vw; /* Further increase font size on very small screens */
    }

    .touch-button {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}