.controls-upper-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 64px;
}

@media (min-width: 480px) {
  .controls-upper-row {
    margin-top: 96px;
  }
}

.controls-lower-row {
  display: flex;
  margin-top: 48px;
  justify-content: center;
}

@media (min-width: 480px) {
  .controls-lower-row {
    margin-top: 96px;
  }
}

/* D-pad */
.dpad {
  position: relative;
  display: grid;
  grid-template: 36px 36px 36px / 36px 36px 36px;
  gap: 0;
  border-radius: 50%;
  background-color: lightgray;
  padding: 12px;
  filter: brightness(95%);
}

.dpad-touch-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  z-index: 1;
}

@media (min-width: 480px) {
  .dpad {
    grid-template: 48px 48px 48px / 48px 48px 48px;
  }
}

.dpad button {
  background: #222;
  color: white;
  border: 2px solid #444;
  border-radius: 4px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.dpad button:active { background: #555; }
.dpad-up    { grid-area: 1 / 2; }
.dpad-left  { grid-area: 2 / 1; }
.dpad-center { grid-area: 2 / 2; background: #222 !important; border: 2px solid #444; border-radius: 4px; }
.dpad-right { grid-area: 2 / 3; }
.dpad-down  { grid-area: 3 / 2; }

.ab-buttons {
  display: flex;
  gap: 32px;
  align-items: center;
  transform: rotate(-25deg);
  background-color: lightgray;
  filter: brightness(95%);
  padding: 12px;
  border-radius: 40%;
}

@media (min-width: 480px) {
  .ab-buttons {
    gap: 48px;
  }
}

.ab-buttons button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #8b1a4a;
  color: white;
  border: 2px solid #6b1030;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 8px 8px grey;
}

@media (min-width: 480px) {
  .ab-buttons button {
    width: 64px;
    height: 64px;
  }
}

.ab-buttons button:active { background: #a52a5a; }

.button-with-text-below {
  display: flex;
  row-gap: 8px;
  flex-direction: column;
  text-align: center;
  font-weight: bold;
}

/* Start / Select */
.meta-buttons {
  display: flex;
  gap: 16px;
  align-self: flex-end;
  margin-bottom: 4px;
}

.meta-buttons button {
  background: #555;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 8px 24px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
}

@media (min-width: 480px) {
  .meta-buttons button {
    padding: 12px 36px;
  }
}

.meta-buttons .button-with-text-below {
  transform: rotate(-25deg);

}
.meta-buttons button:active { background: #777; }
