body {
  margin: 0;
  padding: 0;
  background: #231f20;
  overflow: hidden;
}

/* Native fullscreen: fill the screen — no stretched “fake” fullscreen */
html:fullscreen,
html:-webkit-full-screen {
  background: #231f20;
  width: 100%;
  height: 100%;
}

html:fullscreen body,
html:-webkit-full-screen body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

html:fullscreen #unity-container,
html:-webkit-full-screen #unity-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#unity-container:fullscreen,
#unity-container:-webkit-full-screen {
  background: #231f20;
  width: 100%;
  height: 100%;
}

/* ── 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 ── */
#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;
}

/* iOS safe area */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .unity-mobile #unity-footer {
    padding-bottom: env(safe-area-inset-bottom);
  }
}
