body {
  margin: 0;
  padding: 0;
  background: #231f20;
  overflow: hidden;
}

/* ── Container ── */
#unity-container {
  position: absolute;
  width: 100%;
  height: 100%;
}

#unity-container.unity-desktop {
  width: 100%;
  height: 100%;
}

#unity-container.unity-mobile {
  width: 100%;
  height: 100%;
}

/* ── Canvas ── */
#unity-canvas {
  display: block;
  background: #231f20;
}

.unity-desktop #unity-canvas {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.unity-mobile #unity-canvas {
  width: 100%;
  height: calc(100% - 42px);
}

/* ── Loading bar ── */
#unity-loading-bar {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: none;
  z-index: 10;
}

#unity-logo {
  width: 154px;
  height: 130px;
  background: url("unity-logo-dark.png") no-repeat center;
}

#unity-progress-bar-empty {
  position: relative;
  width: 141px;
  height: 18px;
  margin-top: 10px;
  margin-left: 6.5px;
  background: url("progress-bar-empty-dark.png") no-repeat center;
}

#unity-progress-bar-full {
  position: absolute;
  left: 0;
  top: 0;
  width: 0%;
  height: 18px;
  background: url("progress-bar-full-dark.png") no-repeat center;
  background-size: 141px 18px;
}

#webgl-progress-label {
  color: #aaa;
  font-size: 12px;
  font-family: arial, sans-serif;
  margin-top: 8px;
  text-align: center;
}

/* ── Footer (inside container so native fullscreen keeps it visible) ── */
#unity-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 38px;
  background: rgba(0, 0, 0, 0.55);
  z-index: 5;
  display: flex;
  align-items: center;
}

#unity-webgl-logo {
  width: 204px;
  height: 38px;
  background: url("webgl-logo.png") no-repeat center;
  flex: 0 0 auto;
}

#unity-build-title {
  flex: 1 1 auto;
  text-align: right;
  margin-right: 10px;
  line-height: 38px;
  font-family: arial, sans-serif;
  font-size: 14px;
  color: #ccc;
}

#unity-fullscreen-button {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  background: url("fullscreen-button.png") no-repeat center;
  background-size: 24px 24px;
  cursor: pointer;
  display: none;
  margin-right: 6px;
}

#unity-fullscreen-button.fs-active {
  opacity: 0.6;
}

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

/* ── Pseudo-fullscreen (CSS fallback when native API is unavailable) ── */
.pseudo-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 2147483646 !important;
}

.pseudo-fullscreen #unity-canvas {
  width: 100vw !important;
  height: 100vh !important;
  position: static !important;
  transform: none !important;
}

.pseudo-fullscreen #unity-footer {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 2147483647 !important;
}

/* iOS safe area */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .unity-mobile #unity-footer,
  .pseudo-fullscreen #unity-footer {
    padding-bottom: env(safe-area-inset-bottom);
  }
}
