<template>
  <div class="guide-card">
    <div class="guide-illustration" style="background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);">
      <div class="illus-bubble bubble-1">🎊</div>
      <div class="illus-bubble bubble-2">🏅</div>
      <div class="illus-center">🎉</div>
    </div>

    <div class="guide-body">
      <div class="guide-badge">Step 4</div>
      <h2 class="guide-title">参与活动，赢取大奖</h2>
      <p class="guide-desc">节日活动、答题游戏、转盘抽奖...<br />参与活动可解锁<strong>限时积分奖励</strong>！</p>

      <!-- 活动类型展示 -->
      <div class="activity-list">
        <div class="activity-item" v-for="item in activities" :key="item.id">
          <span class="activity-icon">{{ item.icon }}</span>
          <div class="activity-info">
            <div class="activity-name">{{ item.name }}</div>
            <div class="activity-reward">+{{ item.reward }} 积分</div>
          </div>
          <span class="activity-tag">{{ item.tag }}</span>
        </div>
      </div>
    </div>

    <div class="guide-footer">
      <button class="btn-primary" @click="handleGoActivity">
        <span>🎯</span> 了解活动
      </button>
      <button v-if="false" class="btn-secondary" @click="$emit('next')">
        {{ isLast ? '完成新手教程 ✓' : '下一步' }}
      </button>
      <button class="btn-prev" v-if="!isFirst" @click="$emit('prev')">
        上一步
      </button>
    </div>
  </div>
</template>

<script>
export default {
  name: 'ActivityGuide',
  props: {
    isLast: { type: Boolean, default: false },
    isFirst: { type: Boolean, default: false },
    isReplay: { type: Boolean, default: false },
  },
  data() {
    return {
      activities: [
        { id: 1, icon: '🎮', name: '节日答题', reward: 50, tag: '限时' },
        { id: 2, icon: '🎡', name: '转盘抽奖', reward: 100, tag: '热门' },
        { id: 3, icon: '📝', name: '节日签到', reward: 30, tag: '每日' },
      ],
    }
  },
  methods: {
    handleGoActivity() {
      this.$router.push('/home/festiveEvents')
      setTimeout(() => this.$emit('next'), 500)
    },
  },
}
</script>

<style scoped>
@import './guide-common.css';

/* Step 4 专属样式 */
.guide-badge { color: #6a11cb; background: #f3eeff; }
.guide-desc strong { color: #6a11cb; }
.btn-primary {
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  box-shadow: 0 4px 14px rgba(106,17,203,0.3);
}
.btn-primary:hover { box-shadow: 0 6px 18px rgba(106,17,203,0.45); }

/* 活动列表 */
.activity-list { display: flex; flex-direction: column; gap: 8px; }
.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #f7f9fc;
  border-radius: 10px;
  transition: all 0.25s;
}
.activity-item:hover { background: #f3eeff; transform: translateX(4px); }
.activity-icon { font-size: 22px; }
.activity-info { flex: 1; }
.activity-name { font-size: 13px; font-weight: 600; color: #1d2129; }
.activity-reward { font-size: 12px; color: #6a11cb; font-weight: 700; margin-top: 2px; }
.activity-tag {
  padding: 2px 8px;
  font-size: 11px;
  color: #fff;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  border-radius: 10px;
}
</style>
