:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --success: #16a34a;
  --success-soft: #f0fdf4;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a;
    --surface: #1e293b;
    --surface-soft: #172033;
    --border: #334155;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --accent: #60a5fa;
    --accent-soft: #1e3a5f;
    --success: #4ade80;
    --success-soft: #143327;
    --danger: #f87171;
    --danger-soft: #3b1d22;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

.page { max-width: 1180px; margin: 0 auto; padding: 36px 24px 24px; }

.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-end;
  justify-content: space-between;
  padding: 28px 30px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--surface), var(--surface-soft));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.hero-main { max-width: 660px; }
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}
.hero h1 { margin: 10px 0 8px; font-size: 26px; line-height: 1.35; letter-spacing: -0.5px; }
@media (max-width: 560px) { .hero h1 { font-size: 20px; } }
.hero p { margin: 0; color: var(--text-muted); font-size: 14px; }
.hero-meta { display: flex; gap: 26px; flex-wrap: wrap; }
.hero-meta div { display: flex; flex-direction: column; gap: 2px; }
.hero-meta strong { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.hero-meta span { font-size: 14px; font-weight: 600; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.9fr);
  gap: 20px;
  margin-top: 20px;
  align-items: start;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
}

.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head h2 { margin: 0; font-size: 16px; }
.hint { font-size: 12px; color: var(--text-muted); }

.dropzone {
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
.drop-icon { color: var(--accent); margin-bottom: 8px; }
.drop-title { font-weight: 600; font-size: 15px; }
.drop-sub { margin-top: 4px; font-size: 12px; color: var(--text-muted); }

.file-list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.file-ext {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.file-info { flex: 1; min-width: 0; }
.file-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-size: 12px; color: var(--text-muted); }
.icon-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 6px;
}
.icon-btn:hover { color: var(--danger); background: var(--danger-soft); }

.options-head { margin-top: 24px; }
.options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.option:hover { border-color: var(--accent); }
.option input { margin-top: 3px; accent-color: var(--accent); }
.option-text { display: flex; flex-direction: column; gap: 2px; }
.option-text strong { font-size: 13px; font-weight: 600; }
.option-text small { font-size: 11px; color: var(--text-muted); line-height: 1.4; }

.actions { display: flex; gap: 10px; margin-top: 20px; }
.btn {
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s, transform .15s;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:not(:disabled):active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn.wide { width: 100%; margin-top: 14px; }

.progress-wrap { margin-top: 14px; display: flex; align-items: center; gap: 10px; }
.progress-track { flex: 1; height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; }
.progress-bar { height: 100%; width: 0; border-radius: 999px; background: var(--accent); transition: width .25s; }
.progress-wrap span { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

.alert { margin-top: 14px; padding: 10px 12px; border-radius: 9px; font-size: 13px; }
.alert.error { background: var(--danger-soft); color: var(--danger); }
.alert.success { background: var(--success-soft); color: var(--success); }

.result-list { min-height: 220px; display: flex; flex-direction: column; gap: 8px; }
.empty-state {
  min-height: 200px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 20px;
}
.result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
}
.result-status {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}
.result-status.ok { background: var(--success-soft); color: var(--success); }
.result-status.fail { background: var(--danger-soft); color: var(--danger); }
.result-info { flex: 1; min-width: 0; }
.result-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-detail { font-size: 11px; color: var(--text-muted); }
.result-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  white-space: nowrap;
}
.result-link:hover { background: var(--accent-soft); }

.note { margin: 12px 0 0; font-size: 11px; color: var(--text-muted); }
.footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
}
.copyright {
  font-weight: 700;
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  letter-spacing: 0.2px;
}
.beian {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  flex: 0 0 100%;
  order: 10;
  gap: 18px;
  font-size: 12px;
  background: #0d1117;
  padding: 9px 18px;
  border-radius: 8px;
}
.beian a {
  color: #8b949e;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.beian a:hover { color: #c9d1d9; text-decoration: none; }
.beian-icon { flex: 0 0 auto; display: block; }
.beian-icp { color: #8b949e; }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .options { grid-template-columns: 1fr; }
  .hero { padding: 22px; }
  .page { padding: 20px 16px; }
}
