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

:root {
    --bg: #0d0d0d;
    --surface: #111111;
    --surface-2: #171717;
    --surface-3: #202020;
    --text: #d4d4d4;
    --text-dim: #757575;
    --text-muted: #3d3d3d;
    --accent: #4f8ef0;
    --accent-hover: #6ba0f4;
    --danger: #c04040;
    --danger-hover: #d45252;
    --success: #40a060;
    --mono: ui-monospace, 'Cascadia Code', 'Fira Code', monospace;
    --sans: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body {
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

#splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease;
}

#splash.leaving {
    opacity: 0;
    pointer-events: none;
}

.splash-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.splash-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 1px;
    background: var(--accent);
    animation: splash-sweep 1.6s ease-in-out infinite;
}

@keyframes splash-sweep {
    0%   { left: 0;    width: 0; }
    45%  { left: 0;    width: 100%; }
    55%  { left: 0;    width: 100%; }
    100% { left: 100%; width: 0; }
}

#app {
    opacity: 0;
    transition: opacity 0.35s ease;
}

#app.ready {
    opacity: 1;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font: inherit;
    color: inherit;
    border-radius: 0;
}

input, textarea, select {
    font: inherit;
    color: var(--text);
    background: var(--surface-3);
    border: none;
    outline: none;
    border-radius: 0;
    appearance: none;
}

input::placeholder, textarea::placeholder {
    color: var(--text-muted);
}

input:focus, textarea:focus {
    background: var(--surface-2);
}

input.input-invalid {
    outline: 1px solid var(--danger);
}

* {
    border-radius: 0 !important;
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--surface-3);
}

::selection {
    background: var(--accent);
    color: #fff;
}
