.modern-compressor {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    color: #2d3748;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.subtitle {
    color: #718096;
    font-size: 16px;
    margin: 0;
}

.upload-area {
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.upload-area:hover {
    border-color: #4a6cf7;
    background: #f8faff;
}

.upload-icon {
    width: 60px;
    height: 60px;
    fill: #4a6cf7;
    margin-bottom: 15px;
}

.upload-area p {
    color: #4a5568;
    font-size: 16px;
    margin: 10px 0 0 0;
}

.browse {
    color: #4a6cf7;
    font-weight: 600;
    text-decoration: underline;
}

#fileInput {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.preview-container {
    margin: 25px 0;
    text-align: center;
}

.preview-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.compression-controls {
    margin: 30px 0;
}

.quality-slider {
    margin-bottom: 25px;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #718096;
    margin-bottom: 8px;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #4a6cf7;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(74, 108, 247, 0.2);
}

.quality-value {
    text-align: center;
    font-size: 15px;
    color: #4a5568;
    margin-top: 10px;
}

.quality-value span {
    font-weight: 600;
    color: #4a6cf7;
}

.compress-button, .download-button {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.compress-button {
    background: #4a6cf7;
    color: white;
}

.compress-button:hover {
    background: #3a5bd9;
    transform: translateY(-2px);
}

.results {
    margin-top: 30px;
}

.comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.image-box {
    text-align: center;
}

.image-box h3 {
    color: #4a5568;
    font-size: 15px;
    margin: 0 0 10px 0;
    font-weight: 500;
}

.comparison-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.download-button {
    background: #38a169;
    color: white;
}

.download-button:hover {
    background: #2f855a;
    transform: translateY(-2px);
}

@media (max-width: 640px) {
    .modern-compressor {
        padding: 20px;
    }
    
    .comparison {
        grid-template-columns: 1fr;
    }
}