.merge-pdf-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.merge-pdf-upload-area {
    background: #fff;
    border: 2px dashed #c3c4c7;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
}

.merge-pdf-upload-area h3 {
    margin: 0 0 10px 0;
    color: #1d2327;
    font-size: 24px;
}

.merge-pdf-upload-area p {
    color: #646970;
    margin: 0 0 20px 0;
}

/* Upload Section */
.upload-section {
    margin: 30px 0;
}

#pdf-upload {
    display: none;
}

.upload-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #2271b1;
    color: #fff;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.upload-button:hover {
    background: #135e96;
}

.upload-section.dragover {
    background: #f0f6fc;
    border-color: #2271b1;
}

.file-info {
    font-size: 12px;
    color: #646970;
    margin: 8px 0 0 0;
}

/* PDF List */
.pdf-list {
    margin: 30px 0;
    text-align: left;
}

.pdf-list h4 {
    margin: 0 0 15px 0;
    color: #1d2327;
    font-size: 18px;
}

.no-files {
    color: #646970;
    font-style: italic;
    text-align: center;
    padding: 20px;
    background: #f6f7f7;
    border-radius: 4px;
}

#sortable-pdfs {
    list-style: none;
    padding: 0;
    margin: 0;
    min-height: 60px;
}

.pdf-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    margin: 8px 0;
    background: #f6f7f7;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    cursor: move;
    transition: all 0.2s ease;
}

.pdf-item:hover {
    background: #f0f0f1;
    border-color: #8c8f94;
}

.pdf-item.ui-sortable-helper {
    background: #f0f6fc;
    border-color: #2271b1;
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.2);
}

.ui-state-highlight {
    height: 50px;
    background: #f0f6fc;
    border: 2px dashed #2271b1;
    border-radius: 4px;
}

.file-name {
    flex: 1;
    font-weight: 500;
    color: #1d2327;
}

.remove-file {
    background: none;
    border: none;
    color: #d63638;
    cursor: pointer;
    padding: 4px;
    border-radius: 2px;
    transition: background-color 0.2s ease;
}

.remove-file:hover {
    background: #d63638;
    color: #fff;
}

.file-order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #2271b1;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    margin-left: 10px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 30px 0;
}

.merge-button, .reset-button {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.merge-button {
    background: #2271b1;
    color: #fff;
}

.merge-button:hover:not(:disabled) {
    background: #135e96;
}

.merge-button:disabled {
    background: #a7aaad;
    cursor: not-allowed;
}

.reset-button {
    background: #d63638;
    color: #fff;
}

.reset-button:hover {
    background: #b32d2e;
}

/* Merge Result */
.merge-result {
    margin-top: 20px;
}

.success-message {
    background: #d1e7dd;
    border: 1px solid #badbcc;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
}

.success-message p {
    color: #0f5132;
    margin: 0 0 15px 0;
    font-weight: 500;
}

.download-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #0f5132;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s ease;
    font-weight: 500;
}

.download-button:hover {
    background: #0c4028;
    color: #fff;
}

.file-note {
    font-size: 12px;
    color: #0f5132;
    margin: 10px 0 0 0;
    opacity: 0.8;
}

.processing-message {
    background: #fff3cd;
    border: 1px solid #ffecb5;
    border-radius: 4px;
    padding: 15px;
    text-align: center;
    color: #856404;
}

.error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 15px;
    text-align: center;
    color: #721c24;
}

/* Responsive Design */
@media (max-width: 768px) {
    .merge-pdf-container {
        padding: 10px;
    }
    
    .merge-pdf-upload-area {
        padding: 20px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .pdf-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .file-order {
        align-self: flex-end;
        margin-left: 0;
    }
}

/* Loading States */
.pdf-item.uploading {
    opacity: 0.7;
    pointer-events: none;
}

.pdf-item.uploading .file-name::after {
    content: ' (Uploading...)';
    color: #646970;
    font-style: italic;
}