/* PDF合并工具样式 */

/* 工具内容区域 */
.tool-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 20px 0;
}

/* 上传区域 */
.upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.upload-area:hover {
    border-color: #4a90e2;
    background-color: rgba(74, 144, 226, 0.05);
}

.upload-area.drag-over {
    border-color: #4a90e2;
    background-color: rgba(74, 144, 226, 0.1);
}

.upload-area i {
    font-size: 48px;
    color: #666;
    margin-bottom: 10px;
}

.upload-area p {
    margin: 5px 0;
    color: #666;
}

.upload-area .upload-tip {
    font-size: 14px;
    color: #999;
}

/* PDF文件列表 */
.pdf-list-container {
    margin: 20px 0;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.pdf-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.pdf-list-header h2 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.list-actions {
    display: flex;
    gap: 10px;
}

.pdf-list {
    min-height: 100px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fff;
}

/* PDF文件项 */
.pdf-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    cursor: move;
    background: #fff;
    transition: background-color 0.2s ease;
}

.pdf-item:last-child {
    border-bottom: none;
}

.pdf-item:hover {
    background-color: #f8f9fa;
}

.pdf-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.pdf-item-name {
    color: #4a90e2;
    cursor: pointer;
}

.pdf-item-name:hover {
    text-decoration: underline;
}

.pdf-item-pages {
    color: #666;
    font-size: 14px;
}

.pdf-item-actions {
    display: flex;
    gap: 8px;
}

/* 预览面板 */
.preview-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 50%;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.preview-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-header h3 {
    margin: 0;
}

.preview-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-info {
    font-size: 14px;
    color: #666;
}

.preview-content {
    flex: 1;
    overflow: auto;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background: #f0f0f0;
}

#pdfPreview {
    max-width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 帮助对话框 */
.help-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.help-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
}

.help-content h3 {
    margin-top: 0;
}

.help-content ul {
    padding-left: 20px;
    margin: 15px 0;
}

.help-content li {
    margin: 8px 0;
    color: #666;
}

/* 加载提示 */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 3000;
    justify-content: center;
    align-items: center;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4a90e2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 按钮样式 */
.btn-primary {
    background: #4a90e2;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    transition: background-color 0.2s ease;
}

.btn-primary:hover {
    background: #357abd;
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-icon {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: #eee;
    color: #333;
}

.btn-icon:disabled {
    color: #ccc;
    cursor: not-allowed;
}

.btn-icon:disabled:hover {
    background: none;
}

/* 拖拽时的样式 */
.sortable-ghost {
    opacity: 0.5;
    background: #f0f0f0;
}

/* 合并按钮容器 */
.merge-actions {
    text-align: center;
    margin-top: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .preview-panel {
        width: 100%;
    }
    
    .pdf-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .pdf-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .preview-controls {
        flex-wrap: wrap;
    }
} 