/* 快解 · FastZip 浏览器版 —— 与桌面/自托管版一致的视觉语言 */
:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --ink: #162033;
  --muted: #6b7280;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --border: #e5e7eb;
  --danger: #dc2626;
  --ok: #059669;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", sans-serif;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px 28px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 14px; }
.logo { font-size: 34px; }
.brand h1 { margin: 0; font-size: 20px; }
.brand p { margin: 0; color: var(--muted); font-size: 13px; }

.tabs { display: flex; gap: 8px; }
.tab {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--ink);
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
}
.tab.active { background: var(--blue); border-color: var(--blue); color: #fff; }

main { max-width: 980px; margin: 24px auto 60px; padding: 0 20px; }
.panel.hidden, .hidden { display: none !important; }

.banner {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13.5px;
  margin-bottom: 16px;
}
.banner a { color: var(--blue); }

.dropzone {
  border: 2px dashed #c7d2fe;
  border-radius: var(--radius);
  background: var(--card);
  text-align: center;
  padding: 42px 20px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--blue); background: #eef2ff; }
.dropzone-icon { font-size: 40px; }
.dropzone-title { font-size: 17px; font-weight: 600; margin: 8px 0 4px; }
.dropzone-hint { color: var(--muted); font-size: 13px; }
.dropzone-actions { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-top: 16px;
}
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-head h2 { margin: 0; font-size: 17px; word-break: break-all; }
.muted { color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.note { margin: 8px 4px 0; }

.entries-wrap { max-height: 380px; overflow: auto; margin-top: 14px; border: 1px solid var(--border); border-radius: 8px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  position: sticky; top: 0; background: #f9fafb; text-align: left;
  padding: 8px 12px; border-bottom: 1px solid var(--border); font-weight: 600; z-index: 1;
}
.table td { padding: 7px 12px; border-bottom: 1px solid #f1f3f7; word-break: break-all; }
.table tr:last-child td { border-bottom: none; }
.table .num { text-align: right; white-space: nowrap; }
.table .ops { width: 110px; text-align: right; white-space: nowrap; }
.dir-name { font-weight: 600; }
.link { color: var(--blue); cursor: pointer; background: none; border: none; padding: 0; font: inherit; }
.link:hover { text-decoration: underline; }
.link.disabled { color: #c3c8d4; cursor: not-allowed; text-decoration: none; }

.options {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border);
}
.options label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.options select, .options input {
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px;
  font-size: 14px; color: var(--ink); background: #fff; min-width: 150px;
}

.btn {
  border: 1px solid var(--border); background: var(--card); color: var(--ink);
  border-radius: 8px; padding: 8px 16px; font-size: 14px; cursor: pointer;
}
.btn:hover { border-color: #c7d2fe; background: #f8faff; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--blue-dark); }
.btn.primary:disabled { opacity: .55; cursor: default; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost.danger:hover { color: var(--danger); }

.progress-wrap { margin-top: 14px; }
.progress-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 4px; gap: 12px; }
.progress-label span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress { height: 8px; background: #eef0f5; border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--blue); border-radius: 999px; transition: width .2s; }
.progress-bar.indeterminate { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0% { margin-left: 0; } 50% { margin-left: 55%; } 100% { margin-left: 0; } }

.result { margin-top: 14px; padding: 12px 14px; border-radius: 8px; background: #f0fdf4; border: 1px solid #bbf7d0; font-size: 14px; }
.result.failed { background: #fef2f2; border-color: #fecaca; }
.result .ops-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }

.file-list { list-style: none; margin: 12px 0 0; padding: 0; max-height: 240px; overflow: auto; }
.file-list li {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 7px 10px; border-bottom: 1px solid #f1f3f7; font-size: 14px;
}
.file-list li:last-child { border-bottom: none; }
.file-list .remove { color: var(--muted); cursor: pointer; border: none; background: none; }
.file-list .remove:hover { color: var(--danger); }

.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 18px 0 30px; }
.foot a { color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%);
  background: #111827; color: #fff; border-radius: 8px; padding: 10px 18px;
  font-size: 14px; max-width: 80vw; z-index: 99; box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.toast.error { background: var(--danger); }
