/* Reset */
body { 
  padding: 0; 
  margin: 0;
}

/* Default container style (positioned by template/JS logic) */
#unity-container { 
  position: absolute;
  left: 50%; 
  top: 50%; 
  transform: translate(-50%, -50%);
  width: auto;
  height: auto;
}

/* Desktop container (still centred) */
#unity-container.unity-desktop { 
  position: absolute;
  left: 50%; 
  top: 50%; 
  transform: translate(-50%, -50%);
}

/* Mobile: full screen fill */
#unity-container.unity-mobile { 
  position: fixed; 
  width: 100%; 
  height: 100%; 
}

/* Dynamic viewport height fix for mobile browsers */
:root {
  --vh: 100%;
}

#canvas-wrapper {
  width: 100vw;
  height: calc(var(--vh, 1vh) * 100);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}

/* Ensure the canvas background stays and canvas doesn't inherit container backgrounds */
#unity-canvas {
  background-image: url('rocketstar_bg.png');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: block;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transform-origin: center center; /* defensive: matches the JS */
}

/* Mobile canvas: stretch full size normally */
.unity-mobile #unity-canvas { 
  width: 100%; 
  height: 100%; 
}

/* Loading bar remains centred */
#unity-loading-bar { 
  position: absolute; 
  left: 50%; 
  top: 50%; 
  transform: translate(-50%, -50%); 
  display: none;
}

/* Unity logo for loading screen */
#unity-logo { 
  width: 154px; 
  height: 130px; 
  background: url('unity-logo-dark.png') no-repeat center; 
}

/* Progress bar container */
#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; 
}

/* Progress bar fill */
#unity-progress-bar-full { 
  width: 0%; 
  height: 18px; 
  margin-top: 10px; 
  background: url('progress-bar-full-dark.png') no-repeat center; 
}

/* Footer container */
#unity-footer { 
  position: relative; 
}

/* Mobile: hide footer */
.unity-mobile #unity-footer { 
  display: none; 
}

/* Logo in footer */
#unity-logo-title-footer { 
  float:left; 
  width: 102px; 
  height: 38px; 
  background: url('unity-logo-title-footer.png') no-repeat center; 
}

/* Build title text in footer */
#unity-build-title { 
  float: right; 
  margin-right: 10px; 
  line-height: 38px; 
  font-family: arial; 
  font-size: 18px; 
}

/* Fullscreen button */
#unity-fullscreen-button { 
  cursor:pointer; 
  float: right; 
  width: 38px; 
  height: 38px; 
  background: url('fullscreen-button.png') no-repeat center; 
}

/* Warning banner */
#unity-warning { 
  position: absolute; 
  left: 50%; 
  top: 5%; 
  transform: translate(-50%); 
  background: white; 
  padding: 10px; 
  display: none; 
}
