.merge-pdf-main .loader {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive styles */
@media (min-width: 640px) {
    .merge-pdf-main .sm-flex-row {
        flex-direction: row !important;
    }
}



.merge-pdf-main .upload-state {
    padding: 1rem;
    text-align: center;
}

.merge-pdf-main .upload-state h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.merge-pdf-main .upload-state p {
    color: #64748b;
    margin-bottom: 1rem;
}

.merge-pdf-main #drop-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 0.75rem;
    padding: 2.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.merge-pdf-main #drop-zone:hover {
    background-color: #e2e8f0;
    border-color: #94a3b8;
}

.merge-pdf-main .drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.merge-pdf-main .drop-zone-icon {
    width: 4rem;
    height: 4rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.merge-pdf-main .drop-zone-text-main {
    font-size: 1.125rem;
    font-weight: 600;
    color: #334155;
}

.merge-pdf-main .drop-zone-text-sub {
    color: #64748b;
    margin-top: 0.25rem;
}

.merge-pdf-main #browse-btn {
    margin-top: 1rem;
    background-color: #2563eb;
    color: #ffffff;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1),
                0 2px 4px -2px rgb(0 0 0 / 0.1);
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.merge-pdf-main #browse-btn:hover {
    background-color: #1d4ed8;
}

.merge-pdf-main #file-list-container {
    display: none;
    margin-top: 1.5rem;
    text-align: left;
    background-color: #f1f5f9;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #90b2d5;
}

.merge-pdf-main .file-list-title {
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.merge-pdf-main #file-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    max-height: 150px;
    overflow-y: auto;
}

.merge-pdf-main .file-list-item {
    font-size: 0.875rem;
    color: #475569;
    padding: 0.25rem 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.merge-pdf-main #merge-btn {
    display: none;
    margin-top: 1.5rem;
    width: 100%;
    background-color: #16a34a;
    color: #ffffff;
    font-weight: 700;
    padding: 0.75rem 0;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1),
                0 2px 4px -2px rgb(0 0 0 / 0.1);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.merge-pdf-main #merge-btn:hover {
    background-color: #15803d;
    transform: scale(1.02);
}

.merge-pdf-main .merging-state {
    display: none;
    padding: 2rem;
    text-align: center;
}

.merge-pdf-main .merging-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 16rem;
}

.merge-pdf-main .merging-text-main {
    font-size: 1.25rem;
    font-weight: 600;
    color: #334155;
    margin-top: 1.5rem;
}

.merge-pdf-main .merging-text-sub {
    color: #64748b;
}

.merge-pdf-main .result-state {
    display: none;
    padding: 2rem;
    text-align: center;
}

.merge-pdf-main .result-state h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #16a34a;
    margin-bottom: 1rem;
}

.merge-pdf-main .result-summary-container {
    background-color: #f1f5f9;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.merge-pdf-main #merge-summary {
    font-size: 1.125rem;
    font-weight: 500;
    color: #1e293b;
}

.merge-pdf-main .result-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.merge-pdf-main #download-btn {
    width: 100%;
    background-color: #2563eb;
    color: #ffffff;
    font-weight: 700;
    padding: 0.75rem 0;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1),
                0 2px 4px -2px rgb(0 0 0 / 0.1);
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.merge-pdf-main #download-btn:hover {
    background-color: #1d4ed8;
    transform: scale(1.02);
}

.merge-pdf-main #start-over-btn {
    width: 100%;
    background-color: #e2e8f0;
    color: #334155;
    font-weight: 700;
    padding: 0.75rem 0;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.merge-pdf-main #start-over-btn:hover {
    background-color: #cbd5e1;
}

.merge-pdf-main .footer {
    text-align: center;
    margin-top: 0.5rem;
}

.merge-pdf-main .footer-text {
    font-size: 0.875rem;
    color: #94a3b8;
}
