.button-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 20px;
  margin: 10px auto;
  width: 90%;
  max-width: 1200px;
  height: 80vh; /* Make container height 80% of viewport height */
}

.button-container button {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: transparent;
  border: none;
  cursor: pointer;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.3s, background-image 0.3s;
  width: 100%;
  height: 10vh; /* Height based on viewport height */
}

.arrow-button.right {
  background-image: url('../images/arrow.png');
  transform: rotate(90deg);
  justify-self: center;
  align-self: center;
  grid-column: 2 / 4;
  grid-row: 3 / 3;
}

.arrow-button.left {
  background-image: url('../images/arrow.png');
  transform: rotate(270deg);
  justify-self: center;
  align-self: center;
  grid-column: 1 / 3;
  grid-row: 3 / 3;
}

.arrow-button.up {
  background-image: url('../images/arrow.png');
  transform: rotate(0deg);
  justify-self: center;
  align-self: center;
  grid-column: 2 / 3;
  grid-row: 2 / 3;
}

.lights-button {
  background-image: url('../images/lights.png');
  grid-column: 1 / 2;
  grid-row: 2 / 3;
  justify-self: center;
  align-self: center;
}

.lights-button.active {
  background-image: url('../images/lights_active.png');
}

.i2v-button {
  background-image: url('../images/i2v.png');
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  justify-self: left;
  align-self: center;
}

.i2v-button.active {
  background-image: url('../images/i2v_active.png');
}

.satellite-button {
  background-image: url('../images/satellite.png');
  grid-column: 3 / 4;
  grid-row: 1 / 2;
  justify-self: right;
  align-self: center;
}

.satellite-button.active {
  background-image: url('../images/satellite_active.png');
}

.car-button {
  background-image: url('../images/car.png');
  grid-column: 2 / 3;
  grid-row: 3 / 3;
  justify-self: center;
  align-self: center;
}

.leadcar-button {
  background-image: url('../images/leadcar.png');
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  justify-self: center;
  align-self: center;
}

.leadcar-button.active {
  background-image: url('../images/leadcar_active.png');
}

.arrow-button.active {
  background-image: url('../images/arrow_active.png');
}

/* Media Queries for responsive design */
@media (min-width: 600px) {
  .button-container button {
    height: 12vh; /* Adjust height based on viewport height */
  }
}

@media (min-width: 900px) {
  .button-container button {
    height: 14vh; /* Adjust height based on viewport height */
  }
}

@media (min-width: 1200px) {
  .button-container {
    gap: 30px;
  }

  .button-container button {
    height: 16vh; /* Adjust height based on viewport height */
  }
}

/* Media Query for screens with height less than or equal to 800px */
@media (max-height: 800px) {
  .button-container {
    gap: 10px; /* Reduces gap to fit height */
  }

  .button-container button {
    height: 8vh; /* Adjust height to fit within 800px screen height */
  }
}
