---
import BaseLayout from "../layouts/BaseLayout.astro";
---

<BaseLayout
    title="404 - Page Not Found | Hidden Den Cafe"
    description="This page doesn't exist in the Hidden Den."
>
    <div class="matrix-bg" aria-hidden="true"></div>

    <main class="not-found-page">
        <div class="container">
            <div class="content fade-in">
                <h1 class="error-code">404</h1>
                <div class="divider">══════════════════════════════</div>
                <h2 class="error-title">Lost in the Den?</h2>
                <p class="error-message">
                    This corner doesn't exist yet.
                </p>
                <div class="actions">
                    <a href="/" class="btn">[Back to Home]</a>
                    <a
                        href="https://git.hiddenden.cafe"
                        class="btn"
                        target="_blank"
                        rel="noopener noreferrer"
                    >
                        [Gitea]
                    </a>
                </div>
            </div>
        </div>
    </main>
</BaseLayout>

<style>
    .matrix-bg {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: -1;
        opacity: 0.03;
        background:
            linear-gradient(var(--color-accent) 1px, transparent 1px),
            linear-gradient(90deg, var(--color-accent) 1px, transparent 1px);
        background-size: 50px 50px;
        animation: grid-move 20s linear infinite;
    }

    @keyframes grid-move {
        0% { transform: translate(0, 0); }
        100% { transform: translate(50px, 50px); }
    }

    .not-found-page {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        padding: var(--space-md);
        padding-top: calc(var(--space-md) + 3rem);
    }

    .container {
        max-width: 500px;
        width: 100%;
        background: var(--color-glass);
        backdrop-filter: blur(10px);
        border: 1px solid var(--color-surface);
        border-radius: 8px;
        padding: var(--space-xl);
        text-align: center;
    }

    .error-code {
        font-size: 5rem;
        font-weight: bold;
        color: var(--color-warm);
        line-height: 1;
        margin: 0;
    }

    .divider {
        color: var(--color-surface);
        font-size: 0.75rem;
        margin: var(--space-md) 0;
        user-select: none;
    }

    .error-title {
        font-size: 1.25rem;
        margin: 0 0 var(--space-sm) 0;
        color: var(--color-accent);
    }

    .error-message {
        color: var(--color-text-dim);
        margin: 0 0 var(--space-lg) 0;
    }

    .actions {
        display: flex;
        gap: var(--space-md);
        justify-content: center;
        flex-wrap: wrap;
    }

    .btn {
        color: var(--color-blue);
        text-decoration: none;
        transition: color 0.2s ease;
    }

    .btn:hover {
        color: var(--color-accent-bright);
    }

    @media (max-width: 600px) {
        .error-code {
            font-size: 3rem;
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .matrix-bg {
            animation: none;
        }
    }
</style>
