#unity-container {
    height: 70%; /* Responsive width relative to viewport */
    max-height: 920px; /* Caps maximum desktop width */
    aspect-ratio: 16 / 9; /* Automatically locks height to 16:9 */
    margin: 20px auto; /* Centers container horizontally using standard flex/block flow */
    position: relative;
    box-sizing: border-box;
    margin-bottom:50px;
}

    /* REMOVED transform translate centering to prevent resize loop */
    #unity-container.unity-desktop {
        position: relative;
        left: 0;
        top: 0;
        transform: none;
    }

    #unity-container.unity-mobile {
        position: fixed;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
    }

/* Force canvas to strictly stay inside the parent container bounds */
#unity-canvas {
    width: 100% !important;
    height: 100% !important;
    background: #FFFFFF;
    display: block;
    border-radius:10px;
 
}
.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: 154px; background: url('unity-logo-dark.png') no-repeat center; background-size:cover}
#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: 50px; height: 50px; background: url('fullscreen-button.png') no-repeat center; background-size:cover;margin-top:10px }
#unity-warning { position: absolute; left: 50%; top: 5%; transform: translate(-50%); background: white; padding: 10px; display: none }
