<template>
  <section class="mb-index">
    <section>
      <div class="mb-home-title">
        <h1>您专注业务，我们守护安全再强的攻击,也有攻不破的防线</h1>
        <p>高防服务器 | 高防DNS | 游戏盾SDK高防CDN 全方位守护您的业务</p>
      </div>
      <div class="mb-video-content">
        <video ref="videoRef" class="mb-video" preload="auto" :src="homeVideo" autoplay loop muted playsinline
          @loadedmetadata="onVideoLoaded"></video>
        <ParticlesCanvas :size="1" class="canvas-overlay" />
        <ProductTabs />
      </div>
    </section>
  </section>
</template>

<script setup>
import homeVideo from '~/assets/video/home.webm'
import ProductTabs from '~/components/mobile/home/ProductTabs.vue';
</script>

<style scoped lang="scss">
.mb-index {
  .mb-home-title {
    position: relative;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 1;

    h1 {
      text-align: center;
      width: 240px;
      font-size: 18px;
      font-weight: 500;
      line-height: 26px;
      background: linear-gradient(90deg, #7C4DFF 0.24%, #DEB9FF 45.03%, #617FFF 132.52%);
      background-clip: text;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    p {
      color: rgba(255, 255, 255, 0.80);
      width: 184px;
      text-align: center;
      font-size: 12px;
      font-weight: 350;
      line-height: 20px;
    }
  }

  .mb-video-content {
    position: relative;
    margin-top: -10%;
    z-index: 0;


    .mb-video {
      width: 100%;
      height: auto;
    }

    .canvas-overlay {
      position: absolute;
      top: 40%;
      transform: translateY(-50%);
      left: 0;
      height: 80px;
    }
  }


}
</style>
