.fullscreen {
    position: fixed;
    inset: 0 0 0 0;
}

.splashscreen {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    height: 100%;

    overflow: hidden;
    text-align: center;

    background-color: #1976d2;
    color: white;

    font-family: system-ui, sans-serif;
}

.splashscreen > h1 {
    margin-bottom: 1em;
}

.splashscreen > h2 {
    display: flex;
    justify-content: center;
    align-items: center;
}

.splashscreen .progress-bar {
    width: 280px;
    max-width: 80%;
    height: 6px;
    margin-bottom: 1em;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.splashscreen .progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.6),
        rgba(255, 255, 255, 1),
        rgba(255, 255, 255, 0.6)
    );
    background-size: 200% 100%;
    transition: width 0.3s ease-out;
    animation: splashscreen-shift 2s linear infinite;
}

.splashscreen .progress-fill.error {
    background: var(--mud-palette-error);
    animation: none;
}

@keyframes splashscreen-shift {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 200% 0;
    }
}

.splashscreen .error-panel {
    max-width: 540px;
    margin: 36px 16px;
    padding: 16px;
    background: var(--mud-palette-error);
    color: white;
    text-align: left;
    border-radius: 4px;
}

.splashscreen .error-panel p {
    margin-top: 8px;
}

.splashscreen .error-panel pre {
    margin-top: 12px;
    padding: 12px;
    background: white;
    color: black;
    font-family: monospace;
    white-space: pre-wrap;
    overflow: auto;
    border-radius: 4px;
}
