/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* THEME (Obsidian-ish, utilitaire) */
:root {
    color-scheme: dark;

    --bg: #050816;
    --panel: rgba(12, 19, 35, 0.88);
    --panel-2: rgba(8, 14, 27, 0.9);
    --panel-hover: rgba(16, 27, 47, 0.94);

    --text: rgba(248, 250, 252, 0.96);
    --muted: rgba(166, 181, 204, 0.86);

    --accent: #67e8f9;
    --accent-strong: #22d3ee;
    --accent-hover: #38bdf8;

    --border: rgba(148, 163, 184, 0.16);
    --border-strong: rgba(103, 232, 249, 0.34);

    --danger: #f87171;
    --success: #34d399;

    --radius: 14px;
    --radius-lg: 22px;
    --radius-xl: 30px;

    --shadow-1: 0 24px 60px rgba(0, 0, 0, 0.34);
    --shadow-dark: 0 30px 70px rgba(2, 8, 23, 0.45);
    --shadow-soft: 0 14px 35px rgba(2, 8, 23, 0.22);

    --font-main: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* Hard guarantee for conditional UI blocks (inspector sections, menus, etc.). */
[hidden] {
    display: none !important;
}

body {
    position: relative;
    isolation: isolate;
    overflow-x: hidden;
    background-color: var(--app-bg, var(--bg));
    background-image:
        radial-gradient(circle at 12% -8%, rgba(34, 211, 238, 0.15), transparent 32rem),
        radial-gradient(circle at 92% 16%, rgba(99, 102, 241, 0.12), transparent 28rem),
        linear-gradient(145deg, rgba(2, 6, 23, 0.2), rgba(15, 23, 42, 0.12)),
        radial-gradient(circle at 1px 1px, var(--app-dots, rgba(148, 163, 184, 0.1)) 1px, transparent 1.1px);
    background-size: auto, auto, auto, 22px 22px;
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font-main);
    min-height: 100vh;
    padding: clamp(12px, 2vw, 24px);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3 {
    letter-spacing: 0;
}

h1 {
    font-size: clamp(1.55rem, 2.2vw, 2rem);
    line-height: 1.12;
}

h2 {
    font-size: 1.15rem;
    line-height: 1.25;
}

p {
    color: var(--muted);
}

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

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.16s ease, opacity 0.16s ease;
}

a:hover {
    text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(103, 232, 249, 0.24);
    outline-offset: 3px;
}

::selection {
    color: #ecfeff;
    background: rgba(8, 145, 178, 0.55);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(103, 232, 249, 0.28) rgba(2, 6, 23, 0.2);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    border: 3px solid transparent;
    border-radius: 999px;
    background: rgba(103, 232, 249, 0.28);
    background-clip: padding-box;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
