html {
    width: 100%;
    height: 100%;
    overflow: hidden;
  }
  
  body {
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
  }
  
  /* 占满视口，裁掉超出部分，避免横竖大滚动条 */
  #unity-container {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }
  
  /* 桌面：仍在可视区域内居中画布，但外层已被 100% 框死 */
  #unity-container.unity-desktop {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* 手机：保持你原来的全屏思路 */
  #unity-container.unity-mobile {
    position: fixed;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    display: block;
  }
  
  #unity-canvas {
    background: #231F20;
    display: block;
    /* 画布像素由 Unity 设置时，限制在窗口内缩放，少撑破 body */
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
  }
  
  .unity-mobile #unity-canvas {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
  }
  
  #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;
  }
  
  /* 底部条别用 float 把页面撑宽：固定贴底 + 内部包住 */
  #unity-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    min-height: 38px;
  }
  
  .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;
  }
  
  #unity-fullscreen-button {
    cursor: pointer;
    float: right;
    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;
  }