
        #processing-progress-container {
            width: 100%;
            background-color: #e0e0e0;
            border-radius: 8px;
            height: 20px;
            overflow: hidden;
            margin-top: 10px;
            box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
        }

        #processing-progress-bar {
            width: 0%;
            height: 100%;
            background-color: #4c1d95;
            transition: width 0.3s ease;
        }

        .file-upload-progress {
            width: 100%;
            height: 8px;
            background-color: #e0e0e0;
            border-radius: 4px;
            margin-top: 5px;
            overflow: hidden;
        }

        .file-upload-progress-bar {
            width: 0%;
            height: 100%;
            background-color: #3b82f6;
            transition: width 0.3s ease;
        }
        
        /* New CSS for the pulsing animation */
        .pulsing-progress {
            background-color: #6d28d9; /* A slightly different color to indicate a pending state */
            background-image: linear-gradient(-45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);
            background-size: 40px 40px;
            animation: pulse 1s linear infinite;
        }
        
        @keyframes pulse {
            0% {
                background-position: 0 0;
            }
            100% {
                background-position: 40px 40px;
            }
        }
        
        /* CSS for the rotating spinner */
        .spinner {
            border: 4px solid rgba(0, 0, 0, 0.1);
            width: 24px;
            height: 24px;
            border-radius: 50%;
            border-left-color: #4c1d95;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            0% {
                transform: rotate(0deg);
            }
            100% {
                transform: rotate(360deg);
            }
        }
.pdfword-body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f3f4f6;
    color: #1f2937;
    margin: 0;
    padding: 2rem;
    width: 100%;
    display: flex;
    justify-content: center;
    height: 100vh;
}

/* --- Main Container & Layout --- */
.pdfword-body .merge-container {

    width: 100%;
    max-width: 900px;
    padding: 2.5rem 3rem;
    text-align: center;
}

/* --- Header Section --- */
.pdfword-body .tool-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #5b21b6;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.pdfword-body .tool-header h1 i {
    color: #5b21b6;
    font-size: 2.5rem;
}

.pdfword-body .tool-header p {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* --- Upload Section --- */
.pdfword-body .upload-section {
    border: 3px dashed #e5e7eb;
    border-radius: 1rem;
    padding: 3rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

.pdfword-body .upload-section:hover,
.pdfword-body .upload-section.highlight {
    border-color: #5b21b6;
    background-color: #c4b5fd;
}

.pdfword-body .drop-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.pdfword-body .drop-content .bi-folder-plus {
    font-size: 4rem;
    color: #5b21b6;
    margin-bottom: 0.5rem;
}

.pdfword-body .drop-content p {
    font-size: 1.25rem;
    font-weight: 600;
    color: #4c1d95;
    margin: 0;
}

.pdfword-body .drop-content span {
    font-size: 1rem;
    color: #6b7280;
    font-weight: 500;
}

/* --- File Status Area --- */
.pdfword-body .file-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background-color: #f3f4f6;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #e5e7eb;
    width: 100%;
}

.pdfword-body .file-details {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: #1f2937;
}

.pdfword-body .file-details .folder-icon {
    font-size: 1.5rem;
    color: #5b21b6;
}

.pdfword-body .file-details span {
    font-size: 1rem;
}

.pdfword-body .status-message-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.pdfword-body .status-message-container .spinner {
    border: 4px solid #e5e7eb;
    border-top: 4px solid #5b21b6;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.pdfword-body .status-message-container .success-icon {
    color: #10b981;
    font-size: 1.5rem;
}

.pdfword-body .status-message.error {
    color: #ef4444;
    font-weight: 600;
    margin-top: 1rem;
}

/* --- Action Buttons --- */
.pdfword-body .action-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.pdfword-body .btn {
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    justify-content: center;
    border: none;
}

.pdfword-body .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.05);
}

.pdfword-body .btn-convert {
    background-color: #5b21b6;
    color: #ffffff;
}

.pdfword-body .btn-convert:disabled {
    background-color: #e5e7eb;
    cursor: not-allowed;
    color: #6b7280;
}

.pdfword-body .btn-download {
    background-color: #10b981;
    color: #ffffff;
}

.pdfword-body .btn-download i,
.pdfword-body .btn-convert i {
    margin-left: 0.5rem;
}

/* --- Split-specific Styles (Override/Adjustments) --- */
.pdfword-body .split-options-container {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left; /* Align labels and inputs to the left */
}

.pdfword-body .split-options-container label {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    display: block; /* Make label a block element for spacing */
}

.pdfword-body .split-options-container select,
.pdfword-body .split-options-container input {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    font-size: 1rem;
    background-color: #ffffff;
}

.pdfword-body .split-options-container input::placeholder {
    color: #9ca3af;
}

.pdfword-body .range-inputs {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* FINAL FIX: This rule ensures all the elements are hidden by default, and JavaScript can remove it to make them visible. */
.hidden {
    display: none !important;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .pdfword-body .merge-container {
        padding: 2rem 1.5rem;
    }

    .pdfword-body .tool-header h1 {
        font-size: 1.75rem;
    }

    .pdfword-body .tool-header p {
        font-size: 1rem;
    }

    .pdfword-body .btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}
