.png-to-jpg-converter {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.converter-header {
    text-align: center;
    margin-bottom: 40px;
}

.converter-header h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2.5em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.converter-header .description {
    color: #7f8c8d;
    font-size: 1.1em;
    line-height: 1.6;
}

.converter-container {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e8ed;
    position: relative;
}

.upload-section {
    margin-bottom: 25px;
}

.upload-area {
    border: 3px dashed #bdc3c7;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background: #fafafa;
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.upload-area:hover::before {
    left: 100%;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f8f9fa;
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #764ba2;
    background: #f0e6ff;
    transform: scale(1.02);
}

.upload-area.file-selected {
    border-color: #2ecc71;
    background: #e8f6f3;
    padding: 30px 20px;
}

.upload-content .upload-icon {
    font-size: 4em;
    margin-bottom: 20px;
    display: block;
    transition: all 0.3s ease;
}

.upload-content h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.4em;
    font-weight: 600;
}

.upload-content p {
    color: #7f8c8d;
    margin-bottom: 20px;
}

.file-preview {
    margin-top: 20px;
    max-width: 200px;
    margin-left: auto;
    margin-right: auto;
}

.file-preview img {
    max-width: 100%;
    max-height: 150px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.browse-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.browse-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.file-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 1px solid #667eea;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.file-info p {
    margin: 8px 0;
    color: #2c3e50;
    font-size: 0.95em;
}

.quality-section {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    animation: slideDown 0.3s ease;
}

.quality-section h4 {
    color: #856404;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.2em;
}

.quality-slider {
    max-width: 500px;
    margin: 0 auto;
}

#qualityRange {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, #e74c3c, #f39c12, #2ecc71);
    outline: none;
    -webkit-appearance: none;
}

#qualityRange::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #2c3e50;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.quality-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.85em;
    color: #7f8c8d;
}

.quality-labels span:nth-child(2) {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1em;
}

.conversion-info {
    background: linear-gradient(135deg, #e8f5e8 0%, #e3f2fd 100%);
    border: 1px solid #c8e6c9;
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
}

.conversion-info h4 {
    color: #2e7d32;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.2em;
}

.conversion-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
}

.conversion-info li {
    padding: 10px 15px;
    color: #2e7d32;
    font-size: 0.95em;
    background: rgba(255,255,255,0.7);
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.conversion-info li:hover {
    transform: translateX(5px);
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 35px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 160px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(46, 204, 113, 0.4);
}

.btn-primary:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(46, 204, 113, 0.4);
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
    transform: translateY(-3px);
}

.result-section {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #28a745;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.download-area h3 {
    color: #155724;
    margin-bottom: 10px;
    font-size: 1.5em;
}

.download-area p {
    color: #155724;
    margin-bottom: 20px;
}

.success-icon {
    font-size: 4em;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.file-size-info {
    margin: 20px 0;
    padding: 15px;
    background: rgba(255,255,255,0.5);
    border-radius: 10px;
}

.size-savings {
    color: #28a745;
    font-weight: bold;
    font-size: 1.1em;
}

.size-info {
    color: #6c757d;
}

.loading-spinner {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    color: #667eea;
    font-size: 1.1em;
    font-weight: 500;
}

.error-notification {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 1px solid #f5c6cb;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.3s ease;
}

.error-icon {
    font-size: 1.2em;
}

.error-message {
    flex: 1;
    color: #721c24;
    font-weight: 500;
}

.error-close {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #721c24;
    padding: 0;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-close:hover {
    background: rgba(114, 28, 36, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .png-to-jpg-converter {
        padding: 15px;
    }
    
    .converter-container {
        padding: 25px 20px;
        border-radius: 15px;
    }
    
    .converter-header h2 {
        font-size: 2em;
    }
    
    .upload-area {
        padding: 40px 15px;
    }
    
    .upload-content .upload-icon {
        font-size: 3em;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        min-width: auto;
        width: 100%;
    }
    
    .conversion-info ul {
        grid-template-columns: 1fr;
    }
    
    .quality-labels {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}