/* 1. BODY SETTINGS: Black background, no scrollbars, Flexbox centering */
body { 
    padding: 0; 
    margin: 0; 
    background: #000; /* Black bars */
    width: 100vw;
    height: 100vh;
    overflow: hidden; /* Prevent scrollbars */
    
    /* Flexbox to center the container perfectly */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 2. CONTAINER SETTINGS: Relative positioning for Webview anchoring */
#unity-container { 
    position: relative; /* Essential for gree/unity-webview plugin */
    background: transparent !important;
    /* Width and Height are set dynamically by JavaScript in index.html */
}

/* Remove the old transform centering, let Flexbox handle it */
#unity-container.unity-desktop { 
    width: auto; 
    height: auto;
}

/* 3. CANVAS SETTINGS: Fill the container */
#unity-canvas { 
    background: url('background.png') no-repeat center;
	background-size: cover;
    width: 100%; 
    height: 100%; 
    display: block;
}

.unity-mobile #unity-canvas { 
    width: 100%; 
    height: 100%; 
}

/* Loading Bar */
#unity-loading-bar { 
    position: absolute; 
    left: 50%; 
    top: 50%; 
    transform: translate(-50%, -50%); 
    display: none; 
    z-index: 10; /* Ensure it sits on top */
}

#unity-logo { 
    width: 154px; 
    height: 130px; 
    background: url('unity-logo-dark.png') no-repeat center; 
}

#unity-progress-bar-empty { 
    width: 550px; 
    height: 8px; 
    margin-top: 10px; 
    margin-left: 6.5px; 
    background: url('ResourceLoadingBar_Background.png') no-repeat center; 
}

#unity-progress-bar-full { 
    width: 0%; 
    height: 8px; 
    margin-top: 10px; 
    background: url('ResourceLoadingBar_Foreground.png') no-repeat center; 
}

/* Footer: Hidden for full view */
#unity-footer { 
    display: none !important; 
}

.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: 38px; 
    height: 38px; 
    background: url('fullscreen-button.png') no-repeat center; 
}

#unity-warning { 
    position: absolute; 
    left: 50%; 
    top: 5%; 
    transform: translate(-50%); 
    background: white; 
    padding: 10px; 
    display: none; 
}
