<template>
  <section class="h5-flowchart-container">
    <div class="flowchart-users">
      <User text="正常访客" :src="user1Icon" class="user1" />
      <User text="DDos" :src="user2Icon" :tail-src="user2Tail" class="user2" />
      <User text="异常访客" :src="user3Icon" :tail-src="user3Tail" class="user3" />
      <User text="... ..." :src="user4Icon" :tail-src="user4Tail" class="user4" />
    </div>
    <div class="flowchart-arrow">
      <img class="arrow" src="~/assets/svg/home/arrow.svg" alt="arrow" />
      <div class="text1 text-box">浏览器域名</div>
      <div class="text2 text-box">DNS引流</div>
      <div class="text3 text-box">SDK引流</div>
      <div class="text4 text-box">移动端/PC/客户端APP（Android、ios、Windows）</div>
    </div>
    <div class="flowchart-block">
      <div class="block-ads">
        <div class="block-title">
          清洗系统（ADS）集群
        </div>
        <div class="ads-contnet">
          <div class="ads-text">近源清洗</div>
          <div class="ads-text">BGP调度</div>
          <div class="ads-text">SYN\ UDP\ACK......</div>
        </div>
      </div>
      <div class="block-arrow1">
        <img class="arrow1" src="~/assets/svg/home/arrow1.svg" alt="arrow1">
      </div>
      <div class="block-yun">
        <div class="block-title">
          云端纵深防御平台
        </div>
        <div class="yun-contnet">
          <div class="yun-item">
            <div class="yun-item-title">WAF</div>
            <div class="yun-item-desc">防漏洞、防入侵、防爬虫、<br>防盗链Web蜜网、敏感词替换......</div>
          </div>
          <div class="yun-item">
            <div class="yun-item-title">CC防护</div>
            <div class="yun-item-desc">经典防御策略模式，精准访问控制（DIY）</div>
          </div>
          <div class="yun-item">
            <div class="yun-item-title">DDoS防护</div>
            <div class="yun-item-desc">节点调度网络（Web、TCP、SDK）</div>
          </div>
          <div class="yun-item">
            <div class="yun-item-title">性能优化</div>
            <div class="yun-item-desc">页面压缩、异步加载、移动端跳转全链路优化、Web自适应、高级缓存</div>
          </div>
        </div>
      </div>
    </div>
    <div class="flowchart-footer">
      <div class="footer-left">
        <div class="left-top">
          <div class="footer-text left-text">安全联动</div>
          <img class="top-img" src="~/assets/svg/home/arrow5.svg" alt="arrow5" />
        </div>
        <div class="left-content">
          <div class="block-title">
            大数据安全运营分析中心
          </div>
          <div class="center-content">
            <div class="center-row">
              <div class="center-item half">
                <div class="item-title">AI实时决策引擎</div>
                <div class="item-desc">日志管理、漏洞扫描</div>
              </div>
              <div class="center-item half">
                <div class="item-title">语义语法分析引擎</div>
                <div class="item-desc">运营分析、安全值守</div>
              </div>
            </div>
            <div class="center-row">
              <div class="center-item half">
                <div class="item-title">规则监测引擎</div>
                <div class="item-desc">威胁情报、安全重保</div>
              </div>
              <div class="center-item half">
                <div class="item-title">威胁情报</div>
                <div class="item-desc">渗透测试、大屏展示</div>
              </div>
            </div>
            <div class="center-item full">
              <div class="item-title">安全分析统计</div>
              <div class="item-desc">cc攻击分析、漏洞入侵分析、BOT面板、实时态势......</div>
            </div>
            <div class="center-item full">
              <div class="item-title">业务访问分析统计</div>
              <div class="item-desc">访问分析、热点URL、热点子域名、请求分布、状态码、流量宽带......</div>
            </div>
          </div>
        </div>
      </div>
      <div class="footer-right">
        <div class="right-top">
          <div class="footer-text right-text">洁净流量</div>
          <img class="right-img" src="~/assets/svg/home/arrow6.svg" alt="arrow6 " />
        </div>
        <div class="right-server">
          <img class="server-img" src="~/assets/svg/home/server.svg" alt="server" />
          <img  class="arrow4" src="~/assets/svg/home/arrow4.svg" alt="arrow4">
        </div>
        <div class="server-text">
          源服务器
        </div>
      </div>
    </div>
  </section>
</template>
<script setup>
import User from '~/components/mobile/home/User.vue'
import user1Icon from '~/assets/svg/home/user1.svg'
import user2Icon from '~/assets/svg/home/user2.svg'
import user3Icon from '~/assets/svg/home/user3.svg'
import user4Icon from '~/assets/svg/home/user4.svg'
import user2Tail from '~/assets/svg/home/user2-tail.svg'
import user3Tail from '~/assets/svg/home/user3-tail.svg'
import user4Tail from '~/assets/svg/home/user4-tail.svg'
</script>
<style lang="scss" scoped>
.h5-flowchart-container {
  width: 343px;
  position: relative;
  box-sizing: border-box;
  margin: 0 auto;

  .flowchart-users {
    position: relative;

    .user1 {
      position: absolute;
      top: 0;
      left: 75px;
      z-index: 1;
    }

    .user2 {
      position: absolute;
      top: 0;
      right: 112px;
    }

    .user3 {
      position: absolute;
      top: 0;
      right: 56px;
    }

    .user4 {
      position: absolute;
      top: 0;
      right: 0;
    }

  }

  .flowchart-arrow {
    position: relative;
    color: #FFF;
    font-size: 10px;
    font-weight: 400;

    .arrow {
      position: absolute;
      width: 148px;
      top: 35px;
      left: 26px;
      z-index: 0;
    }

    .text-box {
      position: absolute;
      display: flex;
      justify-content: center;
      align-items: center;
      border-radius: 3px;
      border: 1px solid #8457FF;
      background: #3F327D;
    }

    .text1 {
      left: 0;
      top: 70px;
      width: 88px;
      height: 20px;
    }

    .text2 {
      left: 6px;
      top: 102px;
      width: 65px;
      height: 18px;
    }

    .text3 {
      left: 142px;
      top: 104px;
      width: 52px;
      height: 17px;
    }

    .text4 {
      right: 0;
      top: 56px;
      width: 159px;
      height: 34px;
    }
  }

  .block-title {
    width: 100%;
    height: 20px;
    background: rgba(128, 119, 255, 0.50);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    color: #FFF;
    font-weight: 400;
  }

  .flowchart-block {
    width: 100%;
    padding-top: 138px;

    .block-ads {
      width: 100%;
      border-radius: 4px;
      border: 1px solid #8B74FF;
      background: rgba(63, 51, 125, 0.30);
      color: #FFF;
      font-weight: 400;
      line-height: 6px;

      .ads-contnet {
        font-size: 10px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: space-around;

        .ads-text {
          display: flex;
          width: 99px;
          height: 20px;
          justify-content: center;
          align-items: center;
          border-radius: 3px;
          background: rgba(139, 116, 255, 0.50);
        }
      }
    }



    .block-yun {
      width: 100%;
      border-radius: 4px;
      border: 1px solid #8077FF;
      background: rgba(63, 51, 125, 0.30);
    }

    .yun-contnet {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 8px;
      padding: 8px 0;
      position: relative;


      .yun-item {
        border-radius: 4px;
        background: rgba(139, 116, 255, 0.50);
        display: flex;
        flex-direction: column;
        width: 160px;
        padding: 6px;
        box-sizing: border-box;
        position: relative;
        z-index: 1;

        .yun-item-title {
          color: #FFF;
          font-size: 12px;
          font-weight: 700;
        }

        .yun-item-desc {
          color: #FFF;
          font-size: 10px;
          font-weight: 400;
          text-align: left;
          flex: 1;
        }
      }
    }



    .block-arrow1 {
      display: flex;
      justify-content: center;
    }
  }

  .flowchart-footer {
    width: 100%;
    display: flex;
    box-sizing: border-box;

    .footer-text {
      position: absolute;
      display: flex;
      width: 80px;
      height: 18px;
      justify-content: center;
      align-items: center;
      border-radius: 2px;
      border: 1px solid #CBC9FF;
      background: #3F337D;
      box-shadow: 0 5.5px 10px 0 rgba(181, 179, 227, 0.30);
      color: #FFF;
      font-size: 12px;
      font-weight: 400;
      z-index: 1;
    }

    .left-text {
      top: 16px;
      left: 128px;
    }

    .right-text {
      top: 61px;
      left: 9px;
    }
  }

  .footer-left {
    width: 254px;

    .left-top {
      position: relative;

      .top-img {
        position: relative;
        width: 14px;
        height: 60px;
        left: 156px;
      }
    }

    .left-content {
      width: 100%;
      border-radius: 4px;
      border: 1px solid #8077FF;
      background: rgba(63, 51, 125, 0.30);
      display: flex;
      flex-direction: column;
      box-sizing: border-box;

      .center-content {
        flex: 1;
        padding: 6px 10px 17px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 6px;

        .center-row {
          display: flex;
          justify-content: space-between;
          gap: 6px;
          width: 100%;
        }

        .center-item {
          display: flex;
          width: 236px;
          background: rgba(139, 116, 255, 0.50);
          border-radius: 10px;
          flex-direction: column;
          justify-content: center;
          box-sizing: border-box;
          padding: 2px 6px;
          gap: 2px;

          &.half {
            width: 114px;
          }

          &.full {
            width: 100%;
          }

          .item-title {
            color: #FFF;
            font-size: 12px;
            font-weight: 700;
          }

          .item-desc {
            color: #FFF;
            font-size: 10px;
            font-weight: 400;
          }
        }
      }
    }
  }

  .footer-right {
    width: 89px;

    .right-top {
      position: relative;
    }

    .right-img {
      position: relative;
      width: 14px;
      height: 196px;
      left: 40px;
    }

    .right-server {
      position: relative;
    }

    .arrow4 {
      position: absolute;
      left: 0;
      width: 14px;
      top: 34px;
    }

    .server-img {
      position: relative;
      width: 72px;
      height: 56px;
      left: 9px;
      z-index: 1;
    }

    .server-text {
      display: flex;
      width: 80px;
      height: 24px;
      justify-content: center;
      align-items: center;
      border-radius: 2px;
      border: 1px solid #CBC9FF;
      background: #3F337D;
      box-shadow: 0 5.5px 10px 0 rgba(181, 179, 227, 0.30);
      color: #FFF;
      font-size: 12px;
      font-weight: 400;
      margin: 24px 0 0 8px;
    }
  }

  .arrow1 {
    width: 14px;
    height: 20px;
  }
}
</style>
