﻿body {
    padding: 0;
    margin: 0;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.webgl-content {
    width: 100%;
    height: 100%;
}

.unityContainer {
    width: 100%;
    height: 100%;
}
/* 关键：容器用 relative，loading bar 才能贴在 canvas 底部 */

#unity-container {
    position: relative;
    width: 100%;
    height: 100%;
}
    /* 保留你的桌面/移动端布局逻辑 */

    #unity-container.unity-desktop {
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    #unity-container.unity-mobile {
        width: 100%;
        height: 100%;
    }

#unity-canvas {
    background: url('beijing.png') no-repeat center;
}

.unity-mobile #unity-canvas {
    width: 100%;
    height: 100%;
}
/* ✅ 改：进度条贴 canvas 底部，并且拉长 */

#unity-loading-bar {
    position: absolute;
    left: 50%;
    bottom: 100px; /* 距离 canvas 底部 */
    transform: translateX(-50%); /* 水平居中 */
    display: none;
    width: min(92vw, 1400px); /* 整体拉长：手机按 vw，桌面限制最大宽 */
    pointer-events: none;
}
/* ✅ 改：空槽铺满 loading-bar 宽度（不要写死 1410px） */

#unity-progress-bar-empty {
    width: 100%;
    height: 18px;
    margin-top: 0;
    margin-left: 0;
    background: url('progress-bar-empty-dark.png') no-repeat center;
    background-size: 100% 100%; /* 拉伸铺满 */
    position: relative;
    overflow: hidden;
}
/* ✅ 改：满槽同样铺满并随进度增长 */

#unity-progress-bar-full {
    width: 0%;
    height: 18px;
    margin-top: 0px;
    background: url('progress-bar-full-dark.png') no-repeat center;
    background-size: 100% 100%; /* 拉伸铺满 */
}

#unity-footer {
    position: relative;
}

.unity-mobile #unity-footer {
    display: none;
}

#unity-webgl-logo {
    float: left;
    width: 204px;
    height: 38px;
    background: url('webgl-logo.png') no-repeat center;
}

#unity-build-title {
    float: right;
    margin-right: 10px;
    line-height: 38px;
    font-family: arial;
    font-size: 18px;
}

#unity-fullscreen-button {
    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;
}

