<script>
(function(){
    if (window.mobileDetectionRan) return;
    window.mobileDetectionRan = true;

    var RELOAD_KEY = "mobile_detection_reload";
    var COOKIE_KEY = "is_mdevice";

    var now = Date.now();
    var lastReload = sessionStorage.getItem(RELOAD_KEY);

    // ❌ prevent rapid reload loop
    if (lastReload && (now - parseInt(lastReload)) < 1500) {
        return;
    }

    var ua = navigator.userAgent.toLowerCase();
    var isMobile = false;

    // ✅ CORE detection (real devices)
    if (
        /android|iphone|ipad|ipod|windows phone|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|wince|harmonyos/.test(ua) ||
        /baidu|bdapp|baidubox|mqqbrowser|qqbrowser|ucbrowser|quark|micromessenger/.test(ua) ||
        /huawei|honor|hmscore|arkweb/.test(ua) ||
        (navigator.maxTouchPoints && navigator.maxTouchPoints > 1)
    ) {
        isMobile = true;
    }

    // ✅ Resize support (your requirement)
    if (!isMobile) {
        if (
            (window.innerWidth <= 768 ) 
        ) {
            isMobile = true;
        }
    }

    // ✅ Fallback (Huawei weird cases)
    if (!isMobile && typeof window.orientation !== "undefined") {
        isMobile = true;
    }

    var newValue = isMobile ? "1" : "0";

    var match = document.cookie.match(/is_mdevice=(\d)/);
    var currentValue = match ? match[1] : null;

    // ✅ Only update cookie if changed
    if (currentValue !== newValue) {
        document.cookie = COOKIE_KEY + "=" + newValue + "; path=/; max-age=86400";

        // ✅ reload ONLY when value changes
        sessionStorage.setItem(RELOAD_KEY, now.toString());
        location.reload();
    }

})();
</script><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>404</title>
    <style>
        .main{
            width: 600px;
            height:417px;
            margin: 0 auto;
            margin-top: 125px;
        }
        img{
            margin-bottom: 20px;
        }
        p{
            font-size: 14px;
            color: rgb(32, 33, 36);
        }
        span{
            color:rgb(26, 115, 232);
            cursor: pointer;
        }
        span:hover{
            border-bottom: 1px solid rgb(26, 115, 232);
        }
        button{
            float: right;
            margin-top: 60px;
            background-color: #1970e5;
            color: #fff;
            border-width: 0px;
            padding:10px;
            border-radius: 10%;
            cursor: pointer;
        }
    </style>
</head>
<body>
    <div class="main">
        <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABIAQMAAABvIyEEAAAABlBMVEUAAABTU1OoaSf/AAAAAXRSTlMAQObYZgAAAENJREFUeF7tzbEJACEQRNGBLeAasBCza2lLEGx0CxFGG9hBMDDxRy/72O9FMnIFapGylsu1fgoBdkXfUHLrQgdfrlJN1BdYBjQQm3UAAAAASUVORK5CYII=" alt="">
        <p style="font-size:24px;">无法访问此网站</p>
        <p>检查是否有拼写错误。</p>
        <p>如果拼写无误，请<span>尝试运行 Windos 网络诊断z</span>。</p>
        <p style="font-size:12px;">DNS_PROBE_FINSHED_NXDOMAIN</p>
        <button>请重新加载</button>
    </div>

</body>
</html>