/* Layout adjustments for sidebar integration */
.content-area {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.main {
    padding: 40px;
}

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

.upload-section:hover {
    border-color: #4f46e5;
    background: #f3f4ff;
}

.upload-section.dragover {
    border-color: #4f46e5;
    background: #e0e7ff;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4rem;
    color: #4f46e5;
    margin-bottom: 20px;
}

.upload-text {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 20px;
}

.upload-button {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.upload-button:hover {
    transform: translateY(-2px);
}

#fileInput {
    display: none;
}

.controls {
    margin: 30px 0;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.quality-control {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 300px;
}

.quality-control label {
    font-weight: 600;
    color: #333;
}

.quality-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    outline: none;
    background: #ddd;
}

.quality-value {
    font-weight: 600;
    color: #4f46e5;
    min-width: 50px;
    text-align: center;
}

.action-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.preview-section {
    margin-top: 40px;
}

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

.preview-item {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.preview-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.preview-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f3f4f6;
}

.preview-info {
    padding: 15px;
}

.preview-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
}

.size-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.status {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-processing {
    background: #dbeafe;
    color: #1e40af;
}

.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.status-error {
    background: #fee2e2;
    color: #991b1b;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.hidden {
    display: none;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

.stats-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin: 30px 0;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.stat-item {
    text-align: center;
    min-width: 120px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #4f46e5;
    display: block;
}

.stat-label {
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 5px;
}

.rename-control {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
}

.rename-control input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.rename-control label {
    font-weight: 600;
    color: #333;
    cursor: pointer;
}

.rename-preview {
    color: #64748b;
    font-size: 0.9rem;
    font-family: monospace;
    background: #e2e8f0;
    padding: 4px 8px;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .main {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .quality-control {
        min-width: auto;
    }
    
    .preview-grid {
        grid-template-columns: 1fr;
    }
}
