<template>
  <section class="mb-web">
    <section class="video-section">
      <div class="cdn-dg">
        <NuxtImg class="cdn-bg" src="/images/products/cdn-bg.png" alt="cdn" />
      </div>
      <div class="video-title">
        <p class="video-text">Intelligent routing / dynamic optimization / real-time processing</p>
        <h1><span>智能</span>路由/<span>动态</span>优化/<span>实时</span>处理</h1>
        <div class="video-subtitle">不止于快，更稳更安全，为您的业务保驾护航</div>
        <div class="video-btn">
          <span>联系我们</span>
          <Icon name="line-md:chevron-right" />
        </div>
      </div>
      <section class="perspective-grid-section">
        <div class="perspective-container">
          <div class="grid-floor">
            <div class="grid-lines"></div>
          </div>
        </div>
      </section>
    </section>
    <section class="mb-cdn">
      <h2>678CDN功能</h2>
      <p>让科技为您的业务发光发亮，CDN功能助力您的网站顺畅、高效、安全地运作，同时提供数据防范和预防技术，让您的网站免于遭受恶意攻击</p>
    </section>
    <section class="mb-cdn-content">
      <div class="cdn-item">
        <div class="item-text">
          <h3>CDN内容分发</h3>
          <p>
            加速您的网站，最速达优化性能。CDN内容分发网络遍布五大洲，我们的CDN将使您的网站前所未有的更流畅，提升您的用户体验</p>
        </div>
        <NuxtImg class="item-img img1" src="/images/products/cdn.png" alt="cdn分发" />
      </div>
      <div class="cdn-item">
        <NuxtImg class="item-img img2" src="/images/products/678yun.png" alt="678云盾" />
        <div class="item-text">
          <h3>网站保护</h3>
          <p>
            使用678云盾高防CDN网站保护，网站攻击将无处遁形!我们的专业服务团队利用最佳技术和技巧为您提供安全性和可靠性保护，确保您的业务安全运营，稳步前进。</p>
        </div>
      </div>
    </section>
    <section class="mb-card-text">
      <h2>678CDN 特性</h2>
    </section>
    <section class="mb-cdn-cards">
      <div class="card-item" v-for="(card, index) in cards" :key="index">
        <div class="item-title">
          <img :src="card.icon" alt="icon" />
          <h4>{{ card.title }}</h4>
        </div>
        <div class="item-text">{{ card.text }}</div>
      </div>
    </section>
    <SecurityServicesSuite />
    <WebCard />
    
  </section>
</template>

<script setup>
useHead(() => ({
  title: 'Web安全加速 - 移动端',
  meta: [
    { name: 'viewport', content: 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' }
  ]
}))
import icon1 from '~/assets/svg/products/web/icon.svg'
import icon2 from '~/assets/svg/products/web/icon2.svg'
import icon3 from '~/assets/svg/products/web/icon3.svg'
import icon4 from '~/assets/svg/products/web/icon4.svg'
import icon5 from '~/assets/svg/products/web/icon5.svg'
import icon6 from '~/assets/svg/products/web/icon6.svg'
import SecurityServicesSuite from '~/components/mobile/products/SecurityServicesSuite.vue'
import WebCard from '~/components/mobile/products/WebCard.vue'

const cards = [
  {
    icon: icon1,
    title: 'Anycast',
    text: '通过单一IP地址在全球范围内提供所有内容，并确保低延迟的访问体验。',
  },
  {
    icon: icon2,
    title: 'HTTP/2',
    text: '除了支持HTTP/1.0和HTTP/1.1外，还支持更加高效的HTTP/2协议，进一步提升性能。',
  },
  {
    icon: icon3,
    title: 'HTTPS',
    text: '提供自定义SSL/TLS证书，确保使用您选定的域名以保障内容的安全性。',
  },
  {
    icon: icon4,
    title: '失效操作',
    text: '缓存内容删除仅需几分钟，快速响应并更新内容。',
  },
  {
    icon: icon5,
    title: '日志记录',
    text: '与Stackdriver Logging集成，为您提供每次缓存命中与未命中的详细日志信息。',
  },
  {
    icon: icon6,
    title: '安全',
    text: '多维度拦截（国家、URL、IP）、请求和带宽限制、CC保护。',
  }
]
</script>

<style scoped lang="scss">
.mb-web {
  .video-section {
    position: relative;
    width: 100%;
    height: 200px;
    margin: 0 auto;
    overflow: hidden;

    .cdn-dg {
      position: absolute;
      top: 0;
      right: -26px;
      background: url('/images/products/dengg.png') no-repeat center center;
      background-size: contain;
      width: 212px;
      height: 200px;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 1;

      .cdn-bg {
        position: relative;
        z-index: 1;
        animation: float 3s ease-in-out infinite;
      }

      :deep(img) {
        width: 140px;
        height: auto;
      }
    }

    @keyframes float {

      0%,
      100% {
        transform: translateY(0);
      }

      50% {
        transform: translateY(-10px);
      }
    }

    .video-title {
      position: relative;
      padding-top: 30px;
      width: 100%;
      z-index: 3;
      color: #fff;
      font-style: normal;
      display: flex;
      flex-direction: column;

      h1 {
        color: #D8D3FF;
        font-size: 15px;
        font-weight: 500;
        line-height: 16px;

        span {
          color: #997DFF;
        }
      }

      .video-subtitle {
        margin-top: 10px;
        width: 140px;
        color: #E2D9FF;
        font-size: 10px;
        font-weight: 400;
        line-height: 14px;
      }

      .video-text {
        color: #E2D9FF;
        font-size: 8px;
        font-weight: 300;
        line-height: 8px;
      }


      .video-btn {
        cursor: pointer;
        margin-top: 20px;
        display: flex;
        box-sizing: border-box;
        width: 85px;
        height: 24px;
        justify-content: center;
        align-items: center;
        gap: 10px;
        border-radius: 4px;
        color: #FFF;
        font-size: 10px;
        font-weight: 400;
        line-height: 14px;
        background: linear-gradient(91deg, #A39DFF 1.24%, #7D46FF 122.93%);
      }
    }
  }

  .perspective-grid-section {
    width: 100%;
    height: 100px;
    overflow: hidden;
    position: absolute;
    bottom: 0;
    background: transparent;
    perspective: 400px;
    z-index: 0;

    .perspective-container {
      width: 100%;
      height: 100%;
      display: flex;
      justify-content: center;
      align-items: flex-start;
      transform-style: preserve-3d;
    }

    .grid-floor {
      width: 200%;
      height: 400px;
      position: relative;
      transform: rotateX(60deg);
      transform-origin: center top;
      overflow: hidden;
    }

    .grid-lines {
      width: 100%;
      height: 200%;
      background-image:
        linear-gradient(rgba(22, 24, 75, 0.5) 1px, transparent 1px),
        linear-gradient(90deg, rgba(22, 24, 75, 0.5) 1px, transparent 1px);
      background-size: 50px 50px;
      animation: gridMove 4s linear infinite;
    }

    &::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 100px;
      background: linear-gradient(to bottom, transparent 0%, #030014 100%);
      pointer-events: none;
      z-index: 1;
    }
  }

  @keyframes gridMove {
    0% {
      transform: translateY(-50%);
    }

    100% {
      transform: translateY(0);
    }
  }

  .mb-cdn {
    padding-top: 24px;
    text-align: center;

    h2 {
      font-size: 20px;
      font-weight: 500;
      background: linear-gradient(90deg, #B8AFFF 20.05%, #C597FF 101.05%);
      background-clip: text;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    color: rgba(255, 255, 255, 0.60);
    font-size: 12px;
    font-weight: 400;
    line-height: 24px;
  }

  .mb-cdn-content {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    margin: 30px auto 0;
    gap: 10px;

    .cdn-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;

      .item-img {
        flex-shrink: 0;
      }

      .img1 {
        width: 154px;
        height: auto;
      }

      .img2 {
        width: 140px;
        height: auto;
      }
    }
  }

  .item-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;

    h3 {
      font-size: 16px;
      font-weight: 500;
      background: linear-gradient(91deg, #B8AFFF 10.8%, #C597FF 108.3%);
      background-clip: text;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    p {
      width: 100%;
      color: rgba(255, 255, 255, 0.60);
      font-size: 12px;
      font-weight: 400;
      line-height: 20px;
    }
  }

  .mb-card-text {
    padding: 16px 0;
    text-align: center;
    font-size: 20px;
    font-weight: 500;
    background: linear-gradient(90deg, #B8AFFF 20.05%, #C597FF 101.05%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .mb-cdn-cards {
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;

    .card-item {
      display: flex;
      flex-direction: column;
      gap: 6px;
      padding: 10px;
      border-radius: 4px;
      border: 1px solid rgba(255, 255, 255, 0.10);
      background: rgba(255, 255, 255, 0.10);

      .item-title {
        display: flex;
        gap: 8px;
        align-items: center;

        img {
          width: 22px;
          height: 22px;
        }

        h4 {
          color: #FFF;
          font-size: 14px;
          font-style: normal;
          font-weight: 700;
        }
      }

      .item-text {
        width: 100%;
        color: rgba(255, 255, 255, 0.60);
        font-size: 10px;
        font-weight: 400;
        line-height: 14px;
      }
    }
  }
}
</style>
