/* 页面铺满窗口，黑底，避免滚动条 */
html, body { width: 100%; height: 100%; padding: 0; margin: 0; overflow: hidden; background: #000 }
#unity-container { position: absolute }

/* 桌面端：容器铺满整个窗口，画布居中 */
#unity-container.unity-desktop {
  position: fixed;
  left: 0; top: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

/* 移动端同样铺满并居中 */
#unity-container.unity-mobile {
  position: fixed;
  left: 0; top: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

/* 画布取窗口能容纳的最大 16:9 尺寸，比例不符时留黑边，绝不拉伸 */
#unity-canvas {
  display: block;
  background: #231F20;
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
}
.unity-mobile #unity-canvas {
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
}

#unity-loading-bar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none }
#unity-logo { width: 154px; height: 130px; background: url('unity-logo-dark.png') no-repeat center }
#unity-progress-bar-empty { 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 { width: 0%; height: 18px; margin-top: 10px; background: url('progress-bar-full-dark.png') no-repeat center }

/* 底栏改成右下角悬浮的全屏按钮，不占画面高度 */
#unity-footer {
  position: absolute;
  right: 12px;
  bottom: 12px;
  opacity: 0.35;
  transition: opacity 0.2s ease;
}
#unity-footer:hover { opacity: 1 }
.unity-mobile #unity-footer { display: none }
#unity-webgl-logo { display: none }
#unity-build-title { display: none }
#unity-fullscreen-button { cursor: pointer; width: 38px; height: 38px; background: url('fullscreen-button.png') no-repeat center }

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