html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-image: url("Untold/BackgroundS.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  font-family: sans-serif;
  background-color: #190421;
  position: fixed;
  touch-action: none;
}

.background {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-image: url("Untold/BackgroundS.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  font-family: sans-serif;
  background-color: black;
  object-fit: cover;
  z-index: -1;
}

#unity-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

canvas#unity-canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  touch-action: none;
  outline: none;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
}

#unity-container,
.background {
  height: calc(var(--vh, 1vh) * 100);
}

#bg-blur {
  display: flex;
  justify-content: center;
  position: relative;
  inset: 0;
  margin: 0 auto;
  width: fit-content;
  height: 100%;
}

/* Logo sequence styling */
#logo-sequence {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8vh;
  width: 100%;
  height: 100%;
}

.logo {
  opacity: 0;
  animation: fadeInLogo 1.5s ease forwards;
  width: 80%;
}

@keyframes fadeInLogo {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.content {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: absolute;
  inset: 0;
}

.info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  font-size: 2vh;
  gap: 7px;
  bottom: 50px;
}

.loading {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: clamp(14px, 2vh, 20px);
  gap: 7px;
  margin-bottom: 30px;
  margin-top: 30px;
}

.unity-loading-spinner {
  width: 10%;
}

#unity-warning {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: red;
  color: white;
  padding: 10px;
  display: none;
  z-index: 20;
}

/* Hide unused Unity UI */
#unity-footer,
#unity-logo,
#unity-fullscreen-button {
  display: none;
}

/* Prevent zoom on iOS inputs */
input,
textarea,
.UnityInput {
  font-size: 16px !important;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.unity-loading-spinner-container {
  position: relative;
  width: 40%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.unity-loading-spinner {
  width: 100%;
  height: auto;
  display: block;
  animation: spin-reverse 10s linear infinite;
}

.hour-glass {
  position: absolute;
  width: 25%;
  height: auto;
  z-index: 2;
  /* animation: spin 5s linear infinite; */
}
@keyframes spin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes spin-reverse {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(-360deg);
  }
}

.loading-dots {
  position: relative;
  display: inline-block;
}

.dots-placeholder::after {
  content: "...";
  visibility: hidden;
}

.loading-dots::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 0;
  animation: dots 1.5s steps(3, end) infinite;
}

@keyframes dots {
  0% {
    content: "";
  }
  33% {
    content: ".";
  }
  66% {
    content: "..";
  }
  100% {
    content: "...";
  }
}

.header {
  font-size: 70px;
  font-weight: bold;
  padding-bottom: 30px;
}
.text {
  font-size: 30px;
  padding: 10px 100px;
}

.reload-btn {
  padding: 10px 30px;
  font-size: 46px;
  margin-top: 50px;
}

.ram-warning {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 22px;
  color: rgba(255, 255, 255, 0.6);
  font-family: sans-serif;
  pointer-events: none;
}

#oom-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #190421;
  color: white;
  font-family: sans-serif;
  z-index: 9999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}
