/* ============================================================
 * 酷擎PDF · editor 子页面统一主题
 * 供 /editor/ 下 text-watermark.html、rotate.html、delete-page.html 使用，
 * 使其与各工具子站风格一致：明暗切换按钮、推荐侧边栏、统一头部/面包屑/脚部。
 * 依赖：页面自身 static/css/style.css（本文件在其后加载，覆盖硬编码颜色）。
 * ============================================================ */

/* ---------- 推荐工具侧边栏（与其他工具页一致） ---------- */
.rec-sidebar{
  position:fixed;
  right:18px;
  top:88px;
  width:210px;
  max-height:calc(100vh - 130px);
  overflow-y:auto;
  background:#ffffff;
  border:1px solid #e5e7eb;
  border-radius:16px;
  padding:20px 16px;
  box-shadow:0 8px 24px rgba(15,23,42,.10);
  z-index:40;
  scrollbar-width:thin;
}
.rec-sidebar::-webkit-scrollbar{width:4px}
.rec-sidebar::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:4px}
.rec-sidebar-title{
  font-size:15px;
  font-weight:700;
  color:#0f172a;
  margin-bottom:14px;
  padding:0 4px;
  letter-spacing:.3px;
}
.rec-sidebar-list{list-style:none;margin:0;padding:0;display:grid;gap:4px}
.rec-sidebar-list li{border-radius:10px;overflow:hidden}
.rec-sidebar-list a{
  display:block;
  font-size:13.5px;
  color:#334155;
  padding:9px 12px;
  text-decoration:none;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  border-radius:10px;
  transition:all .2s ease;
}
.rec-sidebar-list a:hover{background:#eff6ff;color:#2563eb}
@media(max-width:1240px){.rec-sidebar{display:none}}

/* ---------- 主题切换按钮（右下角圆形，与各工具页一致） ---------- */
#theme-toggle{
  position:fixed;right:16px;bottom:16px;z-index:60;
  width:46px;height:46px;border-radius:50%;
  background:#203d63;color:#fff;border:none;cursor:pointer;
  font-size:20px;line-height:1;
  box-shadow:0 2px 10px rgba(0,0,0,.18);
  transition:transform .1s,background .2s;
}
#theme-toggle:hover{transform:scale(1.06)}
html.dark #theme-toggle{background:#ffffff;color:#000000}

/* ---------- 主站暗色变量 ---------- */
html.dark{
  --primary:#60a5fa;--primary-dark:#3b82f6;--accent:#fb923c;
  --text:#f1f5f9;--text-muted:#94a3b8;--border:#334155;
  --bg:#0f172a;--bg-soft:#1e293b;
}

/* ---------- 统一 header / 面包屑 / footer ---------- */
.site-header{padding:12px 0;background:#fff;border-bottom:1px solid #e2e8f0}
.site-header .nav{display:flex;align-items:center;justify-content:space-between}
.site-header .brand{display:inline-flex;align-items:center;gap:8px;font-weight:800;font-size:17px;color:#0f172a;text-decoration:none}
.site-header .main-nav{display:flex;flex-wrap:wrap}
.site-header .main-nav a{margin-left:14px;color:#64748b;font-size:13.5px;text-decoration:none}
.site-header .main-nav a:hover{color:#2563eb}

.breadcrumb{font-size:13px;color:#64748b;margin-bottom:14px}
.breadcrumb ol{list-style:none;display:flex;gap:6px;padding:0;margin:0}
.breadcrumb li+li::before{content:"/";margin-right:6px;color:#cbd5e1}
.breadcrumb [aria-current]{color:#2563eb;font-weight:600}

.footer-bottom p{margin:0}

/* ---------- 深色模式适配（覆盖 editor 样式表的硬编码颜色） ---------- */
html.dark body{background:#0f172a;color:#f1f5f9}
html.dark .site-header{background:rgba(15,23,42,.92);border-color:#334155}
html.dark .site-header .brand{color:#f1f5f9}
html.dark .site-header .main-nav a{color:#94a3b8}
html.dark .breadcrumb{color:#94a3b8}
html.dark .breadcrumb li+li::before{color:#475569}
html.dark .breadcrumb a{color:#60a5fa}
html.dark .card{background:#1e293b}
html.dark .page-title,
html.dark .card-title,
html.dark .section-title,
html.dark .sub-title,
html.dark .faq-question{color:#f1f5f9}
html.dark .small-text,
html.dark .page-desc,
html.dark .drop-tip,
html.dark .faq-answer{color:#94a3b8}
html.dark .drop-zone{border-color:#475569}
html.dark .drop-zone:hover{background:#1e3a5f;border-color:#60a5fa}
html.dark .btn-gray{background:#334155;color:#e2e8f0}
html.dark input,
html.dark select,
html.dark textarea{background:#0f172a;color:#e2e8f0;border-color:#475569}
html.dark .file-list > div{border-color:#334155}
html.dark .site-footer{background:#0b1220;border-top:1px solid #334155}
html.dark .rec-sidebar{background:#1e293b;border-color:#334155;box-shadow:0 8px 24px rgba(15,23,42,.35)}
html.dark .rec-sidebar-title{color:#01070e;padding: 3px 10px;}
html.dark .rec-sidebar-list a{color:#cbd5e1}
html.dark .rec-sidebar-list a:hover{background:#253b58;color:#60a5fa}

/* ---------- 处理完成横幅 + 显眼下载按钮 ---------- */
.dl-banner{
  margin-top:16px;
  background:#f0fdf4;
  border:2px solid #22c55e;
  border-radius:14px;
  padding:26px 20px;
  text-align:center;
}
.dl-banner .dl-title{
  font-size:19px;
  font-weight:800;
  color:#166534;
  margin-bottom:16px;
}
.dl-banner .dl-btn{
  display:inline-block;
  padding:14px 38px;
  background:#16a34a;
  color:#ffffff;
  font-size:17px;
  font-weight:700;
  border-radius:12px;
  text-decoration:none;
  box-shadow:0 6px 18px rgba(22,163,74,.35);
  transition:transform .1s,background .2s;
}
.dl-banner .dl-btn:hover{background:#15803d;transform:translateY(-1px)}
.dl-banner .dl-btn:active{transform:translateY(0)}
.dl-banner .dl-meta{margin-top:12px;font-size:12.5px;color:#64748b}

html.dark .dl-banner{background:#12291c;border-color:#22c55e}
html.dark .dl-banner .dl-title{color:#86efac}
html.dark .dl-banner .dl-btn{background:#16a34a}
html.dark .dl-banner .dl-btn:hover{background:#15803d}
html.dark .dl-banner .dl-meta{color:#94a3b8}
