﻿body {
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    position: absolute
}

#unity-container {
    position: absolute
}

#unity-container.unity-desktop {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%)
}

#unity-container.unity-mobile {
    position: fixed;
    width: 100%;
    height: 100%
}

#unity-canvas {
    background: transparent url(../TemplateData/top_bg.jpg) center center / cover no-repeat;;
    transform-origin: 0px 0px 0px;
    position: absolute;
    -webkit-box-orient: horizontal;
    -webkit-box-align: center;
    -webkit-box-pack: center;
    object-fit: contain;
    /* 防止拉伸 */
    box-sizing: border-box;
    max-width: 100vw;
    max-height: 100vh;
    /*
        以下在resize事件中进行设置
        transform
        margin
        padding
        width
        height
    */
}

.unity-mobile #unity-canvas {
    overflow: hidden;
}

#unity-loading-bar {
    display: none
}

#unity-logo {
    display: none !important;
}

#unity-progress-bar-empty {
    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 {
    width: 0%;
    height: 18px;
    margin-top: 10px;
    background: url('progress-bar-full-dark.png') no-repeat center
}

#unity-footer {
    position: relative
}

.unity-mobile #unity-footer {
    display: none
}

#unity-webgl-logo {
    display: none !important;
}

#unity-build-title {
    display: none !important;
}

#unity-fullscreen-button {
    display: none !important;
}

/* #unity-warning { position: absolute; left: 50%; top: 5%; transform: translate(-50%); background: white; padding: 10px; display: none } */
.sub_div {
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}


.sub_div {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 56.25vw;
    text-align: center;
    z-index: 10;
    margin: 0;
    padding: 0;
    font-size: 100%;
    font-family: 'Arial', serif;
    overflow: hidden;
}

.loading {
    position: absolute !important;
    top: 60%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.loading-overlay {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.loading-icon-container {
    position: relative;
    display: inline-block;
}

.loading-icon {
    width: 96px;
    height: 96px;
    animation: rotate 2s linear infinite;
}

.loading-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 25px;
    /* font-weight: bold; */
    font-family: Arial, sans-serif;
}

.loading-text {
    color: white;
    font-size: 20px;
    /* font-weight: bold; */
    font-family: Arial, sans-serif;
    letter-spacing: 3px;
    animation: pulse 1.5s ease-in-out infinite;
}

.loading-text-bottom {
    position: absolute;
    bottom: calc(13% - 60px);
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 25px;
    font-family: 'Arial', serif;
    text-align: center;
    z-index: 100;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* 响应式设计 */
@media (max-width: 1440px) {
    .loading-icon {
        width: 72px;
        height: 72px;
    }

    .loading-percentage {
        font-size: 25px;
    }

    .loading-text {
        font-size: 24px;
    }

    .loading-text-bottom {
        font-size: 22px;
        bottom: calc(15% - 50px);
    }

    .loading-overlay {
        padding: 20px;
    }
}

@media (max-width: 1080px) {
    .loading-icon {
        width: 60px;
        height: 60px;
    }

    .loading-percentage {
        font-size: 18px;
    }

    .loading-text {
        font-size: 18px;
    }

    .loading-text-bottom {
        font-size: 19px;
        bottom: calc(15% - 40px);
    }

    .loading-overlay {
        padding: 10px;
    }
}

@media (max-width: 900px) {
    .loading-icon {
        width: 50px;
        height: 50px;
    }

    .loading-percentage {
        font-size: 15px;
    }

    .loading-text {
        font-size: 20px;
    }

    .loading-text-bottom {
        font-size: 16px;
        bottom: calc(15% - 30px);
    }

    .loading-overlay {
        padding: 10px;
    }
}
