/* css/loading.css */

/* The splash runs before .NET, so it cannot read --mud-palette-*. The inline script in
   index.html's <head> overwrites these from the palette MainLayout left in local storage on the
   previous visit (splashPalette); these values are what a first-ever visit sees. */
:root {
    --splash-bg: #121212;
    --splash-surface: #282c34;
    --splash-primary: #61dafb;
    --splash-secondary: #61dafb;
    --splash-muted: #888888;
}

.loading-screen {
    background-color: var(--splash-bg);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    text-align: center;
    width: 340px;
}

.loading-title {
    font-family: var(--app-ui-font, 'Roboto', sans-serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--splash-primary);
    margin-bottom: 24px;
    letter-spacing: 2px;
}

.blocks-grid {
    display: grid;
    grid-template-columns: repeat(12, 18px);
    gap: 4px;
    justify-content: center;
    /* The grid fills in reading order; keep it left to right in every language so the progress
       reads the same way the counter beneath it does. */
    direction: ltr;
}

.block {
    width: 18px;
    height: 18px;
    border-radius: 3px;
}

.block.pending {
    background: var(--splash-surface);
    animation: blockPulse 1s ease-in-out infinite;
}

.block.loaded {
    background: var(--splash-primary);
    animation: blockPop 0.3s ease;
}

@keyframes blockPop {
    0% { transform: scale(0.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes blockPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

.loading-counter {
    font-family: var(--app-ui-font, 'Roboto', sans-serif);
    font-size: 0.9rem;
    color: var(--splash-muted);
    margin-top: 16px;
    direction: ltr;
}
