<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>访问提示</title>
    <style>
        :root {
            --primary-color: #e74c3c;
            --secondary-color: #3498db;
        }
        body {
            background: #f5f7fa;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            margin: 0;
            font-family: 'Helvetica Neue', Arial, sans-serif;
        }
        .container {
            background: white;
            border-radius: 15px;
            box-shadow: 0 5px 30px rgba(0,0,0,0.1);
            padding: 2rem;
            width: 90%;
            max-width: 400px;
            text-align: center;
        }
        h1 {
            color: var(--primary-color);
            font-size: 1.8rem;
            margin-bottom: 1.5rem;
        }
        .url-box {
            background: #f8f9fa;
            border-radius: 8px;
            padding: 1rem;
            margin: 1.5rem 0;
            word-break: break-all;
        }
        .copy-btn {
            background: var(--secondary-color);
            color: white;
            border: none;
            padding: 0.8rem 2rem;
            border-radius: 25px;
            font-size: 1rem;
            cursor: pointer;
            transition: all 0.3s;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
        }
        .copy-btn:hover {
            background: #2980b9;
            transform: translateY(-2px);
        }
        .tip {
            color: #7f8c8d;
            font-size: 0.9rem;
            margin-top: 1.5rem;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>⚠️ 访问提示</h1>
        <p>微信已封，请使用浏览器打开</p>
        
        <div class="url-box" id="urlDisplay">正在加载网址...</div>
        
        <button class="copy-btn" onclick="copyUrl()">
            <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
                <path d="M8 4v12h12V4H8zM6 2h16v16H6V2z"></path>
                <path d="M4 8H2v16h16v-2"></path>
            </svg>
            复制网址
        </button>
        
        <p class="tip">点击上方按钮复制后，粘贴到浏览器地址栏访问</p>
    </div>

    <script>
        // 从URL参数获取二级域名
        const urlParams = new URLSearchParams(window.location.search);
        const subdomain = urlParams.get('key') || 'yourdomain';

        // 获取当前域名（去除子域名部分）window.location.hostname.split('.').slice(-2).join('.');
        const currentDomain = `shlmxc.com`;
        
        // 生成完整网址
        const fullUrl = `http://${subdomain}.${currentDomain}`;
        document.getElementById('urlDisplay').textContent = fullUrl;

        // 复制功能
        function copyUrl() {
            // 创建临时文本区域
            const textArea = document.createElement('textarea');
            textArea.value = fullUrl;
            document.body.appendChild(textArea);
            
            // 选择文本
            textArea.select();
            textArea.setSelectionRange(0, 99999); // 用于移动设备
            
            try {
                // 尝试复制
                document.execCommand('copy');
                alert('网址已复制到剪贴板！');
            } catch (err) {
                alert('复制失败，请手动选择网址复制');
            }
            
            // 移除临时文本区域
            document.body.removeChild(textArea);
        }
    </script>
</body>
</html>