@font-face {
    font-family: 'Recursive';
    font-style: oblique 0deg 15deg;
    font-weight: 300 1000;
    font-display: swap;
    src: url('/fonts/Recursive-Variable.woff2') format('woff2');
}

* {
    box-sizing: border-box;
}

:root {
    /* Typography - Recursive variable font
       MONO axis: 0 = Sans, 1 = Mono
       CASL axis: 0 = Linear, 1 = Casual */
    --font-mono: 'Recursive', 'SF Mono', monospace;
    --font-sans: 'Recursive', -apple-system, sans-serif;

    /* Spacing */
    --radius: 4px;

    /* Transitions */
    --transition: 0.15s ease;

    /* Accent - amber/orange for that retro terminal feel */
    --accent: #f59e0b;
    --accent-dim: #d97706;
    --accent-muted: rgba(245, 158, 11, 0.15);

    /* Functional colors */
    --success: #22c55e;
    --error: #ef4444;
    --info: #6b7280;
}

/* Dark mode (default) */
:root {
    --bg-base: #0a0a0a;
    --bg-surface: #111111;
    --bg-elevated: #1a1a1a;
    --bg-hover: #222222;
    --text-primary: #e8e8e8;
    --text-secondary: #888888;
    --text-muted: #555555;
    --border: #262626;
    --border-bright: #333333;
    color-scheme: dark;
}

/* Light mode */
@media (prefers-color-scheme: light) {
    :root {
        --bg-base: #ffffff;
        --bg-surface: #f5f5f5;
        --bg-elevated: #eeeeee;
        --bg-hover: #e5e5e5;
        --text-primary: #1a1a1a;
        --text-secondary: #555555;
        --text-muted: #888888;
        --border: #e0e0e0;
        --border-bright: #cccccc;
        --accent: #d97706;
        --accent-dim: #b45309;
        color-scheme: light;
    }
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

body {
    display: flex;
    flex-direction: column;
}

::selection {
    background: var(--accent);
    color: var(--bg-base);
}

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

::-webkit-scrollbar-track {
    background: var(--bg-surface);
}

::-webkit-scrollbar-thumb {
    background: var(--border-bright);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444;
}

:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: 1px;
}

/* Dialog styles */
dialog {
    background: var(--bg-elevated);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius);
    padding: 0;
    color: var(--text-primary);
    max-width: 480px;
    width: 90%;
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
}

dialog[open] {
    animation: dialog-show 0.15s ease;
}

@keyframes dialog-show {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
