.image-compressor-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #2d3748;
}

.compressor-header {
    text-align: center;
    margin-bottom: 2rem;
}

.compressor-header h2 {
    font-size: 1.875rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.compressor-header p {
    color: #718096;
    margin: 0;
    font-size: 1rem;
}

.compressor-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.upload-area {
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.upload-area:hover {
    border-color: #90cdf4;
    background: #ebf8ff;
}

.upload-area.drag-over {
    background: #dbeafe;
    border-color: #63b3ed;
}

#imageUpload {
    display: none;
}

.upload-content svg {
    color: #4299e1;
    margin-bottom: 1rem;
}

.upload-content p {
    margin: 0.5rem 0;
    color: #4a5568;
}

.or-text {
    color: #a0aec0;
    font-size: 0.9rem;
}

.btn {
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #3182ce;
    color: white;
}

.btn-primary:hover {
    background: #2c5282;
}

.btn-secondary {
    background: #f7fafc;
    color: #2d3748;
    border-color: #e2e8f0;
}

.btn-secondary:hover {
    background: #edf2f7;
}

.btn-success {
    background: #38a169;
    color: white;
}

.btn-success:hover {
    background: #2f855a;
}

.supported-formats {
    color: #718096;
    font-size: 0.875rem;
    margin-top: 1rem;
}

/* Preview Section */
.preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.preview-box h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2d3748;
    text-align: center;
}

.image-container {
    position: relative;
    width: 100%;
    height: 300px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #3182ce;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 0.75rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.image-info {
    display: flex;
    justify-content: space-between;
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: #4a5568;
}

/* Controls */
.controls {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.control-group {
    margin-bottom: 1.25rem;
}

.control-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #2d3748;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3182ce;
    cursor: pointer;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 0.5rem;
}

.input-field {
    margin-bottom: 0;
}

.input-field label {
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.375rem;
    color: #4a5568;
}

.input-field input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 0.95rem;
}

.maintain-aspect {
    margin-top: 0.75rem;
}

.maintain-aspect label {
    font-weight: normal;
    font-size: 0.95rem;
    color: #4a5568;
}

.actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.savings-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f0fff4;
    border: 1px solid #c6f6d5;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    color: #2f855a;
}

/* Privacy Note */
.privacy-note {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
    padding: 1rem;
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #2b6cb0;
}

.privacy-note svg {
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .preview-grid {
        grid-template-columns: 1fr;
    }
    
    .input-row {
        grid-template-columns: 1fr;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}