/**
 * More Brains - Base Styles
 * Foundation styles and resets
 */

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

/* Base */
html {
    font-size: var(--text-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-main);
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-primary);
}

h1 { font-size: var(--text-xl); }
h2 { font-size: var(--text-lg); }
h3, h4, h5, h6 { font-size: var(--text-base); }

p {
    margin-bottom: var(--space-3);
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    text-decoration: underline;
}

code, pre, kbd, samp {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

code {
    background-color: var(--bg-elevated);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

pre {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    overflow-x: auto;
}

pre code {
    background: none;
    padding: 0;
}

/* Selection */
::selection {
    background-color: var(--accent-primary);
    color: var(--bg-main);
}

/* Focus */
:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

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

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Utility Classes */
.mono {
    font-family: var(--font-mono);
}

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }

.text-success { color: var(--accent-success); }
.text-warning { color: var(--accent-warning); }
.text-danger { color: var(--accent-danger); }

.bg-main { background-color: var(--bg-main); }
.bg-panel { background-color: var(--bg-panel); }
.bg-elevated { background-color: var(--bg-elevated); }
