html, body { padding: 0; margin: 0; overflow: hidden; width: 100%; height: 100%; background: #fff }
#unity-container { position: fixed; left: 0; top: 0; width: 100%; height: 100%; background: #fff }
/* 手机端全屏：整页铺满，canvas 铺满视口宽度和高度（不再固定 350×760） */
.unity-mobile #unity-container { height: 100vh; height: 100dvh; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left) }
.unity-mobile #unity-content { position: absolute; left: 0; top: 0; width: 100%; height: 100%; transform: none; max-width: none; max-height: none }
.unity-mobile #unity-game-window { width: 100%; height: 100%; max-width: none; max-height: none }
.unity-mobile #unity-canvas { width: 100% !important; height: 100% !important; display: block }
/* 和之前一样：窗口在浏览器上下左右居中；背景只占游戏窗口大小(350x760)，与 Unity 接管后一致 */
#unity-content { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1 }
/* 和之前一样：窗口在浏览器上下左右居中；首屏即用视口等比适配，避免 JS 执行前 750×1334 闪一下 */
/* 首屏宽高同时约束，避免 height:auto 导致上下留白闪一下 */
#unity-game-window { position: relative; aspect-ratio: 750 / 1334; width: min(750px, 100vw, calc(100vh * 750 / 1334)); height: min(1334px, 100vh, calc(100vw * 1334 / 750)) }
#unity-bg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 0 }
#unity-canvas { position: relative; z-index: 1; background: transparent; display: block; width: 100%; height: 100%; box-sizing: border-box }
#unity-canvas-cover { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none }
/* 进度条放在游戏窗口底部内侧，避免超出 */
#unity-loading-bar { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 2; display: none; width: 60%; max-width: 280px; text-align: center }
#unity-progress-text { font-size: 12px; color: rgba(255,255,255,0.9); margin-bottom: 6px; text-shadow: 0 1px 2px rgba(0,0,0,0.5) }
#unity-progress-bar-empty { width: 100%; height: 12px; background: rgba(0,0,0,0.3); border-radius: 6px; overflow: hidden }
#unity-progress-bar-full { width: 0%; height: 12px; background: rgb(255, 197, 61); border-radius: 6px; transition: width 0.2s }
#unity-warning { position: absolute; left: 50%; top: 5%; transform: translate(-50%); background: white; padding: 10px; display: none; z-index: 2 }
