html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    /* Matches SurfaceGray so there is no color flash between the splash and Compose's first frame. */
    background: #F3F4F8;
}

/* Splash shown while the Wasm/JS bundle downloads; removed by the script in index.html once Compose mounts. */
#sl-splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: #F3F4F8;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #16233B;
    transition: opacity 300ms ease;
}

#sl-splash.sl-hidden {
    opacity: 0;
    pointer-events: none;
}

#sl-splash .sl-logo {
    width: 96px;
    height: 96px;
    border-radius: 22px;
    box-shadow: 0 8px 24px rgba(22, 35, 59, 0.12);
    animation: sl-pulse 1.8s ease-in-out infinite;
}

#sl-splash .sl-title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

#sl-splash .sl-bar {
    position: relative;
    width: 200px;
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
    background: #DCE1F2;
}

#sl-splash .sl-bar::after {
    content: "";
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    border-radius: 2px;
    background: #3B55F6;
    animation: sl-slide 1.2s ease-in-out infinite;
}

#sl-splash .sl-status {
    margin: 0;
    min-height: 1.4em;
    max-width: 280px;
    padding: 0 16px;
    font-size: 14px;
    color: #475569;
    text-align: center;
}

#sl-splash.sl-error .sl-bar,
#sl-splash.sl-error .sl-logo {
    animation: none;
}

#sl-splash.sl-error .sl-bar::after {
    display: none;
}

#sl-splash.sl-error .sl-status {
    color: #E53935;
}

@keyframes sl-slide {
    0% { left: -40%; }
    100% { left: 100%; }
}

@keyframes sl-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
    #sl-splash .sl-logo { animation: none; }
    #sl-splash .sl-bar::after { animation-duration: 2.4s; }
}
