.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 #c4b5fd;
    border-radius: 22px;
    background: #f5f3ff;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.spdf-dropzone:hover,
.spdf-dropzone.is-dragging {
    border-color: #6d28d9;
    background: #ede9fe;
}

.spdf-button {
    padding: 18px 34px;
    border: 0;
    border-radius: 12px;
    background: #6d28d9;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.spdf-button:hover {
    background: #5b21b6;
    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 #ddd6fe;
    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: #ede9fe;
    color: #6d28d9;
    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: #f5f3ff;
    color: #6d28d9;
}

.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: #6d28d9;
    background: #f5f3ff;
    transform: translateY(2px);
}

.spdf-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 24px;
}

.spdf-button--secondary {
    border: 1px solid #6d28d9;
    background: #ffffff;
    color: #6d28d9;
}

.spdf-button--secondary:hover {
    background: #f5f3ff;
    color: #5b21b6;
}

.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: #6d28d9;
}

.spdf-file-item.is-dragging-file {
    opacity: 0.35;
}

.spdf-file-item.is-drag-target {
    border-color: #6d28d9;
    background: #f5f3ff;
    transform: translateY(3px);
}

.spdf-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 24px;
}

.spdf-button--secondary {
    border: 1px solid #6d28d9;
    background: #ffffff;
    color: #6d28d9;
}

.spdf-button--secondary:hover {
    background: #f5f3ff;
    color: #5b21b6;
}

.spdf-button--process {
    margin: 0;
}

@media (max-width: 600px) {
    .spdf-actions {
        flex-direction: column;
    }

    .spdf-actions .spdf-button {
        width: 100%;
    }
}