<template>
  <div class="app-container home">
    <!-- <el-divider /> -->
    <div class="index-style">
      <div class="typewriter-container">
        <span v-for="(char, index) in 'welcome!'" :key="index" :style="{ animationDelay: `${index * 0.5}s` }" class="typewriter-char">{{
          char
        }}</span>
      </div>
    </div>
  </div>
</template>

<script setup name="Index" lang="ts">
const goTarget = (url: string) => {
  window.open(url, '__blank');
};
</script>

<style lang="scss" scoped>
.home {
  blockquote {
    padding: 10px 20px;
    margin: 0 0 20px;
    font-size: 17.5px;
    border-left: 5px solid #eee;
  }
  hr {
    margin-top: 20px;
    margin-bottom: 20px;
    border: 0;
    border-top: 1px solid #eee;
  }
  .col-item {
    margin-bottom: 20px;
  }

  ul {
    padding: 0;
    margin: 0;
  }

  font-family: 'open sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #676a6c;
  overflow-x: hidden;

  ul {
    list-style-type: none;
  }

  h4 {
    margin-top: 0px;
  }

  h2 {
    margin-top: 10px;
    font-size: 26px;
    font-weight: 100;
  }

  p {
    margin-top: 10px;

    b {
      font-weight: 700;
    }
  }

  .update-log {
    ol {
      display: block;
      list-style-type: decimal;
      margin-block-start: 1em;
      margin-block-end: 1em;
      margin-inline-start: 0;
      margin-inline-end: 0;
      padding-inline-start: 40px;
    }
  }
  .index-style {
    font-size: 48px;
    font-weight: bold;
    letter-spacing: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);

    .typewriter-container {
      display: flex;
    }

    .typewriter-char {
      opacity: 0;
      transform: translateY(20px) rotate(-5deg);
      animation:
        typewriter-animation 0.8s ease forwards,
        pulse 2s ease-in-out infinite 1s;
      color: #2d8cf0;
      text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
      transition: color 0.3s ease;

      &:hover {
        color: #f06292;
        transform: scale(1.1);
        animation-play-state: paused;
      }
    }
  }

  @keyframes typewriter-animation {
    0% {
      opacity: 0;
      transform: translateY(20px) rotate(-5deg);
    }
    50% {
      opacity: 0.5;
      transform: translateY(10px) rotate(-2deg);
    }
    100% {
      opacity: 1;
      transform: translateY(0) rotate(0deg);
    }
  }

  @keyframes pulse {
    0% {
      text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
      transform: scale(1);
    }
    50% {
      text-shadow:
        0 0 15px rgba(45, 140, 240, 0.8),
        0 0 30px rgba(45, 140, 240, 0.4);
      transform: scale(1.05);
    }
    100% {
      text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
      transform: scale(1);
    }
  }
}
</style>
