@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

html, body {
    margin: 0;
    width: 100%;
    height: 100%;
}

body {
    overflow: hidden;
    background-color: #0f1219;
    background-image: url("https://content.ragdolldynamics.com/e1b576f9-3a09-4bb6-a781-406fd9cdfe18.png");
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    opacity: 0;
}

body.is-ready canvas {
    opacity: 1;
}

.loader {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        linear-gradient(rgba(10, 14, 20, 0.72), rgba(10, 14, 20, 0.72)),
        url("https://content.ragdolldynamics.com/e1b576f9-3a09-4bb6-a781-406fd9cdfe18.png");
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    color: #e9eefb;
    transition: opacity 200ms ease-in;
}

body.is-ready .loader {
    opacity: 0;
    pointer-events: none;
}

.loader-panel {
    width: min(360px, 100%);
    padding: 36px 32px;
    border-radius: 20px;
    background: rgba(14, 18, 26, 0.5);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}

.loader-logo {
    display: block;
    width: min(140px, 36vw);
    max-width: 100%;
    height: auto;
    margin: 0 auto 28px auto;
}

.loader-title {
    margin: 0 0 6px 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #e9eefb;
}

.loader-status {
    margin: 0 0 20px 0;
    font-size: 13px;
    font-weight: 400;
    color: rgba(200, 209, 234, 0.6);
}

.loader-track {
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.loader-progress {
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #7fb0ff 0%, #69ffd8 100%);
    transition: width 200ms ease-out;
}

.loader-progress.is-indeterminate {
    transition: none;
    background: linear-gradient(
        90deg,
        rgba(127, 176, 255, 0) 0%,
        rgba(127, 176, 255, 0.9) 40%,
        rgba(105, 255, 216, 0.9) 60%,
        rgba(105, 255, 216, 0) 100%
    );
    background-size: 40% 100%;
    background-repeat: no-repeat;
    animation: loader-indeterminate 1.2s ease-in-out infinite;
}

@keyframes loader-indeterminate {
    0%   { background-position: -40% 0; }
    100% { background-position: 140% 0; }
}

.loader-detail {
    margin: 12px 0 0 0;
    font-size: 11px;
    font-weight: 400;
    color: rgba(200, 209, 234, 0.35);
    font-variant-numeric: tabular-nums;
    min-height: 1em;
}

.loader-error .loader-status {
    color: #ff8a8a;
}

.loader-error .loader-progress {
    background: #ff6b6b;
}
