body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0;
  background-color: #f0f0f0;
  font-family: Arial, sans-serif;
}

.container {
  text-align: center;
  width: 100%;
  max-width: 960px; /* Limit the maximum width of the container */
  padding: 20px;
  box-sizing: border-box; /* Ensures that borders and padding are included in the element's dimensions, preventing layout issues. */
}

.header-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

#grid-container {
  display: grid;
  width: 100%; /* Make the grid container responsive */
  aspect-ratio: 1 / 1; /* Ensure the grid remains square, regardless of its width */
  border: 1px solid #000;
  margin-top: 20px;
}

.grid-square {
  box-sizing: border-box;
  border: 1px solid #ddd;
  transition: background-color 0.3s ease;
}

button {
  font-size: 16px;
  font-weight: 700;
  padding: 10px 20px;
  cursor: pointer;
}

@media only screen and (max-width: 380px) {
  .header-container {
    justify-content: center;
  }
}
