/* First-paint shell. Keep this dependency-free so the startup overlay can render
   before the full application cascade is available. */

html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #05080e;
}

body {
    width: 100%;
    height: 100vh;
    margin: 0;
    overflow: hidden;
    background: #05080e;
    color: #ffffff;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.boot-state-overlay {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: radial-gradient(circle at center, rgb(39, 58, 82), rgb(5, 8, 14));
    pointer-events: auto;
}

.boot-state-overlay[hidden] {
    display: none;
}

.boot-state-panel {
    width: min(420px, 92vw);
    padding: 28px;
    border: 1px solid rgba(239, 241, 196, 0.5);
    border-radius: 12px;
    background: rgba(11, 18, 28, 0.94);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
    font-family: Consolas, monospace;
    text-align: center;
}

.boot-state-panel h2 {
    margin: 0 0 12px;
    color: #eff1c4;
    font-family: Georgia, serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.boot-state-panel p {
    margin: 0 0 18px;
    color: #d7e3f4;
    line-height: 1.45;
}

.boot-progress-shell {
    display: block;
    margin: 2px 0 20px;
}

.boot-progress-shell[hidden] {
    display: none;
}

.boot-progress-track {
    position: relative;
    height: 16px;
    overflow: hidden;
    border: 1px solid #b87333;
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 45%),
        #111923;
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.68),
        0 0 0 1px rgba(5, 8, 14, 0.8);
}

.boot-progress-fill {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(180deg, #f0b56c, #b87333 52%, #70401f);
    box-shadow:
        inset 0 1px 0 rgba(255, 244, 210, 0.72),
        0 0 14px rgba(240, 181, 108, 0.34);
    transition: width 180ms ease-out;
}

@media (prefers-reduced-motion: reduce) {
    .boot-progress-fill {
        transition: none;
    }
}

.boot-state-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.boot-state-actions button {
    min-width: 160px;
    padding: 10px 18px;
    border: 1px solid #eff1c4;
    border-radius: 6px;
    background: rgba(184, 115, 51, 0.22);
    color: #ffffff;
    cursor: pointer;
    font-family: Georgia, serif;
}

#boot-retry-btn:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

@media (max-width: 480px) {
    .boot-state-overlay {
        padding: 14px;
    }

    .boot-state-panel {
        padding: 22px 18px;
    }
}
