<script setup>
import { usePageTitle } from '../../composables/Core/usePageTitle'
import { useNavigate } from '../../composables/Core/useNavigate'

usePageTitle('Page Not Found')
const { navigate } = useNavigate()
</script>

<template>
  <div class="notfound-page min-vh-100 d-flex align-items-center justify-content-center p-4">
    <div class="notfound-container glass-card text-center p-5 shadow-lg animate-fade-in">
      <div class="illustration-container mb-4">
        <div class="notfound-404 shadow-text">404</div>
        <div class="notfound-icon">
          <i class="fas fa-search-location"></i>
        </div>
      </div>
      
      <h2 class="fw_8 mb-3 premium-title">Lost in the Fields?</h2>
      <p class="text-muted mb-5 px-3">
        The page you're looking for doesn't exist or has been relocated to a new plot.
      </p>
      
      <button 
        @click="navigate({ page: 'Home' })" 
        class="btn btn-primary btn-lg rounded-pill px-5 py-3 fw_7 shadow-primary-lg glow-button"
      >
        <i class="fas fa-home me-2"></i>
        Back to Dashboard
      </button>
    </div>
  </div>
</template>

<style scoped>
.notfound-page {
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.05) 0%, transparent 25%),
              radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.05) 0%, transparent 25%);
}

.notfound-container {
  max-width: 500px;
  width: 100%;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

:global(.dark-mode) .notfound-container {
  background: rgba(31, 41, 55, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.illustration-container {
  position: relative;
  height: 180px;
}

.notfound-404 {
  font-size: 10rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.1;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.notfound-icon {
  font-size: 5rem;
  color: #3b82f6;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 10px 15px rgba(59, 130, 246, 0.3));
}

.premium-title {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

:global(.dark-mode) .premium-title {
  background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.shadow-primary-lg {
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

.glow-button {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glow-button:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(59, 130, 246, 0.5);
  filter: brightness(1.1);
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
</style>
