<!DOCTYPE html>
<html lang="th">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>404 - Page Not Found</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            font-family: 'Inter', sans-serif;
            background: linear-gradient(135deg, #1a1c2e 0%, #2c1f4a 100%);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            overflow: hidden;
        }

        .container {
            text-align: center;
            padding: 3rem;
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            max-width: 500px;
            position: relative;
            z-index: 1;
            animation: float 6s ease-in-out infinite;
        }

        @keyframes float {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-20px); }
        }

        .error-code {
            font-size: 120px;
            font-weight: 800;
            margin: 0;
            background: linear-gradient(to right, #fff, #9d6aff);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            line-height: 1;
            animation: glow 2s ease-in-out infinite alternate;
        }

        @keyframes glow {
            from { text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #9d6aff; }
            to { text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #9d6aff; }
        }

        .error-message {
            font-size: 1.5rem;
            margin: 1.5rem 0;
            font-weight: 300;
            opacity: 0;
            transform: translateY(20px);
            animation: fadeIn 0.5s ease forwards;
            animation-delay: 2s;
        }

        .back-button {
            display: inline-block;
            padding: 1rem 2.5rem;
            background: linear-gradient(45deg, #9d6aff, #6a8eff);
            color: white;
            text-decoration: none;
            border-radius: 30px;
            border: none;
            backdrop-filter: blur(5px);
            transition: all 0.3s;
            font-weight: 500;
            position: relative;
            overflow: hidden;
            opacity: 0;
            transform: translateY(20px);
            animation: fadeIn 0.5s ease forwards;
            animation-delay: 2.5s;
        }

        .back-button:hover {
            transform: translateY(-3px);
            box-shadow: 0 5px 20px rgba(157, 106, 255, 0.4);
        }

        .back-button::after {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
            transform: rotate(45deg);
            animation: shine 3s infinite;
        }

        @keyframes shine {
            0% { transform: translateX(-100%) rotate(45deg); }
            100% { transform: translateX(100%) rotate(45deg); }
        }

        @keyframes fadeIn {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .background {
            position: fixed;
            width: 100vw;
            height: 100vh;
            z-index: 0;
        }

        .circle {
            position: absolute;
            border-radius: 50%;
            background: rgba(157, 106, 255, 0.1);
            animation: pulse 4s infinite;
        }

        @keyframes pulse {
            0%, 100% { transform: scale(1); opacity: 0.3; }
            50% { transform: scale(1.1); opacity: 0.5; }
        }

        .circle-1 {
            width: 400px;
            height: 400px;
            top: -200px;
            left: -200px;
            animation-delay: 0s;
        }

        .circle-2 {
            width: 300px;
            height: 300px;
            bottom: -150px;
            right: -150px;
            animation-delay: -2s;
        }

        .circle-3 {
            width: 200px;
            height: 200px;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            animation-delay: -1s;
        }

        .stars {
            position: fixed;
            width: 2px;
            height: 2px;
            background: white;
            box-shadow: 
                0 0 20px white,
                100px 100px 1px white,
                200px 50px 1px white,
                300px 200px 1px white,
                400px 150px 1px white,
                500px 300px 1px white,
                600px 250px 1px white,
                700px 100px 1px white,
                800px 200px 1px white,
                900px 150px 1px white;
            animation: twinkle 5s infinite;
        }

        @keyframes twinkle {
            0%, 100% { opacity: 0.3; }
            50% { opacity: 1; }
        }
    </style>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;500;800&display=swap" rel="stylesheet">
</head>
<body>
    <div class="stars"></div>
    <div class="background">
        <div class="circle circle-1"></div>
        <div class="circle circle-2"></div>
        <div class="circle circle-3"></div>
    </div>
    <div class="container">
        <div class="error-code" id="counter">0</div>
        <p class="error-message">PAGE NOT FOUND</p>
        <a href="/" class="back-button">BACK TO HOME</a>
    </div>

    <script>
        const counter = document.getElementById('counter');
        const target = 404;
        const duration = 1000;
        const steps = 20;
        const stepDuration = duration / steps;
        
        let current = 0;
        const increment = target / steps;
        
        const updateCounter = () => {
            current = Math.min(current + increment, target);
            counter.textContent = Math.round(current);
            
            if (current < target) {
                setTimeout(updateCounter, stepDuration);
            }
        };

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