/* Base body styles for centering and background */
body { padding: 0; margin: 0 } /* Base from original file */
#unity-container { position: absolute } /* Base from original file, overridden by more specific rules */

body { /* Enhanced body for flex centering */
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background-color: #231F20; /* Matches canvas background */
}

/* --- Desktop Container --- */
#unity-container.unity-desktop {
    /* Sizing & Aspect Ratio */
    width: 100%;
    height: 100%;
    max-width: 75vh; /* Max width = 3/4 of viewport height */
    max-height: 100vh; /* Max height = viewport height */
    aspect-ratio: 3 / 4; /* Force 3:4 ratio */

    /* Centering (Flexbox on body handles most centering, margin: auto is fallback) */
    margin: auto;

    /* Positioning context for children */
    position: relative; /* Changed from absolute */

     /* Removed old centering method from original file */
    /* left: 50%; top: 50%; transform: translate(-50%, -50%) */
}

/* --- Mobile Container (Remains full screen) --- */
#unity-container.unity-mobile { /* Styles from original file */
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0; /* Added to ensure full coverage */
    left: 0; /* Added to ensure full coverage */
}

/* --- Canvas Styling (Applies to both Desktop & Mobile) --- */
#unity-canvas {
    display: block; /* Remove potential space below canvas */
    width: 100%;
    height: 100%;
    /* Canvas background from your Tow N Go style.css */
    background: #231F20;
    /* Ensure canvas is correctly positioned within the container */
    position: absolute;
    top: 0;
    left: 0;
}

/* Mobile canvas rule from original file - redundant now, but harmless */
.unity-mobile #unity-canvas { width: 100%; height: 100% }

/* --- Loading Bar --- */
#unity-loading-bar { /* Styles from original file */
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 2; /* Ensure it's above the canvas */
}

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

#unity-progress-bar-empty { /* Styles from original file */
    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 { /* Styles from original file */
    width: 0%;
    height: 18px;
    margin-top: 10px;
    background: url('progress-bar-full-dark.png') no-repeat center;
}

/* --- Footer --- */
#unity-footer { /* Styles from original file, adjusted for absolute positioning */
    position: absolute;
    bottom: 5px;
    width: 100%;
    height: 38px;
    z-index: 1;
}

/* Hide footer on mobile */
.unity-mobile #unity-footer { display: none } /* Styles from original file */

/* --- Warning Banner --- */
#unity-warning { /* Styles from original file */
    position: absolute;
    left: 50%;
    top: 5%;
    transform: translateX(-50%); /* Changed from translate(-50%) for consistency */
    background: white;
    padding: 10px;
    display: none;
    z-index: 3;
    text-align: center;
    color: #333;
    border-radius: 5px;
    max-width: 90%;
}