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

body {
  background-color: #393b40;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column-reverse;
  position: relative;
}
#loader {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  z-index: 99;
  background-color: #000000;
  background-image: url("./snake/bg.png");
  background-position: center;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  transition: all 0.25s;
}
#restart {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  z-index: 100;
  background-color: #00000092;
  background-position: center;
  background-size: cover;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
  text-align: center;
}

#restart h1{
  margin-bottom: 20px;
  text-align: center;
  color:white
}

#restart #button{
  padding:12px 20px;
  background-color: #363535;
  border: 2px solid white;
  color: white;
}

#config {
  padding: 20px;
  margin-right: 5vw;
  min-width: 300px;
  width: 30%;
  height: 80vh;
  background-color: #000000;
  box-shadow: 0 0 10px rgb(51, 51, 51);
  gap: 10px;
}

#config input{
  width: 100%;
  height: 40px;
  background-color: #363535;
  border: 2px transparent solid;
  color: rgb(12, 173, 12);
  padding: 5px 10px;
  margin-bottom: 20px;

}

#start ,#run ,#start2,#reset{
  padding: 15px 37px;
  background-color: rgb(12, 173, 12);
  color: #000000;
  border: none;
}
#start:hover{
  background-color: rgb(12, 143, 12);
}

#config p{
  color: rgb(12, 173, 12);
  padding: 2px 10px;

}
#config a{
  color: rgb(12, 173, 12);
  padding: 2px 10px;
  cursor: pointer;
}

#config div{
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  width: 190px;
  height: 31%;
  margin-top: 20px;
}

#snake, #snake_body , #food{
  overflow: hidden;
  border-radius: 10px;
  background-position: center;
  background-size: contain;
  background-repeat: space;
  height: 30px;
  width: 30px;
}

#snake{
  background-size: cover;
  background-image: url("./snake/sn.png");
}

#snake_body{
  background-size: cover;
  background-image: url("./snake/bd.png");
}

#food{
  background-color: red;
  border-radius: 21px;
}

.hide_adv{
  display: none;
}
.hide_{
  display: none;
}
/* 
#filter {
  display: none;
  z-index: 101;
  position: absolute;
  inset: 0;
  background-color: #000000;
  padding: 20px;
  color: green;
  text-align: center;
  
}

#filter h1{
  width: 100%;
  color: green;
  text-align: center;
  display: block;
} */

#playstation {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
#score {
  position: absolute;
  top: 5px;
  left: 5px;
  height: 200px;
  width: 200px;
  background-color: rgb(0, 0, 0);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
  gap: 7px;
}
#score h1 {
  color: rgb(0, 138, 0);
  font-size: 47px;
  /* display: none */
  transition: 0.3s;
}

#highest {
  background-color: rgb(38, 43, 48);
  height: 60%;
  width: 90%;
  border-radius: 17px;
  overflow: hidden;
  padding: 12px;
  background-color: greenyellow;
  transition: 0.3s;
}
#highest h4 {
  display: block;
}
#highest h1 {
  display: block;
  margin-top: 5%;
  color: rgb(0, 138, 0);
  width: 100%;
  text-align: center;
  transition: 0.25s;
}

#board {
  background-color: black;
  width: 97.5vmin;
  height: 97.5vmin;
  max-height: 97.5vh;
  min-height: 250px;
  min-width: 300px;
  border-radius: 20px;
  display: grid;
  grid-template-rows: repeat(21, 1fr);
  grid-template-columns: repeat(21, 1fr);
}
.snake {
  background: greenyellow;
  background-image: url("./snake/bd.png");
  background-position: center;
  background-size: cover;
  border: 2px solid black;
  border-radius: 5px;
}
.snake:first-child {
  background-image: url("./snake/sn.png");

  background-position: center;
  background-size: contain;

  border: 2px solid black;
  border-radius: 5px;
  z-index: 2;
}
.food {
  background-color: rgb(255, 0, 0);
  border: 2px solid black;
  border-radius: 35%;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
}

/* @media screen and (max-width: 1000px) {
  #filter{
    display: flex;
    align-items: center;
    justify-content: center;
  }
} */
@media screen and (max-width: 800px) {
  #loader {
    justify-content: center;
  }

  

  #config {
    border-radius: 10px;
    margin-right: 0vw;
    
  }
}
@media screen and (max-width: 1110px) {


  #score{
    display: none;
  }

  
}



#controls{
  margin-top: 30px;
  position: absolute;
  bottom: 10px;
  }
  


  
.btn{
  padding: 5px 20px;
  border-radius: 5px;
  border: none;
  box-shadow: 0 0 20px black;
  transition: all .4s;
  text-transform: uppercase;
  font-weight: 800;
  cursor: pointer;
  font-size: 20px;

}

.btn:hover{
  background-color: rgb(200, 250, 200);
}
