/* ============================================
   Unity WebGL Container Styles
   ============================================ */
html, body {
  margin: 0;
  padding:
    env(safe-area-inset-top)
    env(safe-area-inset-right)
    env(safe-area-inset-bottom)
    env(safe-area-inset-left);
  height: 100%;
}

#banner-ad-container {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 50px;
    z-index: 1000;
    align-items: center;
    background: transparent url('TemplateData/temporary-banner-ad.png') no-repeat center;
    visibility: hidden;
}

#unity-container {
  position: absolute;
  inset: 0;
  height: 100dvh;
}
#unity-container.unity-desktop {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%)
}
#unity-container.unity-mobile {
  position: absolute;
  inset: 0;
}
#unity-canvas {
  background: #ffffff;
}
.unity-mobile #unity-canvas {
  width: 100%;
  height: 100%
}

#unity-loading-bar {
  position: fixed;
  width: 100vw;
  height: 100vh;
  display: none;
}

#unity-logo {
  position: fixed;
  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: fixed;
  bottom: 10%;
  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%;
  z-index: 3;
}

#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: fixed;
  bottom: 15%;
  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;
  }
}
