/* 吐槽码系统 - 共享样式（浅色主题） */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --danger: #dc2626;
  --ok: #16a34a;
  --warn: #d97706;
}
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* ===== 通用组件 ===== */
.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  border: none; border-radius: 8px; padding: 9px 18px;
  font-size: 14px; font-weight: 500; transition: 0.15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger-ghost { background: #fff; color: var(--danger); border: 1px solid var(--border); }
.btn-danger-ghost:hover { border-color: var(--danger); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; line-height: 1.6;
}
.tag-pending  { background: #fef3c7; color: #92400e; }
.tag-processing { background: #dbeafe; color: #1e40af; }
.tag-done     { background: #dcfce7; color: #166534; }
.tag-cat      { background: #f1f5f9; color: #475569; }

.modal-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.45);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px;
}
.modal {
  background: #fff; border-radius: 14px; padding: 24px;
  width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,.18);
}
.modal h3 { margin-bottom: 14px; font-size: 17px; }
.modal .close-row { display: flex; gap: 10px; margin-top: 18px; justify-content: flex-end; }

.toast {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  background: #1e293b; color: #fff; padding: 10px 20px; border-radius: 10px;
  font-size: 14px; z-index: 200; box-shadow: 0 8px 24px rgba(0,0,0,.25);
  animation: toastIn .25s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -8px); } }

/* ===== 扫码吐槽页（移动端） ===== */
.scan-body { min-height: 100vh; background: linear-gradient(180deg, #dbeafe 0%, #f1f5f9 240px); }
.scan-wrap { max-width: 480px; margin: 0 auto; padding: 40px 18px 60px; }
.scan-badge {
  width: 64px; height: 64px; border-radius: 18px; background: var(--primary);
  color: #fff; font-size: 30px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px; box-shadow: 0 8px 20px rgba(37,99,235,.35);
}
.scan-unit { margin-bottom: 24px; }
.scan-unit h1 { font-size: 22px; margin-bottom: 4px; }
.scan-unit p { color: var(--muted); font-size: 14px; }
.scan-card {
  background: var(--card); border-radius: 16px; padding: 22px;
  box-shadow: 0 4px 24px rgba(15,23,42,.06);
}
.scan-card label { display: block; font-size: 14px; font-weight: 600; margin: 18px 0 8px; }
.scan-card label:first-child { margin-top: 0; }
.scan-card label span { color: var(--danger); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: #fff; font-size: 13px; color: var(--muted); transition: .15s;
}
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
textarea#content {
  width: 100%; min-height: 140px; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px; font-size: 15px; resize: vertical; outline: none;
}
textarea#content:focus { border-color: var(--primary); }
.counter { text-align: right; font-size: 12px; color: var(--muted); margin-top: 4px; }
.counter.over { color: var(--danger); }
.anon-tip {
  margin-top: 16px; font-size: 12px; color: var(--muted); text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.scan-success { text-align: center; padding: 30px 10px; }
.scan-success .big { font-size: 52px; margin-bottom: 12px; }
.scan-success h2 { font-size: 20px; margin-bottom: 8px; }
.scan-success p { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.scan-error { text-align: center; padding: 60px 10px; color: var(--muted); }
.scan-error .big { font-size: 48px; margin-bottom: 12px; }

/* ===== 落地页 ===== */
.home-wrap { max-width: 760px; margin: 0 auto; padding: 70px 20px; }
.home-wrap h1 { font-size: 30px; margin-bottom: 10px; }
.home-wrap .sub { color: var(--muted); margin-bottom: 40px; font-size: 15px; }
.home-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.home-card {
  background: var(--card); border-radius: 14px; padding: 24px;
  box-shadow: 0 4px 20px rgba(15,23,42,.06);
}
.home-card .ico { font-size: 30px; margin-bottom: 10px; }
.home-card h2 { font-size: 17px; margin-bottom: 6px; }
.home-card p { color: var(--muted); font-size: 13px; margin-bottom: 16px; line-height: 1.7; }
.demo-list { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.demo-list a { display: block; font-size: 13px; color: var(--primary); text-decoration: none; padding: 4px 0; }
@media (max-width: 640px) { .home-cards { grid-template-columns: 1fr; } }
