/* ==================================================
   页面专属样式
   分区：首页 Hero / 特色 / 流程；任务大厅；帮助页
   ================================================== */

/* ========== 首页 · Hero ========== */
.hero {
  position: relative;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #10b981 140%);
  color: #fff;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  right: -80px;
  top: -80px;
  width: 320px;
  height: 320px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}
.hero .container {
  position: relative;
  z-index: 1;
  padding-top: 76px;
  padding-bottom: 76px;
  max-width: 760px;
  text-align: center;
}
.hero-tag {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 1px;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 18px;
}
.hero p {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 34px;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* 轮播小圆点 */
.hero-dots { display: flex; gap: 8px; justify-content: center; margin-top: 34px; }
.hero-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s;
}
.hero-dots span.active { background: #fff; width: 26px; border-radius: 5px; }

/* ========== 首页 · 特色卡片 ========== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: all 0.25s;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}
.feature-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  border-radius: 16px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-card h3 { font-size: 18px; margin-bottom: 10px; }
.feature-card p { font-size: 14px; color: var(--text-sub); }

/* ========== 首页 · 热门兼职类型（左对齐横向卡片） ========== */
.jobtypes-section { background: var(--bg-page); }
.jobtypes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.jobtype-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 28px 26px 28px 30px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.25s;
}
.jobtype-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}
.jobtype-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.jobtype-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.jobtype-info h3 { font-size: 18px; margin-bottom: 8px; }
.jobtype-info p { font-size: 14px; color: var(--text-sub); line-height: 1.7; }

/* ========== 首页 · 兼职优势（浅色区 + 圆形彩色图标） ========== */
.advantages-wrap { background: var(--bg-card); }
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.advantage-item {
  text-align: center;
  padding: 8px 12px;
}
.advantage-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: transform 0.25s;
}
.advantage-item:hover .advantage-icon { transform: scale(1.08) rotate(-4deg); }
.advantage-item:nth-child(4n+1) .advantage-icon { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.advantage-item:nth-child(4n+2) .advantage-icon { background: linear-gradient(135deg, #10b981, #059669); }
.advantage-item:nth-child(4n+3) .advantage-icon { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.advantage-item:nth-child(4n+4) .advantage-icon { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.advantage-item h3 { font-size: 17px; margin-bottom: 8px; }
.advantage-item p { font-size: 14px; color: var(--text-sub); line-height: 1.7; }

/* 首页 · CTA 区块 */
.cta-band {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  text-align: center;
  border-radius: var(--radius);
  padding: 48px 24px;
  margin: 20px 0;
}
.cta-band h2 { font-size: 26px; margin-bottom: 12px; }
.cta-band p { color: rgba(255, 255, 255, 0.85); margin-bottom: 26px; }

/* ========== 通用页面头（任务/帮助） ========== */
.page-head {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fff;
  padding: 52px 0;
  text-align: center;
}
.page-head h1 { font-size: 32px; margin-bottom: 10px; }
.page-head p { color: rgba(255, 255, 255, 0.88); font-size: 15px; }

/* ========== 任务大厅 ========== */
.filter-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}
.filter-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  flex-wrap: wrap;
}
.filter-row + .filter-row { border-top: 1px dashed var(--border); }
.filter-label {
  flex-shrink: 0;
  width: 72px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}
.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-tabs button {
  padding: 7px 18px;
  border-radius: 999px;
  background: var(--bg-page);
  border: 1px solid transparent;
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}
.filter-tabs button:hover { color: var(--primary); }
.filter-tabs button.active {
  background: var(--primary);
  color: #fff;
}
.filter-dates { display: flex; align-items: center; gap: 10px; }
.date-input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-main);
  background: #fff;
}
.date-input:focus { border-color: var(--primary); }
.date-sep { color: var(--text-light); font-size: 14px; }
.filter-actions { display: flex; gap: 10px; margin-left: auto; }

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 18px;
  flex: 1;
  max-width: 340px;
}
.search-box input { border: none; font-size: 14px; flex: 1; background: transparent; }

.tasks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.task-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: all 0.25s;
}
.task-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary-light); }
.task-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 12px;
}
.task-card h3 { font-size: 18px; }

/* 任务状态标签 */
.task-status {
  flex-shrink: 0;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.task-status.st-pending { background: #fef3c7; color: #b45309; }
.task-status.st-active { background: var(--accent-light); color: #047857; }
.task-status.st-expired { background: #f3f4f6; color: #9ca3af; }
.task-status.st-ended { background: #e0e7ff; color: #4338ca; }

.task-desc {
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.task-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 16px;
}
.task-meta span { display: inline-flex; align-items: center; gap: 6px; }
.task-meta .reward { color: var(--primary); font-weight: 600; }
.task-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; min-height: 4px; }
.task-tags .tag {
  padding: 3px 10px;
  background: var(--bg-page);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-light);
}
.task-card .btn { width: 100%; }

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.page-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}
.page-btn:hover:not(:disabled):not(.active) { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.page-ellipsis { color: var(--text-light); padding: 0 4px; }

/* ========== 帮助页 ========== */
.faq-list { display: flex; flex-direction: column; gap: 14px; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.faq-item.open { box-shadow: var(--shadow-md); }
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 22px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  text-align: left;
  gap: 16px;
}
.faq-question .faq-arrow {
  flex-shrink: 0;
  transition: transform 0.25s;
  color: var(--text-light);
}
.faq-item.open .faq-arrow { transform: rotate(180deg); color: var(--primary); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 22px;
  color: var(--text-sub);
  font-size: 15px;
  line-height: 1.75;
}
.faq-item.open .faq-answer { max-height: 480px; padding: 0 22px 20px; }

/* FAQ 图片列表（第4个问题） */
.faq-images {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 22px;
}
.faq-item.open .faq-images {
  max-height: none;
  padding: 0 22px 24px;
}
.faq-image-item {
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  width: 300px;
  max-width: 100%;
}
.faq-image-item:last-child { margin-bottom: 0; }
.faq-image-item img {
  width: 300px;
  max-width: 100%;
  height: 568px;
  object-fit: cover;
  display: block;
}

.compliance-note {
  margin-top: 28px;
  padding: 24px;
  background: var(--primary-light);
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
}
.compliance-note h3 { font-size: 17px; color: var(--primary-dark); margin-bottom: 10px; }
.compliance-note p { font-size: 14px; color: #374151; line-height: 1.75; }

/* ========== 自定义日期选择器 ========== */
.date-input { cursor: pointer; width: 150px; }
.date-input::placeholder { color: var(--text-light); }
.dp-panel {
  z-index: 200;
  width: 268px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 14px;
  user-select: none;
}
.dp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.dp-title { font-size: 15px; font-weight: 600; color: var(--text-main); }
.dp-nav {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 20px;
  color: var(--text-sub);
  transition: all 0.2s;
}
.dp-nav:hover { background: var(--primary-light); color: var(--primary); }
.dp-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}
.dp-week span {
  text-align: center;
  font-size: 12px;
  color: var(--text-light);
  padding: 6px 0;
}
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-day, .dp-empty {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-main);
  transition: all 0.15s;
}
.dp-day:hover { background: var(--primary-light); color: var(--primary); }
.dp-today { color: var(--primary); font-weight: 600; }
.dp-selected { background: var(--primary); color: #fff; }
.dp-selected:hover { background: var(--primary-dark); color: #fff; }
.dp-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.dp-clear, .dp-today-btn {
  font-size: 13px;
  color: var(--text-sub);
  padding: 5px 12px;
  border-radius: 6px;
  transition: all 0.2s;
}
.dp-clear:hover, .dp-today-btn:hover { background: var(--bg-page); color: var(--primary); }

/* ========== 任务详情页 ========== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-sub);
  font-size: 14px;
  margin-bottom: 20px;
  transition: color 0.2s;
}
.back-link:hover { color: var(--primary); }

.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.detail-title { font-size: 26px; margin-bottom: 6px; }
.detail-sub { color: var(--text-sub); font-size: 14px; }
.detail-section { margin-bottom: 28px; }
.detail-section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 3px solid var(--primary);
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 32px;
}
.detail-row { display: flex; gap: 10px; font-size: 14px; }
.detail-label { color: var(--text-light); flex-shrink: 0; min-width: 72px; }
.detail-value { color: var(--text-main); font-weight: 500; }
.detail-text {
  font-size: 15px;
  color: var(--text-main);
  line-height: 1.8;
  background: var(--bg-page);
  padding: 16px 18px;
  border-radius: var(--radius-sm);
}
.detail-actions {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.detail-sign-btn { min-width: 220px; padding: 14px 32px; font-size: 16px; }

/* ========== 二维码弹窗 ========== */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 20px;
}
.modal-mask[hidden] { display: none; }
.modal {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 340px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.22s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 26px;
  line-height: 1;
  color: var(--text-light);
  transition: color 0.2s;
}
.modal-close:hover { color: var(--text-main); }
.modal-title { font-size: 20px; margin-bottom: 8px; }
.modal-tip { font-size: 14px; color: var(--text-sub); margin-bottom: 20px; }
.qr-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}
.qr-box img { width: 220px; height: 220px; border-radius: var(--radius-sm); }
.qr-error { color: var(--text-sub); font-size: 14px; }

/* ========== 服务工作指南（侧边悬浮提示） ========== */
.guide-panel {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 150;
  display: flex;
  align-items: flex-start;
}
.guide-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 8px;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  border: none;
  border-radius: 10px 0 0 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  box-shadow: -2px 2px 10px rgba(234, 88, 12, 0.3);
  transition: all 0.25s;
  writing-mode: vertical-lr;
  letter-spacing: 2px;
  line-height: 1.2;
}
.guide-tab:hover { background: linear-gradient(135deg, #ea580c, #c2410c); }
.guide-tab svg { writing-mode: horizontal-tb; }

.guide-body {
  width: 0;
  max-height: 70vh;
  overflow: hidden;
  background: #fff;
  border-radius: 12px 0 0 12px;
  box-shadow: -4px 4px 24px rgba(0, 0, 0, 0.12);
  transition: width 0.3s ease, padding 0.3s ease;
  padding: 0;
}
.guide-panel.open .guide-body {
  width: 320px;
  padding: 20px 22px;
  overflow-y: auto;
}
.guide-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.guide-head h3 { font-size: 16px; font-weight: 700; color: var(--text-main); }
.guide-close {
  font-size: 22px;
  color: var(--text-light);
  padding: 0 4px;
  transition: color 0.2s;
}
.guide-close:hover { color: var(--text-main); }

.guide-steps { list-style: none; padding: 0; margin: 0; }
.guide-steps li {
  counter-increment: guide-step;
  position: relative;
  padding: 0 0 20px 28px;
  border-left: 2px solid var(--primary-light);
  margin-left: 10px;
}
.guide-steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.guide-steps li::before {
  content: counter(guide-step);
  position: absolute;
  left: -11px;
  top: 0;
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.guide-steps h4 { font-size: 14px; font-weight: 600; color: var(--text-main); margin-bottom: 6px; }
.guide-steps p { font-size: 13px; color: var(--text-sub); line-height: 1.7; }

/* ========== 响应式 ========== */
@media (max-width: 900px) {
  .features-grid, .jobtypes-grid, .advantages-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .hero h1 { font-size: 30px; }
  .hero p { font-size: 15px; }
  .filter-label { width: 100%; }
  .filter-actions { margin-left: 0; }
  .search-box { max-width: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-card { padding: 22px; }
  .detail-title { font-size: 22px; }
  .date-input { width: 100%; }
  .filter-dates { flex: 1; }
}
@media (max-width: 520px) {
  .features-grid, .jobtypes-grid, .advantages-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 26px; }
  .guide-panel.open .guide-body { width: 78vw; }
}
