.pdf-merger-tool-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.pdf-upload-area {
    margin: 20px 0;
    padding: 20px;
    border: 2px dashed #ccc;
    border-radius: 5px;
    text-align: center;
    background-color: #f9f9f9;
}

.upload-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #2271b1;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.upload-button:hover {
    background-color: #135e96;
}

#pdf-upload {
    display: none;
}

.file-info {
    display: block;
    margin-top: 10px;
    color: #666;
}

.pdf-list-container {
    margin: 20px 0;
}

.pdf-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
    min-height: 50px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.pdf-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    background-color: white;
    cursor: move;
}

.pdf-item:last-child {
    border-bottom: none;
}

.drag-handle {
    margin-right: 10px;
    cursor: move;
    color: #666;
}

.file-name {
    flex-grow: 1;
    margin-right: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    color: #666;
    font-size: 0.9em;
    margin-right: 15px;
}

.remove-file {
    background: none;
    border: none;
    color: #cc1818;
    font-size: 1.2em;
    cursor: pointer;
    padding: 0 5px;
}

.remove-file:hover {
    color: #a01212;
}

.empty-message {
    padding: 15px;
    color: #666;
    text-align: center;
    font-style: italic;
}

.actions {
    margin: 20px 0;
    text-align: center;
}

.merge-button {
    padding: 10px 20px;
    background-color: #2271b1;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
}

.merge-button:hover {
    background-color: #135e96;
}

.merge-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.download-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin-left: 10px;
    transition: background-color 0.3s;
}

.download-link:hover {
    background-color: #3e8e41;
}

.loading-indicator {
    text-align: center;
    margin: 20px 0;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid #2271b1;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* SortableJS styles */
.sortable-ghost {
    opacity: 0.5;
    background: #c8ebfb;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .pdf-item {
        flex-wrap: wrap;
    }
    
    .file-name {
        flex-basis: 100%;
        margin: 5px 0;
    }
    
    .actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .download-link {
        margin-left: 0;
        margin-top: 10px;
    }
}