/* ========== 基础变量 ========== */
:root {
  --primary: #2563eb;
  --primary-deep: #1d4ed8;
  --primary-light: #38bdf8;
  --accent: #ff8a3d;
  --accent-light: #ffb37a;
  --bg: #f4f6fa;
  --card: #ffffff;
  --text-1: #1e293b;
  --text-2: #64748b;
  --text-3: #94a3b8;
  --line: #eef1f6;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow-card: 0 4px 20px rgba(37, 99, 235, 0.06);
  --shadow-pop: 0 12px 40px rgba(15, 23, 42, 0.18);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue",
    "Microsoft YaHei", sans-serif;
  color: var(--text-1);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

img {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  border: none;
  background: none;
  font-family: inherit;
  cursor: pointer;
}

input,
textarea {
  font-family: inherit;
  border: none;
  outline: none;
  background: none;
}

/* ========== 顶部渐变区 ========== */
.hero {
  position: relative;
  background: linear-gradient(135deg, #2563eb 0%, #4f9cf8 45%, #38bdf8 100%);
  padding: calc(22px + env(safe-area-inset-top)) 20px 76px;
  color: #fff;
  overflow: hidden;
}

/* 光感:顶部高光层 */
.hero::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -50px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 65%);
}

.hero::before {
  content: "";
  position: absolute;
  left: -60px;
  bottom: -90px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 60%);
}

/* 质感:斜向光泽扫过 */
.hero .shine {
  position: absolute;
  top: -40%;
  left: -20%;
  width: 50%;
  height: 180%;
  transform: rotate(20deg);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0) 100%);
  animation: shineMove 5s ease-in-out infinite;
}

@keyframes shineMove {
  0% { left: -30%; }
  50% { left: 100%; }
  100% { left: -30%; }
}

.hero-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(29, 78, 216, 0.35);
}

.hero-slogan {
  position: relative;
  z-index: 2;
  margin-top: 6px;
  font-size: 13px;
  opacity: 0.9;
  text-shadow: 0 1px 4px rgba(29, 78, 216, 0.25);
}

/* ========== Banner 轮播(自适应完整显示) ========== */
.banner-wrap {
  position: relative;
  z-index: 3;
  margin: -52px 16px 0;
}

.banner-slide {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.18);
  background: #fff;
}

.banner-slide img {
  width: 100%;
  height: auto;
  min-height: 120px;
  display: block;
  object-fit: contain;
}

.banner-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 8px;
}

.banner-dots i {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: #cbd5e1;
  transition: all 0.3s;
}

.banner-dots i.on {
  width: 18px;
  background: var(--primary);
}

/* ========== 任务列表 ========== */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 10px;
}

.section-title {
  font-size: 17px;
  font-weight: 700;
}

.section-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--primary), var(--primary-light));
  vertical-align: -2px;
  margin-right: 8px;
}

.section-more {
  font-size: 12px;
  color: var(--text-3);
}

.task-list {
  padding: 4px 16px 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.task-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: cardIn 0.4s ease both;
  transition: transform 0.15s, box-shadow 0.2s;
}

.task-card:active {
  transform: scale(0.98);
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.task-main {
  flex: 1;
  min-width: 0;
}

.task-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.task-reward-line {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
  text-shadow: 0 1px 0 rgba(255, 138, 61, 0.15);
}

.task-btn {
  flex-shrink: 0;
  width: 56px;
  height: 76px;
  border-radius: 16px;
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  line-height: 1.25;
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4), 0 1px 0 rgba(255, 255, 255, 0.35) inset;
  transition: transform 0.15s, box-shadow 0.2s;
}

.task-btn:active {
  transform: scale(0.94);
  box-shadow: 0 3px 8px rgba(34, 197, 94, 0.4);
}

/* 已报名:灰色不可点击态 */
.task-btn.applied {
  background: linear-gradient(180deg, #cbd5e1 0%, #a8b2c1 100%);
  box-shadow: 0 4px 12px rgba(148, 163, 184, 0.35), 0 1px 0 rgba(255, 255, 255, 0.3) inset;
  cursor: default;
}

.task-btn.applied:active {
  transform: scale(0.98);
  box-shadow: 0 3px 8px rgba(148, 163, 184, 0.3);
}

.task-tags {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 11px;
  color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 6px;
  padding: 2px 8px;
  line-height: 1.5;
}

.task-reward {
  flex-shrink: 0;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(255, 138, 61, 0.35);
}

.task-reward span {
  line-height: 1.3;
}

.empty {
  text-align: center;
  color: var(--text-3);
  padding: 60px 0;
  font-size: 14px;
}

.empty::before {
  content: "";
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
}

/* ========== 悬浮按钮组(投诉 + 商务合作) ========== */
.fab-group {
  position: fixed;
  right: 14px;
  bottom: calc(30px + var(--safe-bottom));
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fab-group.fab-above-footer {
  bottom: calc(96px + var(--safe-bottom));
}

.fab-complaint {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.45), 0 1px 0 rgba(255, 255, 255, 0.3) inset;
  transition: transform 0.15s;
}

.fab-complaint.fab-report {
  background: linear-gradient(135deg, #f43f5e 0%, #fb7185 100%);
  box-shadow: 0 10px 24px rgba(244, 63, 94, 0.45), 0 1px 0 rgba(255, 255, 255, 0.3) inset;
}

.fab-complaint:active {
  transform: scale(0.92);
}

.fab-complaint svg {
  width: 20px;
  height: 20px;
}

/* 商务合作页 */
.cooperation-page {
  padding-bottom: 40px;
}

.cooperation-box {
  margin: 14px 16px 0;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 12px;
}

.cooperation-img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
}

/* 数据统计页 */
.stats-page {
  padding-bottom: 40px;
}

.stats-box {
  margin: 14px 16px 0;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08);
  padding: 18px 16px;
}

.stats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stats-name {
  font-size: 18px;
  font-weight: 800;
}

.stats-mode {
  font-size: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  padding: 4px 12px;
  border-radius: 999px;
}

.stats-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stats-item {
  background: #f1f5f9;
  border-radius: 14px;
  padding: 18px 12px;
  text-align: center;
}

.stats-num {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
}

.stats-label {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-2);
}

.stats-tip {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
  line-height: 1.6;
}

/* ========== 仅限微信打开提示 ========== */
.wx-only {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #f8fafc;
  text-align: center;
  padding: 24px;
}

.wx-only-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #07c160 0%, #06ad56 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 8px 20px rgba(7, 193, 96, 0.3);
}

.wx-only-icon svg {
  width: 36px;
  height: 36px;
}

.wx-only-text {
  font-size: 16px;
  color: #1e293b;
  font-weight: 600;
}

/* ========== 推广员统计页(新) ========== */
.stats-page {
  min-height: 100vh;
  background: #f1f5f9;
  padding-bottom: 40px;
}

.stats-state {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #94a3b8;
  font-size: 14px;
}

.stats-loading-text {
  color: #64748b;
  font-size: 14px;
}

.stats-hero {
  position: relative;
  background: linear-gradient(180deg, #1e293b 0%, #334155 100%);
  padding: 60px 20px 80px;
  border-radius: 0 0 24px 24px;
  color: #fff;
}

.stats-hero-name {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.stats-hero-badge {
  display: inline-block;
  padding: 4px 14px;
  background: linear-gradient(135deg, #10b981, #14b8a6);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  margin-bottom: 14px;
}

.stats-hero-code {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}

.stats-hero-code-val {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: #fff;
  margin-left: 4px;
  letter-spacing: 0.5px;
}

.stats-overview-card {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: -52px;
  background: #fff;
  border-radius: 16px;
  padding: 22px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.overview-item {
  flex: 1;
  text-align: center;
}

.overview-num {
  font-size: 28px;
  font-weight: 800;
  color: #1e293b;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  line-height: 1;
}

.overview-num .unit {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
  margin-left: 2px;
}

.overview-item.today .overview-num {
  color: #10b981;
}

.overview-item.today .overview-num .unit {
  color: #10b981;
}

.overview-label {
  margin-top: 8px;
  font-size: 13px;
  color: #64748b;
}

.overview-divider {
  width: 1px;
  height: 36px;
  background: #e2e8f0;
}

.stats-tabs {
  display: flex;
  margin: 70px 16px 14px;
  background: #e5e7eb;
  border-radius: 14px;
  padding: 4px;
}

.stats-tabs button {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 0;
  font-size: 14px;
  color: #64748b;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.stats-tabs button.active {
  background: linear-gradient(135deg, #10b981, #14b8a6);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.stats-detail-card {
  margin: 0 16px;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  min-height: 280px;
}

.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 24px;
}

.detail-title {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
}

.detail-count {
  font-size: 12px;
  color: #64748b;
}

.detail-empty-state {
  padding: 30px 0 10px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

.empty-pie {
  width: 80px;
  height: 80px;
  margin-bottom: 14px;
}

.empty-text {
  font-size: 13px;
  color: #94a3b8;
}

.detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.detail-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px dashed #e2e8f0;
}

.detail-list li:last-child {
  border-bottom: none;
}

.d-date {
  font-size: 14px;
  color: #475569;
}

.d-cnt {
  font-size: 14px;
  color: #10b981;
  font-weight: 700;
}

/* ========== 详情页 ========== */
.detail-page {
  padding-bottom: 24px;
}

.detail-hero {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(135deg, #2563eb 0%, #38bdf8 100%);
  padding: calc(12px + env(safe-area-inset-top)) 14px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}

.back-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-btn svg {
  width: 20px;
  height: 20px;
}

.detail-hero-title {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-card {
  margin: 14px 16px 0;
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 18px 16px;
}

.detail-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.45;
}

.detail-reward-row {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-reward {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
  padding: 5px 14px;
}

.detail-tags {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-text {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
}

.detail-text strong {
  color: var(--accent);
  font-weight: 700;
}

/* 二维码区 */
.qr-box {
  margin: 14px 16px 0;
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 20px 16px;
  text-align: center;
}

.qr-title {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.qr-title svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.qr-grid {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.qr-img {
  width: 180px;
  height: 180px;
  border-radius: 10px;
  border: 1px dashed var(--primary-light);
  padding: 8px;
  object-fit: contain;
  background: #fff;
}

.qr-tip {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.7;
}

.qr-tip b {
  color: var(--accent);
}

/* 详情图片 */
.gallery {
  margin: 14px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gallery-item {
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background: #f8fafc;
}

.gallery-caption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-2);
}

/* ========== 投诉页 ========== */
.complaint-page {
  padding-bottom: 40px;
}

.complaint-form {
  margin: 14px 16px 0;
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 18px 16px;
}

.form-label {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

.type-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.type-chip {
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--text-2);
  border: 1px solid transparent;
  transition: all 0.2s;
}

.type-chip.on {
  background: rgba(37, 99, 235, 0.1);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

.form-textarea {
  width: 100%;
  min-height: 130px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  line-height: 1.6;
  resize: none;
  color: var(--text-1);
}

.form-textarea:focus {
  border-color: var(--primary-light);
}

.form-input {
  width: 100%;
  height: 44px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--text-1);
}

.form-input:focus {
  border-color: var(--primary-light);
}

.form-char {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-3);
  text-align: right;
}

.btn-submit {
  margin: 20px 16px 0;
  width: calc(100% - 32px);
  height: 48px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.btn-submit:active {
  transform: scale(0.98);
}

.form-error {
  color: #ef4444;
  font-size: 12px;
  margin-top: 8px;
  text-align: center;
}

.form-tip {
  margin: 14px 20px 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.7;
}

/* ========== 弹窗 ========== */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-body {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: 22px 22px 0 0;
  padding: 24px 20px calc(20px + var(--safe-bottom));
  animation: slideUp 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.modal-title {
  text-align: center;
  font-size: 17px;
  font-weight: 800;
}

.modal-sub {
  text-align: center;
  font-size: 13px;
  color: var(--text-2);
  margin-top: 6px;
}

.modal-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
}

.modal-task {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-task:active {
  background: #f8fafc;
}

.modal-task .task-title {
  -webkit-line-clamp: 1;
  font-size: 14px;
}

.modal-task .task-reward {
  width: 52px;
  height: 52px;
  font-size: 10px;
}

.modal-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
}

.modal-btn {
  flex: 1;
  height: 44px;
  border-radius: 22px;
  font-size: 14px;
  font-weight: 600;
}

.modal-btn.ghost {
  background: #f1f5f9;
  color: var(--text-2);
}

.modal-btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
}

/* 成功提示 */
.success-box {
  text-align: center;
  padding: 30px 10px;
}

.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #4ade80);
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-icon svg {
  width: 32px;
  height: 32px;
  color: #fff;
}

.success-box h3 {
  margin-top: 14px;
  font-size: 17px;
}

.success-box p {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-2);
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 200;
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 10px;
  max-width: 80%;
  text-align: center;
  animation: fadeIn 0.2s ease;
}

/* 加载 */
.loading {
  text-align: center;
  padding: 50px 0;
  color: var(--text-3);
  font-size: 14px;
}

/* 任务列表分页加载提示 */
.load-more {
  text-align: center;
  padding: 16px 0 24px;
  color: var(--text-3);
  font-size: 13px;
  user-select: none;
  -webkit-user-select: none;
}
.load-more [v-cloak] { display: none; }
.load-more span { transition: opacity 0.2s; }
.load-more span:active { opacity: 0.5; }

/* ==================================================
   全局动效增强(丝滑感)
   ================================================== */

/* ---- 页面切换过渡:每次进入/切回都有淡入上移 ---- */
.home-page,
.detail-page,
.complaint-page,
.cooperation-page,
.stats-page {
  animation: pageIn 0.32s cubic-bezier(0.22, 0.9, 0.3, 1) both;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- 首页顶部文字逐层下落 ---- */
.hero-title,
.hero-slogan {
  animation: dropIn 0.5s cubic-bezier(0.22, 0.9, 0.3, 1) both;
}
.hero-slogan { animation-delay: 0.08s; }

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- banner 区与标题区渐入 ---- */
.banner-wrap,
.section-head {
  animation: riseIn 0.42s cubic-bezier(0.22, 0.9, 0.3, 1) both;
}
.section-head { animation-delay: 0.1s; }

@keyframes riseIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- banner 轮播切换淡入(需配合模板 :key 触发) ---- */
.banner-slide img {
  animation: bannerIn 0.35s ease both;
}

@keyframes bannerIn {
  from { opacity: 0; transform: scale(0.985); }
  to   { opacity: 1; transform: scale(1); }
}

/* ---- 详情页内容逐层浮现 ---- */
.detail-card,
.qr-box,
.gallery {
  animation: cardIn 0.42s cubic-bezier(0.22, 0.9, 0.3, 1) both;
}
.qr-box { animation-delay: 0.07s; }
.gallery { animation-delay: 0.14s; }

/* ---- 投诉 / 合作页渐入 ---- */
.complaint-form {
  animation: riseIn 0.4s cubic-bezier(0.22, 0.9, 0.3, 1) both;
}
.cooperation-img {
  animation: riseIn 0.45s cubic-bezier(0.22, 0.9, 0.3, 1) both;
}

/* ---- 数据统计页逐层浮现 ---- */
.stats-overview-card,
.stats-tabs,
.stats-detail-card {
  animation: riseIn 0.5s cubic-bezier(0.22, 0.9, 0.3, 1) both;
}
.stats-tabs { animation-delay: 0.08s; }
.stats-detail-card { animation-delay: 0.16s; }

/* ---- 成功提示:弹性弹出 + 图标脉冲 ---- */
.success-box {
  animation: popIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.success-icon {
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both 0.1s;
}

@keyframes popIn {
  0%   { opacity: 0; transform: scale(0.6); }
  70%  { opacity: 1; transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1); }
}

/* ---- 悬浮按钮弹入 ---- */
.fab-group {
  animation: fabIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both 0.2s;
}

@keyframes fabIn {
  from { opacity: 0; transform: translateY(18px) scale(0.7); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- Toast 上浮提示 ---- */
.toast {
  animation: toastIn 0.25s cubic-bezier(0.22, 0.9, 0.3, 1);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- 任务卡片悬浮微抬升(仅支持悬停的设备,避免覆盖移动端按压缩放) ---- */
@media (hover: hover) {
  .task-card:hover {
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.14), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
    transform: translateY(-2px);
  }
}

/* ---- 统一触摸按压反馈 + 光晕涟漪 ---- */
.back-btn,
.type-chip,
.btn-submit,
.modal-btn,
.stats-tabs button {
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.back-btn:active,
.type-chip:active,
.btn-submit:active,
.modal-btn:active,
.stats-tabs button:active {
  transform: scale(0.94);
}

.modal-task {
  transition: transform 0.12s ease, background 0.2s ease;
}
.modal-task:active {
  transform: scale(0.97);
  background: #f8fafc;
}

/* 按压光晕涟漪(独立按钮) */
.task-btn,
.back-btn,
.fab-complaint,
.btn-submit,
.modal-btn {
  position: relative;
  overflow: hidden;
}
.task-btn::after,
.back-btn::after,
.fab-complaint::after,
.btn-submit::after,
.modal-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0) 70%);
  transform: scale(0);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  pointer-events: none;
}
.task-btn:active::after,
.back-btn:active::after,
.fab-complaint:active::after,
.btn-submit:active::after,
.modal-btn:active::after {
  transform: scale(2.2);
  opacity: 1;
}

/* ==================================================
   推荐弹窗:单任务精推 + 轮换进度
   ================================================== */

/* 弹窗面板:顶部留出图标凸出空间 */
.modal-body {
  position: relative;
  padding-top: 40px;
}
.modal-body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 110px;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(180deg, rgba(255, 237, 213, 0.65) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

/* 顶部礼物图标:金色渐变,凸出面板 */
.modal-gift {
  width: 70px;
  height: 70px;
  margin: -54px auto 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 55%, #f97316 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.5), 0 2px 0 rgba(255, 255, 255, 0.55) inset;
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both 0.05s;
  z-index: 2;
}
.modal-gift svg {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 2px 3px rgba(180, 83, 9, 0.35));
}

/* 主推荐卡片 */
.modal-feature {
  position: relative;
  margin-top: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  border: 1px solid #dbeafe;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.12);
  padding: 16px 14px 16px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  animation: riseIn 0.45s cubic-bezier(0.22, 0.9, 0.3, 1) both 0.1s;
}
.modal-feature:active {
  transform: scale(0.97);
}
.modal-feature::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, rgba(56, 189, 248, 0) 70%);
  pointer-events: none;
}

/* 左上角"为你精选"缎带 */
.mf-ribbon {
  position: absolute;
  top: -1px;
  left: -1px;
  background: linear-gradient(135deg, #f43f5e 0%, #fb7185 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 12px 4px 10px;
  border-radius: 17px 0 18px 0;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.35);
  z-index: 1;
}

.mf-body {
  flex: 1;
  min-width: 0;
  padding-top: 18px;
}
.mf-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mf-tags {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* 报酬金币徽标 */
.mf-reward {
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffb37a 0%, #ff8a3d 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  box-shadow: 0 8px 20px rgba(255, 138, 61, 0.4), 0 1px 0 rgba(255, 255, 255, 0.35) inset;
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both 0.2s;
}

/* 轮换进度 */
.modal-progress {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-3);
}
.mp-line {
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0), rgba(148, 163, 184, 0.6));
}
.mp-line:last-child {
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.6), rgba(148, 163, 184, 0));
}
.mp-text {
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.5px;
}
