html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #111720;
}

#unity-container,
#unity-container.unity-desktop,
#unity-container.unity-mobile {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  transform: none;
}

#unity-canvas,
.unity-mobile #unity-canvas {
  display: block;
  /* Unity's default template assigns fixed desktop dimensions inline. */
  width: 100% !important;
  height: 100% !important;
  background: #111720;
  outline: none;
}

#unity-footer {
  display: none;
}

#unity-warning {
  z-index: 20;
  box-sizing: border-box;
  max-width: min(90%, 720px);
}

#player-controls {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 24px);
  transform: translateX(-50%);
  font: 600 12px/1.2 Arial, sans-serif;
  pointer-events: none;
}

#player-controls[hidden],
#unity-fullscreen-button[hidden],
#player-fullscreen-status[hidden] {
  display: none !important;
}

#unity-fullscreen-button {
  float: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: auto;
  min-height: 36px;
  height: auto;
  padding: 8px 11px;
  border: 1px solid rgba(173, 217, 239, .55);
  border-radius: 6px;
  color: #effaff;
  background: rgba(9, 20, 31, .78);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
  font: inherit;
  white-space: nowrap;
  opacity: .82;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
}

#unity-fullscreen-button:hover,
#unity-fullscreen-button:focus-visible {
  opacity: 1;
  border-color: #82e9ff;
  background: #142b3c;
}

#unity-fullscreen-button:focus-visible {
  outline: 2px solid #82e9ff;
  outline-offset: 3px;
}

#unity-fullscreen-button[aria-disabled="true"] {
  cursor: wait;
}

#unity-fullscreen-button svg {
  width: 16px;
  height: 16px;
  flex: none;
}

#player-fullscreen-status {
  max-width: 340px;
  padding: 8px 11px;
  border-radius: 6px;
  color: #f5f8fa;
  background: rgba(9, 20, 31, .94);
  text-align: center;
}

@media (max-width: 600px) {
  #player-controls {
    top: max(8px, env(safe-area-inset-top));
  }

  #unity-fullscreen-button {
    min-height: 36px;
    padding: 8px;
  }

  #player-fullscreen-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
