@import url('https://fonts.googleapis.com/css2?family=Prosto+One&display=swap');

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

body {
  font-family: 'Prosto One', cursive;
  background-color: #f3f3f3;
}

.snake-game {
  text-align: center;
  padding-top: 20px;
}

#board {
  border-radius: 1rem;
  background: #cd853f;
  width: 75vmin;
  height: 75vmin;
  border: 2px solid black;
  display: grid;
  grid-template-rows: repeat(18, 1fr);
  grid-template-columns: repeat(18, 1fr);
}

.head {
  background: #ffcd6e;
  border: 4px solid white;
  border-radius: 45%;
}

.snake {
  background: #fffbaa;
  border-radius: 45%;
  border: 1px solid white;
}

.food {
  background: #8b491c;
  border-radius: 8px;
}

button {
  margin-bottom: 10px;
  padding: 0.5rem 1rem;
  font-size: 1.2rem;
  font-family: 'Prosto One', cursive;
  border-radius: 0.6rem;
  background-color: #ffcd6e;
  border: 2px solid white;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

button:hover {
  background-color: #8b491c;
  color: white;
}

#scoreBox,
#HiScore {
  margin: 10px 0;
  border-radius: 1rem;
  border: 2px solid #9e9e9e;
  font-size: 1.5rem;
  font-family: 'Prosto One', cursive;
  padding: 8px 16px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  #board {
    width: 85vmin;
    height: 85vmin;
  }

  button {
    font-size: 1rem;
    padding: 0.4rem 0.8rem;
    margin-bottom: 8px;
  }

  #scoreBox,
  #HiScore {
    font-size: 1.2rem;
    padding: 6px 12px;
    margin: 8px 0;
  }

  .instructions {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
  }

  #board {
    margin-top: 40px;
  }

  .game-section {
    width: 100%;
  }
}

/* Larger screen adjustments */
@media (min-width: 1024px) {
  #board {
    width: 60vmin;
    height: 60vmin;
  }

  .stats-section {
    width: 30%;
  }

  button {
    padding: 0.6rem 1.2rem;
  }
}