* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
    --green-color: #b8fb3c;
    --snake-color: rgb(0, 107, 0);
    --food-color: rgb(255, 97, 247);
    --font:  "Science Gothic", sans-serif;
}
html, body, main {
    width: 100%;
    height: 100%;
}
button {
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
body {
    background: url(./Assets/bg.png);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    color: var(--green-color);
    font-family: var(--font);
}
main {
    position: relative;
}
section {
    height: 100%;
    padding:1.2rem 10rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.infos {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px;
    border: 2px solid rgba(241, 241, 241, 0.712);
    border-radius: 8px;
    background-color: rgba(13, 13, 14, 0.283);
    -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
}
.infos .info {
    padding: 0.5rem;
}
.board {
    width: 100%;
    height: 100%;
    border-radius: 2px;
    flex-grow: 1;
    background-color: rgba(13, 13, 14, 0.283);
    -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    grid-template-rows: repeat(auto-fill, minmax(50px, 1fr));
}
.block {
    border-radius: 2px;
    font-size: 0.7rem;
}
.fill {
    background: var(--snake-color);
}
.food {
    background: var(--food-color);  
    border-radius: 50%;  
}
.model {
    height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(13, 13, 14, 0.283);
    -webkit-backdrop-filter: blur(20px);
          backdrop-filter: blur(20px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 10px;
    z-index: 990;
}
.start-game, 
.game-over {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
.start-game h3 {
    font-size: 2rem;
    text-align: center;
    line-height: 40px;
}
.start-btn,
.restart-btn {
    font-size: 1.5rem; 
    padding: 15px 20px;
    background: rgb(75, 3, 65);
    color: white;
}
.game-over {
    display: none;
}
.game-over h3 {
    font-size: 5rem;
    text-align: center;
    font-weight: 700;
    line-height: 70px;
}
/* working on controllers */
.controllers {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    display: none;
    align-items: center;
    justify-content: center;
}
.controller-btns {
    position: relative;
    width: 250px;
    height: 250px;
    border:2px solid rgb(255, 255, 255);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(13, 13, 14, 0.283);
    -webkit-backdrop-filter: blur(2px);
          backdrop-filter: blur(2px);
}
.controller-btn {
    border-radius: 8px;
    background: transparent;
    position: absolute;
    font-size: 85px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green-color);
    cursor: pointer;
   -webkit-tap-highlight-color: transparent;
    user-select: none;
    touch-action: manipulation;
}
.head {
    border-radius: 50%;
}
.up-btn {
    top: 5%;
}
.right-btn {
    right: 5%;
}
.down-btn {
    bottom: 5%;
}
.left-btn {
    left: 5%;
}

@media screen and (max-width: 480px) {
    section {
        padding: 1rem;
    }
    .infos .info {
        font-size: 0.6rem;
    }
    .board {
        height: 50%;
        flex-grow: unset;
    }
    .controllers {
        display: flex;
    }
    .up-btn, .down-btn {
       width: 75px;
       height: 75px;
     }
    .left-btn, .right-btn {
       width: 85px;
       height: 75px;
    }
}

@media (min-width: 480px) and (max-width: 800px) {
    section {
        padding: 1.5rem;
    }
    .infos .info {
        font-size: 0.6rem;
    }
    .board {
        height: 50%;
        flex-grow: unset;
    }
    .controllers {
        display: flex;
    }
    .controller-btns {
        width: 220px;
        height: 220px;
    }
    .controller-btn {
        font-size: 60px;
    }
    .up-btn, .down-btn {
        width: 60px;
        height: 70px; 
     }
    .left-btn, .right-btn {
       width: 73px;
       height: 60px;
    } 
}