/**
 * GoStack Base Styles
 * Reset and typography defaults.
 */

/* CSS Variables */
:root {
    /* Colors */
    --color-primary: #009cde;
    --color-primary-hover: #0080b8;
    --color-secondary: #64748b;
    --color-secondary-hover: #475569;
    --color-success: #10b981;
    --color-success-hover: #059669;
    --color-success-light: #ecfdf5;
    --color-success-dark: #065f46;
    --color-warning: #f59e0b;
    --color-warning-light: #fffbeb;
    --color-warning-dark: #92400e;
    --color-error: #ef4444;
    --color-error-hover: #dc2626;
    --color-error-light: #fef2f2;
    --color-error-dark: #991b1b;
    --color-info: #3b82f6;
    --color-info-light: #eff6ff;
    --color-info-dark: #1e40af;

    /* Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-dark: #1f2937;
    --bg-dark-secondary: #374151;

    /* Text */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-light: #f3f4f6;

    /* Borders */
    --border-color: #e2e8f0;
    --border-radius: 6px;
    --border-radius-lg: 8px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;

    /* Fonts */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', Consolas, 'Liberation Mono', Menlo, monospace;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    line-height: 1.25;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
    margin-bottom: var(--spacing-md);
}

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

a:hover {
    text-decoration: underline;
}

/* Lists */
ul, ol {
    padding-left: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

/* Code */
code, pre {
    font-family: var(--font-mono);
    font-size: var(--font-size-sm);
}

code {
    padding: 0.125rem 0.25rem;
    background-color: var(--bg-tertiary);
    border-radius: var(--border-radius);
}

pre {
    padding: var(--spacing-md);
    background-color: var(--bg-tertiary);
    border-radius: var(--border-radius);
    overflow-x: auto;
}

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

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 600;
    background-color: var(--bg-tertiary);
}

/* Images */
img {
    max-width: 100%;
    height: auto;
}

/* Forms */
input,
textarea,
select,
button {
    font-family: inherit;
    font-size: inherit;
}

/* Utilities */
.hidden {
    display: none !important;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-error { color: var(--color-error); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }
