<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>404 - Page Not Found | Vulpes</title>
    <link rel="icon" href="/icon.png">
    <link href="https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&display=swap" rel="stylesheet">
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
    <style>
        body {
            background-color: #131314;
            font-family: 'Lato', sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            margin: 0;
            color: white;
            overflow: hidden;
        }

        .error-container {
            text-align: center;
            max-width: 600px;
            padding: 20px; /* Reduced padding */
            position: relative;
            overflow: hidden;
        }

        .error-404 {
            font-size: 15rem;
            font-weight: bold;
            color: rgba(255,255,255,0.1);
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            z-index: 0;
            user-select: none;
            animation: glitch 3s infinite;
        }

        .error-content {
            position: relative;
            z-index: 1;
            margin-top: 40px; 
        }

        .error-title {
            font-size: 3rem;
            margin-bottom: -10px; 
            opacity: 0;
            animation: fadeIn 1s forwards 0.5s;
        }

        .error-description {
            font-size: 1.2rem;
            color: rgba(255,255,255,0.7);
            margin-bottom: 15px; /* Reduced margin-bottom */
            opacity: 0;
            animation: fadeIn 1s forwards 1s;
        }

        .authorize-btn {
            border: 2px solid white;
            color: white;
            background: transparent;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            padding: 10px 20px; /* Adjusted padding */
            border-radius: 50px;
            transition: all 0.3s ease;
            opacity: 0;
            animation: fadeIn 1s forwards 1.5s;
        }

        .authorize-btn:hover {
            background: rgba(255,255,255,0.1);
            transform: scale(1.05);
        }

        .authorize-btn i {
            font-size: 1.2em;
        }

        .background-grid {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: -1;
            opacity: 0.05;
        }

        @keyframes glitch {
            0%, 100% { transform: translate(-50%, -50%) scale(1); }
            25% { transform: translate(-50%, -50%) scale(1.01) skew(2deg, 2deg); }
            50% { transform: translate(-50%, -50%) scale(0.99) skew(-2deg, -2deg); }
            75% { transform: translate(-50%, -50%) scale(1.01) skew(1deg, 1deg); }
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
    </style>
</head>
<body>
    <div class="background-grid"></div>
    <div class="error-container">
        <div class="error-404">404</div>
        <div class="error-content">
            <h1 class="error-title">Page Not Found</h1>
            <p class="error-description">
                Oops! The page you're looking for doesn't exist
            </p>
            <button onclick="window.location.href='/'" class="authorize-btn">
                <i class="fas fa-home"></i> Return to Home
            </button>
        </div>
    </div>

    <script>
        function createBackgroundGrid() {
            const grid = document.querySelector('.background-grid');
            const gridSize = 20;

            for (let i = 0; i < gridSize * gridSize; i++) {
                const dot = document.createElement('div');
                dot.style.position = 'absolute';
                dot.style.width = `${100 / gridSize}%`;
                dot.style.height = `${100 / gridSize}%`;
                dot.style.left = `${(i % gridSize) * (100 / gridSize)}%`;
                dot.style.top = `${Math.floor(i / gridSize) * (100 / gridSize)}%`;
                dot.style.border = '1px solid rgba(255,255,255,0.05)';
                grid.appendChild(dot);
            }
        }

        createBackgroundGrid();
    </script>
</body>
</html>