/* ========== Global ========== */
* {
    box-sizing: border-box;
}

body {
    margin: 15px;
    padding: 0;
    font-family: 'Terminal', monospace;
    background-color: #fff;
    color: #333;
    transition: background-color 0.3s, color 0.3s;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 15px; 
}

/* ========== Headings ========== */
h1 {
    font-size: 2em;
    text-align: left;
    margin: 20px 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

h3 {
    font-size: 1.3em;
    margin: 15px 0;
    color: #444;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* ========== Paragraphs & Labels ========== */
p,
label {
    font-size: 1em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    text-align: left;
    color: #555;
    margin: 10px 10px;
}

/* ========== Canvas ========== */
canvas {
    margin: 0 auto;
    image-rendering: pixelated;
    cursor: crosshair;
    resize: both;
    overflow: auto;
    width: 95%;
    max-width: 85%;
    max-height: 50%;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ========== Buttons ========== */
button {
    background-color: #241632;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 15px;
    font-family: 'Terminal', monospace;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
}

button:hover {
    background-color: #36073a;
    transform: translateY(-3px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3);
}

button:active {
    transform: translateY(1px);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

.clearCanv{
    display: flex;
    justify-content: center;
    align-items: center;
    /* spacing of children */
    gap: 10px;

}

/* ========== Text Inputs & Vars ========== */
.text-vars {
    margin: 20px 0;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    background: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.text-input {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin: 10px 0;
}

.text-input input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    font-family: 'Terminal', monospace;
    text-align: center;
    transition: border-color 0.3s, box-shadow 0.2s;
}

.file-input input {
    padding: 10px;
    border: 1px solid #ddd;
    height: 45px;
    border-radius: 5px;
    font-size: 1em;
    font-family: 'Terminal', monospace;
    text-align: center;
    transition: border-color 0.3s, box-shadow 0.2s;
}

.file-input {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* ========== Tools & Color Picker ========== */
.tools {
    margin: 15px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 15px 0;
    justify-content: center;
}

.color-swatch {
    width: 40px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 10%;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.color-swatch:hover {
    transform: scale(1.1);
    border-color: #555;
}

.selected {
    border-color: #0078d4 !important;
    box-shadow: 0 0 8px rgba(0, 120, 212, 0.5);
}

/* ========== Dark Mode ========== */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #111;
        color: #ddd;
    }

    h1, h3, p, label {
        color: #ccc;
        text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.05);
    }

    .text-vars {
        background: #1a1a1a;
        border-color: #333;
        box-shadow: 0 2px 4px rgba(255, 255, 255, 0.05);
    }

    .text-input input {
        background-color: #222;
        color: #eee;
        border: 1px solid #444;
    }

    .color-swatch {
        border-color: #555;
    }

    .color-swatch:hover {
        border-color: #888;
    }

}
