:root {
  color-scheme: dark;
  background: #07182c;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
}

* {
  box-sizing: border-box;
}

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

html,
body {
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: #07182c;
}

body {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

#unity-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, rgba(16, 160, 202, 0.24), transparent 46%),
    #07182c;
  touch-action: none;
}

#unity-canvas {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: #07182c;
  touch-action: none;
}

#unity-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  padding:
    max(24px, env(safe-area-inset-top))
    max(24px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom))
    max(24px, env(safe-area-inset-left));
  background:
    radial-gradient(circle at 50% 35%, rgba(25, 191, 223, 0.23), transparent 42%),
    #07182c;
  transition: opacity 180ms ease;
  z-index: 20;
}

#unity-loading.unity-loading-complete {
  opacity: 0;
  pointer-events: none;
}

#unity-loading-icon {
  width: 96px;
  height: 96px;
  border-radius: 22%;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
}

#unity-loading-title {
  color: #f7fbff;
  font-size: clamp(24px, 5vw, 38px);
  font-weight: 900;
  letter-spacing: 0.02em;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.45);
}

#unity-progress-track {
  width: min(340px, 68vw);
  height: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
}

#unity-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #18bedf, #ffd15a, #ff812d);
  box-shadow: 0 0 18px rgba(24, 190, 223, 0.58);
  transition: width 100ms linear;
}

#unity-loading-label {
  color: rgba(247, 251, 255, 0.75);
  font-size: 14px;
  font-weight: 700;
}

.unity-loading-error #unity-loading-label {
  color: #ffd5ce;
}

#unity-warning {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  width: min(680px, calc(100vw - 32px));
  transform: translateX(-50%);
  z-index: 40;
  pointer-events: none;
}

.unity-message {
  margin-bottom: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  color: #07182c;
  background: #fff2a8;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.32);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.unity-message-error {
  color: #fff;
  background: #b3261e;
}

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