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

#unity-container {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #231F20;
}

/* Fills the space above the footer, then centers the canvas within it. */
#unity-canvas-wrap {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Canvas scales up or down to fill its wrap while preserving the game's
   native 960:600 aspect ratio (letterboxing/pillarboxing as needed). Unity's
   runtime reads this CSS size every frame (matchWebGLToCanvasSize) and
   matches the WebGL render target resolution to it automatically. */
#unity-canvas {
  background: #231F20;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 960 / 600;
}

#unity-loading-bar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none }
#unity-logo { width: 154px; height: 130px; background: url('unity-logo-dark.png') no-repeat center }
#unity-progress-bar-empty { width: 141px; height: 18px; margin-top: 10px; margin-left: 6.5px; background: url('progress-bar-empty-dark.png') no-repeat center }
#unity-progress-bar-full { width: 0%; height: 18px; margin-top: 10px; background: url('progress-bar-full-dark.png') no-repeat center }

#unity-footer { position: relative; flex: 0 0 auto; width: 100%; max-width: 960px }
#unity-webgl-logo { float:left; width: 204px; height: 38px; background: url('webgl-logo.png') no-repeat center }
#unity-build-title { float: right; margin-right: 10px; line-height: 38px; font-family: arial; font-size: 18px; color: #fff }
#unity-fullscreen-button { cursor:pointer; float: right; width: 38px; height: 38px; background: url('fullscreen-button.png') no-repeat center }

#unity-warning { position: absolute; left: 50%; top: 5%; transform: translate(-50%); background: white; padding: 10px; display: none }

/* On short viewports (e.g. a phone in landscape), drop the footer so the
   play area gets the vertical space instead. */
@media (max-height: 420px) {
  #unity-footer { display: none }
}
