.spdf-tool {
    width: min(900px, calc(100% - 32px));
    margin: 60px auto;
    padding: 48px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 35px rgba(31, 41, 55, 0.08);
    font-family: Arial, Helvetica, sans-serif;
    color: #1f2937;
    text-align: center;
}

.spdf-tool__header h1 {
    margin: 0 0 14px;
    font-size: clamp(36px, 6vw, 54px);
    line-height: 1.1;
}

.spdf-tool__header p {
    margin: 0;
    color: #6b7280;
    font-size: 18px;
}

.spdf-dropzone {
    margin-top: 36px;
    padding: 70px 24px;
    border: 3px dashed #b8dced;
    border-radius: 22px;
    background: #f2f9ff;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.spdf-dropzone:hover,
.spdf-dropzone.is-dragging {
    border-color: #075cab;
    background: #e3f1ff;
}

.spdf-button {
    padding: 18px 34px;
    border: 0;
    border-radius: 12px;
    background: #075cab;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.spdf-button:hover {
    background: #063b79;
    transform: translateY(-1px);
}

.spdf-dropzone p {
    margin: 18px 0 0;
    color: #6b7280;
}

.spdf-file-list {
    margin-top: 24px;
    text-align: left;
}

.spdf-files {
    display: grid;
    gap: 12px;
}

.spdf-file-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid #dceaf5;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(76, 29, 149, 0.06);
}

.spdf-file-item__icon {
    display: grid;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 12px;
    background: #e3f1ff;
    color: #075cab;
    font-size: 13px;
    font-weight: 800;
}

.spdf-file-item__info {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 4px;
}

.spdf-file-item__name {
    overflow: hidden;
    color: #1f2937;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.spdf-file-item__size {
    color: #6b7280;
    font-size: 14px;
}

.spdf-file-item__remove {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: #fef2f2;
    color: #dc2626;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.spdf-file-item__remove:hover {
    background: #fee2e2;
}

.spdf-button--process {
    display: block;
    margin: 24px auto 0;
}

@media (max-width: 600px) {
    .spdf-tool {
        margin: 32px auto;
        padding: 28px 18px;
    }

    .spdf-dropzone {
        padding: 50px 18px;
    }

    .spdf-file-item {
        padding: 12px;
    }
}

.spdf-button:disabled,
.spdf-file-item__remove:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.spdf-status {
    margin-top: 18px;
    padding: 14px 18px;
    border-radius: 12px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
}

.spdf-status:empty {
    display: none;
}

.spdf-status--loading {
    background: #f2f9ff;
    color: #075cab;
}

.spdf-status--success {
    background: #ecfdf5;
    color: #047857;
}

.spdf-status--error {
    background: #fef2f2;
    color: #b91c1c;
}
.spdf-file-summary {
    margin-bottom: 14px;
    color: #6b7280;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
}

.spdf-file-item {
    cursor: grab;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        opacity 0.2s ease,
        transform 0.2s ease;
}

.spdf-file-item:active {
    cursor: grabbing;
}


.spdf-file-item.is-dragging-file {
    opacity: 0.4;
}

.spdf-file-item.is-drag-target {
    border-color: #075cab;
    background: #f2f9ff;
    transform: translateY(2px);
}

.spdf-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 24px;
}

.spdf-button--secondary {
    border: 1px solid #075cab;
    background: #ffffff;
    color: #075cab;
}

.spdf-button--secondary:hover {
    background: #f2f9ff;
    color: #063b79;
}

.spdf-button--process {
    margin: 0;
}

@media (max-width: 600px) {
    .spdf-actions {
        flex-direction: column;
    }

    .spdf-actions .spdf-button {
        width: 100%;
    }

    .spdf-file-item__drag {
        display: none;
    }
}

.spdf-file-item__drag {
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.spdf-file-item__drag:active {
    cursor: grabbing;
}

.spdf-file-item__name,
.spdf-file-item__size {
    user-select: none;
}
.spdf-file-summary {
    margin-bottom: 14px;
    color: #6b7280;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
}

.spdf-file-item {
    cursor: grab;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        opacity 0.2s ease,
        transform 0.2s ease;
}

.spdf-file-item:active {
    cursor: grabbing;
}

.spdf-file-item__drag {
    display: flex !important;
    flex: 0 0 28px;
    width: 28px;
    height: 36px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-right: 2px;
    cursor: grab;
    user-select: none;
}

.spdf-file-item__drag span {
    display: block !important;
    width: 18px;
    height: 3px;
    border-radius: 999px;
    background: #075cab;
}

.spdf-file-item.is-dragging-file {
    opacity: 0.35;
}

.spdf-file-item.is-drag-target {
    border-color: #075cab;
    background: #f2f9ff;
    transform: translateY(3px);
}

.spdf-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 24px;
}

.spdf-button--secondary {
    border: 1px solid #075cab;
    background: #ffffff;
    color: #075cab;
}

.spdf-button--secondary:hover {
    background: #f2f9ff;
    color: #063b79;
}

.spdf-button--process {
    margin: 0;
}

@media (max-width: 600px) {
    .spdf-actions {
        flex-direction: column;
    }

    .spdf-actions .spdf-button {
        width: 100%;
    }
}
.spdf-preview-title{margin:28px 0 14px;text-align:center;font-size:18px}.spdf-merge-previews{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;margin:0 0 24px}.spdf-merge-preview{overflow:hidden;border:1px solid #dceaf5;border-radius:14px;background:#fff}.spdf-merge-preview object{display:block;width:100%;height:300px;background:#f1f5f9}.spdf-merge-preview strong{display:block;padding:10px 12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.spdf-merge-result{margin-top:28px;padding:20px;border:1px solid #b8dced;border-radius:18px;background:#f8f7ff;text-align:center}.spdf-merge-result object{display:block;width:100%;height:620px;margin:15px 0;background:#fff;border:0;border-radius:12px}.spdf-merge-result .spdf-button{display:inline-block;text-decoration:none}@media(max-width:640px){.spdf-merge-result object{height:460px}.spdf-merge-preview object{height:240px}}
