﻿:root {
  --bg: #f1f5f9;
  --card-bg: #fff;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --accent: #3b82f6;
  --accent-bg: #eff6ff;
  --success-bg: #f0fdf4;
  --success-border: #bbf7d0;
  --success-text: #16a34a;
  --error-bg: #fef2f2;
  --error-border: #fecaca;
  --error-text: #dc2626;
  --tab-bg: #f1f5f9;
  --tab-active: #fff;
  --hover-bg: #f8fafc;
  --upload-icon: #64748b;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --btn-bg: #0f172a;
  --btn-hover: #1e293b;
  --download-bg: #22c55e;
  --download-hover: #16a34a;
  --file-icon: #3b82f6;
  --code-bg: #f8fafc;
}

[data-theme="dark"] {
  --bg: #0f172a;
  --card-bg: #1e293b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --border: #334155;
  --accent: #60a5fa;
  --accent-bg: #1e3a5f;
  --success-bg: #052e16;
  --success-border: #166534;
  --success-text: #4ade80;
  --error-bg: #450a0a;
  --error-border: #7f1d1d;
  --error-text: #f87171;
  --tab-bg: #1e293b;
  --tab-active: #334155;
  --hover-bg: #1e293b;
  --upload-icon: #94a3b8;
  --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --btn-bg: #3b82f6;
  --btn-hover: #60a5fa;
  --download-bg: #16a34a;
  --download-hover: #22c55e;
  --file-icon: #60a5fa;
  --code-bg: #0f172a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
:focus-visible { outline: 2px solid var(--accent,#3b82f6); outline-offset: 2px; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  min-height: 100vh;
  color: var(--text);
  transition: background 0.2s, color 0.2s;
}
html[dir="rtl"] body { direction: rtl; }
html[dir="ltr"] body { direction: ltr; }

.app {
  max-width: 600px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.header { padding: 28px 0 20px; }
.header-row { display: flex; align-items: center; justify-content: space-between; }

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.back-link {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  color: var(--text-muted); transition: all 0.2s; flex-shrink: 0;
  margin-inline-end: 2px;
}
.back-link:hover { color: var(--text); background: var(--tab-bg); }
.back-link:active { transform: scale(0.92); }
.back-link svg { width: 20px; height: 20px; }
.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--btn-bg);
  color: white;
  border-radius: 8px;
  font-size: 16px;
}

.header-actions { display: flex; align-items: center; gap: 8px; }

.header-cancel-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border: 1.5px solid var(--danger,#ef4444);
  background: rgba(239,68,68,0.08); color: var(--danger,#ef4444);
  border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer;
  transition: all 0.15s; white-space: nowrap;
}
.header-cancel-btn:hover { background: var(--danger,#ef4444); color: #fff; }
.header-cancel-btn:disabled { opacity: 0.3; cursor: default; background: rgba(239,68,68,0.08); color: var(--danger,#ef4444); }
.header-cancel-btn svg { flex-shrink: 0; }

.lang-toggle, .theme-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--tab-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.lang-toggle:hover, .theme-toggle:hover { background: var(--border); }
.lang-sep { color: var(--text-light); font-weight: 400; }

.theme-toggle .sun { display: block; }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }

.subtitle {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.main-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 24px 24px 28px;
  box-shadow: var(--shadow);
  transition: background 0.2s;
}

.tabs {
  display: flex;
  gap: 4px;
  background: var(--tab-bg);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.tab:hover { color: var(--text); }
.tab.active { background: var(--tab-active); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.tab-content { display: none; }
.tab-content.active { display: block; }

.step { margin-bottom: 22px; }
.step:last-of-type { margin-bottom: 20px; }

.step-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.step-num {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--accent-bg); color: var(--accent);
  font-size: 13px; font-weight: 700;
}
.step-title { font-size: 13px; font-weight: 600; color: var(--text-muted); }

.upload-zone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.upload-zone:hover { border-color: var(--text-light); background: var(--hover-bg); }
.upload-zone.dragover { border-color: var(--accent); background: var(--accent-bg); }
.upload-icon { margin-bottom: 10px; }
.upload-icon svg { stroke: var(--upload-icon); }
.upload-text { font-size: 14px; font-weight: 500; color: var(--text); }
.upload-hint { margin-top: 4px; font-size: 12px; color: var(--text-light); }

.file-info {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: var(--hover-bg); border-radius: 12px; margin-top: 8px;
}
.file-icon { flex-shrink: 0; }
.file-icon svg { stroke: var(--file-icon); }
.file-name { font-size: 13px; font-weight: 600; color: var(--text); word-break: break-all; }
.file-size { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.file-remove { margin-right: auto; background: none; border: none; font-size: 20px; color: var(--text-light); cursor: pointer; padding: 0 4px; line-height: 1; }
.file-remove:hover { color: var(--error-text); }

.format-group { margin-bottom: 12px; }
.format-group:last-child { margin-bottom: 0; }
.format-group-label { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.format-group-label svg { stroke: var(--text-muted); }
.format-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.format-chip {
  padding: 7px 14px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  cursor: pointer; transition: all 0.15s; background: var(--card-bg);
}

.format-chip:hover:not(.disabled) { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }
.format-chip.active { border-color: var(--accent); background: var(--accent); color: white; }
.format-chip.disabled { opacity: 0.3; cursor: not-allowed; }

/* Options grid */
.opts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opts-col { display: flex; flex-direction: column; gap: 4px; }
.opts-col label { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.opts-col input, .opts-col select {
  padding: 8px 12px; border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 13px; outline: none; background: var(--card-bg); color: var(--text);
  transition: border 0.15s;
}
.opts-col input:focus, .opts-col select:focus { border-color: var(--accent); }

/* Crop UI */
#cropPreviewImg { max-width: 100%; max-height: 200px; margin-top: 8px; border-radius: 8px; }

/* File List */
.file-list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.file-list-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--hover-bg); border-radius: 10px; }
.file-list-item .file-name { flex: 1; font-size: 12px; }
.file-list-remove { background: none; border: none; font-size: 18px; color: var(--text-light); cursor: pointer; }
.file-list-remove:hover { color: var(--error-text); }

.pages-input {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 14px; outline: none; background: var(--card-bg); color: var(--text);
  transition: border 0.15s;
}
.pages-input:focus { border-color: var(--accent); }

.convert-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px 24px; background: var(--btn-bg); color: white;
  border: none; border-radius: 12px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.convert-btn:hover:not(:disabled) { background: var(--btn-hover); }
.convert-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.convert-btn.loading { opacity: 0.7; pointer-events: none; }

/* Compact progress bar */
.progress-bar { width: 100%; margin-top: 10px; background: var(--card-bg); border-radius: 8px; border: 1px solid var(--border); overflow: hidden; }
.progress-header { display: flex; align-items: center; gap: 8px; padding: 8px 10px 0; }
.progress-status { font-size: 11px; font-weight: 600; color: var(--text-muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress-meta { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.progress-speed, .progress-eta { font-size: 9px; color: var(--text-light); white-space: nowrap; }
.progress-track { position: relative; margin: 10px 10px 4px; height: 4px; background: var(--tab-bg); border-radius: 2px; }
.progress-fill { height: 100%; background: var(--accent,#3b82f6); border-radius: 2px; width: 0%; transition: width 0.3s ease; position: relative; }
.progress-pct { position: absolute; right: 0; top: 6px; font-size: 10px; font-weight: 700; color: var(--accent); line-height: 1; white-space: nowrap; }

.result {
  margin-top: 16px; text-align: center;
  background: var(--card-bg); border-radius: 12px;
  border: 1px solid var(--border); padding: 0; overflow: hidden;
  max-width: 460px; margin-left: auto; margin-right: auto;
}
.result-accent {
  height: 3px; background: linear-gradient(90deg, #22c55e, #4ade80);
}
.result-inner { padding: 14px 14px 12px; }
.result-icon { margin-bottom: 6px; }
.result-icon svg { width: 36px; height: 36px; display: block; margin: 0 auto; }
.result-icon .checkmark-circle {
  fill: none; stroke: #22c55e; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 63; stroke-dashoffset: 63;
  animation: result-draw-circle 0.45s ease-out forwards;
}
.result-icon .checkmark-check {
  fill: none; stroke: #22c55e; stroke-width: 2.5;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 16; stroke-dashoffset: 16;
  animation: result-draw-check 0.3s ease-out 0.45s forwards;
}
@keyframes result-draw-circle { to { stroke-dashoffset: 0; } }
@keyframes result-draw-check { to { stroke-dashoffset: 0; } }
.result-text { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.result-size { font-size: 11px; color: var(--text-muted); margin-bottom: 12px; }

.download-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 14px; background: var(--download-bg); color: #fff;
  text-decoration: none; border-radius: 7px;
  font-size: 12px; font-weight: 600;
  transition: all 0.2s;
}
.download-btn:hover {
  background: var(--download-hover);
}
.download-btn svg { width: 14px; height: 14px; }

.focused-mode .download-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 32px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  color: #fff; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all 0.25s;
}
.focused-mode .download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(59,130,246,0.25);
}
.focused-mode .download-btn svg { width: 18px; height: 18px; }

/* Side by side */
.compare { display: flex; gap: 12px; margin-top: 16px; }
.compare-col { flex: 1; text-align: center; }
.compare-label { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.compare img { width: 100%; border-radius: 10px; border: 1px solid var(--border); max-height: 200px; object-fit: contain; }

#status { margin-top: 10px; padding: 10px 16px; border-radius: 8px; font-size: 13px; }
#status.success { display: none; }
#status.error { background: var(--error-bg); color: var(--error-text); border: 1px solid var(--error-border); }

/* OCR */
.ocr-result {
  margin-top: 16px; padding: 16px;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px;
}
.ocr-result-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.ocr-result-title { font-size: 14px; font-weight: 700; color: var(--text); }
.ocr-result-stats { font-size: 11px; color: var(--text-muted); }
.ocr-text {
  width: 100%; padding: 14px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 13px; background: var(--code-bg); color: var(--text);
  resize: vertical; outline: none; font-family: inherit; line-height: 1.7;
  box-sizing: border-box;
}
.ocr-text:focus { border-color: var(--accent); }
.ocr-result-actions {
  display: flex; gap: 8px; margin-top: 10px;
}
.ocr-action-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border: none; border-radius: 8px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all 0.15s; color: #fff;
  background: var(--accent,#3b82f6);
}
.ocr-action-btn:hover { opacity: 0.9; }
.ocr-action-btn--secondary {
  background: var(--tab-bg); color: var(--text);
  border: 1px solid var(--border);
}
.ocr-action-btn--secondary:hover { background: var(--border); }

.spinner {
  display: inline-block; width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3); border-top-color: white;
  border-radius: 50%; animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* HTML preview */
.html-preview {
  margin-top: 12px; padding: 14px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--code-bg); max-height: 300px; overflow: auto;
  font-size: 13px; text-align: start;
}

/* Color converter */
.color-row { display: flex; gap: 10px; }
.color-field { flex: 1; }
.color-field label { display: block; font-size: 11px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.color-field input { width: 100%; padding: 8px 12px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 13px; outline: none; background: var(--card-bg); color: var(--text); transition: border 0.15s; }
.color-field input:focus { border-color: var(--accent); }
.color-preview { height: 60px; border-radius: 10px; margin-top: 14px; border: 1px solid var(--border); transition: background 0.15s; }
.color-swatches { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.color-swatch { width: 32px; height: 32px; border-radius: 8px; cursor: pointer; border: 2px solid transparent; transition: border 0.15s; }
.color-swatch:hover { border-color: var(--accent); }

/* SEO content */
.seo-content { margin-bottom: 20px; }
.seo-content h2 { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.seo-content p { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 8px; }
.seo-content ol { padding: 0 20px 0 0; margin: 8px 0; }
.seo-content li { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; line-height: 1.5; }
.seo-content ol li::marker { color: var(--accent); font-weight: 600; }

/* Article layout â€” full-width, reader-friendly typography */
.article-layout .main-card { max-width: 820px; padding: 32px 36px; }
.article-layout .seo-content { margin-bottom: 0; }
.article-layout .seo-content > div { max-width: 720px; margin: 0 auto; }
.article-layout .seo-content p { font-size: 16px; line-height: 1.85; margin-bottom: 18px; color: var(--text); }
.article-layout .seo-content h2 { font-size: 26px; font-weight: 800; margin: 40px 0 16px; color: var(--text); letter-spacing: -0.3px; }
.article-layout .seo-content h3 { font-size: 20px; font-weight: 700; margin: 32px 0 12px; color: var(--text); }
.article-layout .seo-content h4 { font-size: 17px; font-weight: 600; margin: 24px 0 10px; color: var(--text); }
.article-layout .seo-content ul,
.article-layout .seo-content ol { padding: 0 24px 0 0; margin: 0 0 20px; }
.article-layout .seo-content li { font-size: 16px; line-height: 1.8; margin-bottom: 8px; color: var(--text); }
.article-layout .seo-content ol li::marker { color: var(--accent); font-weight: 700; }
.article-layout .seo-content ul li::marker { color: var(--accent); }
.article-layout .seo-content strong { color: var(--text); font-weight: 700; }
.article-layout .seo-content .seo-table { margin: 28px 0; overflow-x: auto; }
.article-layout .seo-content .seo-table h3 { margin: 0 0 10px; }
.article-layout .seo-content table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.6; border-radius: 12px; overflow: hidden; }
.article-layout .seo-content table th { background: var(--accent-light,rgba(59,130,246,0.12)); color: var(--text); font-weight: 700; padding: 12px 16px; text-align: start; border-bottom: 2px solid var(--border,#334155); }
.article-layout .seo-content table td { padding: 10px 16px; border-bottom: 1px solid var(--border,#334155); color: var(--text-muted); }
.article-layout .seo-content table tr:last-child td { border-bottom: none; }
.article-layout .seo-content .seo-tips { background: var(--accent-light,rgba(59,130,246,0.06)); border: 1px solid var(--border,#334155); border-radius: 14px; padding: 24px 28px; margin: 28px 0; }
.article-layout .seo-content .seo-tips h3 { margin-top: 0; font-size: 18px; }
.article-layout .seo-content .seo-tips ul { margin-bottom: 0; }
.article-layout .seo-content .seo-tips li::marker { color: var(--accent); }
.article-layout .faq-section { margin-top: 36px; padding-top: 28px; }
.article-layout .faq-section h3 { font-size: 22px; margin-bottom: 20px; }
.article-layout details.faq-item { border-radius: 12px; margin-bottom: 10px; }
.article-layout details.faq-item summary { font-size: 16px; padding: 16px 20px; }
.article-layout details.faq-item p { font-size: 15px; line-height: 1.8; padding: 0 20px 18px; }
.article-layout .related-section { margin-top: 40px; padding-top: 28px; }
.article-layout .related-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.article-layout .related-article { padding: 18px 20px; margin-bottom: 18px; }
.article-layout .article-title { font-size: 16px; }
.article-layout .article-body { font-size: 14px; }
.article-layout .wheel-nav { margin-top: 36px; padding-top: 24px; }
.article-layout .pillar-banner { font-size: 14px; padding: 12px 20px; }
.faq-section { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border,#334155); }
.faq-section h3 { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 14px; }
details.faq-item { margin-bottom: 8px; border: 1px solid var(--border,#334155); border-radius: 10px; overflow: hidden; background: var(--card-bg,#1e293b); }
details.faq-item summary { font-size: 14px; font-weight: 600; color: var(--text); padding: 12px 16px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; list-style: none; unicode-bidi: plaintext; }
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after { content: '+'; font-size: 18px; font-weight: 300; color: var(--accent,#3b82f6); transition: transform 0.2s; }
details.faq-item[open] summary::after { content: 'âˆ’'; }
details.faq-item p { font-size: 13px; color: var(--text-muted); line-height: 1.6; padding: 0 16px 14px; margin: 0; }

.related-section { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border,#334155); }
.related-heading { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.related-card { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--card-bg,#1e293b); border: 1px solid var(--border,#334155); border-radius: 10px; text-decoration: none; transition: all 0.15s; }
.related-card:hover { border-color: var(--accent,#3b82f6); transform: translateY(-1px); }
.related-icon { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; background: var(--accent-light,rgba(59,130,246,0.1)); border-radius: 6px; font-size: 9px; font-weight: 700; color: var(--accent,#3b82f6); flex-shrink: 0; }
.related-label { font-size: 12px; font-weight: 500; color: var(--text); }
.related-article { margin-bottom: 16px; padding: 14px 16px; background: var(--card-bg,#1e293b); border: 1px solid var(--border,#334155); border-radius: 10px; }
.article-title { font-size: 14px; font-weight: 600; color: var(--text); margin: 0 0 6px; line-height: 1.4; }
.article-body { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin: 0; }
.wheel-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border,#334155); }
.wheel-link { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; background: var(--card-bg,#1e293b); border: 1px solid var(--border,#334155); border-radius: 10px; text-decoration: none; font-size: 13px; font-weight: 600; color: var(--text); transition: all 0.15s; }
.wheel-link:hover { border-color: var(--accent,#3b82f6); color: var(--accent,#3b82f6); transform: translateY(-1px); }
.wheel-prev { margin-right: auto; }
.wheel-next { margin-left: auto; }

.format-chip.locked { border-color: var(--accent); background: var(--accent-bg); color: var(--accent); cursor: default; opacity: 0.85; }

/* Focused mode banner */
.focused-banner {
  text-align: center;
  padding: 28px 20px;
  margin-bottom: 20px;
  background: var(--accent-bg);
  border: 1.5px solid var(--accent);
  border-radius: 14px;
}
.focused-arrows {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 10px;
}
.focused-src, .focused-dst {
  font-size: 22px;
  font-weight: 800;
  padding: 8px 18px;
  border-radius: 10px;
  color: white;
}
.focused-src { background: var(--text-light); }
.focused-dst { background: var(--accent); }
.focused-arrows svg { color: var(--text-muted); flex-shrink: 0; }

.focused-desc { font-size: 13px; color: var(--text-muted); }
.focused-heading { font-size: 15px; font-weight: 700; color: var(--text); margin: 0 0 12px; }
.convert-heading { font-size: 18px; font-weight: 700; color: var(--text); margin: 0 0 16px; text-align: center; }

@media (max-width: 500px) {
  .app { padding: 16px 12px 32px; }
  .main-card { padding: 20px 14px; }
  .article-layout .main-card { padding: 20px 16px; }
  .article-layout .seo-content p { font-size: 15px; }
  .article-layout .seo-content h2 { font-size: 22px; }
  .article-layout .seo-content h3 { font-size: 18px; }
  .article-layout .seo-content li { font-size: 15px; }
  .article-layout .seo-content .seo-tips { padding: 18px 16px; }
  .opts-grid { grid-template-columns: 1fr; }
  .tab { font-size: 11px; padding: 8px 4px; }
  .tab svg { width: 14px; height: 14px; }
  .compare { flex-direction: column; }
}
.breadcrumb { margin-bottom: 16px; font-size: 13px; }
.breadcrumb-list { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.breadcrumb-item a { color: var(--accent,#3b82f6); text-decoration: none; }
.breadcrumb-item a:hover { text-decoration: underline; }
.breadcrumb-item.active { color: var(--text-muted,#94a3b8); }
.breadcrumb-sep { margin: 0 4px; color: var(--text-light,#94a3b8); }
.seo-table { margin: 20px 0; overflow-x: auto; }
.seo-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.seo-table th, .seo-table td { padding: 10px 14px; border: 1px solid var(--border,#334155); text-align: start; }
.seo-table th { background: var(--accent-bg,#1e3a5f); font-weight: 600; }
.seo-tips { margin: 20px 0; padding: 18px; background: var(--accent-bg,#1e3a5f); border-radius: 10px; border: 1px solid var(--border,#334155); }
.seo-tips ul { margin: 10px 0 0; padding-left: 20px; }
.seo-tips li { margin-bottom: 8px; font-size: 14px; line-height: 1.6; }
.pillar-banner { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 12px 16px; margin-bottom: 16px; background: var(--accent-bg,#1e3a5f); border: 1px solid var(--accent,#3b82f6); border-radius: 10px; font-size: 13px; }
.pillar-banner a { color: var(--accent,#3b82f6); font-weight: 600; text-decoration: none; }
.pillar-banner a:hover { text-decoration: underline; }

.smart-badge { display: inline-block; padding: 3px 10px; background: #22c55e; color: #fff; border-radius: 20px; font-size: 11px; font-weight: 700; margin-top: 8px; letter-spacing: 0.3px; }

/* Drag overlay */
.drag-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(15,23,42,0.85);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}
.drag-overlay.active { opacity: 1; pointer-events: auto; }
.drag-overlay-content {
  text-align: center; transform: scale(0.9); transition: transform 0.25s ease;
}
.drag-overlay.active .drag-overlay-content { transform: scale(1); }
.drag-overlay-content svg { stroke: #60a5fa; animation: drag-bounce 1.2s ease-in-out infinite; }
@keyframes drag-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.drag-overlay-text { margin-top: 16px; font-size: 22px; font-weight: 700; color: #fff; }

/* File preview thumbnail */
.file-preview {
  display: none; width: 40px; height: 40px; border-radius: 8px;
  object-fit: cover; border: 1px solid var(--border); flex-shrink: 0;
}
.file-preview.show { display: block; }

/* Video preview */
.video-preview-container { display: flex; flex-direction: column; gap: 8px; }
.video-preview { width: 100%; max-height: 240px; border-radius: 8px; background: #000; }
.video-trim-row { display: flex; align-items: center; gap: 8px; }
.video-trim-label { font-size: 11px; color: var(--text-light); white-space: nowrap; min-width: 80px; }
.video-trim-val { font-weight: 700; color: var(--accent); }
.video-slider { flex: 1; height: 4px; -webkit-appearance: none; appearance: none; background: var(--tab-bg); border-radius: 2px; outline: none; }
.video-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); cursor: pointer; }

/* Batch progress */
.batch-progress {
  margin-top: 10px; padding: 6px 12px;
  background: var(--accent-bg); border-radius: 8px;
  font-size: 12px; font-weight: 600; color: var(--accent); text-align: center;
}

/* Batch queue */
.batch-queue { margin-top: 16px; }
.batch-queue-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.batch-queue-title { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.batch-queue-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px;
  background: var(--accent); color: #fff; border-radius: 20px;
  font-size: 11px; font-weight: 700;
}
.batch-queue-list { display: flex; flex-direction: column; gap: 4px; max-height: 200px; overflow-y: auto; }
.batch-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 12px; background: var(--hover-bg); border-radius: 8px;
  font-size: 12px;
}
.batch-item-row { display: flex; align-items: center; gap: 8px; width: 100%; }
.batch-item-icon {
  width: 24px; height: 24px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; flex-shrink: 0;
}
.batch-item-icon.pending { background: var(--tab-bg); color: var(--text-light); }
.batch-item-icon.processing { background: var(--accent); color: #fff; animation: batch-pulse 0.8s ease-in-out infinite; }
@keyframes batch-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}
.batch-item-icon.done { background: #22c55e; color: #fff; }
.batch-item-icon.error { background: var(--error-text); color: #fff; }
.batch-item-name { flex: 1; color: var(--text); word-break: break-all; }
.batch-item-status { font-size: 11px; color: var(--text-light); white-space: nowrap; }
.batch-item-remove {
  background: none; border: none; font-size: 16px;
  color: var(--text-light); cursor: pointer; padding: 0 2px;
}
.batch-item-remove:hover { color: var(--error-text); }
.batch-item-cancel {
  background: none; border: none; font-size: 14px;
  color: var(--text-light); cursor: pointer; padding: 0 4px; line-height: 1;
}
.batch-item-cancel:hover { color: var(--danger,#ef4444); }
.batch-item-progress { display: flex; align-items: center; gap: 6px; padding: 0 32px; width: 100%; }
.batch-item-track { flex: 1; height: 3px; background: var(--tab-bg); border-radius: 2px; overflow: hidden; }
.batch-item-fill { height: 100%; background: var(--accent,#3b82f6); border-radius: 2px; transition: width 0.2s; }
.batch-item-pct { font-size: 9px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.batch-item-result { display: flex; align-items: center; gap: 8px; padding: 0 32px; font-size: 11px; }
.batch-item-dl {
  padding: 3px 10px; background: var(--accent); color: #fff;
  border-radius: 4px; text-decoration: none; font-size: 10px; font-weight: 600;
}
.batch-item-dl:hover { opacity: 0.9; }
.batch-item-result-size { color: var(--text-light); font-size: 10px; }
.batch-item-error-text { padding: 0 32px; font-size: 10px; color: var(--error-text); }

/* Recent conversions */
.recent-conversions {
  margin-top: 12px; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--card-bg);
}
.recent-header {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px;
}
.recent-header svg { width: 14px; height: 14px; stroke: var(--text-muted); }
.recent-list { display: flex; flex-direction: column; gap: 4px; }
.recent-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; background: var(--hover-bg); border-radius: 8px;
  font-size: 11px;
}
.recent-item-icon { font-size: 16px; flex-shrink: 0; }
.recent-item-info { flex: 1; min-width: 0; }
.recent-item-name { font-weight: 600; color: var(--text); word-break: break-all; }
.recent-item-meta { font-size: 10px; color: var(--text-light); margin-top: 1px; }
.recent-item-action {
  padding: 5px 10px; background: var(--accent); color: #fff;
  border: none; border-radius: 5px; font-size: 10px; font-weight: 600;
  cursor: pointer; transition: background 0.15s; white-space: nowrap;
}
.recent-item-action:hover { opacity: 0.9; }
.recent-empty { font-size: 11px; color: var(--text-light); text-align: center; padding: 10px 0; }

@media (max-width: 500px) {
  .recent-conversions { padding: 8px; }
  .recent-item { flex-wrap: wrap; }
}

/* ========================================
   Smart Converter — Professional Desktop Design
   ======================================== */
.smart-converter-page {
  background: var(--bg);
  color: var(--text);
  position: relative;
}
.smart-converter-page .app {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 0;
  padding-right: 0;
  position: relative;
  z-index: 1;
  background: transparent;
}
.smart-converter-page .header {
  padding: 28px 40px 20px;
}
.smart-converter-page .main-card {
  padding-left: 40px !important;
  padding-right: 40px !important;
}
@media (max-width: 720px) {
  .smart-converter-page .header { padding: 20px 16px 16px; }
  .smart-converter-page .main-card { padding-left: 16px !important; padding-right: 16px !important; }
}
/* Subtle background glow */
.smart-converter-page .app::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 900px 600px at 50% 0%, rgba(59,130,246,0.04), transparent 70%);
}
[data-theme="dark"] .smart-converter-page .app::before {
  background:
    radial-gradient(ellipse 900px 600px at 50% 0%, rgba(59,130,246,0.06), transparent 70%);
}
/* Debug indicator bar */
.smart-converter-page::before {
  content: '' !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 999999 !important;
  height: 4px !important;
  background: linear-gradient(90deg, var(--accent), #6366f1, #a855f7) !important;
  pointer-events: none !important;
}
.smart-converter-page .header {
  background: rgba(255,255,255,0.8) !important;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
}
[data-theme="dark"] .smart-converter-page .header {
  background: rgba(30,41,59,0.8) !important;
}
.smart-converter-page .subtitle { color: var(--text-muted); }
.smart-converter-page .main-card {
  max-width: 1280px;
  margin: 0 auto !important;
  padding: 0 40px 48px !important;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
}
.smart-converter-page .breadcrumb,
.smart-converter-page .subtitle,
.smart-converter-page .wheel-nav,
.smart-converter-page #tabs,
.smart-converter-page .convert-heading,
.smart-converter-page .step-header,
.smart-converter-page .format-groups,
.smart-converter-page #resizeOptions,
.smart-converter-page #cropOptions,
.smart-converter-page #toolOptions,
.smart-converter-page .batch-queue,
.smart-converter-page .batch-progress,
.smart-converter-page .focused-banner,
/* lang toggle is now in the header */
.smart-converter-page .logo-icon,
.smart-converter-page .logo span,
.smart-converter-page .header-cancel-btn { color: var(--text); }
.smart-converter-page .header-cancel-btn svg { stroke: var(--text); }

/* Hero */
.smart-converter-page .sc-hero {
  position: relative;
  padding: 80px 40px 72px;
  text-align: center;
  overflow: hidden;
  margin: 0 0 0;
  background: linear-gradient(160deg, #0c1222 0%, #1a2744 50%, #0f1929 100%);
  color: #fff;
}
.smart-converter-page .sc-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 800px 500px at 20% 30%, rgba(59,130,246,0.06), transparent 70%),
    radial-gradient(ellipse 600px 600px at 80% 70%, rgba(139,92,246,0.04), transparent 70%);
  pointer-events: none;
}
/* Animated grid dots overlay */
.smart-converter-page .sc-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  animation: scGridFloat 60s linear infinite;
}
@keyframes scGridFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-32px); }
}
.smart-converter-page .sc-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}
.smart-converter-page .sc-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border-radius: 100px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  margin-bottom: 24px;
}
.smart-converter-page .sc-title {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 800;
  margin: 0 0 16px;
  letter-spacing: -1px;
  line-height: 1.08;
}
.smart-converter-page .sc-title em {
  font-style: normal;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.smart-converter-page .sc-subtitle {
  font-size: 18px;
  color: rgba(255,255,255,0.5);
  margin: 0 auto 40px;
  line-height: 1.65;
  max-width: 560px;
}

/* Trust badges */
.smart-converter-page .sc-trust {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin: 32px 0 0;
}
.smart-converter-page .sc-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.3);
}
.smart-converter-page .sc-trust-item svg {
  width: 16px;
  height: 16px;
  stroke: #4ade80;
  flex-shrink: 0;
}

/* Dropzone */
.smart-converter-page .sc-dropzone {
  padding: 44px 32px;
  border-radius: 20px;
  border: 1.5px dashed rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  transition: all 0.35s ease;
  text-align: center;
  position: relative;
}
.smart-converter-page .sc-dropzone:hover,
.smart-converter-page .sc-dropzone.drag-over {
  border-color: rgba(96,165,250,0.3);
  background: rgba(255,255,255,0.04);
  transform: translateY(-2px);
  box-shadow: 0 40px 80px rgba(0,0,0,0.25);
}
.smart-converter-page .sc-dropzone-icon {
  width: 72px; height: 72px;
  margin: 0 auto 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(139,92,246,0.12));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s;
}
.smart-converter-page .sc-dropzone:hover .sc-dropzone-icon {
  transform: scale(1.08);
}
.smart-converter-page .sc-dropzone-icon svg { width: 32px; height: 32px; stroke: #93c5fd; }
.smart-converter-page .sc-dropzone-text { font-size: 20px; font-weight: 700; color: #fff; margin: 0 0 6px; }
.smart-converter-page .sc-dropzone-hint { font-size: 14px; color: rgba(255,255,255,0.35); margin: 0 0 20px; }
.smart-converter-page .sc-dropzone-actions {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px;
}
.smart-converter-page .sc-dropzone-btn {
  padding: 10px 24px; border-radius: 100px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.25s;
}
.smart-converter-page .sc-dropzone-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}
.smart-converter-page .sc-dropzone-btn--primary {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border-color: transparent;
}
.smart-converter-page .sc-dropzone-btn--primary:hover {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  box-shadow: 0 8px 32px rgba(59,130,246,0.25);
}
.smart-converter-page .sc-dropzone-limit {
  font-size: 13px; color: rgba(255,255,255,0.25); margin: 0;
}
.smart-converter-page .sc-dropzone-features {
  display: flex; gap: 28px; justify-content: center; margin-top: 24px; flex-wrap: wrap;
}
.smart-converter-page .sc-dropzone-feat {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: rgba(255,255,255,0.3);
}
.smart-converter-page .sc-dropzone-feat svg { width: 14px; height: 14px; stroke: #4ade80; }
.smart-converter-page .sc-format-tags { display: none; }

/* Uploaded state */
.smart-converter-page .sc-detected {
  display: none; margin-top: 24px;
}
.smart-converter-page .sc-detected.show { display: block; animation: scFadeUp 0.4s ease; }
@keyframes scFadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.smart-converter-page .sc-detected-header {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 16px;
}
.smart-converter-page .sc-spinner {
  width: 24px; height: 24px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: #93c5fd;
  border-radius: 50%; animation: scSpin 0.7s linear infinite;
}
.smart-converter-page .sc-spinner--sm { width: 16px; height: 16px; border-width: 2px; }
@keyframes scSpin { to { transform: rotate(360deg); } }
.smart-converter-page .sc-detected-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.smart-converter-page .sc-detected-icon svg { width: 22px; height: 22px; stroke: #93c5fd; }
.smart-converter-page .sc-detected-info { flex: 1; }
.smart-converter-page .sc-detected-name { font-size: 16px; font-weight: 700; color: #fff; margin: 0 0 2px; }
.smart-converter-page .sc-detected-desc { font-size: 13px; color: rgba(255,255,255,0.45); margin: 0; }
.smart-converter-page .sc-detected-badge {
  padding: 5px 16px; border-radius: 100px;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.18);
  font-size: 12px; font-weight: 600; color: #4ade80; flex-shrink: 0;
}
.smart-converter-page .sc-convert-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px; margin-top: 12px;
}
.smart-converter-page .sc-convert-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; aspect-ratio: 1; padding: 12px 6px; border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer; transition: all 0.25s ease; min-height: 90px;
}
.smart-converter-page .sc-convert-card:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-2px);
}
.smart-converter-page .sc-convert-card--rec {
  background: rgba(59,130,246,0.08);
  border-color: rgba(59,130,246,0.2);
}
.smart-converter-page .sc-convert-card-icon {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 8px;
  background: rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #93c5fd;
}
.smart-converter-page .sc-convert-card-label {
  font-size: 12px; font-weight: 600; text-align: center;
  color: rgba(255,255,255,0.75); margin: 0; line-height: 1.2;
}
.smart-converter-page .sc-convert-card-arrow { display: none; }
.smart-converter-page .convert-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 36px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff; font-size: 16px; font-weight: 700;
  cursor: pointer; transition: all 0.25s; margin-top: 20px;
}
.smart-converter-page .convert-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(59,130,246,0.3);
}
.smart-converter-page .upload-zone { display: none; }
.smart-converter-page .sc-remove-btn {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.35);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: all 0.2s;
}
.smart-converter-page .sc-remove-btn:hover { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.2); color: #ef4444; }

/* File info inside dropzone */
.smart-converter-page .sc-file-info {
  display: none; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  margin-top: 16px; text-align: left;
}
.smart-converter-page .sc-file-info.show { display: flex; }
.smart-converter-page .sc-file-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(59,130,246,0.1);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.smart-converter-page .sc-file-icon svg { width: 18px; height: 18px; stroke: #93c5fd; }
.smart-converter-page .sc-file-details { flex: 1; }
.smart-converter-page .sc-file-name { font-size: 14px; font-weight: 600; color: #fff; margin: 0; }
.smart-converter-page .sc-file-size { font-size: 12px; color: rgba(255,255,255,0.35); margin: 2px 0 0; }
.smart-converter-page .sc-file-remove-btn {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.03); border: none;
  color: rgba(255,255,255,0.25);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: all 0.2s;
}
.smart-converter-page .sc-file-remove-btn:hover { background: rgba(239,68,68,0.1); color: #ef4444; }

/* Progress bar */
.smart-converter-page .progress-bar {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 90%; max-width: 400px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px; box-shadow: var(--shadow-lg);
  z-index: 100;
}
.smart-converter-page .progress-header {
  display: flex; justify-content: space-between; margin-bottom: 14px;
}
.smart-converter-page .progress-status { font-weight: 600; font-size: 15px; color: var(--text); }
.smart-converter-page .progress-meta { color: var(--text-muted); font-size: 13px; }
.smart-converter-page .progress-track {
  height: 6px; border-radius: 3px; background: var(--border); overflow: hidden;
}
.smart-converter-page .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #6366f1);
  border-radius: 3px; transition: width 0.3s;
}
.smart-converter-page .progress-pct {
  display: block; text-align: center; margin-top: 10px;
  font-size: 14px; font-weight: 700; color: var(--text-muted);
}

/* Result overlay */
.smart-converter-page .result {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 90%; max-width: 420px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px; box-shadow: var(--shadow-lg);
  text-align: center; z-index: 100;
}
.smart-converter-page .result-text { font-size: 18px; font-weight: 700; color: var(--text); }
.smart-converter-page .result-size { color: var(--text-muted); font-size: 14px; margin: 8px 0 20px; }
.smart-converter-page .download-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 32px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  color: #fff; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all 0.25s;
}
.smart-converter-page .download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(59,130,246,0.25);
}
.smart-converter-page .result-accent { display: none; }
.smart-converter-page .sc-result-close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 18px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  z-index: 10; transition: background 0.2s;
}
.smart-converter-page .sc-result-close:hover { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.15); color: #ef4444; }
.smart-converter-page #converterInterface { display: none; }

/* Section base */
.smart-converter-page .seo-content,
.smart-converter-page .related-tools,
.smart-converter-page .related-articles {
  display: block; width: 100%; max-width: 100%; margin: 0; padding: 0;
  background: transparent; border: none; border-radius: 0;
}
.smart-converter-page .sc-section-title {
  font-size: 20px; font-weight: 700; color: var(--text); margin: 0 0 20px;
}

/* Section heading pattern — all SEO sections */
.smart-converter-page .sc-features,
.smart-converter-page .sc-howto,
.smart-converter-page .sc-supported,
.smart-converter-page .sc-popular {
  margin: 0 0 56px;
}
.smart-converter-page .sc-howto,
.smart-converter-page .sc-supported,
.smart-converter-page .sc-popular {
  padding-top: 56px;
  border-top: 1px solid var(--border);
}
.smart-converter-page .sc-features h2,
.smart-converter-page .sc-howto h2,
.smart-converter-page .sc-supported h2,
.smart-converter-page .sc-popular h2 {
  font-size: 28px;
  font-weight: 800;
  text-align: center;
  margin: 0 0 32px;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1.2;
  position: relative;
  padding-bottom: 18px;
}
.smart-converter-page .sc-features h2::after,
.smart-converter-page .sc-howto h2::after,
.smart-converter-page .sc-supported h2::after,
.smart-converter-page .sc-popular h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), #6366f1);
}
.smart-converter-page .sc-features h2::before,
.smart-converter-page .sc-howto h2::before,
.smart-converter-page .sc-supported h2::before,
.smart-converter-page .sc-popular h2::before {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), #6366f1);
  margin: 0 auto 20px;
}

/* Scroll reveal animations */
.sc-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.sc-reveal.sc-visible {
  opacity: 1;
  transform: translateY(0);
}
.sc-reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.sc-reveal-left.sc-visible {
  opacity: 1;
  transform: translateX(0);
}
.sc-reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.sc-reveal-right.sc-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Features grid — 4-column on wide desktop */
.smart-converter-page .features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.smart-converter-page .feature-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  padding: 28px 24px;
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  transition: all 0.3s;
}
.smart-converter-page .feature-card:hover {
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(59,130,246,0.08);
  transform: translateY(-4px);
}
.smart-converter-page .feature-icon {
  font-size: 28px;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-bg);
  border-radius: 16px;
}
.smart-converter-page .feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.smart-converter-page .feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
  unicode-bidi: plaintext;
}

/* How it works — 3-column */
.smart-converter-page .steps-list {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.smart-converter-page .steps-list li {
  counter-increment: step;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  width: 100%;
  padding: 32px 24px;
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  transition: all 0.3s;
  position: relative;
}
.smart-converter-page .steps-list li:hover {
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(59,130,246,0.08);
  transform: translateY(-4px);
}
.smart-converter-page .steps-list li::before {
  content: counter(step);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}
.smart-converter-page .steps-list li .step-num { display: none; }
.smart-converter-page .steps-list li div strong {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.smart-converter-page .steps-list li div p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
  unicode-bidi: plaintext;
}

/* Supported Formats — 4-column on wide desktop */
.smart-converter-page .formats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.smart-converter-page .format-category {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 24px 20px;
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  transition: all 0.3s;
}
.smart-converter-page .format-category:hover {
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(59,130,246,0.08);
  transform: translateY(-4px);
}
.smart-converter-page .format-category h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
}
.smart-converter-page .format-category p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
  direction: ltr;
  text-align: left;
  unicode-bidi: embed;
}

/* FAQ — 2-column */
.smart-converter-page .faq-section {
  margin: 0 0 48px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding-top: 56px;
  border-top: 1px solid var(--border);
}
.smart-converter-page .faq-section h3 {
  grid-column: 1 / -1;
  font-size: 28px;
  font-weight: 800;
  text-align: center;
  color: var(--text);
  margin: 0 0 24px;
  letter-spacing: -0.5px;
  position: relative;
  padding-bottom: 18px;
}
.smart-converter-page .faq-section h3::before {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), #6366f1);
  margin: 0 auto 20px;
}
.smart-converter-page details.faq-item {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card-bg);
  padding: 20px 22px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.smart-converter-page details.faq-item[open] {
  border-color: var(--accent);
  box-shadow: 0 4px 24px rgba(59,130,246,0.06);
}
.smart-converter-page details.faq-item summary {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  cursor: default;
  display: block;
  list-style: none;
  position: relative;
  padding-inline-start: 24px;
  unicode-bidi: plaintext;
}
.smart-converter-page details.faq-item summary::before {
  content: '+';
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  font-size: 16px;
  font-weight: 400;
  color: var(--text-muted);
  transition: transform 0.2s;
}
.smart-converter-page details.faq-item[open] summary::before {
  content: '−';
}
.smart-converter-page details.faq-item summary::-webkit-details-marker { display: none; }
.smart-converter-page details.faq-item summary::after { content: none; }
.smart-converter-page details.faq-item p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 14px 0 0;
  padding: 0;
  unicode-bidi: plaintext;
}

/* Popular Conversions */
.smart-converter-page .sc-popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}
.smart-converter-page .sc-popular-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all 0.3s;
}
.smart-converter-page .sc-popular-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 28px rgba(59,130,246,0.06);
  transform: translateY(-3px);
}
.smart-converter-page .sc-popular-icon {
  width: 42px; height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.smart-converter-page .sc-popular-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

/* Related tools & articles */
.smart-converter-page .related-tools,
.smart-converter-page .related-articles {
  padding: 56px 0 0;
  border-top: 1px solid var(--border);
}
.smart-converter-page .related-section {
  margin: 0;
  padding: 28px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: box-shadow 0.3s;
}
.smart-converter-page .related-section:hover {
  box-shadow: 0 8px 32px rgba(59,130,246,0.04);
}
.smart-converter-page .related-heading {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 18px;
}
.smart-converter-page .related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.smart-converter-page .related-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.25s;
}
.smart-converter-page .related-card:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
  transform: translateY(-2px);
}
.smart-converter-page .related-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.smart-converter-page .related-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.smart-converter-page .related-article {
  margin-bottom: 12px;
  padding: 16px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.25s;
}
.smart-converter-page .related-article:hover { border-color: var(--accent); }
.smart-converter-page .article-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px;
}
.smart-converter-page .article-body {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* Popular card icon gradients */
.smart-converter-page .card-icon--jpg { background: linear-gradient(135deg, #f97316, #ef4444); }
.smart-converter-page .card-icon--png { background: linear-gradient(135deg, #3b82f6, #6366f1); }
.smart-converter-page .card-icon--webp { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.smart-converter-page .card-icon--svg { background: linear-gradient(135deg, #f59e0b, #d97706); }
.smart-converter-page .card-icon--img { background: linear-gradient(135deg, #f97316, #d97706); }
.smart-converter-page .card-icon--pdf { background: linear-gradient(135deg, #ef4444, #dc2626); }
.smart-converter-page .card-icon--docx { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.smart-converter-page .card-icon--xlsx { background: linear-gradient(135deg, #22c55e, #059669); }
.smart-converter-page .card-icon--cmp { background: linear-gradient(135deg, #22c55e, #16a34a); }
.smart-converter-page .card-icon--rsz { background: linear-gradient(135deg, #a855f7, #7c3aed); }
.smart-converter-page .card-icon--merge { background: linear-gradient(135deg, #2563eb, #7c3aed); }
.smart-converter-page .card-icon--split { background: linear-gradient(135deg, #7c3aed, #db2777); }

/* Media queries */
@media (max-width: 1100px) {
  .smart-converter-page .features-grid { grid-template-columns: repeat(2, 1fr); }
  .smart-converter-page .formats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .smart-converter-page .sc-hero { padding: 60px 20px 56px; margin: 0 0 48px; }
  .smart-converter-page .steps-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .smart-converter-page .main-card { padding: 0 16px 32px !important; }
  .smart-converter-page .sc-hero { padding: 44px 16px 40px; margin: 0 0 32px; }
  .smart-converter-page .sc-title { font-size: 26px; }
  .smart-converter-page .sc-hero-badge { font-size: 11px; padding: 4px 12px; }
  .smart-converter-page .sc-dropzone { padding: 28px 16px; }
  .smart-converter-page .sc-dropzone-text { font-size: 17px; }
  .smart-converter-page .features-grid { grid-template-columns: 1fr; }
  .smart-converter-page .steps-list { grid-template-columns: 1fr; }
  .smart-converter-page .formats-grid { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
  .smart-converter-page .format-category { flex: 0 0 220px; }
  .smart-converter-page .faq-section { grid-template-columns: 1fr; padding-top: 40px; }
  .smart-converter-page .sc-popular-grid { grid-template-columns: repeat(2, 1fr); }
  .smart-converter-page .sc-trust { gap: 16px; }
  .smart-converter-page .sc-trust-item { font-size: 11px; }
}
#seoContent-ar p, #seoContent-ar li,
#seoContent-en p, #seoContent-en li {
  unicode-bidi: plaintext;
}

/* ==========================================================
   DESKTOP-ORIENTED MODERN LAYOUT
   Focused converter pages + tab layout (OCR, etc.)
   ========================================================== */

.focused-mode .app,
.tab-layout .app {
  max-width: 920px;
}

.focused-mode .main-card,
.tab-layout .main-card {
  padding: 28px 32px 32px;
  border-radius: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
}

[data-theme="dark"] .focused-mode .main-card,
[data-theme="dark"] .tab-layout .main-card {
  box-shadow: 0 2px 12px rgba(0,0,0,0.25), 0 1px 4px rgba(0,0,0,0.15);
}

/* Grid: upload left, actions right */
.focused-mode .converter-grid,
.tab-layout .converter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

/* Focused banner — modern gradient card */
.focused-mode .focused-banner {
  background: linear-gradient(135deg, var(--accent-bg), var(--card-bg));
  border: 1.5px solid var(--accent);
  border-radius: 16px;
  padding: 32px 28px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(59,130,246,0.06);
}

[data-theme="dark"] .focused-mode .focused-banner {
  box-shadow: 0 2px 16px rgba(59,130,246,0.08);
}

.focused-mode .focused-heading {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
}

.focused-mode .focused-src,
.focused-mode .focused-dst {
  font-size: 26px;
  font-weight: 800;
  padding: 10px 24px;
  border-radius: 12px;
}

.focused-mode .focused-arrows {
  gap: 20px;
  margin-bottom: 12px;
}

.focused-mode .focused-arrows svg {
  width: 28px;
  height: 28px;
  stroke-width: 2.5;
}

.focused-mode .focused-desc {
  font-size: 14px;
  color: var(--text-muted);
}

/* Hide the generic heading when focused banner is shown */
.focused-mode .convert-heading {
  display: none;
}

/* Upload zone — larger, modern, interactive */
.focused-mode .converter-upload .step,
.tab-layout #tab-ocr .converter-upload .step {
  margin-bottom: 0;
}

.focused-mode .upload-zone,
.tab-layout #tab-ocr .upload-zone {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  border-radius: 16px;
  border: 2px dashed var(--border);
  transition: all 0.25s ease;
  cursor: pointer;
}

.focused-mode .upload-zone:hover,
.tab-layout #tab-ocr .upload-zone:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59,130,246,0.07);
}

.focused-mode .upload-zone.dragover,
.tab-layout #tab-ocr .upload-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-bg);
  border-style: solid;
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(59,130,246,0.12);
}

.focused-mode .upload-zone .upload-content,
.tab-layout #tab-ocr .upload-zone .upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.focused-mode .upload-icon svg,
.tab-layout #tab-ocr .upload-icon svg {
  width: 48px;
  height: 48px;
}

.focused-mode .upload-text,
.tab-layout #tab-ocr .upload-text {
  font-size: 16px;
  font-weight: 600;
}

.focused-mode .upload-hint,
.tab-layout #tab-ocr .upload-hint {
  font-size: 13px;
}

.focused-mode .file-info {
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
}

.focused-mode .file-name {
  font-size: 14px;
}

/* Actions panel (right column) */
.focused-mode .converter-actions,
.tab-layout #tab-ocr .converter-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.focused-mode .converter-actions .step,
.tab-layout .converter-actions .step {
  margin-bottom: 0;
}

/* Convert button — prominent, modern */
.focused-mode .convert-btn,
.tab-layout #tab-ocr .convert-btn {
  padding: 16px 24px;
  font-size: 16px;
  border-radius: 14px;
  gap: 10px;
  transition: all 0.2s ease;
}

.focused-mode .convert-btn:hover:not(:disabled),
.tab-layout #tab-ocr .convert-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59,130,246,0.3);
}

.focused-mode .convert-btn:active:not(:disabled),
.tab-layout #tab-ocr .convert-btn:active:not(:disabled) {
  transform: translateY(0);
}

/* Options in right panel — compact */
.focused-mode .opts-grid {
  gap: 8px;
}

.focused-mode .opts-col input,
.focused-mode .opts-col select {
  padding: 10px 14px;
  font-size: 13px;
}

.focused-mode .step-header {
  margin-bottom: 10px;
}

.focused-mode .step-header .step-title {
  font-size: 13px;
}

/* Tool options section spacing */
.focused-mode #toolOptions {
  margin-top: 0;
}

/* Progress bar */
.focused-mode .progress-bar {
  margin-top: 16px;
}

/* Result area */
.focused-mode .result {
  margin-top: 24px;
}

/* Batch queue */
.focused-mode .batch-queue {
  margin-top: 16px;
}

/* OCR tab desktop layout */
.tab-layout #tab-ocr .ocr-result {
  border-radius: 14px;
}

.tab-layout #tab-ocr .ocr-text {
  min-height: 180px;
}

/* File list items in tab layout */
.tab-layout .file-list-item {
  padding: 12px 16px;
  border-radius: 12px;
}

/* Tab page convert buttons */
.tab-layout .convert-btn {
  padding: 14px 20px;
  border-radius: 12px;
}

/* ==========================================================
   RESPONSIVE — collapse to single column on smaller screens
   ========================================================== */
@media (max-width: 820px) {
  .focused-mode .app,
  .tab-layout .app {
    max-width: 600px;
  }

  .focused-mode .converter-grid,
  .tab-layout .converter-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .focused-mode .focused-banner {
    padding: 24px 20px;
  }

  .focused-mode .upload-zone,
  .tab-layout #tab-ocr .upload-zone {
    min-height: 160px;
    padding: 24px 16px;
  }

  .focused-mode .upload-icon svg,
  .tab-layout #tab-ocr .upload-icon svg {
    width: 36px;
    height: 36px;
  }

  .focused-mode .upload-text,
  .tab-layout #tab-ocr .upload-text {
    font-size: 14px;
  }

  .focused-mode .focused-src,
  .focused-mode .focused-dst {
    font-size: 20px;
    padding: 8px 16px;
  }

  .focused-mode .convert-btn,
  .tab-layout #tab-ocr .convert-btn {
    padding: 14px 20px;
    font-size: 15px;
  }
}

@media (max-width: 500px) {
  .focused-mode .main-card,
  .tab-layout .main-card {
    padding: 20px 14px !important;
    border-radius: 16px;
  }

  .focused-mode .focused-banner {
    padding: 20px 14px;
    border-radius: 12px;
  }

  .focused-mode .upload-zone,
  .tab-layout #tab-ocr .upload-zone {
    min-height: 120px;
    padding: 18px 12px;
    border-radius: 12px;
  }
}

.trust-section {
  margin: 40px 0 8px;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.trust-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.trust-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.trust-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.trust-card-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-bg);
  border-radius: 6px;
  color: var(--accent);
  font-size: 14px;
}

.trust-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.trust-text {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
}

.page-title {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--text);
  line-height: 1.3;
}

@media (max-width: 600px) {
  .page-title { font-size: 22px; }
  .trust-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .trust-card { padding: 14px 12px; }
}

@media (max-width: 400px) {
  .trust-grid { grid-template-columns: 1fr; }
}
