body {
    font-family: Arial, sans-serif;
    background: #f9f9f9;
    color: #333;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

h1 {
    text-align: center;
    margin-bottom: 30px;
}

.upload-section, .controls, .presets, .image-section {
    margin: 20px 0;
    text-align: center;
}

input[type="file"] {
    margin-bottom: 10px;
    padding: 8px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    width: 80%;
    max-width: 400px;
}

button {
    cursor: pointer;
    padding: 12px 24px;
    border: none;
    background: #4CAF50;
    color: #fff;
    border-radius: 8px;
    margin: 5px;
    transition: 0.3s;
    font-size: 14px;
    font-weight: bold;
}

button:hover {
    background: #45a049;
    transform: translateY(-2px);
}

input[type="range"] {
    width: 80%;
    margin: 10px 0;
    max-width: 400px;
}

.slider-container {
    margin: 10px 0 20px;
}

.slider-container label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

/* Image Comparison Section */
.image-comparison {
    display: flex;
    gap: 20px;
    margin: 30px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.image-box {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    text-align: center;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.image-box h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

.image-box img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.image-placeholder {
    width: 100%;
    height: 300px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 16px;
}

/* Controls Layout */
.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.control-group {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.control-group h3 {
    margin-top: 0;
    color: #495057;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 10px;
}

.control-item {
    margin: 15px 0;
}

.control-item label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #495057;
}

.control-item small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 12px;
}

/* Presets */
.presets {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 30px 0;
}

.preset {
    background: #2196F3;
    flex: 1;
    min-width: 150px;
    max-width: 200px;
}

.preset:hover {
    background: #1976D2;
}

/* Download Button */
#downloadBtn {
    display: block;
    margin: 30px auto;
    background: #FF5722;
    padding: 15px 30px;
    font-size: 16px;
    min-width: 200px;
}

#downloadBtn:hover {
    background: #E64A19;
}

#downloadBtn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .image-comparison {
        flex-direction: column;
    }
    
    .image-box {
        min-width: 100%;
    }
    
    .controls-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        margin: 10px;
        padding: 15px;
    }
}

/* Loading State */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: " (Processing...)";
    font-style: italic;
}