body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: url(bg.png) no-repeat center center;
    background-size:
        cover,
        /* foreground: 너비 꽉, 높이는 비율 유지 */ cover;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

@media only screen and (max-aspect-ratio: 10/16) {
    body {
        background: none;
    }
}

#unity-container {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: inline-block; /* 우측 배너와 나란히 배치 */
}
#unity-canvas {
    width: 100%;
    height: 100%;
    background: #ffffff;
}

#custom-bg,
#custom-loader {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

#custom-bg {
    /*
    background-image: url("background.png");
    background-size: auto 100vh;
    background-repeat: no-repeat;
    background-position: center;

    width: 100vw;
    height: 100vh;
	*/

    background:
        url("background.jpg") no-repeat center center,
        url("bg.png") no-repeat center center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* 1) 앞에 background.png, 2) 뒤에 bg.png */
    /* 각각의 background-size */
    background-size:
        auto 100vh,
        /* background.png */ cover; /* bg.png */
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

#custom-loader {
    position: absolute;
    top: 85%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(0.65 * min(100vw, 100vh * (1080 / 1920)));
    aspect-ratio: 700 / 46;
    --fill-progress: 0;
}

#custom-loader .fill {
    position: absolute;
    top: 50%;
    left: 0.5vh;
    transform: translateY(-50%);

    /* 여유 공간만큼 실제 너비에서 빼줌 */
    width: calc((100% - 0.6vh) * var(--fill-progress));

    height: 75%;

    /* 배경 이미지는 왼쪽 정렬 */
    background-image: url("LoadingBar_IMG_00.png");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: left center;

    box-sizing: border-box;
    transition: width 300ms ease;
    z-index: 2;
}

#custom-loader .empty {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url("LoadingBar_BG.png");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 1;
    transition: border-radius 0.1s ease;
}

#custom-loader .progress {
    position: absolute;
    width: 100%;
    height: auto;

    /* progress-text의 높이만큼 empty의 위로 이동시킴 */
    bottom: 100%;
    left: 0;
    z-index: 3;
}

#custom-loader .progress::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: calc(var(--fill-progress) * 1%);
}

#custom-loader .progress .progress-text {
    display: none;
}

.rightBanner img {
    content: url("https://maplepuzzle-test.dn.nexoncdn.co.kr/MaplePuzzle/Dev/WebGL/image/1/qrlogin/qrloginbanner.png");
    width: 427px;
    height: 170px;
}

.liteBanner img {
    width: 427px;
    height: 170px;
}

@media (min-width: 1010px) and (max-width: 1520px) {
    .rightBanner img {
        content: url("https://maplepuzzle-test.dn.nexoncdn.co.kr/MaplePuzzle/Dev/WebGL/image/1/qrlogin/qrloginbanner_short.png");
        /* width: 170px;
        height: 224px; */
    }
    .liteBanner img {
        /* width: 170px;
        height: 224px; */
    }
}

/* 2,000px 이하에서는 숨김 */
@media (max-height: 250px) {
    .rightBanner {
        display: none;
    }

    .liteBanner img {
        display: none;
    }

    .slideDiv img {
        display: none;
    }
}

/* 2,000px 이하에서는 숨김 */
@media (max-width: 1000px) {
    .rightBanner {
        display: none;
    }
    .liteBanner {
        display: none;
    }
}

.rightBanner {
    position: absolute;
    top: calc(6.3vh);
    //left: calc(100% + 20px);
    left: 50%; /* 화면 가로 중앙 기준 */

    transform: translateX(30vh); /* 중앙에서 오른쪽으로 10vh 이동 */

    /* 축소 후 보여질 영역 크기 = 원본(854×340)의 절반 */
    overflow: hidden;
    z-index: 10;
}

.liteBanner {
    position: absolute;
    top: calc(6.3vh);
    //left: calc(100% + 20px);
    left: 50%; /* 화면 가로 중앙 기준 */

    transform: translateX(30vh); /* 중앙에서 오른쪽으로 10vh 이동 */

    /* 축소 후 보여질 영역 크기 = 원본(854×340)의 절반 */
    overflow: hidden;
    z-index: 10;
}

#slideDiv {
    position: fixed;
    top: 50%;
    right: -365px;
    transform: translateY(-50%);
    transition: right 0.5s ease;
    width: 435px;
    height: 538px;
    cursor: pointer;
    z-index: 999;
    visibility: hidden;
    display: none;
}

#slideDiv.ready {
    visibility: visible;
}

#slideDiv.show {
    right: 0;
}

#slideImg {
    width: 100%;
    height: 100%;
    display: block;
}

@media (max-width: 1010px) and (min-width: 750px) {
    #slideDiv {
        display: block;
    }
}

@media (max-aspect-ratio: 11/16) {
    #slideDiv {
        display: none !important;
    }
}

#slideshow {
	position: fixed;
	left: 50%;
	top: calc(50% + 24vh);
	transform: translate(-50%, -50%);
	z-index: 1000;
}

#slideshow img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 5.6vh;
}

#badge {
	position: fixed;
	left: 50%;
	top: calc(50% + 29vh);
	transform: translateX(-50%);
	width: 100%;
	height: auto;
	object-fit: contain;
	max-width: 35.6vh;
	z-index: 1000;
}
