* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #0876d1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#unity-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}

#unity-canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  background: #0876d1;
}

#loading-screen {
  position: fixed;
  z-index: 2;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  background: linear-gradient(155deg, #0751bb 0%, #087bd5 50%, #08b7e8 100%);
  opacity: 1;
  transition: opacity 300ms ease;
}

#loading-screen.loaded {
  opacity: 0;
  pointer-events: none;
}

.loading-content {
  display: flex;
  width: min(100%, 380px);
  flex-direction: column;
  align-items: center;
}

.game-logo {
  display: block;
  width: min(68vw, 34vh, 300px);
  height: min(68vw, 34vh, 300px);
  object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 18px 48px rgb(0 29 89 / 28%);
}

.loading-label {
  margin-top: 26px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-shadow: 0 2px 8px rgb(0 29 89 / 25%);
}

.progress-track {
  width: min(72vw, 340px);
  height: 12px;
  margin-top: 14px;
  overflow: hidden;
  border: 2px solid rgb(255 255 255 / 88%);
  border-radius: 999px;
  background: rgb(0 39 106 / 30%);
  box-shadow: 0 4px 14px rgb(0 29 89 / 20%);
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffe44d, #ff9e22);
  transition: width 120ms ease-out;
}

.progress-text {
  min-width: 3em;
  margin-top: 9px;
  color: #fff;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: center;
  text-shadow: 0 2px 8px rgb(0 29 89 / 25%);
}

#unity-warning {
  position: fixed;
  z-index: 3;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 12px;
  display: none;
  color: #fff;
  font-size: 13px;
}

.message {
  max-width: 680px;
  margin: 8px auto 0;
  padding: 10px 14px;
  border-radius: 8px;
  background: #a56300;
  text-align: center;
}

.message.error {
  background: #bd2727;
}
