/* Global Styles */

html,
body {
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* Game Container */

#gameContainer {
  position: relative;
  width: 100%;
  height: 100vh;
}

#gameCanvas {
  position: absolute; 
  z-index: 1;
  width: 100%;
  height: 100%;
}

#backgroundImage {
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
  z-index: -1;
}

#gameVideo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Logo */

#logo {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: auto;
  z-index: 1;
}

/* Buttons */

#startButton {
  position: absolute;
  z-index: 3;
  top: 70%;
  right: 50%;
  transform: translateX(50%);
  width: 130px;
  height: 130px;
  background-color: red;
  border: none;
  color: white;
  font-size: 50px;
  border-radius: 15px;
  cursor: pointer;
}

#buttonsContainer {
  position: fixed;
  z-index: 3;
  bottom: 8%;
  right: 5%;
  display: flex;
}

#storeButton {
  width: 110px;
  height: 110px;
  background-color: #4CAF50;
  border: none;
  color: white;
  font-size: 35px;
  border-radius: 10px;
  cursor: pointer;
  margin-right: 40px; 
  transition: transform 0.2s;
}
#storeButton:active {
  transform: scale(0.8);
}

#settingsButton {
  width: 110px;
  height: 110px;
  background-color: #4CAF50;
  border: none;
  color: white;
  font-size: 25px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s;
}
#settingsButton:active {
  transform: scale(0.8);
}

.resolutionButton {
  width: 22%;
  height: auto;
  background-color: white;
  color: black;
  font-size: 2vw;
  border-radius: 10px;
  margin-right: 10px;
  border: 2px solid black;
  cursor: pointer;
  transition: transform 0.2s;
}
.resolutionButton:active {
  transform: scale(0.8);
}

.resolutionButton.selected {
  background-color: #4CAF50;
}

#touchButton {
  transition: transform 0.2s;
}
#touchButton:active {
  transform: scale(0.8);
}

#mouseButton {
  transition: transform 0.2s;
}
#mouseButton:active {
  transform: scale(0.8);
}

.overlay {
  position: fixed;
  top: -15%;
  left: 0;
  width: 100%;
  height: 120%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal {
  background-color: rgba(0, 0, 0, 0.3);
  width: 60%;
  padding: 0px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  align-items: center;
  text-align: center;
}

.modal h2 {
  margin-top: 0;
  font-size: 4vw;
  color: #fff;
}


.modal button {
  margin-top: 5px;
  margin: 3%;
  background-color: red;
  border: none;
  color: white;
  font-size: 2vw;
  padding: 10px 25px;
  border-radius: 18px;
  cursor: pointer;
  overflow: hidden;
}



#settingsMenu label {
  display: block;
  margin-bottom: 0px;
  color: white;
  font-size: 4vw;
  border: 1px solid black;
  padding: 5px;
  border-radius: 4px;
  text-shadow: none;
}

.optionButton {
  width: 22%;
  background-color: white;
  color: black;
  font-size: 3vw;
  border-radius: 10px;
  margin-right: 10px;
  border: 2px solid black;
  cursor: pointer;
  transition: transform 0.2s;
}
.optionButton:active {
  transform: scale(0.8);
}

.optionButton.selected {
  background-color: #4CAF50;
}

.buttonContainer {
  position: absolute;
  bottom: 5%;
  left: 15%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: row;
  align-items: center;
}

.difficultyButton img {
  background: none;
  border: none;
  padding: 0;
  border-radius: 10px;
}

#musicButton {
  position: absolute;
  top: 5%;
  right: 2%;
  z-index: 2;
  background-color: transparent;
  border: none;
  width: 100%;
  height: auto;
  cursor: pointer;
  transition: transform 0.2s;
}
#musicButton:active {
  transform: scale(0.8);
}

#sfxButton {
  position: absolute;
  top: 5%;
  right: 12%;
  z-index: 2;
  background-color: transparent;
  border: none;
  cursor: pointer;
  transition: transform 0.2s;
}
#sfxButton:active {
  transform: scale(0.8);
}

.difficultyButton {
  background: none;
  border: none;
  margin: 15px;
  flex: 0 0 110px;
  margin-left: 20px;
  cursor: pointer;
  transition: transform 0.2s;
}

.difficultyButton:active {
  transform: scale(0.8);
}

#storeButton:hover {
  background-color: #45a049;
}

button img {
  width: 110px;
  height: 110px;
}

button.selected img {
  border: 2px solid red;
}

#groundImg {
  position: absolute;
  width: 500%;
  bottom: 0;
}

#ceilingImg {
  position: absolute;
  width: 500%;
  top: 0;
}

#skyboxImg {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  object-fit: contain;
}

#secondSkyboxImg {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 50;
  left: 0;
  z-index: 10;
}

.coin {
  position: absolute;
  z-index: 3;
}

.hidden {
  display: none;
}


@media (max-width: 768px) {
  #logo {
    top: 35%;
    width: 60%;
  }

  #startButton {
    top: 60%;
    right: 50%;
    transform: translateX(50%);
    width: 100px;
    height: 100px;
    font-size: 40px;
  }

  #buttonsContainer {
    right: 1%;
    bottom: 10%;
  }

  #storeButton {
    bottom: 5%;
    right: 1%;
    width: 90px;
    height: 90px;
    font-size: 30px;
    margin-right: 10px;
    
  }

  #settingsButton {
    bottom: 5%;
    right: 0%;
    width: 90px;
    height: 90px;
    font-size: 20px;
  }

  .buttonContainer {
    bottom: 3%;
  }

  #buttonsContainer {
    bottom: 2%;
  }

  .difficultyButton img {
    width: 90px;
    height: 90px;
  }

  #sfxButton {
    right: 15%;
  }

  .difficultyButton {
    margin: 5px;
    flex: 0 0 90px;
  }
}


@media (max-width: 480px) {
  #logo {
    top: 30%;
    width: 60%;
  }

  #gameCanvas {
    width: 100%;
    height: 50%;
  }

  #startButton {
    top: 50%;
    right: 40%;
    transform: translateX(0);
  }

  #sfxButton {
    right: 20%;
  }
}


