/* public/assets/css/life/ocr-formatter.css */

.ocr-workspace {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    width: 100%;
    margin-bottom: 40px;
}

.ocr-panel {
    flex: 1;
    min-width: 320px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
    overflow: hidden;
}

.ocr-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0,0,0,0.01);
}

.ocr-panel-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
}

.ocr-badge {
    background: rgba(var(--primary-rgb, 0, 102, 204), 0.1);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: monospace;
}

/* =========================================================
   左侧：图像拖拽与预览区
   ========================================================= */
.ocr-dropzone {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: var(--bg-body);
    border: 2px dashed var(--border-color);
    margin: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.ocr-dropzone:hover {
    border-color: var(--primary-color);
    background: rgba(var(--primary-rgb, 0, 102, 204), 0.02);
}

.ocr-placeholder {
    text-align: center;
    color: var(--text-muted);
}

.ocr-placeholder svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    color: var(--border-color);
}

.ocr-dropzone:hover .ocr-placeholder svg {
    color: var(--primary-color);
}

.ocr-paste-text {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
}

/* 预览图区域 */
.ocr-preview-container {
    position: absolute;
    inset: 10px;
    border-radius: 8px;
    overflow: hidden;
    background: #0f172a;
}

.ocr-preview-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* 加载进度覆盖层 */
.ocr-progress-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    z-index: 10;
}

.ocr-loader {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.2);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: ocrSpin 1s linear infinite;
    margin-bottom: 20px;
}
@keyframes ocrSpin { to { transform: rotate(360deg); } }

#ocrStatusText {
    font-size: 0.9rem;
    font-weight: 600;
    font-family: monospace;
    margin: 0 0 10px 0;
}

.ocr-progress-track {
    width: 60%;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    overflow: hidden;
}

.ocr-progress-bar {
    height: 100%;
    width: 0%;
    background: #3b82f6;
    transition: width 0.2s linear;
}

/* =========================================================
   右侧：排版输出区
   ========================================================= */
.ocr-toolbar {
    display: flex;
    gap: 8px;
}

.ocr-btn-tool, .ocr-btn-primary {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ocr-btn-tool {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.ocr-btn-tool:hover {
    background: var(--bg-surface);
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.ocr-btn-tool svg { width: 14px; height: 14px; }

.ocr-btn-primary {
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: white;
}
.ocr-btn-primary:hover {
    opacity: 0.9;
}
.ocr-btn-primary svg { width: 14px; height: 14px; }

.ocr-textarea {
    flex: 1;
    width: 100%;
    min-height: 400px;
    padding: 20px;
    border: none;
    resize: none;
    background: var(--bg-surface);
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.8;
    font-family: inherit;
    box-sizing: border-box;
    outline: none;
}
.ocr-textarea:focus {
    box-shadow: inset 0 0 0 2px rgba(var(--primary-rgb, 0, 102, 204), 0.1);
}

.ocr-stats {
    padding: 12px 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    background: var(--bg-body);
    text-align: right;
}
.ocr-stats span {
    font-weight: 700;
    color: var(--text-main);
}

[data-theme="dark"] .ocr-dropzone { background: #0f172a; border-color: #334155; }
[data-theme="dark"] .ocr-btn-tool { background: #1e293b; border-color: #334155; color: #f8fafc; }
[data-theme="dark"] .ocr-stats { background: #0f172a; border-color: #334155; }

/* =========================================================
   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; display: flex; flex-direction: column; align-items: flex-start;}
.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; width: 100%; }
.seo-icon { width: 40px; height: 40px; flex-shrink: 0; 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; }

@media (max-width: 900px) {
    .seo-feature-grid-3 { grid-template-columns: 1fr; }
    .ocr-workspace { flex-direction: column; }
    .ocr-dropzone, .ocr-textarea { min-height: 250px; }
}