body {
    font-family: Arial, sans-serif;
    background: #FFF0D0;
}

h1, h3, h4, h5 {
    color: #001177;
}

button[disabled] { opacity: 0.5; }

.form-group { margin-bottom: 1em; }
.center { text-align: center; }

#result {
    margin: 1em auto;
    border: 1px solid #ccc;
    background: #eee;
    display: block;
    object-fit: fill;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
}

#footer {
    border: 0px;
    background: transparent;
    text-align: center;
}

/* --- Estilos inspirados en Bootstrap para controles y formularios --- */
#file-container {
    background: #f8f9fa;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 2rem 1.5rem;
    max-width: 700px;
    min-width: 450px;
    margin: 2rem auto;
}

#controls-container {
    background: #f8f9fa;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 2rem 1.5rem;
    max-width: 700px;
    min-width: 450px;
    margin: 2rem auto;
}

.form-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2em;
}

.form-group label {
    flex: 0 0 170px;
    margin-bottom: 0;
    font-weight: bold;
    font-size: 0.9em;
    text-align: right;
    color: #495057;
}

.form-group input[type="file"] {
    flex: 0 0 400px;
    max-width: 400px;
    min-width: 300px;
    padding: 0.4em 0.7em;
    border: 1px solid #ced4da;
    border-radius: 0.3em;
    background: #fff;
    font-size: 0.9em;
    transition: border-color 0.2s;
}

.form-group select,
.form-group input[type="text"],
.form-group input[type="number"] {
    flex: 1 1 auto;
    padding: 0.4em 0.7em;
    border: 1px solid #ced4da;
    border-radius: 0.3em;
    background: #fff;
    font-size: 0.9em;
    transition: border-color 0.2s;
    margin-right: 0.9em;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #80bdff;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.15);
}

.form-actions {
    display: flex;
    justify-content: center;
    gap: 1.5em;
    margin-top: 1.5em;
}

button, .form-group button {
    padding: 0.45em 1.2em;
    border-radius: 0.3em;
    border: none;
    background: #007bff;
    color: #fff;
    font-weight: 500;
    font-size: 1em;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    transition: background 0.2s;
}

button:hover:not([disabled]), .form-group button:hover:not([disabled]) {
    background: #0056b3;
}

button[disabled], .form-group button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive para móviles */
@media (max-width: 700px) {
    #controls-container {
        max-width: 98vw;
        min-width: unset;
        padding: 1rem 0.5rem;
    }
    .form-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.3rem;
    }
    .form-group label {
        flex: none;
        width: 100%;
        margin-bottom: 0.2em;
    }
    .form-group input[type="file"] {
        width: 100%;
        max-width: 100%;
    }
    .form-actions {
        flex-direction: column;
        gap: 0.7em;
    }
}
