*,
*:after,
*:before {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: all 100ms ease-in-out;
  letter-spacing: 2px;
}

@font-face {
  font-family: "Carnevalee Freakshow";
  src: url("../fonts/Carnevalee\ Freakshow.ttf") format("truetype");
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-image: url("../img/5_background/desert11.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 100vh;
  font-family: "Carnevalee Freakshow", sans-serif;
  padding-bottom: 138px;
}

button {
  all: unset;
  cursor: pointer;
  transition: all 100ms ease-in-out;
  letter-spacing: 2px;
}

a {
  text-decoration: none;
  color: rgb(62, 34, 0);
}

h1 {
  font-size: 72px;
  margin-bottom: 56px;
  color: #3e2200;
  text-shadow: 2px 2px 5px #6c3903;
  letter-spacing: 2px;
}

canvas {
  outline: 12px solid rgba(83, 37, 0, 0.8);
  display: block;
}

.content {
  max-width: 100%;
  aspect-ratio: 1.5 / 1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.start-screen {
  height: 100%;
  width: 100%;
  background: url("../img/9_intro_outro_screens/start/startscreen_1.png")
    no-repeat 0 0 / 100% 100%;
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
}

.start-buttons {
  height: 100%;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.control-buttons {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 16px;
}

.control-buttons-center {
  position: absolute;
  top: 20px;
  display: flex;
  gap: 16px;
}

.control-buttons-center button {
  height: 34px;
  width: 34px;
}

.control-buttons-center button img {
  height: 100%;
  width: 100%;
}

.control-buttons button {
  height: 34px;
  width: 34px;
}

.control-buttons button img {
  height: 100%;
  width: 100%;
}

.startGameButton {
  position: absolute;
  bottom: 0;
  margin-bottom: 24px;
  font-size: 36px;
  letter-spacing: 2px;
  background: none;
  color: rgb(255, 213, 0);
  cursor: pointer;
  text-shadow: 3px 6px 7px #6c3903;
  animation: pulse 2s infinite ease-in-out;
  transition: all 100ms ease-in-out;
}

.startGameButton:hover {
  animation-play-state: paused;
  color: rgb(255, 247, 0);
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
    color: rgb(255, 247, 0);
  }
  100% {
    transform: scale(1);
  }
}

/* End Screen */

.end-screen {
  height: 100%;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
}

.end-screen-img {
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  width: 100%;
}

.end-buttons {
  position: absolute;
  bottom: 36px;
  display: flex;
  justify-content: space-around;
  width: 100%;
}

.end-button {
  color: rgb(255, 213, 0);
  font-size: 36px;
  text-shadow: 0px 0px 13px rgba(0, 0, 0, 1);
}

.end-button:hover {
  color: rgb(255, 247, 0);
  scale: 1.1;
}

.end-screen-collected-coins {
  position: absolute;
  top: 20%;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 5px;
}

.end-screen-collected-coins img {
  height: 70px;
  width: 70px;
  margin: -5px;
}

.end-screen-collected-coins span {
  font-size: 36px;
  color: rgb(255, 213, 0);
}

/* Info Screen */

.info-screen {
  width: 350px;
  position: absolute;
  z-index: 1000;
  padding: 16px;
  background: linear-gradient(135deg, blanchedalmond, moccasin);
  border: 4px solid #3e2200;
  border-radius: 16px;
}

.info-title {
  font-size: 30px;
  color: #3e2200;
  text-align: center;
  width: 100%;
  display: block;
  margin-top: 16px;
  margin-bottom: 24px;
  text-shadow: 2px 2px 5px rgba(108, 57, 3, 0.2);
}

.info-close {
  height: 28px;
  width: 28px;
  position: absolute;
  right: 16px;
  top: 16px;
  border-radius: 50%;
  background-image: url("../img/icons/xmark.svg");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}

.info-close:hover {
  background-image: url("../img/icons/xmark-hover.svg");
}

.info-close img {
  height: 100%;
  width: 100%;
}

.key-description-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.key-description {
  display: flex;
  align-items: center;
  gap: 16px;
}

.key-description span {
  font-size: 20px;
  color: #3e2200;
}

.key-description img {
  height: 36px;
  width: 36px;
  border: 3px solid #3e2200;
  border-radius: 8px;
  padding: 2px;
}

.legal-notice-container {
  display: flex;
  justify-content: center;
}

.legal-notice:hover {
  color: rgb(225, 136, 44);
}

/* Mobile Play Panel */

.mobile-play-panel {
  position: fixed;
  bottom: 16px;
  display: flex;
  justify-content: space-around;
  width: 100%;
  z-index: 2000;
}

.mobile-play-buttons-container {
  display: flex;
  gap: 60px;
  gap: 8vw;
}

.mobile-play-button {
  height: 46px;
  width: 46px;
  border-radius: 50%;
  padding: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  touch-action: manipulation;
  background: rgba(255, 235, 205, 0.31);
  border-radius: 8px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(4.9px);
  -webkit-backdrop-filter: blur(4.9px);
}

.mobile-play-button img {
  height: 40px;
  width: 40px;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

/* Portrait Warning */

.portrait-warning {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(135deg, blanchedalmond, moccasin);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 5000;
  padding: 16px;
}

.portrait-warning-icon {
  max-width: 500px;
  width: 100%;
  position: relative;
}

.portrait-warning-icon img {
  height: 100%;
  width: 100%;
}

.portrait-warning-text {
  position: absolute;
  top: 68%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #3e2200;
  font-size: clamp(2.1rem, 10.5vw, 3.5rem);
  text-align: center;
  width: 100%;
  text-shadow: 2px 2px 5px rgba(108, 57, 3, 0.3);
}

/* Utility Classes */

.d-none {
  display: none;
}

.d-flex {
  display: flex;
}

/* Responsive */

@media (max-width: 950px) {
  canvas {
    outline: none;
  }

  .headline {
    display: none;
  }

  body {
    background-image: none;
    background-color: black;
    padding-bottom: 0;
  }
}

@media (max-width: 720px) {
  .content {
    max-width: 100%;
  }
  canvas {
    width: 100%;
    outline: none;
  }
}

@media (max-height: 800px) {
  body {
    padding-bottom: 40px;
  }

  .headline {
    display: none;
  }
}

@media (max-height: 650px) {
  body {
    padding-bottom: 0;
  }

  .mobile-play-button {
    height: 36px;
    width: 36px;
  }

  .mobile-play-button img {
    height: 30px;
    width: 30px;
  }
  .mobile-play-button {
    padding: 4px;
  }
}

@media (max-height: 480px) {
  .headline {
    display: none;
  }

  body {
    padding-bottom: 0;
  }

  canvas {
    height: 100vh;
    outline: none;
  }

  .mobile-play-panel {
    bottom: 1px;
  }

  .mobile-play-button {
    padding: 0;
    height: 46px;
    width: 46px;
  }
}

@media (max-height: 400px) {
  .startGameButton {
    margin-bottom: 16px;
    font-size: 30px;
  }
  .end-button {
    font-size: 30px;
  }
  .control-buttons button {
    height: 30px;
    width: 30px;
  }
  .end-screen-collected-coins img {
    height: 60px;
    width: 60px;
  }
  .end-screen-collected-coins span {
    font-size: 30px;
  }
}

@media (max-height: 370px) {
  .info-title {
    font-size: 26px;
    margin-bottom: 16px;
    margin-top: 8px;
  }
  .key-description-container {
    margin-bottom: 16px;
  }
  .info-screen {
    width: 320px;
  }
  .key-description-container {
    gap: 12px;
  }
  .info-close {
    height: 24px;
    width: 24px;
  }
  .key-description img {
    height: 32px;
    width: 32px;
  }
}
