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

html, body{
    height: 100%;
    width: 100%;

} 

:root{
    /* Background-Color */
    --bg-primary-color: #0E0E0E; 
    --bg-button-color: rgb(5, 174, 146) ;


    /* Text-Color */
    --primary-text-color: rgb(225, 224, 224) ;
    --bg-snake-color: wheat ;
    --bg-food-color: rgb(210, 38, 72) ;


    /* Spacing Variables */
    --space-xs : 4px ;
    --space-sm : 8px ;
    --space-md : 16px ;
    --space-lg : 24px ;
    --space-xl : 32px ;
    --space-2xl : 40px ;
    --space-3xl : 48px ;





    /* Border Color */
    --border-primary-color: rgb(74, 74, 74);





    /* Border Radius */
    --border-radius-xs : 4px ;
    --border-radius-sm : 8px ;
    --border-radius-md : 12px ;
    --border-radius-lg : 16px ;
    --border-radius-xl : 20px ;
    --border-radius-2xl : 24px ;

}


html{


    background-color: var(--bg-primary-color);
    color: var(--primary-text-color );
    font-family: Arial, Helvetica, sans-serif;


}

body main{
    width: 100%;
    height: 100%;
}

main .modal{
    height: 100vh;
    width: 100vw;
    position: fixed;
    backdrop-filter: blur(3px);


    display: flex;
    align-items: center;
    justify-content: center;

}


.modal .start-game{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;


    /* justify-content: ; */
}
.modal .end-game{
    display: none;
    align-items: center;
    flex-direction: column;
    gap: 20px;


    /* justify-content: ; */
}

.modal .start-game h3{
    font-size: 50px;

}
.modal .end-game h3{
    font-size: 70px;

}
.modal .end-game i{
    font-size: 100px;

}

.modal .end-game .btn-restart{
    background-color:rgb(69, 162, 205) ;

}

.modal .start-game .btn{
    height: 60px;
    width: 200px;
    background-color: var(--bg-button-color);
    border: none;
    border-radius: var(--border-radius-lg);
    font-size: 20px;
    color: rgb(245, 244, 242);
    cursor: pointer;

    transition: all 0.25s ease;
}

.btn:hover{
    transform: scale(1.05);
}
.modal .end-game .btn-restart{
    height: 60px;
    width: 200px;
    background-color: rgb(69, 162, 205);
    border: none;
    border-radius: var(--border-radius-lg);
    font-size: 20px;
    color: rgb(245, 244, 242);
    cursor: pointer;

    transition: all 0.25s ease;
}

.btn:hover{
    transform: scale(1.05);
}
.modal .end-game .btn-restart{
    background-color:rgb(69, 162, 205) ;

}

section{
    height: 100%;
    width: 100%;
    padding: var(--space-xl); 
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);



}


section .infos{

    display: flex;
    justify-content: space-around ;

    /* border-bottom: 2px solid salmon ; */


}

section .infos .info{
    border: 1px solid var(--border-primary-color);
    padding: var(--space-md );
    border-radius: var(--border-radius-md);

    font-weight: 100;
    font-size: 20px;
}


section  .board{

    flex-grow: 1;
    border: 1px solid var(--border-primary-color);
    display: grid;
    grid-template-columns: repeat(auto-fill , minmax(50px , 1fr));
    grid-template-rows: repeat(auto-fill , minmax(50px , 1fr));
}


.board .block{
    border: .1px solid var(--border-primary-color);

}

.fill{
    background-color: var(--bg-snake-color);
}
.food{
    background-color: var(--bg-food-color);
}






@media (max-width: 1024px) {
    .modal .start-game h3 {
        font-size: 36px;
        text-align: center;
    }

    .modal .end-game h3 {
        font-size: 48px;
        text-align: center;
    }

    .modal .end-game i {
        font-size: 80px;
    }

    .modal .start-game .btn,
    .modal .end-game .btn-restart {
        height: 55px;
        width: 180px;
        font-size: 18px;
    }
}


@media (max-width: 1024px) {
    section .infos {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    section .infos .info {
        width: 100%;
        text-align: center;
        font-size: 16px;
    }
}