/* 悬赏星球 · 用户端样式 */

:root {
  --primary: #ff3b5c;
  --primary-deep: #ff2d55;
  --orange: #ff6a3d;
  --grad: linear-gradient(135deg, #ff6a3d, #ff2d55);
  --gold: #ff9f1a;
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #20242b;
  --muted: #8a8f99;
  --line: #eef0f3;
  --ok: #16a34a;
  --warn: #f59e0b;
  --err: #e5484d;
  --info: #3b82f6;
  --radius: 16px;
  --shadow: 0 2px 10px rgba(23, 26, 33, 0.05);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #eceff3;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
b { font-weight: 600; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
}
@media (min-width: 520px) {
  #app { box-shadow: 0 18px 60px rgba(23, 26, 33, 0.12); }
}

/* ---------------- 顶栏 / 底栏 ---------------- */

#topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--grad);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#topbar:empty { display: none; }
.brand { font-size: 18px; font-weight: 700; letter-spacing: 0.5px; display: flex; align-items: baseline; gap: 8px; }
.brand-sub { font-size: 11px; font-weight: 400; opacity: 0.85; }
.balance-chip {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chip-dot { width: 6px; height: 6px; border-radius: 50%; background: #ffe08a; display: inline-block; }
.login-link { font-size: 13px; background: rgba(255, 255, 255, 0.22); border-radius: 999px; padding: 5px 12px; }

#view { flex: 1; padding: 14px; padding-bottom: 140px; }

#tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 30;
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex;
  height: 62px;
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #9aa0aa;
  font-size: 11px;
}
.nav-item svg { width: 22px; height: 22px; }
.nav-item.active { color: var(--primary); font-weight: 600; }

/* ---------------- 大厅 ---------------- */

.hero {
  background: var(--grad);
  border-radius: 18px;
  padding: 18px 16px;
  color: #fff;
  box-shadow: 0 10px 24px rgba(255, 59, 92, 0.22);
}
.hero-title { font-size: 20px; font-weight: 700; }
.hero-sub { font-size: 12px; opacity: 0.9; margin-top: 4px; }
.hero-stats { display: flex; margin-top: 14px; }
.hero-stats > div { flex: 1; text-align: center; border-right: 1px solid rgba(255, 255, 255, 0.25); }
.hero-stats > div:last-child { border-right: none; }
.hero-stats b { display: block; font-size: 18px; }
.hero-stats span { font-size: 11px; opacity: 0.85; }

.searchbar { display: flex; gap: 8px; margin-top: 14px; }
.searchbar input {
  flex: 1;
  border: none;
  border-radius: 12px;
  padding: 11px 14px;
  background: #fff;
  box-shadow: var(--shadow);
  outline: none;
}
.searchbar button {
  border: none;
  border-radius: 12px;
  padding: 0 18px;
  background: var(--grad);
  color: #fff;
  font-weight: 600;
}

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  border: 1px solid #e3e6eb;
  background: #fff;
  color: #5b616b;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}
.chip-active { background: var(--grad); color: #fff; border-color: transparent; font-weight: 600; }

.sortrow { display: flex; gap: 18px; margin: 12px 2px 4px; }
.sort-item { border: none; background: none; color: #6b7280; font-size: 13px; padding: 4px 0; cursor: pointer; }
.sort-item.active { color: var(--primary); font-weight: 700; }

.task-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }

.task-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
  display: flex;
  gap: 11px;
  align-items: center;
  cursor: pointer;
}
.task-thumb {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: hsl(var(--hue, 20), 92%, 95%);
  flex-shrink: 0;
}
.task-main { flex: 1; min-width: 0; }
.task-row1 { display: flex; align-items: baseline; gap: 8px; }
.task-title { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-reward { color: var(--primary); font-weight: 800; font-size: 16px; margin-left: auto; }
.task-tagline { color: var(--muted); font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.task-meta b { color: var(--orange); }
.mini-badge { background: #fff1ee; color: var(--orange); border-radius: 6px; padding: 2px 7px; font-size: 11px; font-weight: 600; }
.task-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.task-btn {
  border: none;
  background: var(--grad);
  color: #fff;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.task-btn.disabled, .btn.disabled { background: #d7dbe2 !important; color: #fff !important; cursor: default; }
.task-remain { font-size: 10px; color: #b0b5bd; }

/* ---------------- 详情 ---------------- */

.detail-head { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.detail-title { font-size: 18px; font-weight: 700; }
.detail-reward { color: var(--primary); font-size: 30px; font-weight: 800; margin-top: 6px; }
.detail-reward-unit { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.detail-tags { display: flex; gap: 8px; margin-top: 10px; align-items: center; flex-wrap: wrap; }
.detail-grid {
  display: flex;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 0;
  margin-top: 10px;
}
.detail-grid > div { flex: 1; text-align: center; }
.detail-grid b { display: block; font-size: 15px; }
.detail-grid span { font-size: 11px; color: var(--muted); }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-top: 10px; }
.card-title { font-weight: 700; font-size: 15px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.card-text { font-size: 13px; color: #3d434c; }
.muted { color: var(--muted); }
.err-text { color: var(--err); }
.red { color: var(--primary); }

.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding: 6px 0 6px 30px; font-size: 13px; color: #3d434c; }
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff1ee;
  color: var(--orange);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.proof-box { background: #f7f8fa; border-radius: 10px; padding: 10px; font-size: 12px; color: #4b515a; margin-top: 8px; }
.shot { display: inline-block; background: #fff; border: 1px solid #e8eaee; border-radius: 6px; padding: 2px 6px; margin: 2px 4px 2px 0; font-size: 11px; }
.shot-x { color: var(--err); cursor: pointer; padding: 0 2px; }

.actionbar {
  position: fixed;
  bottom: 62px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  z-index: 25;
}
.actionbar .btn { flex: 1; }

/* ---------------- 按钮 / 表单 ---------------- */

.btn {
  border: none;
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: #f0f2f5;
  color: var(--text);
  text-align: center;
}
.btn.primary { background: var(--grad); color: #fff; }
.btn.ghost { background: #fff; border: 1px solid #e3e6eb; color: #4b515a; }
.btn.light { background: rgba(255, 255, 255, 0.25); color: #fff; border: 1px solid rgba(255, 255, 255, 0.4); }
.btn.ok { background: #e9f9ef; color: var(--ok); }
.btn.danger { background: #fff; border: 1px solid #ffd9dd; color: var(--err); }
.btn.small { padding: 7px 12px; font-size: 12px; border-radius: 10px; }
.btn.block { width: 100%; display: block; }

.input {
  width: 100%;
  border: 1px solid #e3e6eb;
  border-radius: 10px;
  padding: 11px 12px;
  background: #fff;
  outline: none;
}
.input:focus { border-color: #ffb1a0; box-shadow: 0 0 0 3px rgba(255, 106, 61, 0.12); }
.area { resize: vertical; }
.form .field { display: block; margin-top: 12px; }
.form .field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.costrow { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 13px; color: #4b515a; }
.costrow.total b { font-size: 18px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.hint a { color: var(--primary); }

/* ---------------- 订单 / 发布 / 审核 ---------------- */

.page-title { font-size: 18px; font-weight: 700; margin: 2px 0 10px; display: flex; align-items: center; justify-content: space-between; }
.backlink { font-size: 13px; color: var(--muted); font-weight: 400; }

.order-card, .pub-card, .review-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 13px;
  margin-bottom: 10px;
  cursor: pointer;
}
.order-row1, .pub-row1 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.order-title { font-weight: 700; }
.order-reward { color: var(--primary); font-weight: 800; }
.order-meta, .pub-meta { display: flex; gap: 10px; align-items: center; margin-top: 7px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.order-note { margin-top: 7px; font-size: 12px; color: var(--err); background: #fff5f5; border-radius: 8px; padding: 7px 10px; }
.pub-meta b { color: var(--text); }
.pub-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pub-actions .btn { flex: 0 0 auto; }

.chip.tone-ok { background: #e9f9ef; color: var(--ok); border-color: transparent; }
.chip.tone-warn { background: #fff7e8; color: #b45309; border-color: transparent; }
.chip.tone-info { background: #eaf2ff; color: var(--info); border-color: transparent; }
.chip.tone-err { background: #fff0f1; color: var(--err); border-color: transparent; }
.chip.tone-muted { background: #f1f2f4; color: #7c828c; border-color: transparent; }

/* ---------------- 钱包 / 我的 / 邀请 ---------------- */

.wallet-hero {
  background: var(--grad);
  border-radius: 18px;
  padding: 20px 18px;
  color: #fff;
  box-shadow: 0 10px 24px rgba(255, 59, 92, 0.22);
}
.wallet-label { font-size: 12px; opacity: 0.88; }
.wallet-amount { font-size: 36px; font-weight: 800; margin: 6px 0 12px; }
.wallet-actions { display: flex; gap: 10px; }
.wallet-actions .btn { padding: 8px 20px; font-size: 13px; }
.wallet-stats {
  display: flex;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 0;
  margin-top: 10px;
}
.wallet-stats > div { flex: 1; text-align: center; }
.wallet-stats b { display: block; font-size: 15px; }
.wallet-stats span { font-size: 11px; color: var(--muted); }

.tx-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); gap: 8px; }
.tx-row:last-child { border-bottom: none; }
.tx-left { font-size: 13px; min-width: 0; }
.tx-time { font-size: 11px; color: var(--muted); margin-top: 2px; }
.tx-right { font-size: 13px; }
.tx-right.amount { font-weight: 700; font-size: 15px; }
.tx-right .up, .up { color: var(--orange); }
.tx-right .down, .down { color: #9aa0aa; }

.me-head {
  background: var(--grad);
  border-radius: 18px;
  padding: 18px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 13px;
  box-shadow: 0 10px 24px rgba(255, 59, 92, 0.22);
}
.me-avatar { width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); display: flex; align-items: center; justify-content: center; font-size: 28px; }
.me-name { font-size: 18px; font-weight: 700; }
.me-phone { font-size: 12px; opacity: 0.85; }
.me-code { margin-left: auto; text-align: center; background: rgba(255, 255, 255, 0.2); border-radius: 10px; padding: 6px 10px; font-size: 11px; }
.me-code b { display: block; font-size: 14px; letter-spacing: 1px; }

.menu-card { padding: 4px 14px; }
.menu-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.menu-item:last-child { border-bottom: none; }
.menu-item i { font-style: normal; color: #c3c8cf; }

.invite-hero {
  background: var(--grad);
  border-radius: 18px;
  padding: 22px 18px;
  color: #fff;
  text-align: center;
  box-shadow: 0 10px 24px rgba(255, 59, 92, 0.22);
}
.invite-code { font-size: 34px; font-weight: 800; letter-spacing: 4px; margin: 8px 0 10px; }
.invite-hero .wallet-actions { justify-content: center; }

/* ---------------- 登录 ---------------- */

.login-view {
  min-height: 100vh;
  background: linear-gradient(160deg, #ff7a45 0%, #ff2d55 100%);
  display: flex;
  justify-content: center;
  padding: 64px 22px;
}
.login-wrap { width: 100%; max-width: 350px; text-align: center; color: #fff; }
.login-logo { font-size: 44px; }
.login-title { font-size: 26px; font-weight: 800; margin-top: 8px; letter-spacing: 2px; }
.login-sub { font-size: 12px; opacity: 0.88; margin-top: 4px; margin-bottom: 22px; }
.login-tabs { display: flex; justify-content: center; gap: 34px; margin-bottom: 18px; }
.login-tabs button { background: none; border: none; color: rgba(255, 255, 255, 0.65); font-size: 16px; padding: 6px 4px; cursor: pointer; }
.login-tabs button.active { color: #fff; font-weight: 700; border-bottom: 2px solid #fff; }
.login-wrap .input { margin-bottom: 12px; background: rgba(255, 255, 255, 0.96); text-align: left; }
.login-tip { font-size: 11px; opacity: 0.75; margin-top: 16px; line-height: 1.7; }

/* ---------------- 弹层 / 提示 ---------------- */

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(16, 18, 22, 0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.modal-mask.show { opacity: 1; }
@media (min-width: 520px) { .modal-mask { align-items: center; } }
.modal-card {
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 20px 18px 24px;
  width: 100%;
  max-width: 480px;
  transform: translateY(16px);
  transition: transform 0.2s ease;
  max-height: 86vh;
  overflow-y: auto;
}
@media (min-width: 520px) { .modal-card { border-radius: 18px; max-width: 420px; } }
.modal-mask.show .modal-card { transform: translateY(0); }
.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.modal-desc { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.modal-card .input, .modal-card .field { margin-bottom: 10px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.modal-actions .btn { min-width: 96px; }
.shots-row { margin-bottom: 8px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 150px;
  transform: translateX(-50%) translateY(10px);
  background: rgba(28, 31, 38, 0.92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 200;
  opacity: 0;
  transition: all 0.25s ease;
  max-width: 84vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.loading { text-align: center; color: var(--muted); font-size: 13px; padding: 40px 0; }
.empty { text-align: center; color: var(--muted); padding: 56px 0; font-size: 13px; }
.empty-emoji { font-size: 34px; margin-bottom: 8px; }
