#custom-unity-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

#custom-unity-loader .loader-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

#custom-unity-loader .loader-content {
    position: relative;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 32px 40px;
    border-radius: 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: min(360px, calc(100vw - 96px));
    transition: all 0.7s ease;
    animation: slideUpFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#custom-unity-loader .spinner-wrapper {
    margin-bottom: 32px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#custom-unity-loader .spinner-ring {
    width: 80px;
    height: 80px;
    border: 4px solid #f1f5f9;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

#custom-unity-loader .spinner-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: colors 0.5s;
    color: #3b82f6;
}

#custom-unity-loader .text-section {
    text-align: center;
}

#custom-unity-loader .loader-title {
    color: #1e293b;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.025em;
    margin: 0 0 12px 0;
    transition: all 0.5s;
}

#custom-unity-loader .loader-subtitle {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

#custom-unity-loader .loader-progress-area {
    width: 100%;
    margin-top: 32px;
}

#custom-unity-loader .loader-progress-track {
    height: 8px;
    width: 100%;
    background-color: rgba(226, 232, 240, 0.5);
    border-radius: 9999px;
    overflow: hidden;
}

#custom-unity-loader .loader-progress-bar {
    height: 100%;
    background: linear-gradient(to right, #60a5fa, #6366f1);
    width: 0%;
    transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: width;
}

#custom-unity-loader .loader-dots {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

#custom-unity-loader .loader-dots .dot {
    height: 6px;
    width: 6px;
    background-color: #cbd5e1;
    border-radius: 9999px;
    transition: all 0.5s;
}

#custom-unity-loader .loader-dots .dot.dot-active {
    width: 24px;
    background-color: #3b82f6;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideUpFadeIn {
    0% { opacity: 0; transform: translateY(15px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- 手机端自适应 ---- */
@media (max-width: 600px) {
    #custom-unity-loader .loader-content {
        padding: 20px 28px;
        border-radius: 22px;
        min-width: 0;
        width: calc(100vw - 96px);
        max-width: 280px;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    #custom-unity-loader .spinner-wrapper {
        margin-bottom: 20px;
    }

    #custom-unity-loader .spinner-ring {
        width: 56px;
        height: 56px;
        border-width: 3px;
    }

    #custom-unity-loader .spinner-icon svg {
        width: 18px;
        height: 18px;
    }

    #custom-unity-loader .loader-title {
        font-size: 15px;
        margin-bottom: 6px;
    }

    #custom-unity-loader .loader-subtitle {
        font-size: 12px;
    }

    #custom-unity-loader .loader-progress-area {
        margin-top: 20px;
    }

    #custom-unity-loader .loader-progress-track {
        height: 6px;
    }

    #custom-unity-loader .loader-dots {
        margin-top: 12px;
        gap: 6px;
    }

    #custom-unity-loader .loader-dots .dot {
        height: 5px;
        width: 5px;
    }

    #custom-unity-loader .loader-dots .dot.dot-active {
        width: 18px;
    }
}
