<template>
  <div class="error-page">
    <div class="container">
      <h1 class="error-code">{{ error.statusCode }}</h1>
      <p class="error-message">
        {{ error.statusCode === 404 ? '页面不存在' : '出了点问题' }}
      </p>
      <p class="error-desc">
        您访问的页面可能已移动或不存在，请返回首页继续浏览。
      </p>
      <NuxtLink to="/" class="error-back">返回首页</NuxtLink>
    </div>
  </div>
</template>

<script setup>
defineProps({
  error: { type: Object, required: true },
})

useHead({
  title: '页面未找到 - 呼籁旅行',
  meta: [
    { name: 'description', content: '您访问的页面不存在，请返回呼籁旅行首页继续浏览呼伦贝尔家庭定制游产品和服务。' },
    { name: 'robots', content: 'noindex' },
  ],
})
</script>

<style lang="less" scoped>
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  text-align: center;
}

.error-code {
  font-size: 80px;
  font-weight: @font-weight-bold;
  color: @color-primary-lighter;
  line-height: 1;
}

.error-message {
  margin-top: @space-md;
  font-size: @font-size-xl;
  color: @color-text-primary;
}

.error-desc {
  margin-top: @space-sm;
  color: @color-text-muted;
}

.error-back {
  display: inline-block;
  margin-top: @space-xl;
  padding: @space-md @space-xl;
  background: @color-primary;
  color: #fff;
  border-radius: @border-radius-md;
  text-decoration: none;
  font-weight: @font-weight-medium;
  transition: background @transition-fast;

  &:hover {
    background: @color-primary-light;
    color: #fff;
  }
}
</style>
