/*
    style.css

    This stylesheet provides a modern, glassmorphic-inspired UI for a web application,
    featuring a centered container with a gradient background, blurred panels, and
    interactive upload and control areas. Key components include:

    - body: Sets up a responsive, visually appealing background and base typography.
    - .container: Glassmorphic panel with blur, rounded corners, and shadow.
    - h1: Large, centered heading with subtle text shadow.
    - .upload-area: Drag-and-drop file upload area with hover and dragover effects.
    - input[type="file"]: Hidden file input for custom upload UI.
    - .controls: Flexbox layout for control buttons, responsive and centered.
    - button: Gradient-styled, animated buttons with hover and disabled states.
    - .result-area: Flexbox layout for displaying results side by side or stacked on mobile.
    - .image-container: Panel for images/canvases with blur and rounded corners.
    - .color-palette & .color-swatch: Displays a palette of circular color swatches.
    - .progress & .progress-bar: Animated progress bar for indicating processing status.
    - Responsive adjustments for mobile screens.

    Designed for clarity, accessibility, and a visually engaging user experience.
*/
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: white;
}

.container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.upload-area {
    border: 3px dashed rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

input[type="file"] {
    display: none;
}

.upload-text {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.controls {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

button {
    background: linear-gradient(45deg, #FF6B6B, #4ECDC4);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.result-area {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}

.image-container {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

.image-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

canvas, img {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    max-width: 100%;
}

.color-palette {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.progress {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FF6B6B, #4ECDC4);
    width: 0%;
    transition: width 0.3s ease;
}

.resize-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px 0 30px 0;
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 10px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.resize-label {
    font-size: 1.1em;
    font-weight: bold;
    color: #fff;
    margin: 0 4px;
}

.resize-input {
    width: 60px;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1.1em;
    text-align: right;
    background: rgba(255,255,255,0.7);
    color: #333;
    outline: none;
    transition: border 0.2s;
}

.resize-input:focus {
    border: 1.5px solid #4ECDC4;
    background: #fff;
}

.resize-x {
    font-size: 1.3em;
    font-weight: bold;
    color: #fff;
    margin: 0 8px;
}

.white-balance-controls, .contrast-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 10px 20px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.white-balance-controls label, .contrast-controls label {
    font-size: 1.1em;
    font-weight: bold;
    color: #fff;
    margin-right: 8px;
    min-width: 110px;
}

.white-balance-controls input[type="range"], .contrast-controls input[type="range"] {
    width: 180px;
    accent-color: #4ECDC4;
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg, #FF6B6B, #4ECDC4);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    outline: none;
    margin: 0 8px;
    transition: background 0.3s;
}

.white-balance-controls input[type="range"]:hover, .contrast-controls input[type="range"]:hover {
    background: linear-gradient(90deg, #4ECDC4, #FF6B6B);
}

.white-balance-controls span, .contrast-controls span {
    font-size: 1.05em;
    color: #fff;
    min-width: 40px;
    display: inline-block;
    text-align: right;
}

@media (max-width: 600px) {
    .result-area {
        flex-direction: column;
    }
}
