/* PDF 转扫描件 · 在线版 */
:root {
  --accent: #0a9e94;
  --accent-dark: #07827a;
  --accent-soft: #e6f6f4;
  --bg: #f4f6f8;
  --card: #ffffff;
  --line: #e2e8ed;
  --text: #1f2b36;
  --muted: #6b7c8c;
  --ok: #17864a;
  --err: #c0392b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 36, 54, .04), 0 8px 24px rgba(16, 36, 54, .05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #2fbcb0;
    --accent-dark: #1fa79c;
    --accent-soft: #16302e;
    --bg: #12171c;
    --card: #1a2128;
    --line: #2a343d;
    --text: #e8eef3;
    --muted: #93a4b3;
    --ok: #4cc98a;
    --err: #ff7b6b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: 880px; margin: 0 auto; padding: 34px 18px 48px; }

/* ---------- 头部 ---------- */
.hero { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.logo {
  color: var(--accent); flex: 0 0 auto; width: 56px; height: 56px;
  display: grid; place-items: center; background: var(--card);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
}
.hero h1 { font-size: 25px; margin: 0 0 2px; letter-spacing: -.2px; }
.sub { margin: 0; color: var(--muted); font-size: 13.5px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.card-title { font-size: 15px; font-weight: 600; margin: 0 0 14px; }

/* ---------- 拖放区 ---------- */
.drop {
  border: 2px dashed var(--accent); border-radius: var(--radius);
  background: var(--accent-soft); padding: 38px 18px; text-align: center;
  cursor: pointer; transition: background .15s, transform .12s, border-color .15s;
  outline: none;
}
.drop:hover, .drop:focus-visible { background: var(--accent-soft); border-color: var(--accent-dark); }
.drop.on { transform: scale(1.008); border-color: var(--accent-dark); background: var(--accent-soft); }
.drop-ico { color: var(--accent); margin-bottom: 8px; }
.drop-main { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.drop-hint { font-size: 12.5px; color: var(--muted); }

/* ---------- 选项 ---------- */
.opts { display: flex; flex-wrap: wrap; gap: 18px 26px; align-items: flex-start; }
.opt { display: flex; flex-direction: column; gap: 7px; min-width: 200px; flex: 1 1 200px; }
.opt-narrow { flex: 0 1 140px; min-width: 130px; }
.opt-label { font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; }
.opt-label b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

select {
  appearance: none; -webkit-appearance: none;
  font: inherit; font-size: 14px; color: var(--text);
  padding: 9px 34px 9px 12px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--card)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236b7c8c' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  cursor: pointer;
}
select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 22px; background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px; background: var(--line);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 17px; height: 17px; margin-top: -6.5px;
  border-radius: 50%; background: var(--accent); border: 2px solid var(--card);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line); }
input[type="range"]::-moz-range-thumb {
  width: 15px; height: 15px; border-radius: 50%; background: var(--accent);
  border: 2px solid var(--card);
}

.note { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); }

/* ---------- 结果列表 ---------- */
.list-head { display: flex; align-items: center; justify-content: space-between; }
.list-head .card-title { margin-bottom: 10px; }
.list { list-style: none; margin: 0; padding: 0; }

.item { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-top: 1px solid var(--line); }
.item:first-child { border-top: none; }
.item .fileicon { flex: 0 0 auto; color: var(--accent); display: grid; place-items: center; width: 30px; }
.item .meta { flex: 1 1 auto; min-width: 0; }
.item .name {
  font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis;
}
.item .status { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.item .status.ok { color: var(--ok); }
.item .status.err { color: var(--err); }

.bar { height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; margin-top: 6px; }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }

.spinner {
  width: 12px; height: 12px; border: 2px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-dl {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 13px; font-weight: 500; color: #fff;
  background: var(--accent); border: none; border-radius: 9px; padding: 8px 14px;
  cursor: pointer; text-decoration: none;
}
.btn-dl:hover { background: var(--accent-dark); }
.btn-dl[disabled] { opacity: .5; cursor: default; }

.link-btn {
  font: inherit; font-size: 12.5px; color: var(--muted); background: none;
  border: none; cursor: pointer; padding: 0; text-decoration: underline;
  text-underline-offset: 2px;
}
.link-btn:hover { color: var(--text); }

.foot { text-align: center; font-size: 12px; color: var(--muted); margin-top: 8px; }
.foot p { margin: 0; }

@media (max-width: 560px) {
  .wrap { padding: 22px 12px 36px; }
  .hero h1 { font-size: 21px; }
  .opt { flex: 1 1 100%; }
  .opt-narrow { flex: 1 1 45%; }
  .drop { padding: 28px 12px; }
}
