/* Unity WebGL 加载进度条样式 */

.unity-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

/* 背景图片层 */
.unity-loader-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

/* 背景暗色遮罩 */
.unity-loader-bg-dark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.unity-loader-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px 50px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    min-width: 400px;
    max-width: 600px;
    animation: fadeInUp 0.5s ease-out;
    position: relative;
    z-index: 10;
}

.unity-loader-logo {
    max-width: 100%;
    height: auto;
    margin-bottom: 30px;
    animation: pulse 2s ease-in-out infinite;
}

.unity-loader-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 30px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.unity-loader-progress-container {
    margin-bottom: 20px;
}

.unity-loader-progress-bg {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.unity-loader-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4CAF50 0%, #8BC34A 100%);
    border-radius: 15px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.4);
}

.unity-loader-progress-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 2s ease-in-out infinite;
}

.unity-loader-percentage {
    font-size: 36px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 15px;
    font-family: 'Courier New', monospace;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.unity-loader-details {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.unity-loader-filename {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.unity-loader-filesize {
    font-size: 12px;
    color: #999;
    font-family: 'Courier New', monospace;
    margin-bottom: 5px;
}

.unity-loader-speed {
    font-size: 14px;
    color: #4CAF50;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    margin-bottom: 10px;
}

.unity-loader-tip {
    font-size: 12px;
    color: #999;
    margin-top: 15px;
    font-style: italic;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .unity-loader-content {
        min-width: 90%;
        padding: 30px 20px;
        margin: 0 20px;
    }

    .unity-loader-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .unity-loader-percentage {
        font-size: 28px;
    }

    .unity-loader-progress-bg {
        height: 20px;
    }

    .unity-loader-logo {
        max-width: 150px;
    }
}
