body {
  background-color: #444;
  font-family: Arial, Helvetica, sans-serif;
  justify-content: space-between;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  touch-action: manipulation;
  -ms-touch-action: manipulation;
}

#grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), var(--cell-size));
  grid-template-rows: repeat(var(--rows), var(--cell-size));
  margin: 0 auto;
}

.cell {
  width: var(--cell-size);
  aspect-ratio: 1 / 1;
  background-color: #777;
  border: 1px solid black;
}

h1 {
  color: chartreuse;
}

/* Increase the D-pad grid size */
#dpad {
  display: grid;
  grid-template-columns: 80px 80px 80px;
  grid-template-rows: 80px 80px 80px;
  gap: 5px;
  justify-content: center;
  align-items: center;
}

#dpad button {
  font-size: 24px;
  padding: 20px;
  width: 100%;
  height: 100%;
}

#buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1em;
  margin: 1em 0;
}

#up {
  grid-column: 2;
  grid-row: 1;
}

#left {
  grid-column: 1;
  grid-row: 2;
}

#right {
  grid-column: 3;
  grid-row: 2;
}

#down {
  grid-column: 2;
  grid-row: 3;
}

#buttons button {
  padding: 8px 16px;
  color: #00ff00;
  background-color: #000;
  border: 2px solid #00ff00;
  text-transform: uppercase;
  cursor: pointer;
  outline: none;
}

#buttons button:hover {
  background-color: #00ff00;
  color: #000;
}

#buttons button:active {
  transform: translateY(1px);
}

.player {
  background-color: #6b6;
}

.goal {
  background-color: #cc0;
}

.collision {
  background-color: red;
}
