@font-face {
    font-family: "Michroma";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/michroma/michroma-latin-400-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Rajdhani";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/rajdhani/rajdhani-latin-400-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Rajdhani";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/rajdhani/rajdhani-latin-500-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Rajdhani";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/rajdhani/rajdhani-latin-600-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Rajdhani";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/rajdhani/rajdhani-latin-700-normal.woff2") format("woff2");
}

:root {
    color-scheme: dark;
    --color-bg: #05070d;
    --color-surface: rgba(11, 18, 32, 0.8);
    --color-hud: #5fd4ff;
    --color-hud-dim: rgba(95, 212, 255, 0.35);
    --color-text: #e6eef7;
    --color-text-muted: #8a9bb0;
    --color-locked: #ffb347;
    --color-danger: #ff5f6d;
    --font-display: "Michroma", sans-serif;
    --font-hud: "Rajdhani", sans-serif;
    --font-body: "Pretendard Variable", Pretendard, system-ui, sans-serif;
}

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

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.75;
}

a {
    color: var(--color-hud);
}

:focus-visible {
    outline: 2px solid var(--color-hud);
    outline-offset: 4px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.hud-label {
    color: var(--color-hud);
    font-family: var(--font-hud);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.scene-label {
    padding: 0.35rem 0.65rem;
    border-left: 1px solid var(--color-hud);
    background: var(--color-surface);
    color: var(--color-hud);
    text-shadow: 0 0 0.75rem var(--color-hud-dim);
    font-family: var(--font-hud);
    line-height: 1.25;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    pointer-events: auto;
}

.scene-label-name,
.scene-label-subtitle {
    display: block;
}

.scene-label-name {
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    font-weight: 600;
}

.scene-label-subtitle {
    margin-top: 0.2rem;
    font-size: 0.75rem;
    opacity: 0.75;
}

.hud-frame {
    position: relative;
    border: 1px solid var(--color-hud-dim);
    background: var(--color-surface);
}

.hud-frame::before,
.hud-frame::after {
    position: absolute;
    inset: -1px;
    content: "";
    pointer-events: none;
    background:
        linear-gradient(var(--color-hud), var(--color-hud)) left top / 12px 1px no-repeat,
        linear-gradient(var(--color-hud), var(--color-hud)) right bottom / 12px 1px no-repeat,
        linear-gradient(var(--color-hud), var(--color-hud)) left top / 1px 12px no-repeat,
        linear-gradient(var(--color-hud), var(--color-hud)) right bottom / 1px 12px no-repeat;
}

.hud-frame::after {
    transform: scaleX(-1);
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.6rem;
    border: 1px solid var(--color-hud-dim);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 0.875rem;
    text-decoration: none;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.45rem;
    border: 1px solid currentColor;
    color: var(--color-text-muted);
    font-family: var(--font-hud);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.badge-draft {
    color: var(--color-locked);
}

.badge-featured {
    color: var(--color-hud);
}

.prose {
    max-width: 72ch;
    font-family: var(--font-body);
    line-height: 1.75;
    overflow-wrap: anywhere;
}

.prose h2,
.prose h3 {
    margin: 2em 0 0.75em;
    font-family: var(--font-body);
    line-height: 1.35;
}

.prose h2 {
    font-size: 1.75rem;
}

.prose h3 {
    font-size: 1.35rem;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose table,
.prose pre {
    margin: 0 0 1.5rem;
}

.prose ul,
.prose ol {
    padding-left: 1.5rem;
}

.prose li + li {
    margin-top: 0.5rem;
}

.prose blockquote {
    padding: 0.75rem 1.25rem;
    border-left: 2px solid var(--color-hud);
    background: var(--color-surface);
    color: var(--color-text-muted);
}

.prose blockquote > :last-child {
    margin-bottom: 0;
}

.prose table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.prose th,
.prose td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-hud-dim);
    text-align: left;
}

.prose th {
    background: var(--color-surface);
}

.prose code {
    padding: 0.15em 0.35em;
    border-radius: 0.2rem;
    background: var(--color-surface);
    font-family: ui-monospace, monospace;
    font-size: 0.9em;
}

.prose pre {
    padding: 1.25rem;
    overflow-x: auto;
    background: var(--color-surface);
    line-height: 1.6;
}

.prose pre code {
    padding: 0;
    background: transparent;
}

.prose .hljs-keyword,
.prose .hljs-selector-tag,
.prose .hljs-tag,
.prose .hljs-meta {
    color: var(--color-hud);
}

.prose .hljs-string,
.prose .hljs-regexp,
.prose .hljs-template-tag,
.prose .hljs-addition {
    color: var(--color-locked);
}

.prose .hljs-comment,
.prose .hljs-quote {
    color: var(--color-text-muted);
    font-style: italic;
}

.prose .hljs-number,
.prose .hljs-literal,
.prose .hljs-symbol,
.prose .hljs-bullet,
.prose .hljs-deletion {
    color: var(--color-danger);
}

.prose .hljs-title,
.prose .hljs-type,
.prose .hljs-built_in,
.prose .hljs-attr,
.prose .hljs-attribute,
.prose .hljs-selector-class,
.prose .hljs-selector-id {
    color: var(--color-hud);
}

.prose .hljs-emphasis {
    font-style: italic;
}

.prose .hljs-strong,
.prose .hljs-section {
    font-weight: 700;
}

.prose img {
    max-width: 100%;
    height: auto;
}

.prose iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border: none;
}

.prose iframe.youtube {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border: 0;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    padding: 1rem 3rem 1rem 1.25rem;
    border-top: 1px solid var(--color-danger);
    background: var(--color-surface);
    color: var(--color-text);
}

#blazor-error-ui .reload {
    margin-left: 1rem;
    color: var(--color-danger);
}

#blazor-error-ui .dismiss {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: var(--color-danger);
    cursor: pointer;
}

.boot-screen {
    display: flex;
    min-height: 100dvh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    text-align: center;
}

.boot-title {
    margin: 0;
    color: var(--color-text);
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 4vw, 2.5rem);
    font-weight: 400;
    letter-spacing: 0.08em;
}

.boot-label {
    margin: 0.75rem 0 2rem;
}

.boot-progress {
    width: min(100%, 20rem);
}

.boot-gauge {
    height: 0.375rem;
    overflow: hidden;
    border: 1px solid var(--color-hud-dim);
    background: var(--color-surface);
}

.boot-gauge-fill {
    width: var(--blazor-load-percentage, 0%);
    height: 100%;
    background: var(--color-hud);
}

.boot-percentage {
    margin: 0.5rem 0 1.5rem;
    color: var(--color-hud);
    font-family: var(--font-hud);
    font-variant-numeric: tabular-nums;
}

.boot-percentage::after {
    content: var(--blazor-load-percentage-text, "0%");
}

.boot-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--color-text-muted);
    font-family: var(--font-hud);
    font-size: 0.875rem;
    letter-spacing: 0.12em;
}

.boot-noscript {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 1rem;
    border-top: 1px solid var(--color-hud-dim);
    background: var(--color-surface);
    text-align: center;
}

.boot-noscript p {
    margin: 0 0 0.5rem;
}
