﻿body {
    padding: 0;
    margin: 0;
}

/* ======= Layout Base ======= */
#unity-container {
    position: absolute;
}

    /* Desktop layout */
    #unity-container.unity-desktop {
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    /* Mobile layout */
    #unity-container.unity-mobile {
        position: absolute;
        width: 100vw;
        height: auto;
        max-height: 100vh;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background-color: #000;
    }

/* Canvas base */
#unity-canvas {
    background: #231F20;
}

/* Canvas mobile (16:10 aspect ratio) */
.unity-mobile #unity-canvas {
    width: 100vw;
    height: auto;
    aspect-ratio: 16 / 10;
    max-height: 100vh;
    display: block;
    margin: 0 auto;
    touch-action: none;
}

/* Fallback for older browsers */
@supports not (aspect-ratio: 16 / 10) {
    .unity-mobile #unity-canvas {
        height: calc(100vw * 0.625);
    }
}

/* ======= Loading Bar ======= */
#unity-loading-bar {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: none;
    text-align: center;
    width: 160px;
}

/* Custom loading text (your style) */
#loading {
    width: 50%;
    height: 50%;
    margin-top: 10px;
    font-family: Roboto-Bold;
    font-size: 30px;
    color: white;
    text-align: center;
}

/* Logo and progress bars */
#unity-logo {
    width: 154px;
    height: 130px;
    background: url('unity-logo-dark.png') no-repeat center;
    background-size: contain;
    margin: 0 auto;
}

#unity-progress-bar-empty {
    width: 141px;
    height: 18px;
    margin-top: 10px;
    background: url('progress-bar-empty-dark.png') no-repeat center;
}

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

/* Footer */
#unity-footer {
    position: relative;
}

.unity-mobile #unity-footer {
    display: none;
}

/* Branding */
#unity-webgl-logo {
    float: left;
    width: 204px;
    height: 38px;
    background: url('webgl-logo.png') no-repeat center;
    background-size: contain;
}

#unity-build-title {
    float: right;
    margin-right: 10px;
    line-height: 38px;
    font-family: Arial, sans-serif;
    font-size: 18px;
}

#unity-fullscreen-button {
    float: right;
    width: 38px;
    height: 38px;
    background: url('fullscreen-button.png') no-repeat center;
    background-size: contain;
    cursor: pointer;
}

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

/* Mobile UI scale */
@media screen and (max-width: 768px) {
    #unity-logo,
    #unity-progress-bar-empty,
    #unity-progress-bar-full {
        transform: scale(0.98);
        transform-origin: center;
    }
}
