body {
  display: flex;
  flex-direction: column;
  justify-content: top;
  align-items: center;
  height: 100dvh;
  width: 100dvw;
  background-color: #f0f0f0;
  margin: 0;
}
canvas {
  border: 1px solid #000;
  background-color: #fff;
}
.controls {
  position: absolute;
  display: flex;
  align-items: center;
  /* margin-top: 30px; */
  /* justify-content: center; */
  bottom: 20px;
}
.button {
  background-color: #4caf50;
  color: white;
  border: none;
  padding: 10px;
  margin: 7px;
  cursor: pointer;
  border-radius: 5px;
  font-size: 14px;
}
.none {
  display: none;
  background-color: transparent;
}
img {
  display: none;
}
h3 #foodCount {
  font-size: 20px;
}
.paused,
.game-over {
  position: absolute;
  top: 0;
  left: 0;
  width: 100dvw;
  height: 100dvh;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 25px;
  display: none; /* Initially hidden */
  flex-direction: column;
  z-index: 2;
}
.game-over {
  z-index: 4;
}
#pause {
  margin: 0;
  z-index: 3;
}
#container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 40dvw;
}
canvas {
  width: 40dvw;
  z-index: 2;
}
@media (max-width: 430px) {
  .button {
    font-size: 10px; /* Smaller font size for mobile */
    padding: 5px; /* Smaller padding */
  }
  #foodCount {
    font-size: 12px; /* Smaller food count font size */
  }
  #snakeGame {
    width: 90dvw;
  }
  #container {
    width: 90dvw;
  }
  .none {
    display: block;
  }
  img {
    display: block;
  }
  .side {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .paused,
  .game-over {
    font-size: 18px;
  }
}

@media (min-width: 431px) and (max-width: 884px) {
  .button {
    font-size: 16px; /* Smaller font size for mobile */
    padding: 8px; /* Smaller padding */
  }
  #foodCount {
    font-size: 18px; /* Smaller food count font size */
  }
  #snakeGame {
    width: 90dvw;
  }
  #container {
    width: 90dvw;
  }
  .none {
    display: block;
  }
  img {
    display: block;
  }
  .side {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .paused,
  .game-over {
    font-size: 23.5px;
  }
  #up {
    margin-bottom: 20px;
  }
  #down {
    margin-top: 20px;
  }
}
