<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <meta name="description" content="The requested page is not available." />
        <meta name="keywords" content="NotFound 404" />

        <link rel="preconnect" href="https://fonts.googleapis.com" />
        <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
        <link
            href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
            rel="stylesheet"
        />
        <title>File Not Found | 404</title>

        <style>
            * {
                margin: 0;
                padding: 0;
                box-sizing: border-box;
                font-family: "Poppins", sans-serif;
            }

            body {
                height: 100vh;
                width: 100%;

                display: grid;
                place-content: center;
            }

            h1 {
                font-size: 10rem;
                font-weight: 900;
                font-family: system-ui, sans-serif;
                text-align: center;
            }

            p {
                text-align: center;
                padding: 10px;
                background-color: #cccccc31;
                border-radius: 10px;
                font-size: 1.1rem;
                max-width: 500px;

                span {
                    color: rgb(189, 108, 79);
                    font-weight: 900;
                }
            }

            a {
                text-decoration: none;
                color: rgb(105, 105, 105);
                margin-top: 10px;
                margin-left: 5px;
                transition: 0.3s color linear;

                &:hover {
                    color: orange;
                }
            }
        </style>
    </head>

    <body>
        <h1>404</h1>
        <p>
            URL <span>{{ pathname }}</span> not found.
            <a href="/">Return Home (/) in <b class="second">5</b> seconds</a>
        </p>

        <script>
            const second_placeholder = document.querySelector(".second")
            let count = 6

            const handle = setInterval(() => {
                count -= 1
                second_placeholder.textContent = count

                if (count <= 0) {
                    clearInterval(handle)
                    location.href = "/"
                }
            }, 1000)
        </script>
    </body>
</html>
