:root {
    --main-sty-color: #ffffff;
    --canvas-overlay-color: #ffffff;
}

/* ===== Base ===== */
* {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: black;
    background-image: url(background.png); /* TemplateData/background.png */
    background-repeat: no-repeat;
    background-position: 50% 50%;
    background-size: cover;
}

/* ===== Unity Layout ===== */
#unity-container {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
}

    #unity-container.unity-mobile {
        width: 100%;
        height: calc(var(--vh, 1vh) * 100);
    }

    #unity-container.unity-mobileAndriod {
        width: 100%;
        height: 100%;
    }

#unity-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 0; /* 로딩UI 아래 */
}

/* ===== Loading UI ===== */
#unity-loading-bar {
    position: absolute;
    inset: 0;
    display: flex; /* 기본값을 무조건 보이게 */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 14px;
    z-index: 10; /* ★ 캔버스 위로 올림 */
    pointer-events: none; /* 클릭 막지 않게 */
}

#progress-move-char {
    width: 80%;
    max-width: 700px;
    height: 150px;
    position: relative;
}

/* 초록 빈 바 */
#unity-progress-bar-empty {
    width: 80%;
    max-width: 700px;
    height: 22px;
    border-radius: 999px;
    background: #4CAF50; /* 초록 */
    overflow: hidden;
    /* 눈에 더 잘 보이게(선택) */
    box-shadow: 0 0 0 2px rgba(255,255,255,0.25);
}

/* 노랑 채움 바 */
#unity-progress-bar-full {
    width: 0%;
    height: 100%;
    background: #FFD400; /* 노랑 */
    border-radius: 999px;
}

/* 움직이는 이미지 */
#moving_bug, #moving_bard {
    position: absolute;
    left: 0px;
    bottom: 0px;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

/* 애벌레 */
#moving_bug {
    width: 90px;
    height: auto;
    bottom: 0px;
}

/* 새 */
#moving_bard {
    width: 180px;
    height: auto;
    bottom: 40px;
}

/* 로딩 텍스트 */
#loading-text {
    color: white;
    font-family: Arial, sans-serif;
    font-size: 18px;
    opacity: 0.9;
}

/* ===== Footer (선택) ===== */
#unity-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    padding: 0 12px;
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
    z-index: 5;
}

#unity-build-title {
    font-family: arial, sans-serif;
    font-size: 18px;
    color: #ffffff;
    opacity: 0.9;
}

.unity-mobile #unity-footer,
.unity-mobileAndriod #unity-footer {
    display: none;
}
