/* The splash covers the page from the first paint until the game draws its first frame.  A page sets
   --boot-background and --boot-foreground on #boot-splash to match its own colors. */
#boot-splash {
    position: fixed;
    inset: 0;
    /* Under the crash overlay, which has to stay readable if the boot fails. */
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--boot-background, #14161c);
    color: var(--boot-foreground, #ccc);
    font-family: system-ui, sans-serif;
}

#boot-splash .boot-title {
    font-size: 2.5rem;
}

#boot-splash .boot-bar {
    width: min(360px, 60vw);
    height: 6px;
    overflow: hidden;
    border-radius: 3px;
    background: rgba(128, 128, 128, 0.3);
}

/* Boot has no measurable fraction, so the bar only shows that something is moving. */
#boot-splash .boot-bar::before {
    content: "";
    display: block;
    width: 30%;
    height: 100%;
    background: var(--boot-foreground, #ccc);
    animation: boot-slide 1.2s ease-in-out infinite alternate;
}

@keyframes boot-slide {
    from { transform: translateX(0); }
    to { transform: translateX(233%); }
}

@media (prefers-reduced-motion: reduce) {
    #boot-splash .boot-bar::before {
        animation: none;
        width: 100%;
        opacity: 0.5;
    }
}
