/* ===========================================================
   HEIC → JPG · 静态转换站样式
   设计基调：浅色、克制、以内容为主
   =========================================================== */

:root {
  --bg: #f5f7fb;
  --bg-glow: #e8effd;
  --surface: #ffffff;
  --surface-2: #fafbfe;
  --ink: #0e1726;
  --ink-2: #33415c;
  --muted: #63748e;
  --line: #e3e9f4;
  --line-strong: #cfd9e8;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #eaf1ff;
  --teal: #0ea5a4;
  --ok: #15803d;
  --ok-soft: #e9f7ef;
  --err: #c62828;
  --err-soft: #fdecec;
  --shadow-sm: 0 1px 2px rgba(16, 35, 68, .06);
  --shadow: 0 8px 24px -12px rgba(16, 35, 68, .18), 0 2px 6px rgba(16, 35, 68, .04);
  --radius: 16px;
  --radius-lg: 22px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

/* 关键：作者样式里的 display 会覆盖 UA 的 [hidden]，这里强制兜底 */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(1100px 480px at 50% -260px, var(--bg-glow), transparent 70%),
    var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { letter-spacing: -.02em; line-height: 1.2; margin: 0; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  width: min(960px, calc(100% - 40px));
  margin-inline: auto;
}

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid rgba(227, 233, 244, .9);
  background: rgba(255, 255, 255, .72);
  backdrop-filter: saturate(180%) blur(12px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -.01em;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(140deg, var(--accent), #4f8bff);
  color: #fff;
  box-shadow: 0 4px 10px -4px rgba(37, 99, 235, .8);
}
.brand-mark svg { width: 19px; height: 19px; }
.brand-name { font-size: 16.5px; }
.brand-name .arrow { color: var(--muted); margin: 0 2px; font-weight: 500; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}
.pill svg { width: 15px; height: 15px; }
.pill-safe {
  color: var(--ok);
  background: var(--ok-soft);
  border: 1px solid #cdebd9;
}

/* ---------- hero ---------- */

.hero { padding: 56px 0 30px; text-align: center; }

.hero h1 {
  font-size: clamp(30px, 5.2vw, 46px);
  font-weight: 800;
  letter-spacing: -.035em;
}

.grad {
  background: linear-gradient(96deg, var(--accent) 8%, var(--teal) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin: 18px auto 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 16.5px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.hero-points li {
  font-size: 13px;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  box-shadow: var(--shadow-sm);
}

/* ---------- dropzone ---------- */

.tool { padding-bottom: 24px; }

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 46px 24px 40px;
  text-align: center;
  background: var(--surface);
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
  box-shadow: var(--shadow);
  outline: none;
}
.dropzone:hover { border-color: #b9c8de; }
.dropzone:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.dropzone.is-over {
  border-color: var(--accent);
  background: linear-gradient(180deg, #f7faff, #eff5ff);
  transform: translateY(-1px);
}
.dropzone[aria-disabled="true"] { opacity: .6; pointer-events: none; }

.dz-icon {
  width: 54px; height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 8px;
}
.dz-icon svg { width: 26px; height: 26px; }

.dz-title { font-size: 19px; font-weight: 650; letter-spacing: -.01em; }
.dz-sub { color: var(--muted); font-size: 14px; }
.dz-btn { margin-top: 16px; pointer-events: none; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px -8px rgba(37, 99, 235, .9);
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled {
  background: #b9c8e6;
  box-shadow: none;
  cursor: not-allowed;
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink-2);
}
.btn-ghost:hover { background: var(--surface-2); border-color: #b9c8de; }

.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }

/* ---------- settings ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.settings {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 8px 34px;
  margin-top: 18px;
  padding: 20px 22px;
}

.setting-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}
.setting-head label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.setting-head output {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 1px 8px;
  border-radius: 6px;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  background: transparent;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) var(--fill, 84%), #e6ecf6 var(--fill, 84%));
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  margin-top: -6px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  box-shadow: 0 1px 4px rgba(16, 35, 68, .25);
  transition: transform .12s ease;
}
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.1); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: #e6ecf6; }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--accent); }
input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%; background: #fff;
  border: 2px solid var(--accent);
}

select {
  width: 100%;
  height: 38px;
  padding: 0 34px 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2363748e' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
  appearance: none;
  cursor: pointer;
}
select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.setting-hint { margin-top: 7px; font-size: 12.5px; color: var(--muted); }

/* ---------- notice ---------- */

.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid #d5e3ff;
  color: #1b4bab;
  font-size: 13.5px;
}

.notice-warn {
  background: #fff8e8;
  border-color: #f3e0b5;
  color: #8a5a00;
}

.spinner {
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(37, 99, 235, .25);
  border-top-color: var(--accent);
  animation: spin .7s linear infinite;
  flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- queue ---------- */

.queue-wrap { margin-top: 26px; }

.queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.queue-meta { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.queue-meta strong { font-size: 15px; }
.queue-summary { font-size: 13px; color: var(--muted); }
.queue-actions { display: flex; gap: 8px; }

.progress {
  height: 5px;
  border-radius: 999px;
  background: #e6ecf6;
  overflow: hidden;
  margin-bottom: 12px;
}
.progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--teal));
  transition: width .25s ease;
}

.queue { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  animation: rise .22s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.item-thumb {
  width: 64px; height: 64px;
  border-radius: 10px;
  background: #eef2f9 center/cover no-repeat;
  border: 1px solid var(--line);
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #a9b6c9;
  flex: none;
}
.item-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item-thumb svg { width: 22px; height: 22px; }

.item-body { min-width: 0; }

.item-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-meta {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.item-meta .dot { color: #c8d2e2; }
.item-meta .save { color: var(--ok); font-weight: 600; }
.item-meta .grow { color: #a16207; font-weight: 600; }
.item-meta .err { color: var(--err); }
.item-out { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f0f3f9;
  color: var(--muted);
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-err { background: var(--err-soft); color: var(--err); }
.badge-work { background: var(--accent-soft); color: var(--accent-dark); }

.item-actions { display: flex; align-items: center; gap: 6px; }

.icon-btn {
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- features / faq ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 46px auto 0;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.feature-icon {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 12px;
}
.feature-icon svg { width: 19px; height: 19px; }
.feature h3 { font-size: 15px; margin-bottom: 6px; }
.feature p { font-size: 13.5px; color: var(--muted); line-height: 1.65; }

.faq { margin-top: 54px; }
.faq h2 { font-size: 22px; margin-bottom: 14px; letter-spacing: -.02em; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 14px 2px;
}
.faq details[open] { padding-bottom: 4px; }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-2);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1;
  transition: transform .18s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
  max-width: 720px;
}

/* ---------- footer ---------- */

.site-footer {
  margin-top: 64px;
  padding: 26px 0 40px;
  border-top: 1px solid var(--line);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}
.footer-inner .muted { color: #8494ab; }

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .wrap { width: calc(100% - 28px); }
  .hero { padding: 34px 0 22px; }
  .lede { font-size: 15px; }
  .dropzone { padding: 32px 16px 30px; border-radius: 18px; }
  .dz-title { font-size: 17px; }
  .settings { grid-template-columns: 1fr; padding: 16px; gap: 18px; }
  .features { grid-template-columns: 1fr; margin-top: 34px; }
  .item { grid-template-columns: 52px 1fr; gap: 12px; }
  .item-thumb { width: 52px; height: 52px; }
  .item-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .queue-head { align-items: flex-start; }
  .queue-actions { width: 100%; }
  .queue-actions .btn { flex: 1; }
  .site-footer { margin-top: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
