:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: #07131d;
}

* {
  box-sizing: border-box;
}

html,
body,
#unity-container,
#unity-canvas {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

html,
body {
  min-width: 100%;
  min-height: 100%;
  overflow: hidden;
  background: #07131d;
}

#unity-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  width: 100dvw;
  height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, #14364a 0%, #0b2130 34%, #07131d 72%);
}

#unity-canvas {
  display: block;
  width: 100vw;
  height: 100vh;
  width: 100dvw;
  height: 100dvh;
  border: 0;
  outline: 0;
  background: #07131d;
  touch-action: none;
}

#loading-screen {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100vh;
  width: 100dvw;
  height: 100dvh;
  padding: 24px;
  opacity: 1;
  visibility: visible;
  background:
    linear-gradient(rgb(3 15 24 / 28%), rgb(3 15 24 / 48%)),
    url("loading-background.jpg") center / cover no-repeat,
    #07131d;
  transition:
    opacity 380ms ease,
    visibility 380ms ease;
}

#loading-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-card {
  width: min(560px, 88vw);
  text-align: center;
}

#brand {
  min-height: 82px;
  display: grid;
  place-items: center;
}

#brand-logo {
  display: block;
  max-width: min(360px, 76vw);
  max-height: 120px;
  object-fit: contain;
}

#brand.has-logo h1 {
  display: none;
}

#brand h1 {
  margin: 0;
  color: #f4fbff;
  font-size: clamp(44px, 9vw, 78px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.08em;
  text-shadow: 0 8px 28px rgb(0 0 0 / 40%);
}

#loading-label {
  margin: 28px 0 14px;
  color: #d7eaf3;
  font-size: 16px;
  font-weight: 600;
}

.progress-track {
  width: 100%;
  height: 24px;
  overflow: hidden;
  border: 1px solid rgb(210 239 250 / 25%);
  border-radius: 0;
  background: rgb(1 11 18 / 65%);
  box-shadow:
    inset 0 2px 5px rgb(0 0 0 / 35%),
    0 8px 28px rgb(0 0 0 / 18%);
}

#progress-fill {
  width: 0;
  height: 100%;
  border-radius: 0;
  background: linear-gradient(90deg, #52b9df, #8be4f0);
  box-shadow: 0 0 20px rgb(105 215 239 / 45%);
  transition: width 100ms linear;
}

#progress-value {
  margin: 10px 0 0;
  color: #f4fbff;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

#loading-error {
  margin: 16px 0 0;
  color: #ffb4b4;
  font-size: 13px;
  overflow-wrap: anywhere;
}

#unity-warning {
  position: fixed;
  z-index: 1100;
  top: 12px;
  left: 50%;
  width: min(680px, calc(100vw - 24px));
  transform: translateX(-50%);
  text-align: center;
}

#unity-warning > div {
  margin-bottom: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #07131d;
  font-size: 14px;
  font-weight: 700;
}

#unity-warning .warning {
  background: #ffe08a;
}

#unity-warning .error {
  color: #fff;
  background: #b82f3d;
}

@media (prefers-reduced-motion: reduce) {
  #loading-screen,
  #progress-fill {
    transition: none;
  }
}
