html, body { height: 100%; }
body { padding: 0; margin: 0; background: #131313; overflow: hidden; }

/* The game is portrait 540x960. Fit the canvas inside the viewport preserving that aspect
   (letterbox) so it never overflows and never needs scrolling — on a wide window it gets side
   bars, on a narrow one top/bottom bars. 56.25vh = 100vh*(540/960); 177.78vw = 100vw*(960/540). */
#unity-container { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }
#unity-canvas {
  width: min(100vw, 56.25vh);
  height: min(100vh, 177.78vw);
  display: block;
  background: #231F20;
}
/* Real mobile devices fill the whole screen (handled by the unity-mobile branch in index.html). */
.unity-mobile #unity-canvas { width: 100%; height: 100%; }

/* Custom full-screen loading page (replaces the stock Unity-logo loader). */
#unity-loading-bar {
  position: fixed;
  left: 0; top: 0; right: 0; bottom: 0;
  display: none;
  background: #131313 url('loading-bg.jpg') center / contain no-repeat;
}
/* Portrait screens (phones): fill edge-to-edge, slight crop is fine. */
@media (max-aspect-ratio: 2/3) {
  #unity-loading-bar { background-size: cover }
}
#unity-progress-bar-empty {
  position: absolute;
  left: 50%; bottom: 7%;
  transform: translateX(-50%);
  width: min(60vw, 380px); height: 12px;
  border: 1px solid rgba(255, 213, 74, 0.8);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.55);
}
#unity-progress-bar-full {
  width: 0%; height: 100%;
  background: #ffd54a;
  border-radius: 6px;
  transition: width 0.2s ease-out;
}

/* Fullscreen button as a fixed overlay so it's always visible (bottom-left; the injected APK
   download link sits bottom-right). The build title is dropped. */
#unity-footer { position: fixed; left: 12px; bottom: 12px; z-index: 999; }
.unity-mobile #unity-footer { display: none }
#unity-build-title { display: none }
#unity-fullscreen-button {
  cursor: pointer; width: 40px; height: 40px;
  background: rgba(0, 0, 0, 0.55) url('fullscreen-button.png') no-repeat center;
  background-size: 22px 22px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  opacity: 0.85;
}
#unity-fullscreen-button:hover { opacity: 1 }
#unity-warning { position: fixed; left: 50%; top: 5%; transform: translate(-50%); background: white; padding: 10px; display: none; z-index: 1000; }
