<?php
http_response_code(403);

$ipToShow = isset($blocked_ip) ? htmlspecialchars($blocked_ip) : 'Unknown';
?>
<!DOCTYPE html>
<html>
<head>
<title>Access Restricted - GoMAPS</title>
<meta name="robots" content="noindex, nofollow">
<meta name="viewport" content="width=device-width, initial-scale=1">

<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">

<style>
body{
    margin:0;
    font-family:'Open Sans', sans-serif;
    background:#f3f3f3;
    display:flex;
    justify-content:center;
    align-items:center;
    height:100vh;
}

.box{
    background:#fff;
    padding:40px 30px;
    border-radius:14px;
    text-align:center;
    box-shadow:0 4px 12px rgba(0,0,0,0.08);
    max-width:420px;
    width:90%;
}

.box img{
    width:120px;
    margin-bottom:15px;
    opacity:0.8;
}

.box h2{
    color:#d9534f;
    margin-bottom:10px;
}

.box p{
    color:#555;
    font-size:14px;
    margin-bottom:10px;
}

.ip-box{
    background:#f8f8f8;
    padding:10px;
    border-radius:6px;
    font-weight:600;
    color:#333;
    margin:15px 0;
    font-size:14px;
    word-break:break-all;
}

.copy-btn{
    display:inline-block;
    margin-top:5px;
    padding:6px 12px;
    font-size:13px;
    border:none;
    border-radius:5px;
    background:#007185;
    color:#fff;
    cursor:pointer;
}

.copy-btn:hover{
    background:#005f6b;
}

.box a{
    display:inline-block;
    margin-top:15px;
    padding:8px 16px;
    background:#007185;
    color:#fff;
    text-decoration:none;
    border-radius:6px;
}
.box a:hover{
    background:#005f6b;
}
</style>
</head>

<body>

<div class="box">
    <img src="https://cdn-icons-png.flaticon.com/512/564/564619.png" alt="Blocked">
    <h2>Access Restricted</h2>
    <p>Your IP has been restricted due to unusual activity.</p>
    <p>Please share the following IP with our support team:</p>

    <div class="ip-box" id="ipAddress">
        <?= $ipToShow ?>
    </div>

    <button class="copy-btn" onclick="copyIP()">Copy IP</button>

    <br>
    <a href="https://booms.gomaps.in/app/form?id=RddNXQ&b=0">Support Team</a>
</div>

<script>
function copyIP(){
    const ip = document.getElementById("ipAddress").innerText;
    navigator.clipboard.writeText(ip).then(function(){
        alert("IP Address copied!");
    });
}
</script>

</body>
</html>