<script lang="ts" setup>
import Page from '@/components/page/Page.vue'

const a = ref(false)
</script>

<template>
  <Page>
    <div class="welcome-container">
      <!-- 装饰元素 -->
      <div class="decor decor-1"></div>
      <div class="decor decor-2"></div>

      <!-- 左侧内容区 -->
      <div class="content">
        <h1>欢迎使用<br><span>再昇云智能收运系统</span></h1>
        <p>高效、安全、智能的一站式管理平台，助力您的业务腾飞。全新界面，极致体验，即刻开启您的数字化之旅。</p>
        <!-- <a href="#" class="btn">进入系统</a> -->
        <!-- <p>
          <ElButton :disabled="a" circle>Default</ElButton>
          <ElButton :disabled="a" type="primary">进入系统</ElButton>
          <ElButton :disabled="a" type="success">进入系统</ElButton>
          <ElButton :disabled="a" type="info">进入系统</ElButton>
          <ElButton :disabled="a" type="warning">进入系统</ElButton>
          <ElButton :disabled="a" type="danger">进入系统</ElButton>
        </p>
        <p>
          <ElButton :disabled="a" plain>Plain</ElButton>
          <ElButton :disabled="a" plain type="primary">进入系统</ElButton>
          <ElButton :disabled="a" plain type="success">进入系统</ElButton>
          <ElButton :disabled="a" plain type="info">进入系统</ElButton>
          <ElButton :disabled="a" plain type="warning">进入系统</ElButton>
          <ElButton :disabled="a" plain type="danger">进入系统</ElButton>
        </p>
        <p>
          <ElButton :disabled="a" text>Text</ElButton>
          <ElButton :disabled="a" text type="primary">进入系统</ElButton>
          <ElButton :disabled="a" text type="success">进入系统</ElButton>
          <ElButton :disabled="a" text type="info">进入系统</ElButton>
          <ElButton :disabled="a" text type="warning">进入系统</ElButton>
          <ElButton :disabled="a" text type="danger">进入系统</ElButton>
        </p>
        <p>
          <ElButton :disabled="a" link>Link</ElButton>
          <ElButton :disabled="a" link type="primary">进入系统</ElButton>
          <ElButton :disabled="a" link type="success">进入系统</ElButton>
          <ElButton :disabled="a" link type="info">进入系统</ElButton>
          <ElButton :disabled="a" link type="warning">进入系统</ElButton>
          <ElButton :disabled="a" link type="danger">进入系统</ElButton>
        </p> -->
      </div>

      <!-- 右侧图形区 -->
      <div class="graphic">
        <!-- <img class="welcome-svg" src="@/assets/images/zsy.png" alt=""> -->
        <svg class="welcome-svg" viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg">
          <!-- 背景圆形 -->
          <circle class="circle-bg" cx="200" cy="200" r="180"/>

          <!-- 主圆形 -->
          <circle class="circle-primary" cx="200" cy="200" r="80"/>

          <!-- 装饰线条 -->
          <path class="path-line" d="M 80 200 Q 140 120 200 100 Q 260 120 320 200 Q 260 280 200 300 Q 140 280 80 200 Z"/>

          <!-- 星形图标 -->
          <g class="icon-star">
            <path d="M200 60 L225 140 L310 140 L240 190 L260 270 L200 220 L140 270 L160 190 L90 140 L175 140 Z"/>
          </g>

          <!-- 小点装饰 -->
          <circle cx="100" cy="100" fill="#5D87FF" r="8"/>
          <circle cx="300" cy="300" fill="#5D87FF" r="8"/>
          <circle cx="300" cy="100" fill="#5D87FF" r="8"/>
          <circle cx="100" cy="300" fill="#5D87FF" r="8"/>
        </svg>
      </div>
    </div>
  </Page>
</template>

<style lang="stylus" scoped>
/* 欢迎页容器 */
.welcome-container {
  width: 100%;
  max-width: 1200px;
  padding: 40px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  position: relative;
}

/* 左侧内容区域 */
.content {
  flex: 1;
  min-width: 300px;
  z-index: 10;
}

.content h1 {
  font-size: 3.5rem;
  color: #2C3E50;
  margin-bottom: 20px;
  line-height: 1.2;
}

.content h1 span {
  color: #5D87FF;
}

.content p {
  font-size: 1.2rem;
  color: #6C757D;
  margin-bottom: 40px;
  line-height: 1.6;
  max-width: 500px;
  //width: 7500px;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 12px 36px;
  background-color: #5D87FF;
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(93, 135, 255, 0.3);
}

.btn:hover {
  background-color: #4A76EE;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(93, 135, 255, 0.4);
}

/* 右侧图形区域 */
.graphic {
  flex: 1;
  min-width: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* SVG 图形样式 */
.welcome-svg {
  width: 100%;
  max-width: 500px;
  height: auto;
  animation: float 6s ease-in-out infinite;
}

/* SVG 元素动画 */
.circle-bg {
  fill: rgba(93, 135, 255, 0.1);
}

.circle-primary {
  fill: #5D87FF;
  animation: pulse 3s ease-in-out infinite;
}

.path-line {
  stroke: #5D87FF;
  stroke-width: 2;
  fill: none;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: draw 3s ease forwards;
}

.icon-star {
  fill: #5D87FF;
  transform-origin: center;
  animation: rotate 8s linear infinite;
}

/* 装饰元素 */
.decor {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-color: rgba(93, 135, 255, 0.05);
  z-index: 1;
}

.decor-1 {
  top: 20px;
  left: 20px;
}

.decor-2 {
  bottom: 20px;
  right: 20px;
}

/* 动画定义 */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* 响应式适配 */
@media (max-width: 768px) {
  .content h1 {
    font-size: 2.5rem;
  }

  .content p {
    font-size: 1rem;
  }

  .welcome-container {
    flex-direction: column;
    text-align: center;
  }

  .content {
    order: 2;
  }

  .graphic {
    order: 1;
  }
}
</style>
