/* общие для страницы дороги (RoadView.razor.css и её компонентов) и места сцены в пререндере: ширина колонки и сцены,
   цвета, высота полосы меню на сцене (по ней панель начинается ниже полосы) */
:root {
    --text-max: 1200px;   /* колонка текста: текстовая версия и шапка над сценой */
    --road-max: var(--text-max);   /* сцена не шире шапки */
    --accent: #e9b04b;
    --fg: #e4eee6;
    --muted: #8ea597;
    --line: #24382f;
    --panel: #15241e;
    --route-h: 44px;
}

html, body {
    margin: 0;
    min-height: 100%;
    background: #0e1915;
    color: #e8edf2;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.not-found {
    margin: 0;
    padding: 2rem 1rem;
    text-align: center;
}

#blazor-error-ui {
    background: lightyellow;
    color: #222;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* индикатор загрузки (#183, скрипт site-loader-script в index.html): над местом сцены до её первого кадра.
   Шрифт — файл HUD из ProSkill.Hyper.WebGL под своим именем: gl.js регистрирует «JetBrains Mono» сам */
@font-face {
    font-family: "ProSkill Loader Mono";
    src: url("../_content/ProSkill.Hyper.WebGL/fonts/JetBrainsMono-SemiBold.woff2") format("woff2");
    font-weight: 600;
    font-display: swap;
}

/* фон — небо первого кадра (ground.frag.glsl, sky() днём: камера 5° вниз, обзор 66°): синее вверху,
   к горизонту на 43 % высоты — цвет дымки, ниже — дымка; сцена проступает из него без вспышки */
.site-loader {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(#5882b1 0%, #7798b4 21.6%, #8ba7b6 32.5%, #9eb5b8 43.3%);
    color: #0e1915;
    font: 600 clamp(14px, 1.6vw, 18px)/1.3 "ProSkill Loader Mono", "JetBrains Mono", ui-monospace, Consolas, monospace;
    /* текстовая версия и страница под ним прокручиваются и щёлкаются, ловит только кнопка «Обновить» */
    pointer-events: none;
    transition: opacity .3s ease-out;
}

.site-loader[hidden] {
    display: none;
}

/* над местом сцены (.road-stage, до старта .NET — .road-placeholder): left/top/width/height ставит скрипт */
.site-loader-placed {
    position: absolute;
    inset: auto;
}

.site-loader-done {
    opacity: 0;
}

.site-loader-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .7em;
    width: min(33vw, 90%);
    min-width: 180px;
}

.site-loader-text {
    margin: 0;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.site-loader-bar {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: rgba(14, 25, 21, .2);
    overflow: hidden;
}

.site-loader-bar i {
    display: block;
    height: 100%;
    width: var(--p, 0%);
    background: #0e1915;
    transition: width .15s linear;
}

.site-loader-failed .site-loader-bar {
    display: none;
}

.site-loader-reload {
    pointer-events: auto;
    font: inherit;
    color: #e4eee6;
    background: #15241e;
    border: 1px solid #24382f;
    border-radius: 6px;
    padding: .4em 1.1em;
    cursor: pointer;
}

.site-loader-reload:hover,
.site-loader-reload:focus-visible {
    background: #24382f;
}

/* на телефоне полоса — в две трети экрана */
@media (max-width: 700px) {
    .site-loader-box {
        width: min(66vw, 90%);
    }
}

/* пререндер (tools/ProSkill.WebUI.Prerender): место сцены 16:9, пока грузится WASM; без JS скрыто (noscript в <head>) */
.road-placeholder {
    position: relative;
    width: min(calc(100% - 32px), calc((100vh - 190px) * 16 / 9), var(--road-max));
    aspect-ratio: 16 / 9;
    margin: 20px auto 0;
}

.no-js {
    text-align: center;
    font-size: 18px;
}

.no-js a {
    color: #e9b04b;
}
