/* Base Styles - User starting point */

:root {
    --canvas-bg: #0b0b10;
    --canvas-grid: #ddd;
    --canvas-axis: #999;
    --bg-color: #0b0b10;
    --text-color: #eaeaea;
    --primary-color: #007bff;
    --border-color: #8a8f98;
    --spacing: 1rem;
}

* {
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.5;
    margin: 0;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container, .container-fluid {
    width: 100%;
    max-width: 98%;
    margin: 0 auto;
    padding: 10px 0.5rem;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing) 0;
    border-bottom: 1px solid var(--border-color);
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

@media (min-width: 1024px) {
    .main-grid {
        grid-template-columns: 280px 1fr 280px;
        gap: 1rem;
    }
}

section {
    margin-bottom: 2rem;
}

label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

input, select, textarea {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

button, [role="button"], .button {
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    font-size: 1rem;
    line-height: 1.5;
    text-align: center;
}

button.secondary, [role="button"].secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

button.outline, [role="button"].outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

details {
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.5rem;
}

summary {
    font-weight: bold;
    cursor: pointer;
    padding: 0.5rem;
}

/* Preview Specifics */
.canvas-container {
    background-color: var(--canvas-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

canvas {
    max-width: 100%;
    height: auto;
}

#gcodeOutput {
    font-family: monospace;
    font-size: 0.9em;
    min-height: 200px;
    background: #f8f9fa;
}

article {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
}

footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}
