/* JPG to PDF Converter Styles */
.jpg-to-pdf-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header */
.converter-header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    margin-bottom: 30px;
    color: white;
}

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

.converter-header h1 i {
    margin-right: 15px;
}

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

/* Main Card */
.converter-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 40px;
    padding: 30px;
}

/* Upload Area */
.upload-area {
    text-align: center;
    padding: 60px 20px;
    border: 3px dashed #dee2e6;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-area:hover, .upload-area.drag-over {
    border-color: #667eea;
    background: #f8f9fa;
}

.upload-icon i {
    font-size: 64px;
    color: #667eea;
    margin-bottom: 15px;
}

.upload-area h3 {
    margin: 10px 0;
}

.upload-area p {
    color: #6c757d;
    margin-bottom: 20px;
}

.upload-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn-drive, .btn-dropbox {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    opacity: 0.6;
}

.btn-drive {
    background: #4285f4;
    color: white;
}

.btn-dropbox {
    background: #0061ff;
    color: white;
}

.btn-select {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-select:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

/* Preview Area */
.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.preview-header h3 {
    margin: 0;
    color: #333;
}

.btn-clear {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-clear:hover {
    background: #c82333;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding: 5px;
}

.image-card {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s;
}

.image-card:hover {
    transform: translateY(-3px);
}

.image-preview {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    font-size: 10px;
    text-align: center;
}

.image-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: white;
}

.image-name {
    font-size: 11px;
    color: #333;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-remove {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
}

.btn-remove:hover {
    color: #c82333;
}

/* Settings Area */
.settings-area {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.settings-area h3 {
    margin-bottom: 15px;
    color: #333;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-item label {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.setting-item select, .setting-item input {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
}

/* Convert Area */
.convert-area {
    margin-top: 25px;
    text-align: center;
}

.btn-convert {
    background: #28a745;
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-convert:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-2px);
}

.btn-convert:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Progress Area */
.progress-area {
    margin-top: 25px;
    text-align: center;
}

.progress-bar-container {
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    height: 30px;
    margin-bottom: 15px;
}

.progress-bar {
    background: linear-gradient(90deg, #667eea, #764ba2);
    height: 100%;
    width: 0%;
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
}

.progress-text {
    color: #6c757d;
}

.progress-text i {
    margin-right: 8px;
}

/* Result Area */
.result-area {
    margin-top: 25px;
    text-align: center;
}

.result-success i {
    font-size: 64px;
    color: #28a745;
    margin-bottom: 15px;
}

.result-success h3 {
    margin-bottom: 20px;
    color: #333;
}

.btn-download, .btn-new {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin: 0 5px;
}

.btn-download {
    background: #28a745;
    color: white;
}

.btn-download:hover {
    background: #218838;
}

.btn-new {
    background: #6c757d;
    color: white;
}

.btn-new:hover {
    background: #5a6268;
}

/* Error Area */
.error-area {
    margin-top: 25px;
    text-align: center;
}

.error-message i {
    font-size: 64px;
    color: #dc3545;
    margin-bottom: 15px;
}

.error-message h3 {
    margin-bottom: 10px;
    color: #333;
}

.error-message p {
    color: #6c757d;
    margin-bottom: 20px;
}

.btn-retry {
    background: #ffc107;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-retry:hover {
    background: #e0a800;
}

/* Features Section */
.features-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.feature {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature i {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 15px;
}

.feature h4 {
    margin: 10px 0;
    color: #333;
}

.feature p {
    color: #6c757d;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .converter-header h1 {
        font-size: 1.8rem;
    }
    
    .converter-card {
        padding: 20px;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .preview-header {
        flex-direction: column;
        text-align: center;
    }
    
    .btn-download, .btn-new {
        display: block;
        width: 100%;
        margin: 5px 0;
    }
    
    .upload-buttons {
        flex-direction: column;
    }
    
    .btn-drive, .btn-dropbox {
        width: 100%;
    }
}