body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #f0f2f5;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 700px;
    background: #fff;
    padding: 25px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

h1 {
    text-align: center;
    color: #1a202c;
    margin-bottom: 25px;
    font-size: 2em;
}

.controls {
    margin-bottom: 25px;
}

.controls label, .dimensions-wrapper label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
    font-size: 0.95em;
}

.controls input[type="file"],
.controls input[type="number"],
.controls button {
    width: 100%;
    padding: 12px;
    margin-bottom: 18px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1em;
}

.controls input[type="file"] {
    background-color: #f7fafc;
}

.dimensions-wrapper {
    display: flex;
    gap: 20px; /* Space between width and height input blocks */
    margin-bottom: 18px;
}

.dimensions-wrapper > div {
    flex: 1; /* Each block takes equal space */
}

.dimensions-wrapper input[type="number"] {
    width: 100%; /* Make inputs take full width of their flex container */
     margin-bottom: 0; /* Override general margin for inputs in controls */
}


.controls button {
    background-color: #48bb78;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    transition: background-color 0.2s ease-in-out;
}

.controls button:hover {
    background-color: #38a169;
}

#outputContainer h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2d3748;
    font-size: 1.5em;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
}

.output-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 15px;
    background: #f7fafc;
}

.output-item img {
    max-width: 80px;
    max-height: 80px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    object-fit: cover;
}

.output-item-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.output-item-info a {
    text-decoration: none;
    color: #2b6cb0;
    font-weight: 600;
    font-size: 1.05em;
}

.output-item-info a:hover {
    text-decoration: underline;
    color: #2c5282;
}

.output-item-info p {
    margin: 0;
    font-size: 0.85em;
    color: #718096;
}

.error-message {
    color: #e53e3e;
    background-color: #fed7d7;
    border: 1px solid #f56565;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: 500;
}

