<template>
  <section class="section-scenes relative overflow-hidden py-28" ref="sectionRef">
    <!-- 背景 -->
    <div class="absolute inset-0" style="background: linear-gradient(180deg, #ffffff 0%, #f8f5ff 50%, #f0f4ff 100%);"></div>
    <!-- 背景装饰圆 -->
    <div class="absolute inset-0 pointer-events-none overflow-hidden">
      <div class="scene-bg-orb scene-bg-orb-1"></div>
      <div class="scene-bg-orb scene-bg-orb-2"></div>
    </div>

    <div class="relative z-10 max-w-7xl mx-auto px-6">
      <!-- 标题 -->
      <div class="text-center mb-16 reveal-up" :class="{ 'is-visible': isVisible }">
        <span class="inline-flex items-center gap-2 bg-violet-50 border border-violet-200 text-violet-600 text-xs font-bold px-4 py-1.5 rounded-full mb-5 tracking-widest uppercase">
          <span class="w-1.5 h-1.5 bg-violet-500 rounded-full animate-pulse"></span>
          应用场景
        </span>
        <h2 class="text-5xl lg:text-6xl font-black text-gray-900 mb-5 leading-tight">
          工作流<span class="scenes-gradient-text">无处不在</span>
        </h2>
        <p class="text-gray-500 text-lg max-w-2xl mx-auto leading-relaxed">
          从内容创作到企业运营，AI 工作流正在重塑每一个行业的工作方式
        </p>
      </div>

      <!-- 场景切换 Tab -->
      <div class="flex flex-wrap justify-center gap-3 mb-14 reveal-up" :class="{ 'is-visible': isVisible }" style="transition-delay: 0.15s;">
        <button
          v-for="(scene, i) in scenes"
          :key="i"
          @click="switchScene(i)"
          class="scene-tab-btn"
          :class="activeScene === i ? 'scene-tab-active' : 'scene-tab-inactive'"
        >
          <span class="scene-tab-icon">{{ scene.icon }}</span>
          <span>{{ scene.name }}</span>
          <span class="scene-tab-count" :class="activeScene === i ? 'scene-tab-count-active' : ''">{{ scene.count }}</span>
        </button>
      </div>

      <!-- 主展示区 -->
      <div class="grid grid-cols-1 lg:grid-cols-2 gap-8 items-stretch reveal-up" :class="{ 'is-visible': isVisible }" style="transition-delay: 0.3s;">

        <!-- 左侧：场景可视化 -->
        <div class="scene-visual-card" ref="visualCardRef" @mousemove="onCardMouseMove" @mouseleave="onCardMouseLeave">
          <!-- 图片层 -->
          <div class="scene-img-wrapper">
            <Transition name="scene-zoom">
              <img
                :key="activeScene"
                :src="currentScene.img"
                :alt="currentScene.name"
                class="scene-img"
              />
            </Transition>
            <div class="scene-img-overlay"></div>

            <!-- 顶部效率标签 -->
            <div class="scene-efficiency-badge">
              <span class="text-3xl font-black text-white">{{ currentScene.efficiency }}</span>
              <div>
                <div class="text-white text-xs font-bold">效率提升</div>
                <div class="text-white/60 text-xs">{{ currentScene.efficiencyLabel }}</div>
              </div>
            </div>

            <!-- 场景名称 -->
            <div class="scene-bottom-info">
              <div class="flex items-center gap-3 mb-2">
                <span class="text-3xl">{{ currentScene.icon }}</span>
                <h3 class="text-white text-2xl font-black">{{ currentScene.name }}</h3>
              </div>
              <p class="text-white/70 text-sm leading-relaxed mb-4">{{ currentScene.desc }}</p>

              <!-- 三项指标 -->
              <div class="grid grid-cols-3 gap-3">
                <div v-for="metric in currentScene.metrics" :key="metric.label"
                  class="scene-metric-card">
                  <div class="text-white font-black text-lg">{{ metric.value }}</div>
                  <div class="text-white/50 text-xs mt-0.5">{{ metric.label }}</div>
                </div>
              </div>
            </div>
          </div>

          <!-- 底部工具标签 -->
          <div class="scene-tools-bar">
            <span class="text-white/40 text-xs mr-2">集成工具：</span>
            <Transition name="tools-fade">
              <div :key="activeScene" class="flex flex-wrap gap-2">
                <span v-for="(tool, ti) in currentScene.tools" :key="tool"
                  class="scene-tool-tag"
                  :style="{ animationDelay: `${ti * 0.05}s` }">
                  {{ tool }}
                </span>
              </div>
            </Transition>
          </div>
        </div>

        <!-- 右侧：步骤流程 -->
        <div class="flex flex-col">
          <!-- 描述 -->
          <div class="mb-6">
            <Transition name="text-slide" mode="out-in">
              <div :key="activeScene">
                <h3 class="text-2xl font-black text-gray-900 mb-2">{{ currentScene.name }}</h3>
                <p class="text-gray-500 text-base leading-relaxed">{{ currentScene.longDesc }}</p>
              </div>
            </Transition>
          </div>

          <!-- 步骤列表（工作流节点卡片风格）-->
          <div class="flex-1">
            <Transition name="steps-fade" mode="out-in">
              <div :key="activeScene" class="wf-steps-container">
                <div
                  v-for="(step, idx) in currentScene.steps"
                  :key="step.title"
                  class="wf-step-row"
                  :style="{ animationDelay: `${idx * 0.1}s` }"
                >
                  <!-- 左侧：连接线 + 节点圆 -->
                  <div class="wf-step-spine">
                    <!-- 连接线（非最后一项才显示）-->
                    <div v-if="idx < currentScene.steps.length - 1" class="wf-spine-line">
                      <!-- 流动粒子 -->
                      <div class="wf-spine-particle" :style="{ animationDelay: `${idx * 0.4}s` }"></div>
                    </div>
                    <!-- 节点圆 -->
                    <div class="wf-step-node"
                      :class="step.done ? 'wf-node-done' : 'wf-node-pending'"
                      @click="activeStep = activeStep === idx ? -1 : idx">
                      <span v-if="step.done" class="wf-node-check">✓</span>
                      <span v-else class="wf-node-num">{{ idx + 1 }}</span>
                      <!-- 脉冲环（未完成节点）-->
                      <div v-if="!step.done" class="wf-node-pulse"></div>
                    </div>
                  </div>

                  <!-- 右侧：节点卡片 -->
                  <div class="wf-step-card"
                    :class="activeStep === idx ? 'wf-step-card-active' : 'wf-step-card-inactive'"
                    @click="activeStep = activeStep === idx ? -1 : idx">
                    <!-- 卡片顶部 -->
                    <div class="wf-step-card-top">
                      <div class="wf-step-card-title">{{ step.title }}</div>
                      <div class="wf-step-card-badges">
                        <span class="wf-step-time-badge">⏱ {{ step.time }}</span>
                        <span class="wf-step-status-badge" :class="step.done ? 'wf-status-done' : 'wf-status-pending'">
                          {{ step.done ? '已完成' : '待执行' }}
                        </span>
                      </div>
                    </div>
                    <!-- 描述 -->
                    <div class="wf-step-card-desc">{{ step.desc }}</div>
                    <!-- 展开标签 -->
                    <Transition name="tags-expand">
                      <div v-if="activeStep === idx" class="wf-step-tags">
                        <span v-for="tag in step.tags" :key="tag" class="wf-step-tag">{{ tag }}</span>
                      </div>
                    </Transition>
                  </div>
                </div>
              </div>
            </Transition>
          </div>

          <!-- CTA 按钮 -->
          <div class="mt-6 flex gap-3">
            <button class="scene-cta-primary flex-1">
              立即体验 · {{ currentScene.name }} →
            </button>
            <button class="scene-cta-secondary px-5">
              查看案例
            </button>
          </div>
        </div>
      </div>
    </div>
  </section>
</template>

<script setup>
import { ref, computed, onMounted } from 'vue'

const activeScene = ref(0)
const activeStep = ref(0)
const isVisible = ref(false)
const sectionRef = ref(null)
const visualCardRef = ref(null)

onMounted(() => {
  const observer = new IntersectionObserver(
    (entries) => { entries.forEach(e => { if (e.isIntersecting) { isVisible.value = true; observer.unobserve(e.target) } }) },
    { threshold: 0.1 }
  )
  if (sectionRef.value) observer.observe(sectionRef.value)
})

function onCardMouseMove(e) {
  const card = visualCardRef.value
  if (!card) return
  const rect = card.getBoundingClientRect()
  const x = (e.clientX - rect.left) / rect.width - 0.5
  const y = (e.clientY - rect.top) / rect.height - 0.5
  card.style.transform = `perspective(1000px) rotateY(${x * 8}deg) rotateX(${-y * 6}deg) scale(1.02)`
}
function onCardMouseLeave() {
  if (visualCardRef.value) {
    visualCardRef.value.style.transform = 'perspective(1000px) rotateY(0deg) rotateX(0deg) scale(1)'
  }
}

const scenes = [
  {
    icon: '✍️', name: '内容创作', count: '428x',
    efficiency: '10x', efficiencyLabel: '内容产出',
    img: 'https://images.unsplash.com/photo-1455390582262-044cdead277a?w=800&h=600&fit=crop&q=80',
    desc: 'AI 驱动的内容生产流水线，从关键词输入到多平台发布，全程自动化',
    longDesc: 'AI 驱动的内容生产流水线，从关键词输入到多平台发布，全程自动化，效率提升 10 倍。支持微信公众号、小红书、抖音等主流平台一键分发。',
    metrics: [{ value: '10x', label: '效率提升' }, { value: '4平台', label: '同步发布' }, { value: '<5min', label: '生产周期' }],
    tools: ['GPT-4', 'Claude', '微信公众号', '小红书', '抖音', 'n8n'],
    steps: [
      { title: '关键词输入', desc: '输入关键词，AI 自动扩展话题，批量生成内容大纲', time: '10s', done: true, tags: ['批量扩展', '话题分析'] },
      { title: 'AI 文案生成', desc: 'GPT-4 生成高质量文章，支持多种风格和语气调整', time: '40s', done: true, tags: ['GPT-4', 'Claude', '自动配图'] },
      { title: '多平台适配', desc: '自动调整格式，适配各平台字数限制和排版规范', time: '20s', done: true, tags: ['格式转换', '自动排版'] },
      { title: '一键发布', desc: '同步发布到所有平台，自动设置标签和发布时间', time: '5s', done: false, tags: ['多平台', '定时发布'] }
    ]
  },
  {
    icon: '🤖', name: '客服自动化', count: '528x',
    efficiency: '95%', efficiencyLabel: '自动回复率',
    img: 'https://images.unsplash.com/photo-1596526131083-e8c633c948d2?w=800&h=600&fit=crop&q=80',
    desc: '智能客服机器人，7×24h 自动处理客户咨询，准确率高达 95%',
    longDesc: '基于 FastGPT 知识库的智能客服系统，自动学习产品文档和历史对话，实现 95% 问题自动解答，大幅降低人工客服压力。',
    metrics: [{ value: '95%', label: '自动回复率' }, { value: '7×24h', label: '全天在线' }, { value: '<2s', label: '响应时间' }],
    tools: ['FastGPT', 'Coze', '微信', '飞书', '钉钉', 'Zendesk'],
    steps: [
      { title: '知识库构建', desc: '上传产品文档、FAQ，AI 自动解析并建立向量索引', time: '5min', done: true, tags: ['PDF解析', '向量化', '自动更新'] },
      { title: '意图识别', desc: '精准识别用户意图，分类路由到对应处理流程', time: '0.1s', done: true, tags: ['NLU', '多轮对话'] },
      { title: 'AI 智能回答', desc: '基于知识库生成精准回答，支持追问和澄清', time: '1.5s', done: true, tags: ['RAG检索', '上下文理解'] },
      { title: '人工介入', desc: '复杂问题自动转人工，附带完整对话上下文', time: '即时', done: false, tags: ['智能转接', '上下文传递'] }
    ]
  },
  {
    icon: '📊', name: '数据分析', count: '368x',
    efficiency: '8h→20min', efficiencyLabel: '报表生成',
    img: 'https://images.unsplash.com/photo-1551288049-bebda4e38f71?w=800&h=600&fit=crop&q=80',
    desc: '自动化数据采集、清洗、分析和报表生成，将 8 小时工作压缩到 20 分钟',
    longDesc: '从多数据源自动采集数据，经过清洗和分析后，自动生成可视化报表并推送到飞书、邮件等渠道，彻底解放数据分析师。',
    metrics: [{ value: '8h→20min', label: '报表生成' }, { value: '20+数据源', label: '统一接入' }, { value: '自动推送', label: '多渠道' }],
    tools: ['n8n', 'Python', 'MySQL', 'Google Sheets', '飞书', 'Slack'],
    steps: [
      { title: '多源数据采集', desc: '自动从数据库、API、Excel 等多源采集最新数据', time: '2min', done: true, tags: ['MySQL', 'API', 'Excel'] },
      { title: '数据清洗', desc: 'AI 自动识别异常值，标准化数据格式', time: '3min', done: true, tags: ['去重', '格式化', '异常检测'] },
      { title: '智能分析', desc: '自动计算关键指标，生成趋势分析和预测', time: '5min', done: true, tags: ['趋势分析', 'AI预测'] },
      { title: '报表推送', desc: '生成可视化报表，自动推送到指定渠道', time: '1min', done: false, tags: ['图表生成', '定时推送'] }
    ]
  },
  {
    icon: '💼', name: '销售赋能', count: '268x',
    efficiency: '3x', efficiencyLabel: '转化率提升',
    img: 'https://images.unsplash.com/photo-1552664730-d307ca884978?w=800&h=600&fit=crop&q=80',
    desc: '智能销售助手，自动跟进线索、生成个性化方案，转化率提升 3 倍',
    longDesc: '从线索获取到成单全流程自动化，AI 分析客户画像，生成个性化销售方案，自动跟进提醒，让销售团队专注高价值工作。',
    metrics: [{ value: '3x', label: '转化率提升' }, { value: '自动跟进', label: '线索管理' }, { value: '个性化', label: '方案生成' }],
    tools: ['Coze', 'Dify', 'Salesforce', '企业微信', '飞书', 'HubSpot'],
    steps: [
      { title: '线索智能评分', desc: 'AI 分析客户行为，自动评估线索质量和购买意向', time: '实时', done: true, tags: ['行为分析', '意向评分'] },
      { title: '个性化触达', desc: '根据客户画像生成个性化邮件和话术，自动发送', time: '5min', done: true, tags: ['个性化', '自动发送'] },
      { title: '跟进提醒', desc: '智能安排跟进时间，自动提醒销售人员关键节点', time: '自动', done: true, tags: ['智能提醒', 'CRM同步'] },
      { title: '方案生成', desc: 'AI 根据客户需求自动生成定制化销售方案', time: '2min', done: false, tags: ['方案定制', 'PDF生成'] }
    ]
  }
]

const currentScene = computed(() => scenes[activeScene.value])

const stepAnimating = ref(false)

function switchScene(idx) {
  if (activeScene.value === idx) return
  stepAnimating.value = true
  activeScene.value = idx
  activeStep.value = 0
  // 切换后重置动画状态
  setTimeout(() => { stepAnimating.value = false }, 100)
}
</script>

<style scoped>
/* 背景光晕 */
.scene-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}
.scene-bg-orb-1 {
  width: 600px; height: 600px;
  top: -200px; right: -100px;
  background: radial-gradient(circle, rgba(139,92,246,0.12) 0%, transparent 70%);
  animation: orbFloat 14s ease-in-out infinite;
}
.scene-bg-orb-2 {
  width: 500px; height: 500px;
  bottom: -150px; left: -100px;
  background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, transparent 70%);
  animation: orbFloat 18s ease-in-out infinite reverse;
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(25px, -35px); }
}

/* 渐变文字 */
.scenes-gradient-text {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 50%, #0ea5e9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Tab 按钮 */
.scene-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.scene-tab-active {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: white;
  box-shadow: 0 8px 24px rgba(124,58,237,0.35);
  transform: scale(1.05);
}
.scene-tab-inactive {
  background: white;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}
.scene-tab-inactive:hover {
  border-color: #c4b5fd;
  color: #7c3aed;
  background: #faf5ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(124,58,237,0.1);
}
.scene-tab-icon {
  font-size: 16px;
  transition: transform 0.3s ease;
}
.scene-tab-btn:hover .scene-tab-icon {
  transform: scale(1.2);
}
.scene-tab-count {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 20px;
  background: rgba(0,0,0,0.08);
  color: inherit;
  opacity: 0.7;
}
.scene-tab-count-active {
  background: rgba(255,255,255,0.2);
}

/* 视觉卡片 */
.scene-visual-card {
  border-radius: 24px;
  overflow: hidden;
  background: #111827;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease;
  box-shadow: 0 25px 60px rgba(0,0,0,0.25);
}
.scene-img-wrapper {
  position: relative;
  flex: 1;
  overflow: hidden;
}
.scene-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}
.scene-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #111827 0%, rgba(17,24,39,0.4) 50%, transparent 100%);
}
.scene-efficiency-badge {
  position: absolute;
  top: 20px; left: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 10px 16px;
}
.scene-bottom-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px;
}
.scene-metric-card {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 10px;
  text-align: center;
}
.scene-tools-bar {
  background: rgba(17,24,39,0.95);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.scene-tool-tag {
  font-size: 11px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  animation: tagFadeIn 0.3s ease both;
}
.scene-tool-tag:hover {
  background: rgba(139,92,246,0.2);
  border-color: rgba(139,92,246,0.4);
  color: #c4b5fd;
}
@keyframes tagFadeIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

/* ===== 工作流节点卡片步骤风格 ===== */
.wf-steps-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.wf-step-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  animation: stepFadeIn 0.4s ease both;
}
@keyframes stepFadeIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

/* 左侧连接线 + 节点圆 */
.wf-step-spine {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 32px;
  padding-top: 4px;
}
.wf-spine-line {
  flex: 1;
  width: 2px;
  min-height: 40px;
  background: linear-gradient(180deg, rgba(124,58,237,0.3), rgba(79,70,229,0.1));
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  margin: 4px 0;
  order: 2;
}
.wf-spine-particle {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #7c3aed;
  box-shadow: 0 0 6px #7c3aed;
  animation: particleFall 2s linear infinite;
}
@keyframes particleFall {
  0% { top: -6px; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 0.8; }
  100% { top: 100%; opacity: 0; }
}

/* 节点圆 */
.wf-step-node {
  position: relative;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
  order: 1;
  z-index: 2;
}
.wf-node-done {
  background: linear-gradient(135deg, #10B981, #059669);
  color: white;
  box-shadow: 0 4px 12px rgba(16,185,129,0.35);
}
.wf-node-done:hover {
  transform: scale(1.15);
  box-shadow: 0 6px 18px rgba(16,185,129,0.45);
}
.wf-node-pending {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: white;
  box-shadow: 0 4px 12px rgba(124,58,237,0.35);
}
.wf-node-pending:hover {
  transform: scale(1.15);
  box-shadow: 0 6px 18px rgba(124,58,237,0.45);
}
.wf-node-check { font-size: 13px; }
.wf-node-num { font-size: 11px; }

/* 节点脉冲环 */
.wf-node-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(124,58,237,0.4);
  animation: nodePulse 2s ease-in-out infinite;
}
@keyframes nodePulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 0; }
}

/* 右侧卡片 */
.wf-step-card {
  flex: 1;
  border-radius: 14px;
  border: 1px solid transparent;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 10px;
}
.wf-step-card-active {
  background: linear-gradient(135deg, rgba(124,58,237,0.06), rgba(79,70,229,0.04));
  border-color: rgba(124,58,237,0.25);
  box-shadow: 0 4px 20px rgba(124,58,237,0.1), inset 0 1px 0 rgba(255,255,255,0.8);
}
.wf-step-card-inactive {
  background: #fafafa;
  border-color: #f0f0f0;
}
.wf-step-card-inactive:hover {
  background: #faf5ff;
  border-color: rgba(196,181,253,0.5);
  box-shadow: 0 2px 12px rgba(124,58,237,0.06);
}
.wf-step-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
  gap: 8px;
}
.wf-step-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #1f2937;
  flex: 1;
}
.wf-step-card-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.wf-step-time-badge {
  font-size: 10px;
  font-weight: 600;
  color: #6b7280;
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 100px;
  font-family: monospace;
}
.wf-step-status-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
}
.wf-status-done {
  background: rgba(16,185,129,0.1);
  color: #059669;
}
.wf-status-pending {
  background: rgba(124,58,237,0.1);
  color: #7c3aed;
  animation: statusBlink 2s ease-in-out infinite;
}
@keyframes statusBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.wf-step-card-desc {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.5;
}
.wf-step-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}
.wf-step-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  background: rgba(124,58,237,0.08);
  color: #7c3aed;
  border: 1px solid rgba(124,58,237,0.15);
  border-radius: 100px;
}

/* CTA 按钮 */
.scene-cta-primary {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: white;
  font-size: 14px;
  font-weight: 700;
  padding: 14px 24px;
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}
.scene-cta-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.scene-cta-primary:hover {
  box-shadow: 0 12px 32px rgba(124,58,237,0.4);
  transform: translateY(-2px);
}
.scene-cta-primary:hover::before { opacity: 1; }
.scene-cta-secondary {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}
.scene-cta-secondary:hover {
  border-color: #c4b5fd;
  color: #7c3aed;
  background: #faf5ff;
}

/* 过渡动画 */
.scene-zoom-enter-active { transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.scene-zoom-leave-active { transition: all 0.3s ease; }
.scene-zoom-enter-from { opacity: 0; transform: scale(1.08); }
.scene-zoom-leave-to { opacity: 0; transform: scale(0.95); }

.text-slide-enter-active { transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.text-slide-leave-active { transition: all 0.25s ease; }
.text-slide-enter-from { opacity: 0; transform: translateY(12px); }
.text-slide-leave-to { opacity: 0; transform: translateY(-8px); }

.steps-fade-enter-active { transition: all 0.4s ease; }
.steps-fade-leave-active { transition: all 0.2s ease; }
.steps-fade-enter-from { opacity: 0; }
.steps-fade-leave-to { opacity: 0; }

.tools-fade-enter-active { transition: all 0.3s ease; }
.tools-fade-leave-active { transition: all 0.2s ease; }
.tools-fade-enter-from { opacity: 0; }
.tools-fade-leave-to { opacity: 0; }

.tags-expand-enter-active { transition: all 0.3s ease; }
.tags-expand-leave-active { transition: all 0.2s ease; }
.tags-expand-enter-from { opacity: 0; transform: translateY(-4px); }
.tags-expand-leave-to { opacity: 0; transform: translateY(-4px); }

/* 滚动动画 */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 响应式 ===== */

/* 标题响应式 */
.section-scenes h2 {
  font-size: clamp(2rem, 5vw, 3.75rem);
}

/* 平板（≤1024px）*/
@media (max-width: 1024px) {
  .section-scenes { padding-top: 5rem; padding-bottom: 5rem; }
  .scene-visual-card { min-height: 380px; }
}

/* 手机横屏 / 小平板（≤768px）*/
@media (max-width: 768px) {
  .section-scenes { padding-top: 4rem; padding-bottom: 4rem; }
  .section-scenes .max-w-7xl { padding-left: 1rem; padding-right: 1rem; }
  .scene-tab-btn { padding: 8px 14px; font-size: 13px; }
  .scene-visual-card { min-height: 300px; }
  .scene-efficiency-badge { top: 12px; left: 12px; padding: 8px 12px; }
  .scene-efficiency-badge .text-3xl { font-size: 1.5rem; }
  .scene-bottom-info { padding: 16px; }
  .scene-bottom-info h3 { font-size: 1.25rem; }
  .scene-bottom-info p { font-size: 0.8rem; }
  .scene-metric-card { padding: 8px 6px; }
  .scene-metric-card .text-lg { font-size: 1rem; }
  .scene-tools-bar { padding: 10px 14px; }
  .scene-step-item { padding: 10px 12px; gap: 10px; }
  .scene-step-num { width: 30px; height: 30px; font-size: 12px; }
  .scene-cta-primary, .scene-cta-secondary { padding: 11px 18px; font-size: 13px; }
}

/* 手机竖屏（≤480px）*/
@media (max-width: 480px) {
  .section-scenes { padding-top: 3rem; padding-bottom: 3rem; }
  .scene-tab-btn { padding: 7px 11px; font-size: 12px; gap: 5px; }
  .scene-tab-icon { font-size: 13px; }
  .scene-tab-count { display: none; }
  .scene-visual-card { min-height: 240px; }
  .scene-efficiency-badge { display: none; }
  .scene-bottom-info { padding: 12px; }
  .scene-bottom-info h3 { font-size: 1.1rem; }
  .scene-bottom-info .grid-cols-3 { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .scene-step-item { padding: 8px 10px; gap: 8px; }
  .scene-step-num { width: 26px; height: 26px; font-size: 11px; border-radius: 8px; }
  .scene-cta-primary, .scene-cta-secondary { padding: 10px 14px; font-size: 12px; }
}

/* 极小屏（≤360px）*/
@media (max-width: 360px) {
  .scene-tab-btn { padding: 6px 9px; font-size: 11px; }
  .scene-visual-card { min-height: 200px; }
  .scene-step-num { width: 24px; height: 24px; font-size: 10px; }
}
</style>
