:root {
  color-scheme: dark;
  font-family:
    "Avenir Next Condensed",
    "Arial Narrow",
    "Helvetica Neue",
    sans-serif;
  background: #092f35;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 24%, #176f74 0%, #092f35 54%, #051d23 100%);
}

#unity-container {
  position: absolute;
  overflow: hidden;
  background: #092f35;
  box-shadow: 0 24px 72px rgb(0 16 20 / 48%);
}

#unity-container.unity-desktop {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

#unity-container.unity-mobile {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

#unity-canvas {
  display: block;
  background: #86cdd0;
}

.unity-mobile #unity-canvas {
  width: 100%;
  height: 100%;
}

#unity-loading-bar {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: none;
  overflow: hidden;
  opacity: 1;
  background: #092f35;
  transition: opacity 420ms ease;
}

#unity-loading-bar.is-ready {
  opacity: 0;
  pointer-events: none;
}

.loading-art {
  position: absolute;
  inset: -2%;
  background:
    url("twister-key-art.png")
    center center / cover
    no-repeat;
  transform: scale(1.025);
  animation: living-dolly 12s ease-out both;
}

.loading-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgb(4 30 34 / 78%) 0%,
      rgb(5 38 42 / 45%) 34%,
      rgb(4 28 32 / 4%) 66%,
      rgb(4 28 32 / 18%) 100%
    ),
    linear-gradient(0deg, rgb(3 23 27 / 54%) 0%, transparent 42%);
}

.loading-copy {
  position: absolute;
  left: clamp(28px, 5.3vw, 76px);
  bottom: clamp(34px, 8.5vh, 86px);
  width: min(39vw, 390px);
  min-width: 270px;
  color: #effff8;
  text-shadow: 0 2px 18px rgb(0 24 28 / 46%);
}

.studio-mark {
  margin-bottom: 8px;
  color: #9ff6dc;
  font-size: clamp(9px, 1.05vw, 13px);
  font-weight: 800;
  letter-spacing: 0.26em;
}

.game-mark {
  margin-left: -0.04em;
  font-size: clamp(48px, 8vw, 94px);
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.055em;
}

.loading-rule {
  width: 54px;
  height: 4px;
  margin: 20px 0 14px;
  background: #ff8066;
  box-shadow: 0 0 18px rgb(255 128 102 / 46%);
}

.loading-status {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: #d9fff2;
  font-size: clamp(9px, 1.05vw, 12px);
  font-weight: 800;
  letter-spacing: 0.08em;
}

#unity-progress-bar-empty {
  width: 100%;
  height: 7px;
  margin-top: 9px;
  overflow: hidden;
  border: 1px solid rgb(213 255 242 / 66%);
  background: rgb(5 34 38 / 48%);
}

#unity-progress-bar-full {
  width: 0%;
  height: 100%;
  background:
    linear-gradient(90deg, #65eed1, #e9fff5 72%, #ffb36f);
  box-shadow: 0 0 14px rgb(101 238 209 / 72%);
  transition: width 140ms ease-out;
}

.loading-note {
  margin-top: 10px;
  color: rgb(231 255 247 / 72%);
  font-size: clamp(8px, 0.9vw, 10px);
  font-weight: 700;
  letter-spacing: 0.1em;
}

#unity-fullscreen-button {
  position: absolute;
  z-index: 2;
  right: 14px;
  bottom: 12px;
  padding: 7px 10px;
  border: 1px solid rgb(235 255 249 / 40%);
  color: rgb(235 255 249 / 70%);
  background: rgb(5 33 38 / 52%);
  font: 700 9px/1 inherit;
  letter-spacing: 0.12em;
  cursor: pointer;
  opacity: 0;
  transition: opacity 180ms ease;
}

#unity-container:hover #unity-fullscreen-button {
  opacity: 1;
}

.unity-mobile #unity-fullscreen-button {
  display: none;
}

#unity-warning {
  position: absolute;
  z-index: 8;
  left: 50%;
  top: 5%;
  display: none;
  width: min(86%, 620px);
  transform: translateX(-50%);
}

#unity-warning > div {
  margin-bottom: 6px;
  padding: 10px 14px;
  color: #effff8;
  background: rgb(6 42 47 / 94%);
  border-left: 4px solid #ffcf72;
  font-size: 12px;
}

#unity-warning > .error {
  border-color: #ff6f62;
}

@keyframes living-dolly {
  from {
    transform: scale(1.075) translate3d(0.7%, -0.3%, 0);
  }
  to {
    transform: scale(1.025) translate3d(0, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .loading-art {
    animation: none;
  }
}
