html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* 캔버스는 항상 블록 요소로 */
canvas {
    display: block;
}

/* 공통 컨테이너 레이아웃 */
#unity-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
}

/* 데스크톱일 때: 가운데 정렬된 고정 크기 캔버스 느낌 */
#unity-container.unity-desktop {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 모바일일 때: 화면 전체를 캔버스가 채우도록 */
#unity-container.unity-mobile {
    display: flex;
    align-items: stretch;
    justify-content: stretch;
}

/* Unity 캔버스 기본 */
#unity-canvas {
    /* JS에서 width/height 지정해주기 때문에 여기선 max 한 번만 잡아줌 */
    max-width: 100%;
    max-height: 100%;
    background: #000;
}

/* 로딩 바 영역 (캔버스 위에 오버레이) */
#unity-loading-bar {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none; /* 클릭 막기 */
}

/* 로고 자리 (이미지 있으면 넣어서 쓰면 됨) */
#unity-logo {
    text-align: center;
    margin-bottom: 12px;
    pointer-events: none;
}

#unity-logo img {
    max-width: 80%;
    max-height: 80%;
    pointer-events: none;
}

/* 프로그레스 바 테두리 */
#unity-progress-bar-empty {
    width: 40%;
    min-width: 200px;
    max-width: 480px;
    height: 20px;
    border: 1px solid #ffffff;
    padding: 2px;
    box-sizing: border-box;
}

/* 실제 채워지는 부분 */
#unity-progress-bar-full {
    width: 0%;
    height: 100%;
    background: #ffffff;
    transition: width 0.3s ease;
}

/* 테마를 라이트로 쓰고 싶으면 body 에 .light 달면 반전됨 */
.light #unity-progress-bar-empty {
    border-color: #000;
}

.light #unity-progress-bar-full {
    background: #000;
}

/* 하단 푸터 영역 (로고 / 풀스크린 버튼 / 빌드 타이틀) */
#unity-footer { display: none !important; }


/* WebGL / Unity 로고 자리 (이미지 있으면 background로) */
#unity-webgl-logo { pointer-events: none; }

/* 풀스크린 버튼 */
#unity-fullscreen-button 
{ 
    display: none !important; 
}

#unity-fullscreen-button::before{
  content:"⤢";
  font-size:14px;
}

/* 빌드 타이틀 텍스트 */
#unity-build-title { pointer-events: none; }

/* 모바일에서 푸터가 너무 두껍지 않게 조정 */
@media (max-width: 768px) {
    #unity-progress-bar-empty {
        width: 60%;
        min-width: 160px;
    }

    #unity-footer {
        font-size: 11px;
        padding: 4px;
        gap: 8px;
    }

    #unity-webgl-logo,
    #unity-fullscreen-button {
        width: 28px;
        height: 28px;
    }
}
