/* 基础全屏样式：html/body 占满屏幕，无内外边距，溢出隐藏 */
html, body {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #231F20; /* 画布外的背景色，可自定义 */
}

/* Unity容器：全屏居中，保持竖屏比例（9:16） */
#unity-container {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  /* 竖屏核心：宽高比 9:16，宽度最大为100vw，高度最大为100vh */
  width: 100vw;
  max-width: calc(100vh * 9 / 16); /* 高度满屏时，宽度按9:16缩放，避免横向溢出 */
  height: 100vh;
  max-height: calc(100vw * 16 / 9); /* 宽度满屏时，高度按9:16缩放，避免纵向溢出 */
}

/* 移动端/桌面端统一样式（不再区分，统一竖屏逻辑） */
#unity-container.unity-desktop,
#unity-container.unity-mobile {
  width: 100%;
  height: 100%;
}

/* Unity画布：占满容器，保持竖屏比例 */
#unity-canvas {
  width: 100%;
  height: 100%;
  background: #231F20;
  display: block; /* 消除画布默认的inline间隙 */
}

/* 加载进度条：居中显示 */
#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: relative;
  width: 100%;
  box-sizing: border-box;
  padding: 5px 10px;
}

.unity-mobile #unity-footer {
  display: none;
}

#unity-webgl-logo {
  float: left;
  width: 204px;
  height: 38px;
  background: url('webgl-logo.png') no-repeat center;
}

#unity-build-title {
  float: right;
  margin-right: 10px;
  line-height: 38px;
  font-family: arial;
  font-size: 18px;
  color: #fff; /* 适配深色背景，文字变白 */
}

#unity-fullscreen-button {
  float: right;
  width: 38px;
  height: 38px;
  background: url('fullscreen-button.png') no-repeat center;
  cursor: pointer;
}

/* 警告提示：居中显示 */
#unity-warning {
  position: absolute;
  left: 50%;
  top: 5%;
  transform: translate(-50%);
  background: white;
  padding: 10px;
  display: none;
  z-index: 100;
}