/* 单张压缩页面样式 */

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9ff;
}

.upload-area:hover {
    border-color: #764ba2;
    background: #f0f1ff;
}

.upload-area.dragover {
    border-color: #764ba2;
    background: #e8e9ff;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.upload-text {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.upload-hint {
    font-size: 14px;
    color: #999;
}

#fileInput {
    display: none;
}

.controls {
    display: none;
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: block;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
}

.quality-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.quality-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

.quality-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
}

.quality-value {
    display: inline-block;
    margin-left: 10px;
    color: #667eea;
    font-weight: 700;
    font-size: 18px;
}

.format-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.format-select:focus {
    outline: none;
    border-color: #667eea;
}

.preview-area {
    display: none;
    margin-top: 30px;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.preview-item {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    background: #fafafa;
}

.preview-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    text-align: center;
}

.preview-img {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 10px;
    background: white;
}

.preview-info {
    font-size: 14px;
    color: #666;
    text-align: center;
}

.size-info {
    display: inline-block;
    padding: 5px 12px;
    background: white;
    border-radius: 15px;
    margin: 5px;
    font-weight: 600;
}

.size-reduced {
    color: #28a745;
}

@media (max-width: 768px) {
    .upload-area {
        padding: 40px 20px;
    }

    .upload-icon {
        font-size: 48px;
    }

    .preview-grid {
        grid-template-columns: 1fr;
    }
}
