:root {
  color-scheme: dark;
  background: #021b24;
  font-family: "Rubik", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: radial-gradient(circle at 50% 45%, #0b6070 0, #032d3a 42%, #01141c 100%);
  overscroll-behavior: none;
}

#unity-container {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

#unity-canvas {
  display: block;
  width: min(100vw, calc(100vh * 0.5625));
  height: min(100vh, calc(100vw * 1.7777778));
  aspect-ratio: 9 / 16;
  background: #021b24;
  box-shadow: 0 22px 70px rgb(0 0 0 / 52%);
  outline: 0;
  touch-action: none;
}

#unity-loading-bar {
  position: fixed;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  background: radial-gradient(circle at center, #0b6171, #021b24 68%);
}

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

#loading-title {
  display: grid;
  justify-items: center;
  line-height: .9;
  filter: drop-shadow(0 5px 0 #034c66) drop-shadow(0 0 20px rgb(71 235 255 / 42%));
}

#loading-title strong { color: #4aebff; font-size: clamp(64px, 16vw, 112px); }
#loading-title span { color: #ffd766; font-size: clamp(36px, 9vw, 62px); }
#unity-loading-bar p { margin: 0; color: #fff4cf; font-size: 18px; }

#unity-progress-bar-empty {
  width: min(280px, 64vw);
  height: 18px;
  overflow: hidden;
  border: 3px solid #ffdc61;
  border-radius: 999px;
  background: #042d3a;
  box-shadow: 0 3px 0 #6a4512;
}

#unity-progress-bar-full {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #31dce8, #88ffdc);
  transition: width 120ms ease-out;
}

#unity-warning {
  position: fixed;
  z-index: 6;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  width: min(92vw, 640px);
  translate: -50% 0;
}

#unity-warning:empty { display: none; }
#unity-warning > div { margin-bottom: 8px; padding: 12px 16px; border-radius: 12px; background: #fff4cf; color: #4b2d11; }
#unity-warning > .error { background: #ffdfd8; color: #721a13; }

#unity-fullscreen-button {
  position: fixed;
  z-index: 2;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: 2px solid #ffdc61;
  border-radius: 50%;
  background: rgb(2 46 60 / 78%);
  color: white;
  font-size: 22px;
  cursor: pointer;
}

@media (max-width: 640px), (pointer: coarse) {
  #unity-canvas { box-shadow: none; }
  #unity-fullscreen-button { display: none; }
}
