* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 1200px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

header {
    background-color: white;
    padding: 25px 30px;
    border-bottom: 1px solid #eee;
}

h1 {
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.subtitle {
    color: #7f8c8d;
    font-size: 16px;
}

.main-content {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
}

.upload-section {
    flex: 1;
    min-width: 300px;
    padding: 30px;
    background-color: #f8f9fa;
}

.preview-section {
    flex: 2;
    min-width: 500px;
    padding: 30px;
    background-color: white;
}

.upload-area {
    border: 2px dashed #d1d8e0;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s;
    background-color: white;
    cursor: pointer;
    margin-bottom: 25px;
}

.upload-area:hover, .upload-area.dragover {
    border-color: #3498db;
    background-color: #f0f7ff;
}

.upload-icon {
    font-size: 48px;
    color: #7f8c8d;
    margin-bottom: 15px;
}

.upload-text {
    margin-bottom: 20px;
    color: #7f8c8d;
}

.btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s;
    display: inline-block;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-success {
    background-color: #2ecc71;
}

.btn-success:hover {
    background-color: #27ae60;
}

.file-input {
    display: none;
}

.settings-panel {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
}

.setting-group {
    margin-bottom: 20px;
}

.setting-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    background: #e0e0e0;
    border-radius: 3px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
}

.slider-value {
    min-width: 40px;
    text-align: center;
    font-weight: 500;
}

.mode-selector {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.mode-btn {
    flex: 1;
    padding: 10px;
    text-align: center;
    background-color: #f1f2f6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.mode-btn.active {
    background-color: #3498db;
    color: white;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.checkbox {
    width: 18px;
    height: 18px;
}

.preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.preview-box {
    flex: 1;
    min-width: 250px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.preview-header {
    padding: 12px 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
    font-weight: 500;
    color: #2c3e50;
}

.preview-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background-color: #f8f9fa;
    padding: 10px;
}

.file-info {
    padding: 12px 15px;
    background-color: white;
    font-size: 14px;
    color: #7f8c8d;
}

.size-comparison {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
}

.original-size {
    color: #e74c3c;
}

.compressed-size {
    color: #2ecc71;
}

.savings {
    font-weight: 500;
    color: #3498db;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.action-buttons .btn {
    flex: 1;
    min-width: 120px;
    text-align: center;
}

.image-list {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
}

.image-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.image-item:last-child {
    border-bottom: none;
}

.image-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
}

.image-details {
    flex: 1;
}

.image-name {
    font-weight: 500;
    margin-bottom: 4px;
}

.image-size {
    font-size: 12px;
    color: #7f8c8d;
}

.remove-btn {
    color: #e74c3c;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
}

.resize-options {
    display: none;
    margin-top: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.dimension-inputs {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.dimension-input {
    flex: 1;
}

.dimension-input input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.format-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .upload-section, .preview-section {
        min-width: 100%;
    }
    
    .preview-container {
        flex-direction: column;
    }
}