/* PDF转长图工具样式 */
.tool-content {
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    border: 1px solid #ced4da;
    padding: 22px;
    border-radius: 12px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fff;
}

.tool-content .item-file {
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    cursor: pointer;
}

.file-upload {
    border: solid 1px #ced4da;
    background-color: #f8f9fa;
    min-width: 100%;
    max-width: 100%;
    width: 100%;
    min-height: 250px;
    line-height: 30px;
    padding: 0 12px;
    border-radius: 6px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    outline: none;
    font-size: 15px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px 0;
    position: relative;
}

.file-upload .upload-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px 0;
    width: 100%;
    height: 100%;
}

.file-upload .upload-prompt > div > p {
    text-align: center;
    margin-bottom: 0;
    color: #555;
}

.tool-content .operate-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

/*按钮样式*/
.btn {
    outline: none;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 12px;
    color: #333;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,.05);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.btn .ripple {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    z-index: 1;
    animation: ripple-effect 0.6s ease-out forwards;
}

.btn svg {
    fill: #fff;
}

.btn-purple {
    color: #fff;
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.btn-red {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-grey {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-green {
    color: #fff;
    background-color: #28a745;
    border-color: #28a745;
}

.item-preview {
    display: flex;
    align-items: center;
    justify-content: start;
    user-select: none;
    gap: 14px;
    overflow-x: auto;
    cursor: grab;
}

.item-preview:active {
    cursor: grabbing;
}

/* 隐藏滚动条 */
.item-preview::-webkit-scrollbar {
    display: none;
}

.item-preview {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.item-preview .page-box {
    width: 260px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background-color: #fff;
    padding: 14px;
    flex-shrink: 0;
}

.item-preview .page-box .page-title {
    text-align: center;
    font-weight: 500;
    color: #333;
}

.item-preview .page-box canvas {
    width: 100%;
    height: auto;
}

.item-preview .page-box button {
    width: 100%;
    padding: 6px;
    border-radius: 6px;
    border: 1px solid #ced4da;
    background-color: #fff;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    transition: transform 0.2s;
}

.item-preview .page-box button:hover {
    background-color: #17a2b8;
    border: solid 1px #17a2b8;
    color: #fff;
}

/* 关键动画：扩散 + 淡出 */
@keyframes ripple-effect {
    0% {
        width: 0;
        height: 0;
        opacity: 0.4;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

/* 进度条样式 */
.progress-container {
    width: 100%;
    margin: 10px 0;
    display: none;
}

.progress-bar {
    height: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #ced4da;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #17a2b8, #20c997);
    width: 0%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
}

/* 长图预览样式 */
.long-image-preview {
    width: 100%;
    max-height: 600px;
    overflow: auto;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background-color: #fff;
    padding: 10px;
    margin-top: 10px;
}

.long-image-preview img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tool-content {
        padding: .8em !important;
        box-shadow: unset;
    }

    .operate-buttons .btn {
        line-height: 32px !important;
        height: 32px !important;
        padding: 0 8px !important;
    }

    .btn {
        height: 32px;
    }

    .file-upload {
        min-height: 180px;
    }
}