/* General Body Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    padding: 1vw; /* Use viewport width for responsive padding */
}

.container {
    width: auto; /* Allow container to be fluid */
    max-width: 95vw; /* Use most of the viewport width */
    margin: 1vh auto; /* Center with small vertical margin */
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 20px 30px;
}

header {
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

header h1 {
    margin: 0;
    font-size: 2.2em;
    color: #1a2a4c;
}

/* Instructions */
.instructions {
    background-color: #e8f0fe;
    border: 1px solid #d1e3ff;
    border-radius: 8px;
    padding: 10px 25px;
    margin-bottom: 25px;
}

/* Controls Section */
.controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.file-input {
    display: flex;
    flex-direction: column;
}

label {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 0.9em;
}

input[type="file"] {
    border: 1px solid #ccc;
    padding: 8px;
    border-radius: 5px;
    background-color: #fff;
}

button {
    padding: 12px 24px;
    font-size: 1.1em;
    font-weight: bold;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover:not(:disabled) {
    background-color: #0056b3;
}

button:disabled {
    background-color: #a0a0a0;
    cursor: not-allowed;
}

/* Status Message */
#status {
    text-align: center;
    font-weight: bold;
    font-size: 1.1em;
    color: #d9534f;
    min-height: 24px;
}

/* Canvases */
.canvases {
    display: flex;
    /* Stack canvases vertically */
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-top: 20px;
}

.canvas-wrapper {
    /* Allow wrapper to take full width */
    width: 100%;
    text-align: center;
}

.canvas-wrapper h2 {
    margin-top: 0;
    color: #333;
}

canvas {
    /* Let canvas scale within its parent */
    max-width: 100%;
    height: auto; /* Maintain aspect ratio */
    border: 2px solid #ccc;
    background-color: #e9e9e9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tip {
    font-size: 0.9em;
    color: #666;
    margin-top: 10px;
}

