html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(180deg, #bfe9de 0%, #83b66f 100%);
  font-family: Arial, Helvetica, sans-serif;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
}

body #unity-container {
  position: relative;
  width: min(100vw, calc(100vh * 0.5625));
  height: min(100vh, calc(100vw * 1.7777778));
  overflow: hidden;
  background: #bfe9de;
  box-shadow: 0 18px 45px rgba(31, 60, 38, 0.22);
}

body #unity-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #bfe9de;
}

body #unity-loading-bar {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px;
  color: #2f5b37;
  text-align: center;
  background: linear-gradient(180deg, #fff1cf 0%, #bfe9de 48%, #83b66f 100%);
}

body #unity-loading-title {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 800;
}

body #unity-loading-subtitle {
  font-size: clamp(14px, 2.8vw, 22px);
  color: #6d4c2f;
}

body #unity-progress-bar-empty {
  width: min(72%, 360px);
  height: 18px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 0 0 2px rgba(109, 76, 47, 0.2);
}

body #unity-progress-bar-full {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #69ad39, #f0c44c);
}

body #unity-fullscreen-button {
  position: absolute;
  right: calc(10px + env(safe-area-inset-right));
  bottom: calc(10px + env(safe-area-inset-bottom));
  min-width: 54px;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  color: #fff9df;
  background: rgba(47, 91, 55, 0.78);
  font-weight: 800;
  cursor: pointer;
}

body #unity-warning {
  position: absolute;
  top: calc(8px + env(safe-area-inset-top));
  left: 50%;
  display: none;
  width: min(92%, 520px);
  transform: translateX(-50%);
  z-index: 2;
}

.unity-banner-error,
.unity-banner-warning {
  margin-bottom: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #442714;
  background: #fff0cf;
  box-shadow: 0 8px 24px rgba(31, 60, 38, 0.18);
}

.unity-banner-error {
  color: #fff;
  background: #a83c2e;
}

@media (max-aspect-ratio: 9 / 16) {
  body #unity-container {
    width: 100vw;
    height: 100vh;
  }
}

@media (min-aspect-ratio: 9 / 16) {
  body #unity-container {
    width: calc(100vh * 0.5625);
    height: 100vh;
  }
}

@media (max-width: 720px) {
  body #unity-container {
    box-shadow: none;
  }
}
