/* fonts */

@font-face {
  font-family: Lunar Escape;
  src: url("fonts/Lunar Escape.otf");
}
@font-face {
  font-family: Hyper Oxide;
  src: url("fonts/Hyper Oxide.ttf");
}

/* body */

body {
  padding: 0;
  margin: 0;
  background: linear-gradient(white, rgb(196, 196, 196));
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* h1*/

#displayCurrentGamemode {
  font-family: Lunar Escape;
  font-size: 3rem;
  text-align: center;
  text-shadow: 2px 2px rgba(255, 255, 255, 0.596);
  margin: 10px;
  margin-top: 20px;
}

/* Dropdown */

#dropdown-container {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 10px;
  font-size: 1rem;
  background-color: rgba(128, 128, 128, 0.171);
  width: 32px;
  height: 32px;
  border-radius: 20px;
  transition: all 0.6s ease;
}

#dropdown-container .content {
  display: none;
  flex-direction: column;
}

#dropdown-container:hover {
  height: auto;
  width: 16%;
}

#dropdown-container:hover .content {
  display: flex;
}

#dropdown-container button {
  font-family: monospace;
  font-size: 1.5rem;
  color: black;
  background: hsla(0, 0%, 100%, 0.255);
  border: none;
  border-radius: 10px;
  box-shadow: 3px 3px hsla(0, 0%, 60%, 0.2);
  cursor: pointer;
  width: 89%;
  height: 5rem;
  margin: 10px;
  overflow: hidden;

  text-overflow: ellipsis;
}

#dropdown-container button:active {
  box-shadow: none;
  transform: translate(3px, 3px);
}

/* Logo */

#podcastLogo {
  mix-blend-mode: multiply;
  position: absolute;
  top: 10px;
  right: 10px;
  width: 14, 58%;
  height: 15%;
}
/* canvas + restart BTN */

canvas {
  box-shadow: 20px 10px 50px black;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 100%;
  max-height: 100%;
}

#restartBtn {
  display: none;
  position: absolute;
  top: 63%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.8em;
  font-family: Hyper Oxide;
  background: transparent;
  border-radius: 25px;
  border: none;
  padding: 20px;
  color: hsl(0, 0%, 80%);
  text-shadow: 3px 3px black;
  transition: backdrop-filter 0.2s ease-in-out,
    background-color 0.3s ease-in-out, color 0.3s ease-in-out;
}

#restartBtn:hover {
  backdrop-filter: blur(3px);
  background-color: rgba(0, 0, 0, 0.24);
  color: white;
}

/* footer */

#sign {
  position: absolute;
  bottom: 0;
  margin-bottom: 2px;
  right: 10px;
  font-size: 1.2rem;
}

/* links */

a {
  text-decoration: none;
  color: inherit;
}

a:visited {
  color: inherit;
}

/* popups */

.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(36, 36, 36, 0.952);
  color: white;
  padding: 20px;
  border-radius: 10px;
  z-index: 100;
  height: 85%;
  width: 80%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.button-row {
  display: flex;
  gap: 5px;
  justify-content: center;
  flex-wrap: wrap;
}

#startPopup {
  display: none;
}

#startPopup h1 {
  font-family: Lunar Escape;
  font-size: 5rem;
  text-align: center;
  margin: 20px;
  text-shadow: 2px 2px rgba(255, 255, 255, 0.596);
}

#startPopup h3 {
  font-family: Lunar Escape;
  margin-top: 10px;
  font-size: 3rem;
  text-align: center;
  margin: 10px;
  font-weight: normal;
  color: hsl(0, 0%, 89%);
}

#startPopup button {
  font-family: Lunar Escape;
  font-size: 2.5rem;
  background: hsl(0, 0%, 20%);
  border: none;
  color: white;
  border-radius: 10px;
  text-align: center;
  margin: 5px;
}

#startPopup button:active {
  background: hsl(0, 0%, 32%);
}

.directionButton {
  padding: 10px;
}

.difficultyButton {
  padding: 10px;
  font-size: 2rem;
  margin-top: 10px;
}

#spaceButton {
  padding: 10px 40px;
}

/* changeDifficultyPopup */

#changeDifficultyPopup {
  font-family: Lunar Escape;
  font-size: 5rem;
  text-align: center;
  height: fit-content;
  width: max-content;
  display: none;
}

#changeDifficultyPopup .button-row {
  display: flex;
  gap: 5px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

#changeDifficultyPopup button {
  font-family: Lunar Escape;
  font-size: 3rem;
  background: hsl(0, 0%, 20%);
  border: none;
  color: white;
  border-radius: 10px;
  text-align: center;
  margin: 5px;
}

#changeDifficultyPopup button:active {
  background: hsl(0, 0%, 32%);
}

/* Responsive Design  */
@media (max-width: 1200px) {
  canvas {
    box-shadow: none;
    max-width: 80%;
    max-height: 70%;
  }
  #restartBtn {
    font-size: 1.5rem;
    padding: 15px;
  }
  #displayCurrentGamemode {
    font-size: 1.5rem;
  }
  #dropdown-container {
    white-space: nowrap;
    max-width: 33%;
  }
  #dropdown-container button {
    font-size: 1rem;
    padding: 4px;
  }
  #startPopup {
    width: 70%;
    height: 85%;
  }

  #startPopup h1 {
    margin: 0;
    font-size: 2rem;
  }

  #startPopup h3 {
    font-size: 1rem;
    margin: 4px;
  }

  #startPopup button {
    font-size: 1rem;
    padding: 8px;
    margin: 4px;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 1.3em;
  }
  canvas {
    box-shadow: none;
    max-width: 70%;
    max-height: 75%;
  }

  #restartBtn {
    font-size: 1.5em;
    padding: 15px;
  }

  #podcastLogo {
    max-height: 8%;
  }

  #sign {
    font-size: 0.7em;
  }
  #dropdown-container {
    max-width: 17%;
  }
  #dropdown-container button {
    font-size: 0.6rem;
  }

  #startPopup {
    width: 90%;
    height: 90%;
  }

  #startPopup h1 {
    font-size: 2rem;
    margin: 0;
  }

  #startPopup h3 {
    font-size: 1rem;
    margin: 0;
  }

  #startPopup button {
    font-size: 1rem;
    padding: 8px;
    margin: 4px;
  }
}

@media (max-width: 480px) {
  canvas {
    box-shadow: none;
    max-width: 80%;
    max-height: 80%;
  }

  #displayCurrentGamemode {
    font-size: 1rem;
  }

  #restartBtn {
    font-size: 1rem;
  }

  #startPopup {
    width: 95%;
    height: 95%;
  }

  #startPopup h1 {
    font-size: 1rem;
  }

  #startPopup h3 {
    font-size: 1rem;
  }

  #startPopup button {
    font-size: 0.8rem;
    padding: 6px;
  }
}

@media (max-height: 370px) {
  h1 {
    font-size: 1rem;
  }
  #dropdown-container {
    max-height: 70%;
    height: fit-content;
    overflow-y: auto;
    scroll-behavior: smooth;
  }
}
