@font-face {
  font-family: "loader-font";
  src: url("../img/font.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: normal;
}

:root {
  color-scheme: light;
  font-family: "loader-font", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #20201e;
}

#unity-container,
#unity-canvas {
  width: 100%;
  height: 100%;
}

#unity-container {
  position: absolute;
  inset: 0;
}

#unity-canvas {
  display: block;
  background: #20201e;
}

#unity-loader {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: flex;
  width: min(500px, calc(100vw - 40px));
  padding: 30px;
  transform: translate(-50%, -50%);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: #fde021;
  color: #000;
  text-align: center;
}

#unity-loader[hidden] {
  display: none;
}

#level-loader {
  --progress: 0%;
  display: flex;
  max-width: 80%;
  margin-top: 20px;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(
    to top,
    #fde021 0%,
    #fde021 var(--progress),
    #fff var(--progress),
    #fff 100%
  );
}

#level-loader img {
  display: block;
  max-width: 100%;
}

#unity-loader-text {
  margin: 20px 0 4px;
  font-size: clamp(1.5rem, 7vw, 2rem);
}

#unity-loader-subtext,
#dev-version {
  margin: 4px 0;
}

#unity-loader-subtext {
  font-size: 0.8rem;
}

#dev-version {
  font-size: 0.7rem;
}

#retry-button {
  margin-top: 18px;
  padding: 10px 18px;
  border: 2px solid #000;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

#retry-button[hidden] {
  display: none;
}

#unity-warning {
  position: absolute;
  z-index: 3;
  top: 5%;
  left: 50%;
  display: none;
  max-width: calc(100vw - 40px);
  padding: 10px;
  transform: translateX(-50%);
  background: #fff;
  color: #000;
}

#turn,
#no-desktop-msg {
  position: fixed;
  z-index: 10;
  inset: 0;
  display: flex;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  padding: 24px;
  align-items: center;
  justify-content: center;
  background: #fde021;
  color: #000;
  text-align: center;
}

#turn {
  display: none;
}

@media (orientation: landscape) {
  #turn {
    display: flex;
  }

  #unity-container {
    display: none;
  }
}

@media (orientation: portrait) {
  #unity-container {
    display: block;
  }
}
