/* ═══════════ 批图匠 BatchPic · 样式 ═══════════ */
:root {
  --primary: #6d5df6;
  --primary-dark: #5946d6;
  --primary-light: #f0edff;
  --text: #1f2430;
  --text-dim: #6b7280;
  --bg: #f7f8fb;
  --card: #ffffff;
  --border: #e5e7eb;
  --danger: #e5484d;
  --radius: 14px;
  --shadow: 0 4px 20px rgba(31, 36, 48, 0.06);
  --shadow-lg: 0 10px 40px rgba(31, 36, 48, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.is-hidden { display: none !important; }

/* ── 导航 ── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 960px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), #9d8bff);
  color: #fff; font-weight: 700; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.brand-name { font-weight: 700; font-size: 18px; }
.nav-right { display: flex; align-items: center; gap: 18px; }
.nav-link { color: var(--text-dim); text-decoration: none; font-size: 14px; }
.nav-link:hover { color: var(--primary); }

.chip {
  font-size: 12px; padding: 3px 10px; border-radius: 999px; font-weight: 600;
}
.chip-pro { background: #fff3d6; color: #9a6b00; border: 1px solid #ffd57e; }

/* ── Hero ── */
.hero { padding: 56px 0 32px; text-align: center; }
.hero h1 { font-size: clamp(30px, 6vw, 46px); font-weight: 800; letter-spacing: -0.5px; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--primary), #b06ab3);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { margin-top: 14px; color: var(--text-dim); font-size: 17px; }
.hero-sub b { color: var(--text); }

/* ── 卡片与工具区 ── */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px;
}
.tool-card { margin-bottom: 8px; }

.dropzone {
  border: 2px dashed #cfc9f5; border-radius: var(--radius);
  background: var(--primary-light);
  padding: 44px 20px; text-align: center; cursor: pointer;
  transition: all 0.2s;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary); background: #e9e4ff;
  transform: scale(1.005);
}
.dz-icon { font-size: 42px; margin-bottom: 8px; }
.dz-title { font-size: 17px; font-weight: 600; }
.linklike {
  background: none; border: none; color: var(--primary);
  font: inherit; cursor: pointer; text-decoration: underline;
}
.dz-hint { margin-top: 8px; font-size: 13px; color: var(--text-dim); }
.pro-tag {
  margin-left: 8px; font-size: 12px; color: #9a6b00;
  background: #fff3d6; padding: 1px 8px; border-radius: 999px;
}

/* 队列 */
.queue-wrap { margin-top: 18px; }
.queue-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.queue-count { font-size: 14px; font-weight: 600; color: var(--text-dim); }
.queue {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px; max-height: 260px; overflow-y: auto; padding: 4px;
}
.q-item {
  position: relative; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border); background: #fafafa; aspect-ratio: 1;
}
.q-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.q-item .q-del {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px; border-radius: 50%; border: none;
  background: rgba(0,0,0,0.55); color: #fff; font-size: 12px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.q-item .q-del:hover { background: var(--danger); }
.q-item .q-name {
  position: absolute; bottom: 0; left: 0; right: 0;
  font-size: 10px; padding: 2px 4px; color: #fff;
  background: rgba(0,0,0,0.5); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}

/* 设置区 */
.settings {
  margin-top: 22px; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px;
}
.set-group {
  border: 1px solid var(--border); border-radius: 12px; padding: 14px;
}
.set-label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.set-controls { display: flex; flex-direction: column; gap: 8px; }
.set-hint { font-size: 12px; color: var(--text-dim); }
.inline-fields { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--text-dim); }
.range-val { font-size: 13px; color: var(--text-dim); font-variant-numeric: tabular-nums; }

input[type="text"], input[type="number"], select {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border);
  border-radius: 8px; font: inherit; font-size: 14px; background: #fff;
  transition: border-color 0.15s;
}
.inline-fields input[type="number"], .inline-fields select { width: auto; min-width: 90px; }
.inline-fields input[type="range"] { width: 90px; }
input:focus, select:focus { outline: none; border-color: var(--primary); }
input[type="range"] { accent-color: var(--primary); padding: 0; border: none; }

/* Pro 锁定态 */
.pro-badge {
  display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700;
  background: linear-gradient(120deg, #f7b733, #fc4a1a);
  color: #fff; padding: 1px 7px; border-radius: 999px; vertical-align: 1px;
}
.pro-badge.big { font-size: 12px; }
.set-group.pro-locked .set-controls { opacity: 0.45; pointer-events: none; filter: grayscale(0.6); }
.set-group.pro-locked { position: relative; cursor: pointer; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 10px;
  font: inherit; font-weight: 600; cursor: pointer;
  padding: 10px 20px; font-size: 15px; text-decoration: none;
  transition: all 0.15s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #8b7bff);
  color: #fff; box-shadow: 0 4px 14px rgba(109, 93, 246, 0.35);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-ghost { background: #fff; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-lg { padding: 13px 32px; font-size: 16px; }
.btn-block { width: 100%; margin-top: 14px; }

.action-bar { margin-top: 22px; text-align: center; }

/* 进度 */
.prog-wrap { margin-top: 18px; }
.prog-track { height: 8px; border-radius: 999px; background: var(--primary-light); overflow: hidden; }
.prog-bar {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), #b06ab3);
  transition: width 0.2s;
}
.prog-text { margin-top: 8px; font-size: 13px; color: var(--text-dim); text-align: center; }

/* 结果 */
.results { margin-top: 22px; border-top: 1px solid var(--border); padding-top: 18px; }
.result-stats {
  font-size: 15px; font-weight: 600; text-align: center;
  background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46;
  border-radius: 10px; padding: 12px; margin-bottom: 14px;
}
.result-actions { text-align: center; margin-bottom: 14px; }
.result-items {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px; max-height: 300px; overflow-y: auto;
}
.r-item { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fafafa; }
.r-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.r-item .r-meta { padding: 4px 6px; font-size: 11px; color: var(--text-dim); }
.r-item .r-meta a {
  display: inline-block; margin-top: 3px;
  color: #fff; background: var(--primary);
  padding: 2px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 600; text-decoration: none;
}
.r-item .r-meta a:hover { background: var(--primary-dark); }

/* ── 通用 section ── */
.section { padding: 44px 0 8px; }
.section h2 { font-size: 26px; font-weight: 800; text-align: center; margin-bottom: 26px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.mini-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px;
}
.mini-card h3 { font-size: 17px; margin-bottom: 8px; }
.mini-card p { font-size: 14px; color: var(--text-dim); }

/* 定价 */
.price-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px; position: relative;
}
.price-card-pro {
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-lg);
}
.ribbon {
  position: absolute; top: -14px; right: 20px;
  background: linear-gradient(120deg, #f7b733, #fc4a1a);
  color: #fff; font-size: 13px; font-weight: 700;
  padding: 4px 14px; border-radius: 999px;
}
.price-card h3 { font-size: 19px; margin-bottom: 10px; }
.price { font-size: 40px; font-weight: 800; margin-bottom: 16px; }
.price s { font-size: 20px; color: var(--text-dim); font-weight: 400; margin-right: 4px; }
.price small { font-size: 14px; color: var(--text-dim); font-weight: 400; }
.tick-list { list-style: none; }
.tick-list li { padding: 6px 0 6px 26px; position: relative; font-size: 14.5px; color: #374151; }
.tick-list li::before { content: "✓"; position: absolute; left: 2px; color: #10b981; font-weight: 700; }

.activate-box { margin-top: 16px; border-top: 1px dashed var(--border); padding-top: 14px; }
.activate-title { font-size: 13px; color: var(--text-dim); margin-bottom: 8px; }
.activate-row { display: flex; gap: 8px; }
.activate-row input { flex: 1; font-family: ui-monospace, Consolas, monospace; letter-spacing: 1px; }
.activate-msg { margin-top: 8px; font-size: 13px; min-height: 18px; }
.activate-msg.ok { color: #059669; }
.activate-msg.err { color: var(--danger); }

/* FAQ */
.faq details {
  background: var(--card); border-radius: 12px; box-shadow: var(--shadow);
  padding: 16px 20px; margin-bottom: 10px;
}
.faq summary { font-weight: 700; cursor: pointer; font-size: 15px; }
.faq p { margin-top: 10px; color: var(--text-dim); font-size: 14.5px; }

/* 页脚 */
.footer { text-align: center; padding: 40px 20px 32px; color: var(--text-dim); font-size: 14px; }
.footer-dim { font-size: 12px; margin-top: 4px; color: #9ca3af; }

/* Toast */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: rgba(23, 26, 35, 0.92); color: #fff;
  padding: 12px 22px; border-radius: 12px; font-size: 14px;
  box-shadow: var(--shadow-lg); z-index: 100; max-width: 90vw;
  animation: toast-in 0.25s ease;
}
.toast a { color: #a5b4fc; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (max-width: 560px) {
  .tool-card { padding: 18px 14px; }
  .hero { padding: 36px 0 20px; }
  .settings { grid-template-columns: 1fr; }
}
