body { padding: 0; margin: 0 }
#unity-container { position: absolute }
#unity-container.unity-desktop { left: 50%; top: 50%; transform: translate(-50%, -50%) }
#unity-container.unity-mobile { position: fixed; width: 100%; height: 100% }
#unity-canvas { background: #1F1F20 }
.unity-mobile #unity-canvas { width: 100%; height: 100% }
#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 }
.unity-mobile #unity-footer { display: none }
#unity-logo-title-footer { float:left; width: 102px; height: 38px; background: url('unity-logo-title-footer.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 }

/* Browser viewport expansion; fixed canvas backing, CSS aspect-fit only. */
#game-controls { position:absolute;top:0;left:0;right:0;z-index:10000;text-align:center;pointer-events:none }
#game-controls button { pointer-events:auto }
#game-controls span:not(:empty) { background:#222;color:white;font:14px sans-serif }
#unity-fullscreen-button { width:auto;min-width:92px;height:38px;background:#087e9a;color:white;border:0;cursor:pointer;padding:0 12px;font:14px sans-serif }
#unity-container.viewport-expanded { position:fixed;inset:0;left:0;top:0;transform:none;width:100vw;height:100vh;height:100dvh;box-sizing:border-box;padding-top:38px;background:black;display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:9999 }
#unity-container.viewport-expanded #unity-canvas { width:min(100vw, max(1px, calc((100vh - 76px) * 1.6))) !important;width:min(100vw, max(1px, calc((100dvh - 76px) * 1.6))) !important;height:auto !important;aspect-ratio:8 / 5;flex:none }
#unity-container.viewport-expanded #unity-footer { display:flex;align-items:center;justify-content:space-between;width:min(100vw, max(1px, calc((100vh - 76px) * 1.6)));width:min(100vw, max(1px, calc((100dvh - 76px) * 1.6)));height:38px;flex:none;background:white }
#unity-container.viewport-expanded #unity-build-title { overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:12px;min-width:0 }
#unity-container.viewport-expanded #unity-fullscreen-button { flex-shrink:0 }
@media(max-width:480px) { #unity-container.viewport-expanded #unity-logo-title-footer { display:none } }
