/* CSS cho giao diện */
body {
    font-family: Arial, sans-serif;
    margin: 20px;
    background-color: #f4f4f4;
    color: #333;
}
h1 {
    color: #0056b3;
    text-align: center;
    margin-bottom: 30px;
}
.controls, .outputs {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
    justify-content: center;
    align-items: center;
}
.control-group {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    padding: 15px;
    background-color: #e9f5ff;
    border-radius: 5px;
    border: 1px solid #cce7ff;
    text-align: center;
}
.control-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #004085;
}
input[type="file"] {
    display: block;
    margin: 15px auto;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f0f0f0;
}
input[type="range"] {
    width: 90%;
    margin-top: 5px;
}
canvas {
    display: block;
    max-width: 100%;
    height: auto; /* Allow height to adjust */
    border: 1px solid #ddd;
    margin: 20px auto;
    box-shadow: 0 0 15px rgba(0,0,0,0.05);
    background-color: #fff; /* In case no image loaded */
}
button {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    margin: 5px;
}
button:hover {
    background-color: #0056b3;
}
button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}
.message {
    text-align: center;
    margin-top: 15px;
    font-size: 1.1em;
    color: #555;
    min-height: 20px; /* Prevent layout shift */
}
.quality-options {
    text-align: center;
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}
.quality-options p {
    font-style: italic;
    color: #666;
    margin-bottom: 10px;
}