/* ============================================================
   PDF压缩网 pdfyasuo.com 设计系统
   主题：数字纸张 + 印章红
   ============================================================ */

/* ---------- 设计令牌 ---------- */
:root {
  --brand: #d9432e;
  --brand-dark: #b93522;
  --brand-soft: #fbeae6;
  --brand-ink: #7a2418;
  --paper: #fbf8f4;
  --paper-deep: #f3ede4;
  --card: #ffffff;
  --ink: #23272d;
  --ink-2: #555f6b;
  --ink-3: #8b95a1;
  --line: #e8e3db;
  --line-2: #ddd6cc;
  --green: #1f9667;
  --green-soft: #e6f5ee;
  --blue: #2b6de0;
  --blue-soft: #e9f1fe;
  --amber: #b7791f;
  --amber-soft: #fbf2dd;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(35, 39, 45, .06), 0 8px 24px rgba(35, 39, 45, .08);
  --shadow-lg: 0 2px 6px rgba(35, 39, 45, .08), 0 18px 48px rgba(35, 39, 45, .14);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { line-height: 1.3; color: var(--ink); margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(26px, 4.5vw, 40px); letter-spacing: -.01em; }
h2 { font-size: clamp(22px, 3vw, 30px); letter-spacing: -.01em; }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
img, svg { max-width: 100%; }
button { font-family: inherit; }
::selection { background: var(--brand); color: #fff; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.text-center { text-align: center; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 248, 244, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--ink); flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.brand .brand-mark { width: 34px; height: 34px; flex: none; }
.brand em { font-style: normal; color: var(--brand); }
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav-links a {
  color: var(--ink-2); font-size: 13.5px; font-weight: 500;
  padding: 7px 8px; border-radius: 8px; white-space: nowrap;
}
.nav-links a:hover { color: var(--ink); background: var(--paper-deep); }
.nav-links a.active { color: var(--brand); background: var(--brand-soft); }
.nav-toggle {
  display: none; margin-left: auto;
  width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: .2s;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.nav-toggle.open span { background: transparent; }
.nav-toggle.open span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-size: 15px; font-weight: 600; cursor: pointer; transition: .18s;
  min-height: 44px; text-decoration: none;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(217, 67, 46, .28); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; transform: translateY(-1px); }
.btn-primary:disabled { background: var(--ink-3); box-shadow: none; cursor: not-allowed; transform: none; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink-3); background: var(--paper); color: var(--ink); }
.btn-lg { padding: 15px 32px; font-size: 17px; }
.btn-block { width: 100%; }

/* ---------- 徽章 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px;
}
.badge-local { background: var(--green-soft); color: var(--green); }
.badge-cloud { background: var(--blue-soft); color: var(--blue); }
.badge svg { width: 14px; height: 14px; }

/* ---------- 首页 Hero ---------- */
.hero { padding: 64px 0 40px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 260px at 85% -10%, rgba(217, 67, 46, .10), transparent 70%),
    radial-gradient(500px 240px at 5% 10%, rgba(43, 109, 224, .06), transparent 70%);
}
.hero-inner { position: relative; max-width: 760px; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: var(--brand);
  background: var(--brand-soft); padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.hero p.lead { font-size: clamp(16px, 2.2vw, 19px); color: var(--ink-2); max-width: 620px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 26px; }
.hero-stats { display: flex; gap: 32px; margin-top: 36px; flex-wrap: wrap; }
.hero-stats .stat b { display: block; font-size: 24px; color: var(--ink); }
.hero-stats .stat span { font-size: 13px; color: var(--ink-3); }

/* ---------- 信任特性条 ---------- */
.trust-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 8px 0 56px; }
.trust-item {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; gap: 14px; align-items: flex-start;
}
.trust-item .ti-icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft);
  display: flex; align-items: center; justify-content: center; flex: none; color: var(--brand);
}
.trust-item h4 { margin: 0 0 2px; font-size: 15px; }
.trust-item p { margin: 0; font-size: 13px; color: var(--ink-3); }

/* ---------- 工具卡片网格（折角纸张） ---------- */
.section { padding: 20px 0 48px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.section-head p { color: var(--ink-2); margin: 6px 0 0; }
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tool-card {
  position: relative; display: block;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px 22px; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  color: var(--ink); overflow: hidden;
}
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--line-2); color: var(--ink); }
.tool-card .tc-icon {
  width: 48px; height: 48px; border-radius: 12px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand);
}
.tool-card h3 { margin: 0 0 6px; font-size: 17px; }
.tool-card p { margin: 0; font-size: 13.5px; color: var(--ink-3); }
/* 纸张折角 */
.tool-card::after {
  content: ""; position: absolute; top: 0; right: 0; width: 22px; height: 22px;
  background: linear-gradient(225deg, var(--paper-deep) 50%, rgba(0,0,0,.02) 50%, transparent 52%);
  border-bottom-left-radius: 8px; transition: .2s;
}
.tool-card:hover::after { width: 26px; height: 26px; background: linear-gradient(225deg, var(--paper-deep) 50%, rgba(0,0,0,.04) 50%, transparent 52%); }

/* ---------- 工具页 ---------- */
.tool-hero { padding: 40px 0 8px; }
.breadcrumb { font-size: 13px; color: var(--ink-3); margin-bottom: 16px; }
.breadcrumb a { color: var(--ink-3); }
.breadcrumb a:hover { color: var(--brand); }
.tool-hero .title-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.tool-hero h1 { margin: 0; }
.tool-hero .sub { color: var(--ink-2); max-width: 680px; }

.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px; margin: 24px 0;
}
.panel-options { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.option-chip {
  border: 1px solid var(--line-2); background: #fff; border-radius: 10px;
  padding: 10px 18px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-2);
  transition: .15s; min-height: 44px;
}
.option-chip small { display: block; font-weight: 400; font-size: 12px; color: var(--ink-3); }
.option-chip:hover { border-color: var(--ink-3); }
.option-chip.selected { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.option-chip.selected small { color: var(--brand); }
.field-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.field-row label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.input {
  border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 14px; font-size: 14px;
  font-family: inherit; min-height: 42px; width: 100%; max-width: 220px; color: var(--ink); background: #fff;
}
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* ---------- 拖拽上传区 ---------- */
.dropzone {
  border: 2px dashed var(--line-2); border-radius: var(--radius);
  padding: 48px 24px; text-align: center; cursor: pointer;
  background: var(--paper); transition: .18s;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--brand); background: var(--brand-soft); }
.dropzone .dz-icon {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 16px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center; color: var(--brand);
}
.dropzone h3 { margin-bottom: 6px; }
.dropzone p { color: var(--ink-3); font-size: 14px; margin: 0; }
.dropzone .dz-formats { margin-top: 10px; font-size: 12.5px; color: var(--ink-3); }

/* ---------- 文件列表 ---------- */
.file-list { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 10px; }
.file-item {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; background: #fff;
}
.file-item .fi-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; flex: none; }
.file-item .fi-info { flex: 1; min-width: 0; }
.file-item .fi-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item .fi-meta { font-size: 12.5px; color: var(--ink-3); }
.file-item .fi-remove { border: none; background: none; color: var(--ink-3); cursor: pointer; width: 36px; height: 36px; border-radius: 8px; flex: none; }
.file-item .fi-remove:hover { color: var(--brand); background: var(--brand-soft); }

/* ---------- 进度条 ---------- */
.progress { height: 8px; border-radius: 999px; background: var(--paper-deep); overflow: hidden; margin: 18px 0 8px; }
.progress-bar { height: 100%; width: 0; background: var(--brand); border-radius: 999px; transition: width .25s; }
.progress-text { font-size: 13px; color: var(--ink-2); }

/* ---------- 结果卡片 ---------- */
.result-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--green-soft); padding: 22px; margin-top: 20px; display: none; }
.result-card.show { display: block; }
.result-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.result-head .rh-icon { width: 44px; height: 44px; border-radius: 12px; background: #fff; color: var(--green); display: flex; align-items: center; justify-content: center; flex: none; }
.result-head b { font-size: 17px; }
.result-compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; background: #fff; border-radius: var(--radius-sm); padding: 16px; margin-bottom: 16px; }
.rc-box { text-align: center; }
.rc-box .rc-label { font-size: 12px; color: var(--ink-3); }
.rc-box .rc-size { font-size: 20px; font-weight: 800; color: var(--ink); }
.rc-arrow { color: var(--ink-3); }
.rc-ratio { text-align: center; font-weight: 800; color: var(--green); font-size: 18px; }
.rc-ratio small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 500; }

/* ---------- 提示消息 ---------- */
.alert { border-radius: var(--radius-sm); padding: 14px 16px; font-size: 14px; margin: 16px 0; display: none; }
.alert.show { display: flex; gap: 10px; align-items: flex-start; }
.alert-error { background: var(--brand-soft); color: var(--brand-ink); border: 1px solid #f3c9c0; }
.alert-info { background: var(--blue-soft); color: #1e4fa8; border: 1px solid #cdddf8; }
.alert-warning { background: var(--amber-soft); color: var(--amber); border: 1px solid #ecd9ad; }
.alert svg { flex: none; margin-top: 2px; }

/* ---------- 步骤说明 ---------- */
.howto { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 8px 0; }
.howto .step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: relative; }
.howto .step .step-no {
  width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff;
  font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.howto .step h4 { margin: 0 0 6px; font-size: 16px; }
.howto .step p { margin: 0; font-size: 13.5px; color: var(--ink-3); }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; margin-bottom: 10px; overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; border: none; background: none; cursor: pointer;
  padding: 16px 18px; font-size: 15px; font-weight: 600; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px;
}
.faq-q .faq-chevron { flex: none; transition: transform .2s; color: var(--ink-3); }
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-a p { padding: 0 18px 16px; margin: 0; font-size: 14px; color: var(--ink-2); }

/* ---------- 相邻工具 ---------- */
.related-tools { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.related-tools a {
  border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 16px;
  font-size: 14px; font-weight: 500; color: var(--ink-2);
}
.related-tools a:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--card); margin-top: 60px; padding: 48px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; margin-bottom: 32px; }
.footer-grid h5 { font-size: 14px; margin: 0 0 14px; color: var(--ink); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 9px; }
.footer-grid a { font-size: 13.5px; color: var(--ink-3); }
.footer-grid a:hover { color: var(--brand); }
.footer-brand p { font-size: 13.5px; color: var(--ink-3); max-width: 280px; }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 22px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }
.footer-bottom a { color: var(--ink-3); }

/* ---------- 工具提示/加载 ---------- */
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.working { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- 焦点与动效无障碍 ---------- */
a:focus-visible, button:focus-visible, .input:focus-visible { outline: 3px solid rgba(217, 67, 46, .35); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- 表单增强（水印 / 页码 / 加密） ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 24px; margin: 22px 0 6px; }
.form-group { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); padding: 18px 18px 20px; }
.form-group > .fg-title { font-size: 14px; font-weight: 700; color: var(--ink); margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.form-group .field-row { margin-bottom: 14px; }
.form-group .field-row:last-child { margin-bottom: 0; }
.form-group .input { max-width: 100%; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.input[type="text"] { max-width: 100%; }

/* 滑块 */
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px; background: var(--paper-deep); outline: none; margin: 8px 0 4px; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(35,39,45,.3); cursor: pointer; }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(35,39,45,.3); cursor: pointer; }
.range-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.range-head .range-val { font-size: 13px; font-weight: 700; color: var(--brand); }

/* 颜色色块 */
.swatch-row { display: flex; gap: 10px; flex-wrap: wrap; }
.color-swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; padding: 0; transition: transform .15s, box-shadow .15s; }
.color-swatch:hover { transform: scale(1.08); }
.color-swatch.selected { box-shadow: 0 0 0 2px var(--brand); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-row { grid-template-columns: repeat(2, 1fr); }
  .howto { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--card); border-bottom: 1px solid var(--line);
    padding: 12px 16px 18px; box-shadow: var(--shadow-lg);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; border-radius: 10px; font-size: 15px; }
}
@media (max-width: 720px) {
  .panel { padding: 20px 16px; }
  .dropzone { padding: 36px 16px; }
  .result-compare { grid-template-columns: 1fr; }
  .rc-arrow { transform: rotate(90deg); }
}
@media (max-width: 480px) {
  .tool-grid { grid-template-columns: 1fr; }
  .trust-row { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 28px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 22px; }
}
