/* 前台样式（与本地工具网页版一致，去掉统计模块） */
:root {
  --primary: #ff5000; --border: #e5e6eb; --card: #fff;
  --muted: #8a8f99; --text: #333; --ok: #00a870; --err: #d03050;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
  margin: 0;
  background: #f5f6f8; color: var(--text);
  font-size: 14px;
}
header {
  background: linear-gradient(135deg, #ff5000, #ff7d3c);
  color: #fff; padding: 18px 24px; text-align: center;
}
header h1 { margin: 0; font-size: 20px; }
header p { margin: 6px 0 0; opacity: .9; font-size: 13px; }
main { max-width: 1100px; margin: 20px auto; padding: 0 16px; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 8px; padding: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
textarea {
  width: 100%; height: 100px; border: 1px solid var(--border); border-radius: 6px;
  padding: 10px; font-size: 13px; font-family: Consolas, monospace; resize: vertical;
  -webkit-appearance: none; appearance: none;
}
.row { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.btn-primary, .btn-blue {
  border: none; border-radius: 6px; padding: 9px 22px; color: #fff;
  font-size: 14px; cursor: pointer; white-space: nowrap;
}
.btn-primary { background: #00a870; }
.btn-blue { background: #3a6df0; }
.btn-primary:hover, .btn-blue:hover { opacity: .88; }
.hint { font-size: 12px; color: var(--muted); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 14px; }
table { width: 100%; border-collapse: collapse; background: #fff; min-width: 640px; }
th {
  background: #f0f2f5; padding: 9px 10px; font-size: 13px; text-align: left;
  border-bottom: 1px solid var(--border);
}
td { padding: 8px 10px; font-size: 13px; border-bottom: 1px solid #f2f3f5; }
tbody tr:hover { background: #fafbfc; }
.url-cell { word-break: break-all; max-width: 240px; color: #666; font-size: 12px; }
.status-ok { color: var(--ok); }
.status-err { color: var(--err); }
.empty { color: var(--muted); text-align: center; padding: 26px 0; }
.spinner {
  display: inline-block; width: 13px; height: 13px; border: 2px solid #ddd;
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin .8s linear infinite; vertical-align: middle; margin-right: 5px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.pay-panel {
  margin-top: 14px; padding: 14px; border: 1px dashed var(--primary);
  border-radius: 8px; background: #fff8f3; text-align: center;
}
.pay-panel h3 { margin: 0 0 8px; font-size: 16px; }
.pay-panel b { color: var(--primary); font-size: 18px; }
.total-price { margin: 8px 0; font-size: 14px; }
.total-price b { font-size: 22px; }
.qr-img { width: 220px; height: 220px; max-width: 78vw; max-height: 78vw; margin: 8px auto; display: block; }
.qr-expire { margin: 8px 0 0; font-size: 13px; color: var(--err); }
.qr-expire b { font-size: 15px; }

/* ===== 人工客服模块 ===== */
.site-footer {
  background: #fff; border-top: 1px solid var(--border);
  margin-top: 30px; padding: 24px 16px 20px; text-align: center;
}
.service-box {
  max-width: 640px; margin: 0 auto; padding: 18px;
  background: #fafbfc; border: 1px solid var(--border); border-radius: 10px;
}
.service-box h3 {
  margin: 0 0 8px; font-size: 16px; color: var(--primary);
}
.service-tip { margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.service-contacts {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
}
.service-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; background: #fff; border: 1px solid var(--border);
  border-radius: 20px; font-size: 13px; color: var(--text);
  text-decoration: none; transition: all .2s;
}
.service-item:hover {
  border-color: var(--primary); color: var(--primary); transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255,80,0,.12);
}
.svc-icon { font-size: 16px; }
.service-note { margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.copyright { margin: 18px 0 0; font-size: 12px; color: var(--muted); }

/* ===== 手机端适配（≤768px） =====
   核心：结果表格改为「卡片式」竖排展示（不再横向滑动），
   每行结果 = 一张卡片，字段带标签上下排列，触控友好。 */
@media (max-width: 768px) {
  body { overflow-x: hidden; }
  header { padding: 14px 12px; }
  header h1 { font-size: 17px; }
  header p { font-size: 12px; line-height: 1.5; }
  main { margin: 12px auto; padding: 0 10px; }
  .card { padding: 12px; border-radius: 6px; }
  textarea { height: 90px; font-size: 14px; }
  .row { flex-direction: column; align-items: stretch; gap: 8px; }
  .row .btn-primary, .row .btn-blue { width: 100%; padding: 13px 0; font-size: 15px; }
  .hint { font-size: 12px; line-height: 1.6; }
  .pay-panel { padding: 12px 10px; }
  .pay-panel h3 { font-size: 15px; }
  .pay-panel .btn-blue, .pay-panel .btn-primary { width: 100%; padding: 12px 0; }
  .qr-img { width: 200px; height: 200px; }
  .service-box { padding: 14px 10px; }
  .service-item { font-size: 12px; padding: 7px 12px; }
  .service-note { font-size: 11px; }

  /* ---- 结果表格 → 卡片式 ---- */
  .table-wrap { overflow: visible; margin-top: 12px; }
  table { min-width: 0; width: 100%; }
  thead { display: none; }              /* 隐藏表头（字段名由标签替代） */
  table, tbody, tr, td { display: block; width: 100%; }
  tbody tr {
    border: 1px solid #e5e6eb; border-radius: 8px;
    margin-bottom: 10px; padding: 4px 10px;
    background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.04);
  }
  tbody tr:hover { background: #fff; }
  td {
    border: none; border-bottom: 1px dashed #f0f1f3;
    padding: 7px 2px; font-size: 13px; word-break: break-all;
  }
  td:last-child { border-bottom: none; }
  /* 字段标签 */
  td::before {
    display: inline-block; min-width: 52px; margin-right: 6px;
    color: var(--muted); font-size: 12px;
  }
  td:nth-child(1)::before { content: "链接"; }
  td:nth-child(2)::before { content: "宝贝ID"; }
  td:nth-child(3)::before { content: "标题"; }
  td:nth-child(4)::before { content: "店铺"; }
  td:nth-child(5)::before { content: "类目"; }
  td:nth-child(6)::before { content: "状态"; }
  .url-cell { max-width: none; font-size: 12px; }
  .empty { padding: 18px 0; }
}
