/* 快工具箱 - 全站统一样式（无框架，纯 CSS） */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --text: #1f2937;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0, 0, 0, .06);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ===== 页眉 ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 700; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo-icon { font-size: 24px; }
.site-nav { display: flex; gap: 4px; }
.site-nav a { color: var(--text); padding: 8px 12px; border-radius: 8px; font-size: 15px; }
.site-nav a:hover { background: var(--bg-soft); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 8px; font-size: 20px; padding: 4px 12px; cursor: pointer; color: var(--text); }

/* ===== Hero ===== */
.hero { background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 60%, #faf5ff 100%); padding: 64px 0 56px; text-align: center; }
.hero h1 { font-size: 34px; margin-bottom: 12px; letter-spacing: .5px; }
.hero .slogan { display: inline-block; background: #dcfce7; color: #166534; font-size: 14px; font-weight: 600; padding: 4px 14px; border-radius: 999px; margin-bottom: 16px; }
.hero p.lead { color: var(--text-muted); font-size: 17px; max-width: 640px; margin: 0 auto 24px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.trust-badges { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-top: 28px; color: var(--text-muted); font-size: 14px; }

/* ===== 按钮 / 表单 ===== */
.btn {
  display: inline-block; border: 1px solid var(--border); background: #fff; color: var(--text);
  padding: 12px 24px; border-radius: 10px; font-size: 16px; cursor: pointer; min-height: 48px;
}
.btn:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
label.field-label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: 15px; }
input[type="text"], input[type="number"], input[type="datetime-local"], select, textarea {
  width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 16px; font-family: inherit; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-light); border-color: var(--primary); }
textarea { min-height: 160px; resize: vertical; line-height: 1.6; }
input[type="range"] { width: 100%; accent-color: var(--primary); }
input[type="file"] { font-size: 15px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: 15px; }
.checkbox-row input { width: 18px; height: 18px; accent-color: var(--primary); }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row > * { flex: 1; min-width: 140px; }

/* ===== 工具宫格 ===== */
.section { padding: 48px 0; }
.section h2 { font-size: 24px; margin-bottom: 6px; }
.section .section-desc { color: var(--text-muted); margin-bottom: 24px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.tool-card {
  display: block; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; background: #fff; transition: box-shadow .2s, transform .2s; color: var(--text);
}
.tool-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.tool-card .tool-icon { font-size: 32px; margin-bottom: 10px; }
.tool-card h3 { font-size: 17px; margin-bottom: 6px; }
.tool-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* ===== 工具工作区 ===== */
.tool-workspace {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin: 24px 0;
}
.dropzone {
  border: 2px dashed #cbd5e1; border-radius: var(--radius); padding: 36px 20px;
  text-align: center; color: var(--text-muted); cursor: pointer; background: #fff;
  transition: border-color .2s, background .2s;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--primary); background: var(--primary-light); }
.dropzone .dz-icon { font-size: 40px; margin-bottom: 8px; }
.result-box {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 16px; margin-top: 16px; word-break: break-all;
}
.result-box h4 { margin-bottom: 8px; font-size: 15px; }
.alert { padding: 12px 16px; border-radius: 10px; margin: 12px 0; font-size: 15px; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.alert-info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.compare-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 15px; }
.compare-table th, .compare-table td { border: 1px solid var(--border); padding: 10px; text-align: left; }
.compare-table th { background: var(--bg-soft); }
.file-list { list-style: none; margin-top: 12px; }
.file-list li {
  display: flex; align-items: center; gap: 10px; background: #fff;
  border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; font-size: 14px;
}
.file-list .fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list button { padding: 4px 10px; font-size: 13px; border-radius: 6px; border: 1px solid var(--border); background: #fff; cursor: pointer; min-height: 36px; }
.preview-img { max-width: 100%; max-height: 320px; border-radius: 8px; border: 1px solid var(--border); margin-top: 12px; }
.button-group { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* ===== 面包屑 / 文章区 ===== */
.breadcrumb { font-size: 14px; color: var(--text-muted); margin: 20px 0 8px; }
.breadcrumb a { color: var(--text-muted); }
main h1 { font-size: 28px; margin: 8px 0 12px; }
.tool-intro { color: var(--text-muted); font-size: 16px; margin-bottom: 8px; }
.article { max-width: 800px; }
.article h2 { font-size: 22px; margin: 36px 0 12px; }
.article h3 { font-size: 18px; margin: 24px 0 8px; }
.article p { margin-bottom: 14px; }
.article ul, .article ol { margin: 0 0 14px 24px; }
.article li { margin-bottom: 6px; }
.steps { counter-reset: step; list-style: none; margin-left: 0 !important; }
.steps li { counter-increment: step; position: relative; padding-left: 40px; margin-bottom: 14px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 2px;
  width: 28px; height: 28px; border-radius: 50%; background: var(--primary);
  color: #fff; font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

/* ===== FAQ ===== */
.faq details { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; background: #fff; }
.faq summary { padding: 14px 18px; cursor: pointer; font-weight: 600; font-size: 16px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--primary); font-size: 20px; }
.faq details[open] summary::after { content: "−"; }
.faq .faq-a { padding: 0 18px 16px; color: var(--text-muted); }

/* ===== 相关工具 ===== */
.related-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.related-tools a {
  border: 1px solid var(--border); border-radius: 999px; padding: 8px 18px;
  font-size: 14px; color: var(--text); background: #fff; min-height: 44px;
  display: inline-flex; align-items: center;
}
.related-tools a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }

/* ===== 广告位占位 ===== */
.ad-slot {
  min-height: 90px; border: 1px dashed #cbd5e1; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #94a3b8; font-size: 13px; margin: 24px 0; background: #f8fafc;
}
.ad-slot::after { content: "广告位（上线后替换为 AdSense 代码）"; }

/* ===== 文章 / 教程 ===== */
.article-meta { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }
.cta-box {
  background: var(--primary-light); border: 1px solid #bfdbfe; border-radius: var(--radius);
  padding: 20px 24px; margin: 28px 0; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.cta-box .cta-text { font-size: 15px; }
.cta-box .btn { white-space: nowrap; }

/* ===== 页脚 ===== */
.site-footer { border-top: 1px solid var(--border); margin-top: 48px; padding: 36px 0 24px; background: var(--bg-soft); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; margin-bottom: 24px; }
.footer-grid h4 { font-size: 15px; margin-bottom: 10px; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 6px; font-size: 14px; }
.footer-grid a { color: var(--text-muted); }
.copyright { text-align: center; color: var(--text-muted); font-size: 13px; border-top: 1px solid var(--border); padding-top: 16px; }

/* ===== 移动端 ===== */
@media (max-width: 720px) {
  .hero { padding: 44px 0 36px; }
  .hero h1 { font-size: 26px; }
  main h1 { font-size: 23px; }
  .site-nav {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    background: #fff; flex-direction: column; border-bottom: 1px solid var(--border);
    padding: 8px 20px 16px;
  }
  .site-header.nav-open .site-nav { display: flex; }
  .site-nav a { padding: 12px 8px; border-bottom: 1px solid var(--bg-soft); }
  .nav-toggle { display: block; }
  .tool-workspace { padding: 16px; }
  .form-row { flex-direction: column; }
  .form-row > * { min-width: 0; }
}
