/* ============================================
   Unity WebGL Container Styles
   ============================================ */

html, body {
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  position: fixed;

  padding-bottom: env(safe-area-inset-bottom);
}

#unity-container {
  position: fixed;
  top: 0;
  left: 0;

  width: 100vw;
  height: calc(100vh - env(safe-area-inset-bottom));

  overflow: hidden;
}

#unity-canvas {
  width: 100% !important;
  height: calc(100vh - env(safe-area-inset-bottom));
  background: #FFFFFF;
}

.unity-desktop {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  position: absolute;
}

.unity-mobile {
  position: fixed;
  width: 100%;
  height: 100%;
}

#unity-loading-bar {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: none;
}

#unity-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 640px;
  height: 960px;
  background: url('TemplateData/unity-logo-dark.png') no-repeat center;
  background-size: contain;
}

#unity-progress-bar-empty {
  position: absolute;
  bottom: 220px;
  left: 50%;
  transform: translateX(-50%);
  width: 141px;
  height: 18px;
  background: url('TemplateData/progress-bar-empty-dark.png') no-repeat center;
  background-size: contain;
  z-index: 2;
  overflow: hidden;
}

#unity-progress-bar-full {
  width: 0%;
  height: 18px;
  margin-left: 3px;
  background: url('TemplateData/progress-bar-full-light.png') no-repeat center;
  background-size: 100% 30%;
}

#unity-warning {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffcccc;
  color: #cc0000;
  padding: 10px 20px;
  border-radius: 4px;
  display: none;
  max-width: 90%;
  text-align: center;
  z-index: 1000;
}

#unity-loading-text {
  position: absolute;
  bottom: 240px;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 20px;
  text-align: center;
  font-size: 16px;
  color: black;
  font-family: sans-serif;
  text-shadow: 0 0 5px #000;
}

.dot-animate::after {
  content: '';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%   { content: ''; }
  25%  { content: '.'; }
  50%  { content: '..'; }
  75%  { content: '...'; }
  100% { content: ''; }
}

/* Mobile adjustments */
@media screen and (max-width: 600px) {
  #unity-container {
    width: 100vw;
    height: calc(100vh - env(safe-area-inset-bottom));
  }
}

@media (orientation: landscape) {
  body {
    padding-right: 44px;
    padding-bottom: 21px;
    padding-left: 44px;
  }
}

@media (orientation: portrait) {
  body {
    padding-bottom: 34px;
  }
}
