:root {
    color-scheme: light;
    --app-bg: #f8fafc;
    --app-bg-soft: #ffffff;
    --app-bg-tint: #fff8fc;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-elevated: rgba(255, 255, 255, 0.92);
    --text: #334155;
    --text-strong: #0f172a;
    --text-muted: #64748b;
    --text-faint: #94a3b8;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --accent: #5b7cfa;
    --accent-strong: #3f65f5;
    --accent-soft: #eef0ff;
    --accent-soft-2: #e8f7fb;
    --sidebar-bg: #ffffff;
    --tree-hover: #f3f8fb;
    --tree-selected: linear-gradient(90deg, #edf0ff 0%, #e6f8fb 100%);
    --code-bg: #0f172a;
    --code-text: #e2e8f0;
    --inline-code-text: #be123c;
    --shadow-sm: 0 12px 28px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 18px 45px rgba(15, 23, 42, 0.12);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --app-bg: #0b1120;
    --app-bg-soft: #101827;
    --app-bg-tint: #151124;
    --surface: #111827;
    --surface-soft: #172033;
    --surface-elevated: rgba(17, 24, 39, 0.96);
    --text: #cbd5e1;
    --text-strong: #f8fafc;
    --text-muted: #94a3b8;
    --text-faint: #64748b;
    --border: #263244;
    --border-strong: #3b4a60;
    --accent: #8aa2ff;
    --accent-strong: #a7b7ff;
    --accent-soft: rgba(91, 124, 250, 0.18);
    --accent-soft-2: rgba(14, 165, 233, 0.12);
    --sidebar-bg: #0f172a;
    --tree-hover: rgba(148, 163, 184, 0.12);
    --tree-selected: linear-gradient(90deg, rgba(91, 124, 250, 0.24) 0%, rgba(14, 165, 233, 0.14) 100%);
    --code-bg: #020617;
    --code-text: #e5e7eb;
    --inline-code-text: #fda4af;
    --shadow-sm: 0 14px 30px rgba(0, 0, 0, 0.18);
    --shadow-md: 0 22px 55px rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
}

html {
    background: var(--app-bg);
    transition: background-color 180ms ease, color 180ms ease;
}

body {
    background: var(--app-bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
    transition: background-color 180ms ease, color 180ms ease;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent);
    outline-offset: 2px;
}

a {
    color: var(--accent-strong);
}

h1:focus {
    outline: none;
}

.blazor-error-boundary {
    background: #b32121;
    border-radius: 0.5rem;
    color: white;
    padding: 1rem;
}

.blazor-error-boundary::after {
    content: "Алдаа гарлаа.";
}
