
*{
    padding: 0;
    margin: 0;
}

.body{
    background: url("../img/ak.jpeg"); 
    min-height: 100vh;
    background-size: 100vw 100vh;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
}


#highScoreBox {
    padding: 0px 8px;
    position: absolute;
    background: linear-gradient(rgb(2, 204, 2), rgb(75, 219, 72));
    border-radius: 5px;
    color: rgb(255, 255, 255);
    top: 5px;
    right: 5px; /* Position it at the top-right corner */
    font-size: 26px;
    font-weight: bold;
    font-family: 'New Tegomin', serif;
}



#scoreBox{
    padding: 0px 8px;
    border-radius: 6px;
    position: absolute;
    background: linear-gradient(rgb(2, 204, 2), rgb(75, 219, 72));
    color: rgb(255, 255, 255);
    top: 5px;
    left: 5px;
    font-size: 30px;
    font-weight: bold;
    font-family: 'New Tegomin', serif;
}

#buttons{
    position: fixed;
    color: white;
    top: 652px;
    left: 38px;
    font-size: 40px;
    font-weight: bold;
    font-family: 'New Tegomin', serif;
}


#upButton{
    padding: 10px 33px;
    background-color: #0df015;
    color: white;
    text-align: center;
    font-size: 16px;
    margin: 10px 110px;
    cursor: pointer;
}


#downButton{
    padding: 10px 22px;
    background-color: #0df015;
    color: white;
    text-align: left;
    margin: 10px 110px;
    font-size: 16px;
    cursor: pointer;
}

#leftButton{
    padding: 10px 29px;
    background-color: #0df015;
    color: white;
    text-align: center;
    font-size: 16px;
    margin: 1px 13px;
    cursor: pointer;
}

#rightButton{
    padding: 10px 23px;
    background-color: #0df015;
    color: white;
    margin-left: 85px;
    text-align: right;
    font-size: 16px;
    cursor: pointer;
}


#board{
    background: linear-gradient(rgb(170, 236, 170), rgb(236, 236, 167));
    width: 90vmin;
    height: 90vmin;
    border: 2px solid black;
    display: grid;
    grid-template-rows: repeat(18, 1fr);
    grid-template-columns: repeat(18, 1fr);
}

.head{
    background: linear-gradient(rgb(218, 28, 28), rgb(221, 24, 10));
    border: 1px solid #220422; 
    transform: scale(1.1);
    border-radius: 8px;
}

.snake{
    background: linear-gradient(rgb(23, 224, 39), rgb(199, 233, 5));
    border: .25vmin solid rgb(5, 5, 5);
    border-radius: 7px;
}

.food{
    background: linear-gradient(rgb(243, 140, 5), rgb(211, 233, 10));
    border: .25vmin solid black;
    border-radius: 7px;
}

/* Style for the game stop modal and overlay */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #373482;
    padding: 30px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

#restartButton {
    background-color: #28a745;
    color: rgb(254, 254, 254);
    border: none;
    padding: 10px 20px;
    margin-top: 10px;
    cursor: pointer;
}

#restartButton:hover {
    background-color: #218838;
}

#finalScore {
    color: whitesmoke;
}

h2 {
    color: whitesmoke;
    font-size: 24px;
    margin-bottom: 10px;
}

button {
    padding: 10px 20px;
    background: #008CBA;
    color: #fff;
    border: 2px solid greenyellow;
    cursor: pointer;
}

/* Style for the resume button */
button#resumeButton {
    background: #4CAF50;
}

button:hover {
    background: #005F77;
}

/* Media queries for responsiveness */
@media (max-width: 768px) {
    #board {
        width: 93vmin;
        height: 107vmin;
    }

    #buttons {
        gap: 0.5em;
        position: fixed;
        top: 615px;
        justify-content: center;
    }

    button {
        font-size: 1em;
        
    }
}
@media (max-width: 480px) {
    #scoreBox {
        font-size: 1.7em;
    }

    #buttons {
        font-size: 2.2em;
    }

    button {
        font-size: 1em;
    }
}
