html {
  box-sizing: border-box;
}
*, *:before, *:after {
  box-sizing: inherit;
}
html, body {
  height: 100%;
}
body {
  margin: 0;
  background: black;
}

/* Center canvas on screen */
#unity-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100%;
  background: black;
}

/* Game canvas and container */
#unity-container {
  width: 960px;
  height: 600px;
  position: relative;
  background: #ffffff;
}
#unity-canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: #ffffff;
}

/* Loading screen inside canvas */
#loading-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 960px;
  height: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #ffffff;
  z-index: 10;
  pointer-events: none;
}

#unity-loading-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  gap: 20px;
}

#unity-logo img,
#title-logo img {
  max-width: 600px;
  width: 100%;
  display: block;
  margin: 0 auto;
}
#title-logo {
  margin-top: 20px;
}

#unity-progress-bar-empty {
  width: 80%;
  height: 24px;
  border: 1px solid black;
  padding: 2px;
}
#unity-progress-bar-full {
  width: 0%;
  height: 100%;
  background: #008ee5;
}

/* Optional: spinner loader */
.spinner,
.spinner:after {
  border-radius: 50%;
  width: 5em;
  height: 5em;
}
.spinner {
  font-size: 10px;
  position: relative;
  text-indent: -9999em;
  border-top: 1.1em solid rgba(0, 0, 0, 0.2);
  border-right: 1.1em solid rgba(0, 0, 0, 0.2);
  border-bottom: 1.1em solid rgba(0, 0, 0, 0.2);
  border-left: 1.1em solid black;
  transform: translateZ(0);
  animation: spinner-spin 1.1s infinite linear;
}
@keyframes spinner-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Fullscreen button (if enabled) */
#unity-fullscreen-button {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 38px;
  height: 38px;
  background: url('fullscreen-button.png') no-repeat center;
  background-size: contain;
}

/* Portrait block */
#rotate-device-warning {
  display: none;
  position: fixed;
  z-index: 999999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  color: white;
  font-size: 24px;
  text-align: center;
  padding-top: 50%;
  box-sizing: border-box;
}
body.portrait #unity-wrapper {
  display: none !important;
}
body.portrait #rotate-device-warning {
  display: block;
}
