/* ==========================================================================
   首页样式
   ========================================================================== */

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--grad-primary);
  border-radius: 0 0 36px 36px;
  padding: 38px 0 64px;
  overflow: hidden;
  color: #fff;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--grad-bg-hero);
  mix-blend-mode: screen;
}
.hero-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-decor .deco {
  position: absolute;
  opacity: .9;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,.12));
  animation: floatY 6s ease-in-out infinite;
}
.deco-1 { top: 8%;  left: 6%;  width: 54px; animation-delay: 0s; }
.deco-2 { top: 58%; left: 2%;  width: 36px; animation-delay: 1.2s; }
.deco-3 { top: 14%; right: 8%; width: 64px; animation-delay: .5s; }
.deco-4 { top: 60%; right: 4%; width: 42px; animation-delay: 1.8s; }
.deco-5 { top: 2%;  right: 32%; width: 28px; animation-delay: .9s; }
@keyframes floatY {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(6deg); }
}

.hero-inner { position: relative; z-index: 2; text-align: center; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--r-pill);
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 700;
  backdrop-filter: blur(6px);
  opacity: 0;
  animation: heroUp .6s var(--ease-spring) .05s forwards;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  line-height: 1.25;
  margin: 18px auto 12px;
  max-width: 620px;
  opacity: 0;
  animation: heroUp .65s var(--ease-spring) .14s forwards;
}
.hero p.sub {
  font-size: 15.5px;
  color: rgba(255,255,255,.88);
  max-width: 460px;
  margin: 0 auto 26px;
  opacity: 0;
  animation: heroUp .65s var(--ease-spring) .22s forwards;
}
.hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: heroUp .65s var(--ease-spring) .3s forwards;
}
.hero-ctas .btn-ghost { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.4); color: #fff; }
@keyframes heroUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.hero-stats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 560px;
  margin: 30px auto 0;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--r-md);
  backdrop-filter: blur(8px);
  opacity: 0;
  animation: heroUp .65s var(--ease-spring) .38s forwards;
}
.hero-stat { text-align: center; padding: 16px 8px; }
.hero-stat b {
  font-family: var(--font-display);
  font-size: 24px;
  display: block;
}
.hero-stat span { font-size: 12px; color: rgba(255,255,255,.82); }

/* ---------- 内容区整体上移叠在 hero 之上 ---------- */
.home-content { margin-top: -42px; position: relative; z-index: 3; }

/* ---------- 签到积分条 ---------- */
.checkin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  flex-wrap: wrap;
}
.checkin-left { display: flex; align-items: center; gap: 12px; }
.checkin-icon {
  width: 44px; height: 44px;
  border-radius: 13px;
  background: var(--grad-gold);
  display: grid; place-items: center;
  color: #fff;
  flex-shrink: 0;
}
.checkin-points {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--c-primary);
}
.checkin-streak-dots { display: flex; gap: 4px; margin-top: 4px; }
.streak-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c-border);
}
.streak-dot.filled { background: var(--c-accent); }

/* ---------- 玩法分类宫格 ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (min-width: 640px) { .category-grid { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 980px) { .category-grid { grid-template-columns: repeat(8, 1fr); } }

.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 4px;
  border-radius: var(--r-md);
  transition: transform .2s var(--ease-spring), background .2s;
}
.category-item:hover { background: var(--c-surface); transform: translateY(-3px); }
.category-icon {
  width: 50px; height: 50px;
  border-radius: 16px;
  display: grid; place-items: center;
  font-size: 24px;
  color: #fff;
}
.category-item span { font-size: 12.5px; font-weight: 600; color: var(--c-ink-soft); }

/* 分类配色（依次轮转，呼应主色系但有区分度） */
.cat-c1 { background: linear-gradient(135deg,#FF8A5C,#FF5238); }
.cat-c2 { background: linear-gradient(135deg,#FFC15C,#FF9A3E); }
.cat-c3 { background: linear-gradient(135deg,#3FD2A3,#18C37D); }
.cat-c4 { background: linear-gradient(135deg,#6FD3FF,#3E9CFF); }
.cat-c5 { background: linear-gradient(135deg,#C9A6FF,#9B6BFF); }
.cat-c6 { background: linear-gradient(135deg,#FF8FB4,#FF4F8B); }
.cat-c7 { background: linear-gradient(135deg,#FFD479,#FFB23E); }
.cat-c8 { background: linear-gradient(135deg,#9FB6FF,#6E8CFF); }

/* ---------- 发起抽奖大卡 ---------- */
.cta-launch {
  position: relative;
  background: linear-gradient(135deg, #2B2320 0%, #16110F 100%);
  border-radius: var(--r-lg);
  padding: 30px 26px;
  color: #fff;
  overflow: hidden;
}
.cta-launch::after {
  content: '';
  position: absolute;
  width: 220px; height: 220px;
  right: -60px; top: -60px;
  background: var(--grad-primary);
  border-radius: 50%;
  opacity: .35;
  filter: blur(10px);
}
.cta-launch h3 { font-family: var(--font-display); font-size: 21px; position: relative; z-index: 1; }
.cta-launch p { color: rgba(255,255,255,.7); font-size: 13.5px; margin: 8px 0 18px; position: relative; z-index: 1; max-width: 280px; }

/* ---------- Tabs + 抽奖卡片流 ---------- */
.draw-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 640px) { .draw-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .draw-grid { grid-template-columns: repeat(4, 1fr); } }

.draw-card { overflow: hidden; }
.draw-card-img {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--c-bg);
  overflow: hidden;
}
.draw-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease-soft); }
.draw-card:hover .draw-card-img img { transform: scale(1.06); }
.draw-card-badge { position: absolute; top: 10px; left: 10px; }
.draw-card-body { padding: 13px 14px 15px; }
.draw-card-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 39px;
}
.draw-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}
.draw-card-host { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--c-ink-faint); overflow: hidden; }
.draw-card-host img { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; }
.draw-card-host span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 空状态 ---------- */
.empty-state {
  text-align: center;
  padding: 56px 20px;
}
.empty-state svg { width: 120px; margin: 0 auto 18px; opacity: .8; }
.empty-state h4 { font-size: 16px; margin-bottom: 6px; }
.empty-state p { color: var(--c-ink-faint); font-size: 13.5px; margin-bottom: 20px; }

/* ---------- 滚动渐入 ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease-soft), transform .6s var(--ease-soft); }
.reveal.in-view { opacity: 1; transform: none; }

section + section { margin-top: 30px; }
.page-section { padding: 4px 0; }
