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: #231F20 }
.unity-mobile #unity-canvas { /* 1. 確保 Canvas 填滿父容器 (#unity-container) */
    width: 100% !important;
    height: 100% !important;

    /* 2. 關鍵：使用 object-fit 鎖定長寬比 */
    /* contain: 確保內容完整可見，不裁切，同時保持長寬比。
       它會在較短的邊留下黑邊（Letterboxing 或 Pillarboxing）。*/
    object-fit: contain; 
    
    /* 3. 確保居中 (通常與 object-fit 配合使用以獲得最佳效果) */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); }
#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-warning { position: absolute; left: 50%; top: 5%; transform: translate(-50%); background: white; padding: 10px; display: none }

/*----------------------------------------------------------------------------
Unity-webgl
----------------------------------------------------------------------------*/
#unity-webgl{
	/* 16:9 */
	width: 640px ;/*デフォルトの横幅*/
	height: 360px ;/*デフォルトの縦幅*/
}
@media screen and (max-width: 1240px){/*1240px以下*/
	#unity-webgl{
		width: 640px ;
		height: 360px ;
	}
}
@media screen and (max-width: 1023px){/*1023px以下*/
	#unity-webgl{
		width: 640px ;
		height: 3600px ;
	}
}
@media screen and (max-width: 834px){/*834px以下*/
	#unity-webgl{
		width: 480px ;
		height: 270px ;
	}
}
@media screen and (max-width: 480px){/*480px以下*/
	#unity-webgl{
		width: 400px ;
		height: 225px ;
	}
}
