<!DOCTYPE html>
<html>
<head>
    <title>IP GRABBR</title>
    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
    <style>
        body {
            margin: 0;
            font-family: 'Inter', Arial, sans-serif;
            background: linear-gradient(135deg, #6ee7ff, #a78bfa);
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
        }

        .card {
            background: rgba(255, 255, 255, 0.25);
            backdrop-filter: blur(14px);
            border-radius: 24px;
            padding: 30px;
            width: 380px;
            text-align: center;
            box-shadow: 0 10px 40px rgba(0,0,0,0.2);
        }

        h1 {
            margin-bottom: 5px;
            color: #1f2937;
        }

        p {
            color: #374151;
            margin-bottom: 20px;
        }

        button {
            background: linear-gradient(135deg, #6366f1, #8b5cf6);
            border: none;
            border-radius: 999px;
            padding: 12px 25px;
            color: white;
            font-size: 16px;
            cursor: pointer;
            box-shadow: 0 6px 15px rgba(99,102,241,0.4);
        }

        #output {
            margin-top: 15px;
            font-weight: 500;
        }

        .stats {
            margin-top: 20px;
            display: none;
        }

        .stat {
            margin: 5px 0;
            font-size: 14px;
        }

        canvas {
            margin-top: 20px;
        }
    </style>
</head>
<body>

<div class="card">
    <h1>IP Grabber</h1>
    <p>neural network analysis engine</p>
    <button onclick="analyze()">Analyze</button>

    <div id="output"></div>

    <div class="stats" id="stats">
        <div class="stat" id="confidence"></div>
        <div class="stat" id="risk"></div>
        <div class="stat" id="location"></div>
        <canvas id="chart" width="300" height="200"></canvas>
    </div>
</div>

<script>
function randomIP() {
    return Math.floor(Math.random()*255) + "." +
           Math.floor(Math.random()*255) + "." +
           Math.floor(Math.random()*255) + "." +
           Math.floor(Math.random()*255);
}

function rand(min, max) {
    return Math.floor(Math.random() * (max - min + 1)) + min;
}

let chart;

function analyze() {
    let output = document.getElementById("output");
    let stats = document.getElementById("stats");

    output.innerText = "Analyzing...";
    stats.style.display = "none";

    setTimeout(() => {
        output.innerText = "Detected IP: " + randomIP();

        document.getElementById("confidence").innerText =
            "Confidence Score: " + rand(85, 99) + "%";

        document.getElementById("risk").innerText =
            "Risk Index: " + rand(1, 10) + "/10";

        document.getElementById("location").innerText =
            "Geo Estimate: " + ["US-East", "EU-West", "Asia Node"][rand(0,2)];

        stats.style.display = "block";

        let ctx = document.getElementById("chart").getContext("2d");

        if (chart) chart.destroy();

        chart = new Chart(ctx, {
            type: "bar",
            data: {
                labels: ["Packets", "Latency", "Entropy", "Signal"],
                datasets: [{
                    label: "AI Metrics",
                    data: [rand(50,100), rand(20,80), rand(30,90), rand(60,100)]
                }]
            },
            options: {
                plugins: {
                    legend: { display: false }
                }
            }
        });

    }, 1500);
}
</script>

</body>
</html>