<?php
require_once '../../config.php';

$site_name = getSiteConfig('site_name') ?? '麟泓授权系统';
$site_logo = getSiteConfig('site_logo') ?? '/assets/uploads/logo.png';
?>
            <?php include 'header.php'; ?>

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>注册已关闭 - <?php echo htmlspecialchars($site_name); ?></title>
    <link rel="stylesheet" href="/assets/css/style.css">
    <link rel="stylesheet" href="/assets/css/dark.css" id="dark-theme" disabled>
    <script src="/assets/js/main.js" defer></script>
    <style>
        .closed-container {
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            padding: 20px;
        }
        .closed-card {
            background: var(--bg-primary);
            border-radius: 24px;
            padding: 48px 40px;
            max-width: 500px;
            width: 100%;
            text-align: center;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
            animation: fadeInUp 0.5s ease;
        }
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        .closed-icon {
            width: 100px;
            height: 100px;
            background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 24px;
            font-size: 48px;
            color: white;
            box-shadow: 0 10px 25px -5px rgba(239, 68, 68, 0.3);
        }
        .closed-card h1 {
            font-size: 28px;
            margin-bottom: 16px;
            color: var(--text-primary);
        }
        .closed-card p {
            color: var(--text-secondary);
            margin-bottom: 32px;
            line-height: 1.6;
        }
        .btn-home {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 12px 32px;
            background: var(--primary-color);
            color: white;
            border-radius: 50px;
            text-decoration: none;
            font-weight: 600;
            transition: all 0.3s;
            border: none;
            cursor: pointer;
        }
        .btn-home:hover {
            background: var(--primary-hover);
            transform: translateY(-2px);
            box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.4);
        }
        .btn-login {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 12px 32px;
            background: transparent;
            color: var(--primary-color);
            border: 2px solid var(--primary-color);
            border-radius: 50px;
            text-decoration: none;
            font-weight: 600;
            transition: all 0.3s;
            margin-left: 12px;
        }
        .btn-login:hover {
            background: var(--primary-color);
            color: white;
            transform: translateY(-2px);
        }
        .buttons {
            display: flex;
            gap: 16px;
            justify-content: center;
            flex-wrap: wrap;
        }
        .contact-info {
            margin-top: 32px;
            padding-top: 24px;
            border-top: 1px solid var(--border-color);
            font-size: 14px;
            color: var(--text-muted);
        }
        .contact-info a {
            color: var(--primary-color);
            text-decoration: none;
        }
        .contact-info a:hover {
            text-decoration: underline;
        }
        @media (max-width: 480px) {
            .closed-card {
                padding: 32px 24px;
            }
            .closed-card h1 {
                font-size: 24px;
            }
            .buttons {
                flex-direction: column;
            }
            .btn-login {
                margin-left: 0;
            }
        }
    </style>
</head>
<body>
    <div class="closed-container">
        <div class="closed-card">
            <div class="closed-icon">
                🔒
            </div>
            <h1>注册功能已关闭</h1>
            <p>很抱歉，系统目前暂未开放新用户注册。<br>如有疑问，请联系管理员获取帮助。</p>
            <div class="buttons">
                <a href="/" class="btn-home">
                    🏠 返回首页
                </a>
                <a href="/modules/home/login.php" class="btn-login">
                    🔐 已有账号？登录
                </a>
            </div>
            <div class="contact-info">
                <p>📧 联系邮箱：<a href="mailto:admin@lhwks.top">admin@lhwks.top</a></p>
                <p>💬 官方QQ群：<span id="qqGroup">709503830</span> <button class="copy-qq-btn" onclick="copyQQ()">复制群号</button></p>
            </div>
        </div>
    </div>
    <script>
        function copyQQ() {
            const qq = document.getElementById('qqGroup').innerText;
            navigator.clipboard.writeText(qq).then(() => {
                if (window.showToast) {
                    window.showToast('QQ群号已复制', 'success');
                } else {
                    alert('QQ群号已复制：' + qq);
                }
            }).catch(() => {
                const ta = document.createElement('textarea');
                ta.value = qq;
                document.body.appendChild(ta);
                ta.select();
                document.execCommand('copy');
                document.body.removeChild(ta);
                if (window.showToast) {
                    window.showToast('QQ群号已复制', 'success');
                } else {
                    alert('QQ群号已复制：' + qq);
                }
            });
        }
    </script>
</body>
</html>