/* ===== 步骤条 ===== */
.steps {
  display: flex; justify-content: center; gap: 8px; margin-bottom: 12px;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 16px;
  border-radius: 8px;
  border: 1px solid rgba(102,126,234,0.1);
  box-shadow: 0 1px 4px rgba(102,126,234,0.06);
}
.step { display: flex; align-items: center; gap: 5px; }
.step-num {
  width: 20px; height: 20px; border-radius: 50%;
  background: #e8eef8; color: #999;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
}
.step.active .step-num { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; box-shadow: 0 1px 4px rgba(102,126,234,0.4); }
.step.done .step-num { background: linear-gradient(135deg, #11998e, #38ef7d); color: #fff; }
.step-label { font-size: 12px; color: #999; }
.step.active .step-label { color: #667eea; font-weight: 600; }
.step-line { width: 24px; height: 1px; background: #e0e8f8; }
.step.done + .step-line, .step.active + .step-line { background: #667eea; }

/* ===== 标签页导航 ===== */
.tab-nav {
  display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap;
}
.tab-btn {
  padding: 8px 16px; border: 1px solid #e0e8f8;
  background: #f8faff; border-radius: 8px;
  color: #666; font-size: 13px; cursor: pointer; transition: all 0.3s;
}
.tab-btn:hover { border-color: #667eea; color: #667eea; }
.tab-btn.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-color: transparent; color: #fff;
  box-shadow: 0 2px 8px rgba(102,126,234,0.3);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== 输入区域 ===== */
textarea {
  width: 100%; height: 120px;
  background: #fafbff;
  border: 1px solid #e0e8f8;
  border-radius: 10px; padding: 14px;
  color: #333; font-size: 13px; line-height: 1.7;
  resize: vertical; outline: none;
  transition: all 0.3s;
}
textarea:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
  background: #ffffff;
}
textarea::placeholder { color: #bbb; }
.input-row { display: flex; gap: 8px; margin-top: 8px; }
.input-row input {
  flex: 1; height: 36px;
  background: #fafbff;
  border: 1px solid #e0e8f8;
  border-radius: 8px; padding: 0 12px;
  color: #333; font-size: 13px; outline: none;
  transition: border-color 0.2s;
}
.input-row input:focus { border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,0.1); }
.btn {
  height: 36px; padding: 0 16px;
  border: none; border-radius: 8px;
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.3s;
}
.btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  box-shadow: 0 2px 8px rgba(102,126,234,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(102,126,234,0.4); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-secondary { background: #f0f4ff; color: #667eea; border: 1px solid #e0e8f8; }
.btn-secondary:hover { background: #e8eef8; color: #764ba2; transform: translateY(-1px); }
.btn-danger { background: #fff0f0; color: #e05252; border: 1px solid #ffd0d0; }
.btn-danger:hover { background: #ffe0e0; }
.btn-success { background: linear-gradient(135deg, #11998e, #38ef7d); color: #fff; }
.btn-fail { background: linear-gradient(135deg, #e05252, #ff6b6b); color: #fff; border: none; }
.btn-fail:hover { background: linear-gradient(135deg, #c0392b, #e05252); transform: translateY(-1px); }
.btn-fail:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-fail-inline {
  height: 26px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 13px;
  margin-left: 8px;
  vertical-align: middle;
  box-shadow: 0 2px 8px rgba(224, 82, 82, 0.3);
}
.btn-fail-inline:hover {
  box-shadow: 0 4px 12px rgba(224, 82, 82, 0.4);
}
.btn-sm { height: 28px; padding: 0 12px; font-size: 11px; }

/* ===== 字段选择器 ===== */
.field-section { margin-bottom: 16px; }
.field-category {
  font-size: 12px; font-weight: 600; color: #667eea;
  margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.field-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px;
}
.field-item {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 8px;
  background: #f8faff;
  border: 1px solid #e0e8f8;
  font-size: 12px; cursor: pointer; transition: all 0.25s;
  color: #555;
}
.field-item:hover {
  border-color: #667eea;
  background: rgba(102,126,234,0.04);
  transform: translateX(2px);
}
.field-item.selected {
  background: rgba(102,126,234,0.08);
  border-color: #667eea; color: #4a5fcf;
  box-shadow: 0 1px 4px rgba(102,126,234,0.1);
}
.field-item input { accent-color: #667eea; display: none; }
.field-item .field-desc { color: #aaa; font-size: 10px; }
.field-item.selected .field-desc { color: #667eea; }
.detail-cost-note {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #dbe3ee;
  border-left: 3px solid #4f78a8;
  border-radius: 8px;
  background: #f7f9fc;
  color: #425466;
  font-size: 11px;
  line-height: 1.55;
  transition: background-color .2s ease, border-color .2s ease;
}
.detail-cost-note strong { color: #24364b; font-size: 12px; }
.detail-cost-note span { display: block; }
.detail-cost-note small { color: #738196; font-size: 10px; }
.detail-cost-note.is-enabled { background: #fff8e8; border-color: #d7a63f; }
.detail-capture-card {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid #d9e1eb;
  border-left: 3px solid #5a7698;
  border-radius: 9px;
  background: #f8fafc;
  color: #405064;
  font-size: 11px;
  line-height: 1.55;
  transition: background-color .2s ease, border-color .2s ease;
}
.detail-capture-card.is-enabled { background: #fff8e8; border-color: #d2a23d; }
.detail-capture-toggle { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.detail-capture-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.detail-capture-toggle strong { display: block; color: #26384d; font-size: 12px; }
.detail-capture-toggle small { display: block; margin-top: 1px; color: #77869a; font-size: 10px; }
.detail-capture-switch { width: 30px; height: 17px; flex: 0 0 auto; border-radius: 10px; background: #b8c2ce; position: relative; transition: background-color .2s ease; }
.detail-capture-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 11px; height: 11px; border-radius: 50%; background: #fff; transition: transform .2s ease; }
.detail-capture-toggle input:checked + .detail-capture-switch { background: #4f78a8; }
.detail-capture-toggle input:checked + .detail-capture-switch::after { transform: translateX(13px); }
.detail-capture-card p { margin: 9px 0 6px; color: #526276; }
.detail-capture-card code { color: #315b82; font-size: 10px; }
.detail-capture-cost { padding-top: 6px; border-top: 1px solid #e1e6ed; color: #6d7887; }
.scrape-export-history { margin-top: 18px; }
.scrape-export-history > div:last-child { max-height: none; overflow: visible !important; }
.scrape-export-history table { min-width: 0 !important; table-layout: fixed; }
.scrape-export-history th,
.scrape-export-history td { overflow-wrap: anywhere; }

/* ===== 并发滑块 ===== */
.slider-row { display: flex; align-items: center; gap: 16px; }
.slider-row input[type="range"] {
  flex: 1; height: 6px; border-radius: 3px;
  background: #e0e8f8;
  -webkit-appearance: none;
}
.slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 50%; cursor: pointer;
  box-shadow: 0 2px 8px rgba(102,126,234,0.5);
  border: 2px solid #fff;
  transition: transform 0.2s;
}
.slider-row input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}
.slider-value {
  min-width: 80px; text-align: center;
  padding: 6px 12px; border-radius: 8px;
  background: rgba(102,126,234,0.1); color: #667eea; font-size: 14px; font-weight: 600;
}

/* ===== 价格带步长滑块 ===== */
.step-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.step-slider-row input[type="range"] {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}
.step-slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(102,126,234,0.5);
  border: 3px solid #fff;
  transition: transform 0.15s;
}
.step-slider-row input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}
.step-label {
  font-size: 13px;
  font-weight: 600;
  color: #667eea;
  background: rgba(102,126,234,0.1);
  border-radius: 6px;
  padding: 3px 10px;
  min-width: 48px;
  text-align: center;
  white-space: nowrap;
}
.step-tick-row {
  display: flex;
  justify-content: space-between;
  padding: 0 4px;
  font-size: 10px;
  color: #aaa;
  margin-bottom: 10px;
}
/* 价格区间列表网格（小标签样式） */
.tier-tags-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}
.tier-tag {
  font-size: 10px;
  color: #667eea;
  background: rgba(102,126,234,0.06);
  border: 1px solid rgba(102,126,234,0.15);
  border-radius: 4px;
  padding: 2px 6px;
  user-select: none;
}

/* ===== 导出格式选择 ===== */
.export-options { display: flex; gap: 8px; flex-wrap: wrap; }
.export-opt {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px;
  background: #f8faff;
  border: 1px solid #e0e8f8;
  font-size: 12px; cursor: pointer; transition: all 0.2s;
}
.export-opt:hover { border-color: #667eea; }
.export-opt.selected {
  background: rgba(102,126,234,0.08);
  border-color: #667eea; color: #4a5fcf;
}
.export-opt input { accent-color: #667eea; }

/* ===== 历史记录 ===== */
.history-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; border-radius: 10px;
  background: #f8faff;
  border: 1px solid #e8eef8;
  margin-bottom: 8px; font-size: 12px;
  transition: all 0.2s;
}
.history-item:hover { border-color: #667eea; box-shadow: 0 2px 8px rgba(102,126,234,0.08); }
.history-info .history-title { color: #333; font-weight: 500; }
.history-info .history-meta { color: #999; margin-top: 2px; }
.history-actions { display: flex; gap: 6px; }
.history-actions button { height: 26px; padding: 0 10px; font-size: 11px; }

/* ===== 结果面板 ===== */
.results-panel { grid-column: 1 / -1; }
.result-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap; gap: 12px;
}
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: #fafbff; padding: 6px 12px;
  border-radius: 10px; border: 1px solid #e0e8f8;
}
.search-box input {
  background: none; border: none; color: #333; font-size: 13px; outline: none; width: 150px;
}
.filter-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-tag {
  padding: 4px 10px; border-radius: 12px; font-size: 11px;
  background: #f0f4ff; color: #888; cursor: pointer; transition: all 0.2s;
}
.filter-tag:hover, .filter-tag.active {
  background: rgba(102,126,234,0.12); color: #667eea;
}

/* ===== 环形进度 ===== */
.progress-ring-container {
  display: flex; align-items: center; gap: 20px;
  padding: 16px; background: #f8faff; border-radius: 12px; margin-bottom: 16px;
  border: 1px solid #e8eef8;
}
.progress-ring { position: relative; width: 100px; height: 100px; }
.progress-ring svg { transform: rotate(-90deg); }
.progress-ring circle { fill: none; stroke-width: 8; }
.progress-ring .bg { stroke: #e0e8f8; }
.progress-ring .fg {
  stroke: url(#progressGradient);
  stroke-dasharray: 264; stroke-dashoffset: 264;
  transition: stroke-dashoffset 0.5s;
}
.progress-ring .text {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 20px; font-weight: 700; color: #333;
}
.progress-info { flex: 1; }
.progress-title { font-size: 14px; font-weight: 600; color: #333; margin-bottom: 4px; }
.progress-stats { font-size: 12px; color: #888; }
.progress-stats span { margin-right: 16px; }
.progress-stats .ok { color: #11998e; }
.progress-stats .fail { color: #e05252; }

/* ===== 进度列表 ===== */
.progress-list { max-height: 280px; overflow-y: auto; }
.progress-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid #f0f4ff;
}
.progress-item:last-child { border-bottom: none; }
.progress-item .status {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; flex-shrink: 0;
}
.progress-item .status.pending { background: #f0f4ff; color: #999; }
.progress-item .status.running { background: #f59e0b; color: #fff; animation: pulse 1s infinite; }
.progress-item .status.success { background: #11998e; color: #fff; }
.progress-item .status.error { background: #e05252; color: #fff; }
.progress-item .info { flex: 1; min-width: 0; }
.progress-item .title { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #444; }
.progress-item .url { font-size: 11px; color: #aaa; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
@keyframes aiToastIn { 0% { opacity: 0; transform: translateX(-50%) translateY(-20px); } 100% { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes aiToastOut { 0% { opacity: 1; transform: translateX(-50%) translateY(0); } 100% { opacity: 0; transform: translateX(-50%) translateY(-20px); } }

/* ===== 批量操作栏 ===== */
.batch-bar {
  display: none; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 10px;
  background: rgba(102,126,234,0.06);
  border: 1px solid rgba(102,126,234,0.15);
  margin-bottom: 12px;
}
.batch-bar.show { display: flex; }
.batch-bar span { font-size: 13px; color: #333; }
.batch-bar .batch-count { font-weight: 700; color: #667eea; }
.batch-bar button { height: 30px; padding: 0 14px; font-size: 12px; }

/* ===== 结果卡片 ===== */
.result-card {
  background: #fafbff;
  border: 1px solid #e8eef8;
  border-radius: 12px; padding: 16px; margin-bottom: 10px;
  transition: all 0.3s;
}
.result-card:hover { border-color: rgba(102,126,234,0.3); box-shadow: 0 2px 12px rgba(102,126,234,0.08); }
.result-card.selected { border-color: #667eea; background: rgba(102,126,234,0.04); }
.result-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.result-check { width: 18px; height: 18px; accent-color: #667eea; cursor: pointer; }
.result-title {
  font-size: 14px; font-weight: 500; color: #333;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1;
}
.result-price { font-size: 18px; font-weight: 700; color: #e05252; }
.result-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: #999; margin-top: 8px; }
.result-change { font-size: 11px; padding: 2px 6px; border-radius: 4px; }
.change-up { background: rgba(17,153,142,0.1); color: #11998e; }
.change-down { background: rgba(224,82,82,0.1); color: #e05252; }

/* ===== 底部操作 ===== */
.action-bar {
  display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap;
}
.btn-action {
  flex: 1; min-width: 120px; height: 48px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff; font-size: 15px; font-weight: 700;
  border-radius: 12px; border: none; cursor: pointer; transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(102,126,234,0.35);
  letter-spacing: 0.5px;
}
.btn-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(102,126,234,0.5);
  filter: brightness(1.05);
}
.btn-action:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; filter: none; }
.btn-action.secondary {
  background: linear-gradient(135deg, #11998e, #38ef7d);
  box-shadow: 0 4px 16px rgba(17,153,142,0.3);
}
.btn-action.secondary:hover { box-shadow: 0 8px 28px rgba(17,153,142,0.45); }

/* ===== 模态框 ===== */
.modal-overlay {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.4); z-index: 1000;
  justify-content: center; align-items: center;
}
.modal-overlay.show { display: flex; }
.modal-content {
  background: #ffffff;
  border-radius: 16px; padding: 24px;
  max-width: 800px; max-height: 80vh; overflow-y: auto;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.modal-header h3 { color: #1a1a2e; font-size: 16px; }
.modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: #f0f4ff; border: none;
  color: #666; font-size: 18px; cursor: pointer; transition: all 0.2s;
}
.modal-close:hover { background: #ffe0e0; color: #e05252; }

/* JSON预览 */
.json-preview {
  background: #fafbff; color: #333;
  padding: 14px; border-radius: 10px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12px; line-height: 1.5;
  overflow-x: auto; white-space: pre-wrap;
  max-height: 50vh; overflow-y: auto;
  border: 1px solid #e0e8f8;
}
.json-key { color: #667eea; }
.json-string { color: #11998e; }
.json-number { color: #764ba2; }
.json-boolean { color: #e05252; }

/* 文件上传 */
.file-upload {
  border: 2px dashed #d0d8f0;
  border-radius: 12px; padding: 40px;
  text-align: center; cursor: pointer; transition: all 0.3s;
  background: #f8faff;
}
.file-upload:hover {
  border-color: #667eea;
  background: rgba(102,126,234,0.04);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(102,126,234,0.1);
}
.file-upload input { display: none; }
.file-upload-icon { font-size: 40px; margin-bottom: 12px; }
.file-upload-text { font-size: 13px; color: #888; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  padding: 14px 24px; background: #ffffff;
  color: #333; border-radius: 12px; z-index: 2000;
  opacity: 0; transform: translateY(20px) scale(0.95);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid #e0e8f8;
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
  font-weight: 500;
  min-width: 200px;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateY(0) scale(1); }
.toast.success { background: #11998e; border-color: #11998e; color: #fff; }
.toast.error { background: #e05252; border-color: #e05252; color: #fff; }

/* 提示框 */
.tips {
  background: rgba(245,158,11,0.06); border: 1px solid rgba(245,158,11,0.15);
  border-radius: 10px; padding: 10px 14px;
  font-size: 13px; color: #92660a;
  display: flex; align-items: flex-start; gap: 8px;
  margin-top: 12px;
  transition: all 0.3s;
}
.tips:hover {
  background: rgba(245,158,11,0.1);
  border-color: rgba(245,158,11,0.25);
  transform: translateX(2px);
}
.tips-icon { font-size: 14px; flex-shrink: 0; }

/* ===== 抖音板块样式（内联样式为主，仅保留必要的全局规则） ===== */
