:root {
    --primary: #0561ff;
    --success: #218838;
    --bg: #f4f7f6;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg);
    margin: 0; padding: 20px;
    display: flex; justify-content: center;
}

.container {
    background: #fff;
    max-width: 600px; width: 100%;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

header { text-align: center; margin-bottom: 25px; }
h1 { color: #222; margin: 0; }
p { color: #666; font-size: 0.9em; }

.upload-section { margin-bottom: 20px; }
#imageInput { display: none; }
.custom-file-upload {
    display: block; border: 2px dashed var(--primary);
    padding: 30px; text-align: center;
    border-radius: 10px; cursor: pointer;
    background: #f0f7ff; color: var(--primary);
    transition: 0.3s;
}
.custom-file-upload:hover { background: #e0eeff; }

.preview-box {
    margin: 20px 0; border: 1px solid #eee;
    padding: 10px; border-radius: 8px; text-align: center;
}
.preview-box img { max-width: 100%; max-height: 250px; border-radius: 5px; }
#originalFileInfo { font-size: 0.85em; color: #777; margin-top: 5px; }

.settings-section { background: #fafafa; padding: 15px; border-radius: 10px; }
.form-group { margin-bottom: 15px; }
label { display: block; margin-bottom: 5px; font-weight: 600; }
select, input[type="range"] { width: 100%; height: 35px; }

.btn-primary { 
    width: 100%; padding: 12px; background: var(--primary);
    color: #fff; border: none; border-radius: 5px;
    font-weight: bold; cursor: pointer; font-size: 1em;
}

.btn-success {
    display: inline-block; width: 100%; padding: 12px;
    background: var(--success); color: #fff;
    text-decoration: none; border-radius: 5px;
    font-weight: bold; margin-top: 10px; text-align: center;
}

.hidden { display: none; }
#resultPreviewContainer img { max-width: 100%; border-radius: 5px; }
#resultInfo { margin: 10px 0; font-weight: bold; color: var(--success); text-align: center; }