* { box-sizing: border-box; }
html, body { padding: 0; margin: 0; width: 100%; height: 100%; overflow: hidden; }

#unity-container {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

/* Полноэкранный фон загрузки (TemplateData/loader-background.png) */
#unity-loading-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #2b6a9e;
  background-image: url('loader-background.png');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

#unity-canvas {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: #231F20;
}

/* Пока идёт загрузка WASM, canvas скрыт — иначе чёрная заливка WebGL перекрывает картинку */
#unity-canvas.unity-canvas-loading {
  visibility: hidden;
}

#unity-canvas.unity-canvas-ready {
  visibility: visible;
}

#unity-loading-bar {
  position: absolute;
  left: 50%;
  bottom: 6%;
  top: auto;
  transform: translateX(-50%);
  z-index: 2;
  display: none;
}

/* Прогресс-бар целиком в CSS (без растровых спрайтов полосы) */
#unity-progress-bar-empty {
  width: 141px;
  height: 18px;
  box-sizing: border-box;
  border-radius: 9px;
  overflow: hidden;
  isolation: isolate;
  transform: translateZ(0);
  border: 2px solid rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.18);
}

#unity-progress-bar-full {
  width: 0%;
  height: 100%;
  min-height: 18px;
  box-sizing: border-box;
  border-radius: 9px 0 0 9px;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(186, 230, 253, 0.92) 45%,
    rgba(125, 211, 252, 0.88) 100%
  );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

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


/* Fullscreen overrides */
html,body{padding:0;margin:0;width:100%;height:100%;overflow:hidden}
#unity-container.unity-fullscreen{position:fixed!important;left:0!important;top:0!important;width:100%!important;height:100%!important;transform:none!important}
#unity-canvas{width:100%!important;height:100%!important}
#unity-footer{display:none!important}
