/* public/style.css */
@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&display=swap');

/* 1. ADD THIS AT THE TOP TO FIX BORDER MATH */
* {
    box-sizing: border-box;
}

body {
    background-color: #ffffff;
    color: #000000;
    font-family: 'Courier Prime', monospace;
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 1200px; /* Increased slightly to prevent cramping */
    padding: 10px;
}

h1 {
    font-size: 2.5rem;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 50px;
    letter-spacing: 4px;
}

/* WORKSPACE GRID */
.workspace {
    display: grid;
    /* Changed 500px to auto so it fits the canvas exactly */
    grid-template-columns: 1fr auto; 
    gap: 40px;
    align-items: start;
}

/* Mobile responsive */
@media (max-width: 1050px) {
    .workspace {
        grid-template-columns: 1fr; /* Stack them on smaller screens */
        justify-items: center;
    }
    
    .input-section {
        width: 100%;
        max-width: 500px; /* Match canvas width when stacked */
    }
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    /* Removed fixed height so it matches content naturally */
    min-height: 500px; 
}

textarea {
    flex-grow: 1;
    background: #fdfdfd;
    border: 3px solid black;
    font-family: 'Courier Prime', monospace;
    font-size: 16px;
    padding: 20px;
    resize: none;
    box-shadow: 10px 10px 0px rgba(0,0,0,0.2);
    outline: none;
}

textarea:focus {
    background: #fff;
    border-color: #333;
}

/* BUTTONS */
.button-row {
    display: flex;
    gap: 15px;
}

button {
    flex: 1;
    padding: 20px;
    font-family: 'Courier Prime', monospace;
    font-weight: bold;
    font-size: 18px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 10px 10px 0px rgba(0,0,0,0.2);
    transition: transform 0.1s;
    border: 3px solid black;
}

button:active {
    transform: translate(2px, 2px);
    box-shadow: 8px 8px 0px rgba(0,0,0,0.2);
}

.btn-primary { background: black; color: white; }
.btn-secondary { background: white; color: black; }
.btn-secondary:hover { background: #f0f0f0; }

/* 2. FIXED CANVAS CONTAINER */
.canvas-container {
    /* Remove fixed width/height here. Let the SVG inside define the size */
    display: flex; /* Removes gap at bottom of SVG */
    border: 3px solid black;
    background-color: white;
    box-shadow: 10px 10px 0px rgba(0,0,0,0.2);
}

.status {
    font-size: 14px;
    font-weight: bold;
    text-align: right;
}

.footer {
    margin-top: 60px;
    text-align: center;
    font-size: 14px;
    border-top: 1px solid #ddd;
    padding-top: 20px;
    color: #555;
}

.footer a {
    color: black;
    font-weight: bold;
    text-decoration: none;
    border-bottom: 2px solid black; /* Custom underline */
    transition: all 0.2s ease;
}

.footer a:hover {
    background-color: black;
    color: white;
}
