<template>
  <div class="not-found-container">
    <div class="not-found-content">
      <div class="not-found-big">404</div>
      <div class="not-found-message">页面未找到</div>
      <div class="not-found-desc">很抱歉，您访问的页面不存在或已被删除。</div>
      <a href="javascript:void(0)" class="back-home-btn" @click.prevent="backToHome">
        返回首页
      </a>
    </div>
  </div>
</template>

<script lang="ts" setup>
import { useRouter } from "vue-router";

const router = useRouter();

const backToHome = () => {
  // 使用 /home 作为首页（Hash模式下的系统导航页）
  router.push("/home");
};
</script>

<style scoped>
.not-found-container {
  min-height: 100vh;
  background: linear-gradient(120deg, #6a82fb 0%, #fc5c7d 100%);
  display: flex;
  justify-content: center;
  align-items: center;
}

.not-found-content {
  background: #fff;
  padding: 60px 48px 40px;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  text-align: center;
  animation: float-in 0.8s cubic-bezier(0.7, 0.13, 0.45, 0.81) both;
}

.not-found-big {
  font-size: 100px;
  font-weight: bold;
  letter-spacing: 3px;
  background: linear-gradient(90deg, #6a82fb 0%, #fc5c7d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 18px;
}

.not-found-message {
  font-size: 28px;
  color: #222;
  margin-bottom: 10px;
  font-weight: 600;
}

.not-found-desc {
  font-size: 16px;
  color: #888;
  margin-bottom: 28px;
}

.back-home-btn {
  display: inline-block;
  background: linear-gradient(90deg, #6a82fb 0%, #fc5c7d 100%);
  color: #fff;
  padding: 10px 36px;
  border-radius: 24px;
  font-size: 16px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
  box-shadow: 0 2px 8px rgba(252, 92, 125, 0.07);
}

.back-home-btn:hover {
  background: linear-gradient(-90deg, #6a82fb 0%, #fc5c7d 100%);
}

@keyframes float-in {
  0% {
    transform: translateY(30px) scale(0.97);
    opacity: 0;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}
</style>
