/* public/assets/css/life/doc-enhancer.css */

.dse-workspace { display: flex; flex-wrap: wrap; gap: 24px; width: 100%; margin-bottom: 40px; align-items: stretch; }
.dse-panel { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-lg); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02); overflow: hidden; display: flex; flex-direction: column; }
.dse-panel-header { padding: 16px 24px; border-bottom: 1px solid var(--border-color); background: rgba(0,0,0,0.01); }
.dse-panel-header h3 { margin: 0; font-size: 1.1rem; font-weight: 700; color: var(--text-main); }
.dse-panel-body { padding: 24px; flex: 1; }

/* =========================================================
   左侧：图像导入面板与参数调节
   ========================================================= */
.dse-sidebar { flex: 1; min-width: 320px; max-width: 420px; }

.dse-dropzone {
    border: 2px dashed var(--border-color); border-radius: 12px; padding: 40px 20px;
    text-align: center; cursor: pointer; background: var(--bg-body); transition: all 0.3s;
    min-height: 200px; display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.dse-dropzone:hover { border-color: var(--primary-color); background: rgba(var(--primary-rgb, 0, 102, 204), 0.02); }
.dse-dropzone.has-file { border: 1px solid var(--border-color); padding: 16px; min-height: auto; }

.dse-dropzone-icon { font-size: 2.8rem; margin-bottom: 12px; }
.dse-dropzone-title { font-size: 1rem; font-weight: 700; color: var(--text-main); margin-bottom: 6px; }
.dse-dropzone-desc { font-size: 0.85rem; color: var(--text-muted); }

/* 批量缩略图列表 */
.dse-thumb-list { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; width: 100%; }
.dse-thumb-item {
    width: 64px; height: 86px; border-radius: 6px; background-size: cover; background-position: center;
    border: 2px solid transparent; box-shadow: 0 2px 4px rgba(0,0,0,0.1); opacity: 0.6; cursor: pointer;
    transition: all 0.2s;
}
.dse-thumb-item:hover { opacity: 0.9; }
.dse-thumb-item.active { border-color: var(--primary-color); opacity: 1; transform: scale(1.08); box-shadow: 0 4px 10px rgba(0,102,204,0.2); }

.dse-divider { border: none; border-top: 1px dashed var(--border-color); margin: 24px 0; }
.dse-sub-heading { font-size: 0.95rem; font-weight: 700; color: var(--text-main); margin: 0 0 16px 0; }
.dse-form-group { margin-bottom: 24px; }
.dse-form-group label { display: block; font-size: 0.9rem; font-weight: 600; color: var(--text-muted); margin-bottom: 10px; }

.dse-select { width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-body); color: var(--text-main); font-size: 0.95rem; font-weight: 600; outline: none; cursor: pointer; }
.dse-select:focus { border-color: var(--primary-color); }
.dse-range { width: 100%; cursor: pointer; accent-color: var(--primary-color); }

.dse-btn-primary { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--primary-color); color: white; border: none; border-radius: 8px; padding: 14px; font-size: 1rem; font-weight: 700; cursor: pointer; transition: 0.3s; box-shadow: 0 4px 10px rgba(var(--primary-rgb, 0, 102, 204), 0.2); }
.dse-btn-primary:hover { transform: translateY(-2px); opacity: 0.9; box-shadow: 0 6px 15px rgba(var(--primary-rgb, 0, 102, 204), 0.3); }

/* =========================================================
   右侧：A4 纸张预览与导出区
   ========================================================= */
.dse-main-content { flex: 2; min-width: 0; }

.dse-paper-preview {
    background: #e5e7eb; /* 模拟深灰色桌面背景 */
    padding: 30px;
    border-radius: 8px;
    /* 限定最大高度，内部图片自适应缩放，防止撑开页面 */
    max-height: 550px; 
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border-color);
}

/* 核心特效：模拟白色的纸张立体感 */
#scanCanvas {
    background: #ffffff;
    max-width: 100%; 
    max-height: 480px; 
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 2px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0,0,0,0.1); 
    border: 1px solid #d1d5db;
}

.dse-action-group { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 24px; }
.dse-btn-secondary, .dse-btn-pdf { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; font-size: 0.95rem; font-weight: 700; border-radius: 8px; cursor: pointer; transition: 0.3s; border: none; }
.dse-btn-secondary { background: var(--bg-body); border: 1px solid var(--border-color); color: var(--text-main); box-shadow: 0 2px 4px rgba(0,0,0,0.02);}
.dse-btn-secondary:hover { background: rgba(0,0,0,0.05); }
.dse-btn-pdf { background: #ef4444; color: white; box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2); }
.dse-btn-pdf:hover { background: #dc2626; transform: translateY(-2px); box-shadow: 0 6px 15px rgba(239, 68, 68, 0.3); }

/* =========================================================
   SEO 内容强化网格
   ========================================================= */
.tool-seo-content { margin-top: 50px; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 40px; }
.tool-seo-content h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 20px; color: var(--text-main); }
.seo-intro-section { margin-bottom: 40px; }
.seo-lead-text { font-size: 1rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 15px;}
.seo-sub-heading { font-size: 1.4rem; font-weight: 700; margin-bottom: 20px; color: var(--text-main); border-left: 4px solid var(--primary-color); padding-left: 12px;}
.seo-feature-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.seo-feature-card { background: var(--bg-body); border: 1px solid var(--border-color); padding: 24px; border-radius: 12px; transition: all 0.3s ease; }
.seo-feature-card:hover { border-color: var(--primary-color); transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0, 102, 204, 0.08); }
.seo-feature-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.seo-icon { width: 40px; height: 40px; color: var(--primary-color); background: rgba(var(--primary-rgb, 0, 102, 204), 0.1); border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.seo-icon svg { width: 20px; height: 20px; }
.seo-feature-card h3 { font-size: 1.1rem; font-weight: 700; margin: 0; color: var(--text-main); }
.seo-feature-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; margin: 0; }

/* 暗黑模式自适应 */
[data-theme="dark"] .tool-seo-content { background: var(--bg-surface); }
[data-theme="dark"] .seo-feature-card { background: #0f172a; border-color: #334155; }
[data-theme="dark"] .dse-select, [data-theme="dark"] .dse-dropzone { background: #0f172a; border-color: #334155; }
[data-theme="dark"] .dse-btn-secondary { background: #1e293b; border-color: #334155; color: #f8fafc; }
[data-theme="dark"] .dse-paper-preview { background: #1e293b; border-color: #334155; }

/* 移动端完美折叠 */
@media (max-width: 900px) { 
    .dse-sidebar { max-width: 100%; } 
    .seo-feature-grid-3 { grid-template-columns: 1fr; }
    #scanCanvas { max-height: 350px; }
}