/* Pantalla de carga de ProgressClient.
   Se usa en dos momentos y con la misma estética: el HTML de index.html antes de que arranque
   Blazor (.boot) y el componente que espera la sesión (.boot-screen). Sin fuentes ni scripts
   externos, para abrir sin conexión. */

.boot,
.boot-screen {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    align-content: end;
    justify-items: center;
    overflow: hidden;
    padding-bottom: calc(max(4vh, 22px) + env(safe-area-inset-bottom, 0px));
    background:
        radial-gradient(120% 90% at 50% 0%, #14405f 0%, #0c2c44 42%, #071c2d 100%);
    color: #e7f1fb;
}

/* Velo inferior: la escena y la rejilla quedan arriba y el texto se lee sin competir con ellas. */
.boot::after,
.boot-screen::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 46%;
    background: linear-gradient(to top, #061a2a 12%, #061a2a00 100%);
    pointer-events: none;
}

/* Rejilla de obra: la misma referencia visual que la escena three.js. */
.boot::before,
.boot-screen::before {
    content: "";
    position: absolute;
    inset: -10%;
    background-image:
        linear-gradient(to right, #7fb4db1f 1px, transparent 1px),
        linear-gradient(to bottom, #7fb4db1f 1px, transparent 1px),
        linear-gradient(to right, #9fd0f02e 1px, transparent 1px),
        linear-gradient(to bottom, #9fd0f02e 1px, transparent 1px);
    background-size: 28px 28px, 28px 28px, 140px 140px, 140px 140px;
    transform: perspective(520px) rotateX(58deg) translateY(18%);
    transform-origin: 50% 100%;
    mask-image: radial-gradient(80% 70% at 50% 40%, #000 20%, transparent 78%);
    -webkit-mask-image: radial-gradient(80% 70% at 50% 40%, #000 20%, transparent 78%);
    opacity: .75;
    pointer-events: none;
}

.boot-scene {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.boot-scene canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.boot__content,
.boot-screen__content {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 24px;
    text-align: center;
}
.boot__mark,
.boot-screen__mark {
    display: inline-grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 17px;
    background: linear-gradient(160deg, #2a4d69, #123049);
    border: 1px solid #ffffff26;
    box-shadow: 0 16px 34px #04131f66;
    color: #fff;
    font-size: 30px;
    line-height: 1;
}

.boot__brand,
.boot-screen__brand {
    margin: 14px 0 0;
    font-size: 27px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: #fff;
}

.boot__brand span,
.boot-screen__brand span { color: var(--accent, #ff6b35); }

.boot__subtitle,
.boot-screen__title {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #a8cbe6;
}

.boot__track,
.boot-screen__track {
    width: min(300px, 62vw);
    height: 4px;
    margin-top: 22px;
    border-radius: 99px;
    background: #ffffff1f;
    overflow: hidden;
}

.boot__track span,
.boot-screen__track span {
    display: block;
    width: 38%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #8fc1ea, var(--accent, #ff6b35));
    animation: boot-slide 1.4s cubic-bezier(.45, .05, .55, .95) infinite;
}

.boot__status,
.boot-screen__status {
    margin: 16px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: #dbe9f6;
}

.boot__hint,
.boot-screen__hint {
    margin: 2px 0 0;
    font-size: 11.5px;
    line-height: 1.5;
    color: #8fb4cf;
    max-width: 30ch;
}

@keyframes boot-slide {
    from { transform: translateX(-115%); }
    to { transform: translateX(320%); }
}

@media (prefers-reduced-motion: reduce) {
    .boot__track span,
    .boot-screen__track span {
        animation: none;
        width: 100%;
        opacity: .6;
    }
}

@media (max-width: 640px) {
    .boot__mark,
    .boot-screen__mark { width: 52px; height: 52px; border-radius: 15px; font-size: 26px; }
    .boot__brand,
    .boot-screen__brand { font-size: 24px; }
}
