/* ============================================================
   scraper-components.css — GetAll 通用爬虫组件库

   所有爬虫页面统一引用此文件，确保视觉和交互一致性。
   每个爬虫只需在 :root 中覆盖 --primary 和 --accent 即可适配平台品牌色。

   使用方式：
     <link rel="stylesheet" href="/style.css">
     <link rel="stylesheet" href="/scraper-components.css">

   关联文档：doc/tiktok-scraper-ui-design.md
   版本：v1.0 | 日期：2026-06-15
   ============================================================ */

/* ============================================================
   1. CSS 变量扩展（在 style.css 的基础上追加）
   ============================================================ */
:root {
  /* ---- 品牌色（各爬虫页面覆盖这两个变量即可）---- */
  --primary: #4f6ef7;
  --primary-rgb: 79, 110, 247;
  --primary-hover: #3b5de7;
  --primary-light: #f0f4ff;
  --accent: #8b5cf6;
  --accent-light: #f5f0ff;

  /* ---- 功能色 ---- */
  --success: #27ae60;
  --success-light: #f0fdf4;
  --error: #e74c3c;
  --error-light: #fef2f2;
  --warning: #f39c12;
  --warning-light: #fff8e1;
  --info: #4f6ef7;
  --info-light: #f0f4ff;

  /* ---- Pro 付费标识 ---- */
  --pro-gold: #f0a500;
  --pro-gradient: linear-gradient(135deg, #f0a500, #ffd700);

  /* ---- 中性色 ---- */
  --bg: #f5f6fa;
  --surface: #ffffff;
  --text: #2c3e50;
  --text-secondary: #7f8c9b;
  --text-disabled: #bdc3c7;
  --border: #e2e6ed;
  --border-light: #f0f2f5;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.12);

  /* ---- 间距阶梯（4px grid）---- */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 12px;
  --sp-lg: 16px;
  --sp-xl: 24px;
  --sp-2xl: 32px;

  /* ---- 圆角 ---- */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 12px;
  --radius-pill: 16px;
  --radius-full: 9999px;

  /* ---- 字号层级 ---- */
  --fs-h1: 1.6rem;
  --fs-h2: 1.25rem;
  --fs-h3: 1.05rem;
  --fs-body: 0.92rem;
  --fs-caption: 0.82rem;
  --fs-badge: 0.78rem;
  --fs-mono: 0.85rem;

  /* ---- 过渡 ---- */
  --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1.0);
  --ease-in: cubic-bezier(0.4, 0.0, 1.0, 1.0);
  --dur-fast: 150ms;
  --dur-normal: 250ms;
  --dur-slow: 350ms;
}

/* ============================================================
   2. 通用爬虫页面布局骨架
   ============================================================ */

/* 页面容器 — 比 style.css 的 .container 更宽，适配卡片网格 */
.scraper-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px;
}

/* 页面头部 */
.scraper-header {
  text-align: center;
  margin-bottom: 24px;
}

.scraper-header h1 {
  font-size: var(--fs-h1);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.scraper-header .subtitle {
  color: var(--text-secondary);
  font-size: var(--fs-caption);
}

.scraper-header .back-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--primary);
  font-size: var(--fs-caption);
  text-decoration: none;
}

.scraper-header .back-link:hover {
  text-decoration: underline;
}

/* ============================================================
   3. 卡片组件 (.card)
   ============================================================ */

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  margin-bottom: var(--sp-xl);
  transition: box-shadow var(--dur-normal) var(--ease-out);
}

.card:hover {
  box-shadow: var(--shadow-hover);
}

.card-header {
  font-size: var(--fs-h3);
  font-weight: 600;
  margin-bottom: var(--sp-lg);
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

/* ============================================================
   4. 表单控件
   ============================================================ */

/* 输入行 */
.input-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.input-row input[type="text"],
.input-row input[type="search"],
.input-row input[type="url"] {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: var(--fs-body);
  outline: none;
  transition: border-color var(--dur-fast) var(--ease-out);
}

.input-row input[type="text"]:focus,
.input-row input[type="search"]:focus,
.input-row input[type="url"]:focus {
  border-color: var(--primary);
}

/* 数字输入 */
.input-row input[type="number"] {
  width: 80px;
  padding: 10px 8px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: var(--fs-body);
  text-align: center;
  outline: none;
  transition: border-color var(--dur-fast) var(--ease-out);
}

.input-row input[type="number"]:focus {
  border-color: var(--primary);
}

/* 文本域 */
textarea.scraper-textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: var(--fs-body);
  font-family: "SF Mono", "Cascadia Code", "Consolas", monospace;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color var(--dur-fast) var(--ease-out);
}

textarea.scraper-textarea:focus {
  border-color: var(--primary);
}

textarea.scraper-textarea::placeholder {
  color: var(--text-disabled);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* 下拉选择 */
select.scraper-select {
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: var(--fs-body);
  background: var(--surface);
  outline: none;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out);
}

select.scraper-select:focus {
  border-color: var(--primary);
}

/* 表单标签 */
.form-label {
  display: block;
  font-weight: 600;
  font-size: var(--fs-body);
  margin-bottom: 8px;
}

.form-label .required {
  color: var(--error);
  margin-left: 2px;
}

/* 校验状态 */
.input-valid {
  border-color: var(--success) !important;
}

.input-error {
  border-color: var(--error) !important;
}

.input-warning {
  border-color: var(--warning) !important;
}

.field-hint {
  margin-top: 6px;
  font-size: var(--fs-caption);
  color: var(--text-secondary);
}

.field-error {
  margin-top: 6px;
  font-size: var(--fs-caption);
  color: var(--error);
}

.field-warning {
  margin-top: 6px;
  font-size: var(--fs-caption);
  color: var(--warning);
}

/* ============================================================
   5. 按钮
   ============================================================ */

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: var(--fs-body);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-out),
              opacity var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--border-light);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover:not(:disabled) {
  background: var(--primary-light);
}

.btn-sm {
  padding: 6px 14px;
  font-size: var(--fs-caption);
  border-radius: 6px;
}

.btn-icon {
  padding: 8px;
  border-radius: 6px;
  font-size: var(--fs-body);
  line-height: 1;
}

.btn-danger {
  background: var(--error);
  color: #fff;
}

.btn-danger:hover:not(:disabled) {
  background: #c0392b;
}

/* ============================================================
   6. 采集模式选择器 (.mode-tabs)
   ============================================================ */

.mode-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: var(--sp-lg);
}

.mode-tab {
  padding: 10px 20px;
  font-size: var(--fs-body);
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color var(--dur-fast) var(--ease-out),
              border-color var(--dur-normal) var(--ease-out);
  position: relative;
}

.mode-tab:hover {
  color: var(--primary);
}

.mode-tab.active {
  color: var(--primary);
  font-weight: 600;
  border-bottom-color: var(--primary);
}

.mode-tab .tab-icon {
  margin-right: 6px;
}

.mode-content {
  animation: fadeSlideIn var(--dur-normal) var(--ease-out);
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   7. 批量链接输入框 (.batch-input)
   ============================================================ */

.batch-input-wrapper {
  position: relative;
}

.batch-count {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-top: var(--sp-sm);
  padding: 8px 14px;
  background: var(--success-light);
  border-radius: var(--radius-sm);
  font-size: var(--fs-caption);
  color: var(--success);
  font-weight: 500;
}

.batch-count.has-errors {
  background: var(--warning-light);
  color: var(--warning);
}

.batch-count .count-number {
  font-weight: 700;
  font-size: var(--fs-body);
}

/* ============================================================
   8. 标签式关键词输入器 (.tag-input)
   ============================================================ */

.tag-input-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 8px 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  min-height: 44px;
  cursor: text;
  transition: border-color var(--dur-fast) var(--ease-out);
}

.tag-input-container:focus-within {
  border-color: var(--primary);
}

.tag-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--primary-light);
  border: 1px solid var(--primary);
  border-radius: var(--radius-pill);
  font-size: var(--fs-caption);
  color: var(--primary);
  animation: tagIn var(--dur-normal) var(--ease-out);
}

@keyframes tagIn {
  from { transform: scale(0.6); opacity: 0; }
  to   { transform: scale(1.0); opacity: 1; }
}

.tag-item .tag-remove {
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  opacity: 0.6;
  transition: opacity var(--dur-fast);
}

.tag-item .tag-remove:hover {
  opacity: 1;
}

.tag-input-inner {
  flex: 1;
  min-width: 100px;
  border: none;
  outline: none;
  font-size: var(--fs-body);
  padding: 4px 0;
  background: transparent;
}

.tag-input-inner::placeholder {
  color: var(--text-disabled);
}

.tag-count {
  margin-top: var(--sp-sm);
  font-size: var(--fs-caption);
  color: var(--text-secondary);
}

/* ============================================================
   9. 字段选择器压缩态 (.field-summary)
   ============================================================ */

.field-summary {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 8px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--fs-caption);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}

.field-summary:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.field-summary .summary-count {
  font-weight: 600;
  color: var(--text);
}

.field-summary .summary-arrow {
  font-size: 12px;
  transition: transform var(--dur-normal) var(--ease-out);
}

.field-summary.open .summary-arrow {
  transform: rotate(180deg);
}

/* ============================================================
   10. 高级设置折叠面板 (.advanced-toggle)
   ============================================================ */

.advanced-toggle {
  margin-top: var(--sp-lg);
  border-top: 1px solid var(--border-light);
  padding-top: var(--sp-md);
}

.advanced-toggle-header {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  font-size: var(--fs-caption);
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
  transition: color var(--dur-fast);
}

.advanced-toggle-header:hover {
  color: var(--primary);
}

.advanced-toggle-header .toggle-arrow {
  display: inline-block;
  font-size: 12px;
  transition: transform var(--dur-normal) var(--ease-out);
}

.advanced-toggle.open .toggle-arrow {
  transform: rotate(90deg);
}

.advanced-toggle-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur-slow) var(--ease-out);
}

.advanced-toggle.open .advanced-toggle-body {
  max-height: 600px;
}

.advanced-toggle-inner {
  padding: var(--sp-lg) 0 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.advanced-toggle-inner .adv-field {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}

.advanced-toggle-inner .adv-field label {
  font-size: var(--fs-caption);
  color: var(--text-secondary);
  min-width: 120px;
  flex-shrink: 0;
}

.advanced-toggle-inner .adv-field input[type="number"] {
  width: 100px;
  padding: 8px 10px;
  border: 2px solid var(--border);
  border-radius: 6px;
  font-size: var(--fs-caption);
  text-align: center;
  outline: none;
}

.advanced-toggle-inner .adv-field input[type="number"]:focus {
  border-color: var(--primary);
}

.advanced-toggle-inner .adv-field select {
  padding: 8px 10px;
  border: 2px solid var(--border);
  border-radius: 6px;
  font-size: var(--fs-caption);
  outline: none;
}

.advanced-hint {
  font-size: var(--fs-caption);
  color: var(--text-disabled);
  font-style: italic;
  margin-bottom: var(--sp-sm);
}

/* ============================================================
   11. 状态栏 (.scraper-status-bar)
   ============================================================ */

.scraper-status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: var(--fs-caption);
  font-weight: 500;
  transition: all var(--dur-normal) var(--ease-out);
}

.scraper-status-bar.info {
  background: var(--info-light);
  border: 1px solid #d6e0ff;
  color: var(--text);
}

.scraper-status-bar.success {
  background: var(--success-light);
  border: 1px solid #bbf7d0;
  color: var(--success);
}

.scraper-status-bar.error {
  background: var(--error-light);
  border: 1px solid #fecaca;
  color: var(--error);
}

.scraper-status-bar.warning {
  background: var(--warning-light);
  border: 1px solid #fde68a;
  color: var(--warning);
}

.scraper-hidden {
  display: none !important;
}

/* 状态栏内的进度条 */
.status-progress {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  min-width: 80px;
}

.status-progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.5s var(--ease-out);
}

.status-progress-bar.near-complete {
  background: var(--success);
}

/* Spinner */
.scraper-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: scraper-spin 0.8s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}

@keyframes scraper-spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   12. 历史标签栏 (.history-bar)
   ============================================================ */

.history-bar {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 4px 0 12px 0;
  margin-bottom: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.history-bar::-webkit-scrollbar {
  height: 4px;
}

.history-bar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.history-tag {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 5px 16px;
  font-size: var(--fs-caption);
  cursor: pointer;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}

.history-tag:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.history-tag.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  font-weight: 600;
}

/* ============================================================
   13. 结果卡片网格 (.result-grid)
   ============================================================ */

.result-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-lg);
  flex-wrap: wrap;
  gap: var(--sp-md);
}

.result-section-title {
  font-size: var(--fs-h2);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.result-badge {
  background: var(--accent);
  color: #fff;
  padding: 2px 12px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-badge);
  font-weight: 600;
}

.result-toolbar {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  flex-wrap: wrap;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--sp-lg);
}

/* 结果卡片 */
.result-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}

.result-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.result-card .card-title {
  font-size: var(--fs-body);
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
  /* 最多两行截断 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.result-card .card-author {
  font-size: var(--fs-caption);
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.result-card .card-stats {
  display: flex;
  gap: var(--sp-md);
  flex-wrap: wrap;
  font-size: var(--fs-caption);
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.result-card .card-stats .stat {
  display: flex;
  align-items: center;
  gap: 3px;
}

.result-card .card-stats .stat.highlight {
  color: var(--primary);
  font-weight: 600;
}

.result-card .card-actions {
  display: flex;
  gap: var(--sp-sm);
  border-top: 1px solid var(--border-light);
  padding-top: var(--sp-sm);
  margin-top: var(--sp-sm);
}

.card-actions .btn {
  font-size: var(--fs-badge);
  padding: 5px 12px;
}

/* 表格视图（可选切换） */
.result-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.result-table th {
  background: var(--bg);
  padding: 10px 14px;
  font-size: var(--fs-caption);
  font-weight: 600;
  color: var(--text-secondary);
  text-align: left;
  border-bottom: 2px solid var(--border);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.result-table th:hover {
  color: var(--primary);
}

.result-table th .sort-arrow {
  font-size: 10px;
  margin-left: 3px;
}

.result-table td {
  padding: 10px 14px;
  font-size: var(--fs-caption);
  border-bottom: 1px solid var(--border-light);
}

.result-table tbody tr:hover {
  background: var(--primary-light);
}

.result-table .row-checkbox {
  width: 36px;
  text-align: center;
}

/* ============================================================
   14. 空状态 / 错误状态
   ============================================================ */

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: var(--sp-lg);
  opacity: 0.6;
}

.empty-state .empty-title {
  font-size: var(--fs-h3);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--sp-sm);
}

.empty-state .empty-desc {
  font-size: var(--fs-body);
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto var(--sp-lg) auto;
  line-height: 1.6;
}

.empty-state .empty-actions {
  display: flex;
  gap: var(--sp-sm);
  justify-content: center;
}

/* 错误状态 */
.error-state {
  text-align: center;
  padding: 32px 24px;
}

.error-state .error-icon {
  font-size: 2.5rem;
  margin-bottom: var(--sp-md);
}

.error-state .error-title {
  font-size: var(--fs-h3);
  font-weight: 600;
  color: var(--error);
  margin-bottom: var(--sp-sm);
}

.error-state .error-detail {
  font-size: var(--fs-caption);
  color: var(--text-secondary);
  margin-bottom: var(--sp-lg);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.error-state .error-detail.technical {
  font-family: "SF Mono", "Cascadia Code", "Consolas", monospace;
  font-size: 0.78rem;
  background: var(--bg);
  padding: var(--sp-sm) var(--sp-md);
  border-radius: var(--radius-sm);
  text-align: left;
  max-height: 120px;
  overflow-y: auto;
}

/* ============================================================
   15. Toast 通知
   ============================================================ */

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: 12px 18px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  font-size: var(--fs-caption);
  font-weight: 500;
  min-width: 260px;
  max-width: 420px;
  pointer-events: auto;
  animation: toastIn 300ms var(--ease-out);
  transition: opacity var(--dur-normal) var(--ease-in),
              transform var(--dur-normal) var(--ease-in);
}

.toast.removing {
  opacity: 0;
  transform: translateX(100%);
}

.toast-success {
  border-left: 4px solid var(--success);
}

.toast-error {
  border-left: 4px solid var(--error);
}

.toast-warning {
  border-left: 4px solid var(--warning);
}

.toast-info {
  border-left: 4px solid var(--info);
}

.toast .toast-close {
  margin-left: auto;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: var(--text-disabled);
  background: none;
  border: none;
  padding: 0;
  transition: color var(--dur-fast);
}

.toast .toast-close:hover {
  color: var(--text);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   16. 骨架屏 (Shimmer)
   ============================================================ */

.skeleton {
  background: linear-gradient(90deg,
    var(--border-light) 25%,
    var(--bg) 50%,
    var(--border-light) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  padding: 16px 18px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.skeleton-line {
  height: 14px;
  margin-bottom: 10px;
  background: linear-gradient(90deg,
    var(--border-light) 25%,
    var(--bg) 50%,
    var(--border-light) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}

.skeleton-line:last-child {
  margin-bottom: 0;
}

.skeleton-line.wide   { width: 100%; }
.skeleton-line.medium { width: 70%; }
.skeleton-line.narrow { width: 40%; }

/* ============================================================
   17. 抽屉面板 (Drawer)
   ============================================================ */

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 5000;
  opacity: 0;
  transition: opacity var(--dur-normal) var(--ease-out);
}

.drawer-overlay.open {
  opacity: 1;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 90vw;
  height: 100vh;
  background: var(--surface);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  z-index: 5001;
  transform: translateX(100%);
  transition: transform var(--dur-normal) var(--ease-out);
  display: flex;
  flex-direction: column;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-lg) var(--sp-xl);
  border-bottom: 1px solid var(--border);
}

.drawer-header h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
}

.drawer-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px;
}

.drawer-close:hover {
  color: var(--text);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-xl);
}

.drawer-footer {
  padding: var(--sp-lg) var(--sp-xl);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-sm);
}

/* ============================================================
   18. 弹窗 (Modal)
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 6000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn var(--dur-normal) var(--ease-out);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  width: 480px;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: modalIn var(--dur-normal) var(--ease-out);
}

@keyframes modalIn {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1.0); opacity: 1; }
}

.modal-header {
  padding: var(--sp-lg) var(--sp-xl);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
}

.modal-body {
  padding: var(--sp-xl);
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: var(--sp-lg) var(--sp-xl);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-sm);
}

/* ============================================================
   19. Pro 功能标识
   ============================================================ */

.pro-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  background: var(--pro-gradient);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: default;
}

.pro-locked {
  opacity: 0.6;
  cursor: not-allowed;
  position: relative;
}

.pro-locked::after {
  content: "🔒";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
}

/* ============================================================
   20. 分段选择器 (Segmented Control)
   ============================================================ */

.segmented-control {
  display: inline-flex;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 3px;
}

.segmented-option {
  padding: 7px 16px;
  font-size: var(--fs-caption);
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: none;
  border-radius: 7px;
  transition: all var(--dur-fast) var(--ease-out);
}

.segmented-option:hover {
  color: var(--text);
}

.segmented-option.active {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ============================================================
   21. 响应式
   ============================================================ */

@media (max-width: 768px) {
  .result-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .drawer {
    width: 100vw;
    max-width: 100vw;
  }

  .modal {
    width: 95vw;
  }

  .result-toolbar {
    flex-wrap: wrap;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .result-grid {
    grid-template-columns: 1fr;
  }

  .scraper-container {
    padding: 16px 12px;
  }

  .input-row {
    flex-direction: column;
    align-items: stretch;
  }

  .input-row input[type="number"] {
    width: 100%;
  }

  .btn {
    width: 100%;
  }

  .card {
    padding: 16px 18px;
  }

  .mode-tab {
    padding: 8px 12px;
    font-size: var(--fs-caption);
  }
}

/* ============================================================
   22. 两栏布局框架 (v2.0) — 所有爬虫页面共用
   ============================================================ */
.scraper-page { display:flex; height:100vh; overflow:hidden; }
.scraper-left { width:320px; flex-shrink:0; display:flex; flex-direction:column; height:100vh; background:#f8f9fa; }
.left-brand { flex-shrink:0; padding:20px 20px 16px; border-bottom:1px solid #e5e7eb; }
.left-brand .brand-slogan { font-size:16px; font-weight:700; color:#1a1a2e; }
.left-brand .brand-desc { font-size:13px; color:#6b7280; margin-top:4px; }
.left-scroll { flex:1; overflow-y:auto; padding:0 20px 20px; }
.left-params { padding-top:16px; }
.left-params label { font-size:13px; font-weight:600; color:#6b7280; display:block; margin-bottom:4px; }
.left-params input { width:100%; height:40px; border:1px solid #e5e7eb; border-radius:8px; padding:0 10px; font-size:14px; box-sizing:border-box; }
.left-params .btn-primary { width:100%; height:44px; background:#ff0050; color:#fff; border:none; border-radius:8px; font-size:15px; font-weight:600; cursor:pointer; margin-top:12px; }
.left-params .btn-primary:disabled { opacity:0.6; cursor:not-allowed; }
.left-divider { margin:20px 0; border-top:1px solid #e5e7eb; }
.left-history-title { font-size:13px; font-weight:600; color:#6b7280; margin-bottom:8px; }
.left-history-tags { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:12px; }
.left-history-tags .history-tag { font-size:12px; padding:3px 10px; background:#e5e7eb; border-radius:12px; cursor:pointer; color:#6b7280; white-space:nowrap; transition:background 0.15s; }
.left-history-tags .history-tag:hover { background:#d1d5db; }
.left-history-tags .history-tag.active { background:#ff0050; color:#fff; }
/* 右栏 */
.scraper-right { flex:1; min-width:0; overflow-y:auto; background:#fff; }
/* 信息操作栏 (sticky) */
.right-toolbar { position:sticky; top:0; z-index:10; padding:16px 24px; background:#fff; border-bottom:1px solid #f3f4f6; display:flex; justify-content:space-between; align-items:center; }
.right-toolbar .toolbar-info { font-size:15px; font-weight:600; }
.right-toolbar .toolbar-info .badge { background:#f3f4f6; padding:2px 10px; border-radius:12px; font-size:13px; font-weight:500; margin-left:6px; color:#6b7280; }
.right-toolbar .toolbar-actions { display:flex; gap:8px; }
.right-toolbar .btn-csv { height:32px; padding:0 14px; background:#ff0050; color:#fff; border:none; border-radius:8px; font-size:13px; font-weight:600; cursor:pointer; }
.right-toolbar .btn-json { height:32px; padding:0 14px; background:#fff; color:#6b7280; border:1px solid #e5e7eb; border-radius:8px; font-size:13px; font-weight:600; cursor:pointer; }
.right-toolbar .btn-csv:hover, .right-toolbar .btn-json:hover { opacity:0.85; }
/* 引导面板 */
.scraper-guide { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:340px; color:#9ca3af; }
.scraper-guide .guide-icon { font-size:48px; margin-bottom:16px; }
.scraper-guide .guide-text { font-size:14px; }
/* 卡片网格 */
.right-cards { padding:16px 24px; display:grid; gap:16px; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); }
.scraper-card { border:1px solid #e5e7eb; border-radius:12px; overflow:hidden; cursor:default; transition:box-shadow 0.15s; background:#fff; }
.scraper-card:hover { box-shadow:0 4px 12px rgba(0,0,0,0.08); }
.scraper-card .card-thumb { height:160px; background:#f3f4f6; display:flex; align-items:center; justify-content:center; font-size:32px; color:#d1d5db; }
.scraper-card .card-body { padding:12px; }
.scraper-card .card-desc { font-size:13px; line-height:1.5; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; color:#1a1a2e; cursor:pointer; }
.scraper-card .card-desc:hover { color:#ff0050; }
/* desc 弹窗 */
#descModal { position:fixed; inset:0; z-index:99999; display:flex; align-items:center; justify-content:center; }
.desc-modal-bg { position:absolute; inset:0; background:rgba(0,0,0,0.5); }
.desc-modal-card { position:relative; background:#fff; border-radius:12px; padding:24px 32px; max-width:520px; max-height:80vh; width:90%; box-shadow:0 8px 32px rgba(0,0,0,0.2); }
.desc-modal-text { font-size:14px; line-height:1.7; color:#1a1a2e; white-space:pre-wrap; overflow-y:auto; max-height:60vh; user-select:text; }
.desc-modal-close { position:absolute; top:12px; right:16px; background:none; border:none; font-size:22px; color:#9ca3af; cursor:pointer; }
.desc-modal-close:hover { color:#1a1a2e; }
.scraper-card .card-author { font-size:12px; color:#6b7280; margin-top:8px; }
.scraper-card .card-stats { font-size:12px; color:#9ca3af; margin-top:6px; display:flex; gap:12px; }
.scraper-card .card-stats-below { font-size:12px; color:#6b7280; margin-top:4px; display:flex; gap:12px; }
.scraper-card .card-actions { margin-top:10px; display:flex; gap:16px; font-size:11px; color:#9ca3af; }
.scraper-card .card-actions a, .scraper-card .card-actions span { color:#9ca3af; text-decoration:none; cursor:pointer; }
.scraper-card .card-actions a:hover, .scraper-card .card-actions span:hover { color:#ff0050; }
/* 空状态 */
.empty-state { text-align:center; padding:40px 20px; color:#9ca3af; }
.empty-state .empty-icon { font-size:36px; margin-bottom:12px; }
.empty-state .empty-title { font-size:15px; font-weight:600; color:#6b7280; margin-bottom:6px; }
.empty-state .empty-desc { font-size:13px; }
/* 状态栏覆写 */
.scraper-status-bar { margin-top:10px; }
/* ── 排序选择器 ── */
.toolbar-sort-select { height:32px; padding:0 8px; border:1px solid #e5e7eb; border-radius:8px; font-size:13px; color:#6b7280; background:#fff; cursor:pointer; outline:none; margin-right:8px; }
.toolbar-sort-select:focus { border-color:#ff0050; }
/* ── 视图切换按钮组 ── */
.view-toggle-group { display:inline-flex; border:1px solid #e5e7eb; border-radius:8px; overflow:hidden; margin-right:8px; }
.view-toggle-btn { width:32px; height:32px; border:none; background:#fff; color:#9ca3af; font-size:16px; cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0; transition:background .15s,color .15s; }
.view-toggle-btn:hover { background:#f3f4f6; }
.view-toggle-btn.active { background:#ff0050; color:#fff; }
.view-toggle-btn + .view-toggle-btn { border-left:1px solid #e5e7eb; }
/* ── 列表视图 ── */
.result-list-view { display:flex; flex-direction:column; gap:8px; padding:8px 24px; }
.result-list-view .list-row { display:flex; align-items:stretch; gap:16px; padding:10px 14px; border-bottom:1px solid #f3f4f6; cursor:pointer; transition:background .12s; height:120px; box-sizing:content-box; }
.result-list-view .list-row:hover { background:#f3f4f6; }
.result-list-view .list-col-thumb { width:90px; flex-shrink:0; height:100%; border-radius:6px; overflow:hidden; background:#f3f4f6; display:flex; align-items:center; justify-content:center; font-size:20px; color:#d1d5db; }
.result-list-view .list-col-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.result-list-view .list-col-stats { width:90px; flex-shrink:0; display:flex; flex-direction:column; justify-content:center; font-size:12px; color:#4b5563; gap:2px; line-height:1.3; }
.result-list-view .list-col-stats .list-date { font-size:11px; color:#9ca3af; }
.result-list-view .list-col-desc { flex:1; min-width:0; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; font-size:13px; color:#1a1a2e; line-height:1.5; align-self:center; }
/* 已删除 .list-col-tags — desc+hashtags 合并到 list-col-desc */
.result-list-view .list-col-author { width:140px; flex-shrink:0; display:flex; align-items:center; gap:8px; }
.result-list-view .list-col-author img { width:20px; height:20px; border-radius:50%; object-fit:cover; }
.result-list-view .list-col-author .list-author-fallback { width:20px; height:20px; border-radius:50%; background:#f3f4f6; display:flex; align-items:center; justify-content:center; font-size:10px; }
.result-list-view .list-col-author .list-author-name { font-size:12px; color:#374151; font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* 日期 overlay（卡片图片右下角） */
.card-thumb { position:relative; }
.card-date-overlay { position:absolute; bottom:6px; right:6px; background:rgba(0,0,0,0.55); color:#fff; font-size:11px; font-weight:400; padding:2px 8px; border-radius:4px; line-height:1.4; z-index:2; pointer-events:none; }

/* ═══════════════════════════════════════════════════════════════
   22b. 视频卡片组件 — 所有 TikTok 爬虫共用
   ============================================================ */

/* ── 缩略图 3:4 ── */
.video-card { cursor:pointer; }
.video-card .card-thumb { position:relative; overflow:hidden; padding-top:133.33%; }
.video-card .card-thumb-img {
  position:absolute; top:0; left:0; width:100%; height:100%;
  object-fit:cover; display:block; transition: opacity 0.3s ease;
}
.video-card .card-thumb-img.loading { opacity: 0; }
.card-thumb-fallback {
  position:absolute; top:0; left:0; width:100%; height:100%;
  display:flex; align-items:center; justify-content:center;
  font-size:24px; color:#d1d5db; background:#f3f4f6;
}

/* ── 图片 overlay ── */
.card-likes-overlay {
  position:absolute; bottom:6px; left:6px;
  background:rgba(0,0,0,0.55); color:#fff;
  font-size:11px; font-weight:500; padding:2px 8px; border-radius:4px;
  line-height:1.4; z-index:2; pointer-events:none;
}
.card-play-overlay {
  position:absolute; top:6px; right:6px;
  background:rgba(0,0,0,0.50); color:#ddd;
  font-size:10px; font-weight:400; padding:2px 8px; border-radius:4px;
  line-height:1.4; z-index:2; pointer-events:none;
}

/* ── 作者行 ── */
.card-author-row { display:flex; align-items:center; gap:6px; margin-top:8px; }
.card-avatar-img { width:20px; height:20px; border-radius:50%; object-fit:cover; flex-shrink:0; }
.card-avatar-fallback {
  width:20px; height:20px; border-radius:50%; background:#f3f4f6;
  display:inline-flex; align-items:center; justify-content:center;
  font-size:12px; flex-shrink:0;
}
.author-name { font-size:12px; color:#374151; font-weight:500; }
.card-hashtags { font-size:11px; color:#00f2ea; word-break:break-all; }
.card-badge { display:inline-block; padding:1px 6px; background:#fef3c7; color:#92400e; border-radius:4px; font-size:11px; font-weight:500; }

/* ── 紧凑卡片（6 列网格）— 通过 #resultGrid.compact-cards 启用 ── */
#resultGrid.compact-cards .scraper-card .card-desc { -webkit-line-clamp: 1; font-size: 11px; }
#resultGrid.compact-cards .scraper-card .card-body { padding: 8px 10px; }
#resultGrid.compact-cards .scraper-card .card-stats { font-size: 10px; gap: 4px; margin-top: 4px; }
#resultGrid.compact-cards .scraper-card .card-actions { gap: 6px; font-size: 10px; margin-top: 6px; flex-wrap: wrap; }
#resultGrid.compact-cards .author-name { font-size: 11px !important; }
#resultGrid.compact-cards .card-author-row { margin-top: 4px; gap: 4px; }
#resultGrid.compact-cards .card-avatar-img, #resultGrid.compact-cards .card-avatar-fallback { width: 16px; height: 16px; }

/* ── 卡片 staggered 入场动画 ── */
.scraper-card.stagger-in { opacity: 0; transform: translateY(18px) scale(0.95); }
.scraper-card.stagger-in.visible { animation: cardPopIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1.0) forwards; }
@keyframes cardPopIn { to { opacity: 1; transform: translateY(0) scale(1); } }

/* ── 骨架屏 ── */
.skeleton-thumb {
  width: 100%; padding-top: 133.33%;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-line {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}
.skeleton-line.medium { width: 80%; }
.skeleton-line.narrow { width: 50%; }

/* 响应式 */
@media (max-width:860px) {
  .scraper-page { flex-direction:column; height:auto; overflow:visible; }
  .scraper-left { width:100%; height:auto; }
  .scraper-right { overflow-y:visible; }
  .right-cards { grid-template-columns:repeat(auto-fill, minmax(160px, 1fr)); }
}

/* ============================================================
   23. 任务列表（左侧栏采集记录） — renderTaskList() 使用
   ============================================================ */

/* 任务条目容器 */
.scraper-record-item {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 2px;
  cursor: default;
  transition: background var(--dur-fast) var(--ease-out);
  position: relative;
}

.scraper-record-item:hover {
  background: #eef0f2;
}

.scraper-record-item[data-action="view"] {
  cursor: pointer;
}

/* 第 1 行：圆点 + 名称（最多两行截断） */
.record-header {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.record-dot {
  font-size: 10px;
  flex-shrink: 0;
  line-height: 1.7;
}

.record-name {
  flex: 1;
  min-width: 0;
  font-size: var(--fs-caption);
  color: var(--text);
  line-height: 1.5;
  max-height: 3em;  /* 最多两行 */
  overflow: hidden;
  word-break: break-word;
}

/* 第 2 行：时间 · 结果摘要 */
.record-footer {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 4px;
  margin-left: 22px;  /* 对齐到名称（dot 宽度 + gap） */
  font-size: 11px;
  color: #9ca3af;
}

.record-time {
  flex-shrink: 0;
  color: #9ca3af;
  white-space: nowrap;
}

.record-meta {
  flex-shrink: 0;
  color: #9ca3af;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-sep {
  margin: 0 4px;
  color: #d1d5db;
  flex-shrink: 0;
}

/* ── 三点菜单 ── */
.record-menu-anchor {
  position: absolute;
  top: 6px;
  right: 4px;
}

.record-menu-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 16px;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur-fast), color var(--dur-fast);
}

.record-menu-btn:hover {
  background: #e5e7eb;
  color: var(--text);
}

.record-menu-drop {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 20;
  overflow: hidden;
  margin-top: 2px;
}

.record-menu-drop.open {
  display: block;
}

.record-menu-item {
  padding: 8px 14px;
  font-size: var(--fs-caption);
  color: var(--text);
  cursor: pointer;
  transition: background var(--dur-fast);
  white-space: nowrap;
}

.record-menu-item:hover {
  background: var(--primary-light);
}

/* ── 加载指示器 ── */
.record-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 0;
}

/* ── 空状态 ── */
.scraper-records-empty {
  text-align: center;
  padding: 24px 12px;
  color: #9ca3af;
  font-size: var(--fs-caption);
}

/* ============================================================
   24. 左侧参数区（所有 initPage 爬虫共用）
   ============================================================ */

/* ── 输入框聚焦效果 ── */
.left-params input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.left-params input {
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* ── 按钮五态 ── */
.left-params .btn-primary {
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.left-params .btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.25);
}
.left-params .btn-primary:active:not(:disabled) {
  transform: scale(0.97);
  filter: brightness(0.9);
}
.left-params .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── 按钮 spinner ── */
.left-params .btn-primary .btn-spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
.left-params .btn-primary.loading .btn-spinner { display: inline-block; }
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* ── 状态栏过渡 ── */
.scraper-status-bar {
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.25s ease, background 1s ease;
}
.scraper-status-bar:not(.scraper-hidden) {
  max-height: 60px; opacity: 1;
}

/* ── 最近搜索标题 ── */
.section-label {
  font-size: 11px; font-weight: 600; color: #9ca3af;
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 8px;
}

/* ── 紧凑 6 列卡片网格（视频搜索 / 标签页用）── */
.right-cards.compact-6col {
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  padding: 16px 20px;
}
@media (max-width: 1050px) { .right-cards.compact-6col { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 750px)  { .right-cards.compact-6col { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 500px)  { .right-cards.compact-6col { grid-template-columns: repeat(2, 1fr); } }
