<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>BYPASS</title>
    <link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600&display=swap" rel="stylesheet">
    <style>
        body {
            font-family: 'Playfair Display', serif;
            background: linear-gradient(135deg, #74ebd5, #9face6);
            height: 100vh;
            margin: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            color: #333;
        }

        .container {
            background-color: rgba(255, 255, 255, 0.9);
            padding: 40px;
            max-width: 450px;
            width: 100%;
            border-radius: 12px;
            box-shadow: 0px 8px 30px rgba(0, 0, 0, 0.2);
            transition: all 0.3s ease;
        }

        .container:hover {
            transform: translateY(-5px);
            box-shadow: 0px 12px 40px rgba(0, 0, 0, 0.3);
        }

        h1 {
            font-size: 32px;
            color: #333;
            margin-bottom: 20px;
            font-weight: 600;
            text-align: center;
        }

        p {
            margin-bottom: 15px;
            font-size: 16px;
            text-align: center;
        }

        input[type="text"] {
            width: 100%;
            padding: 12px;
            margin: 10px 0;
            border: 2px solid #ccc;
            border-radius: 8px;
            transition: border-color 0.3s ease;
            font-family: 'Playfair Display', serif;
            font-size: 16px;
        }

        input[type="text"]:focus {
            border-color: #6c63ff;
            outline: none;
        }

        button {
            padding: 14px 28px;
            background: linear-gradient(135deg, #6c63ff, #c1c0ff);
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 16px;
            font-weight: 600;
            transition: background 0.4s ease, box-shadow 0.3s ease;
            font-family: 'Playfair Display', serif;
        }

        button:hover {
            background: linear-gradient(135deg, #5a55d6, #8b88ff);
            box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.2);
        }

        #result {
            margin-top: 20px;
            padding: 15px;
            background-color: #f1f3f5;
            border: 1px solid #dee2e6;
            border-radius: 8px;
            font-size: 16px;
            font-family: 'Playfair Display', serif;
        }

        .error {
            color: #dc3545;
            font-weight: 600;
        }

        #copyButton {
            margin-top: 10px;
            padding: 10px 20px;
            background: linear-gradient(135deg, #ff6a6a, #ff9a9e);
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.4s ease, box-shadow 0.3s ease;
            font-family: 'Playfair Display', serif;
        }

        #copyButton:hover {
            background: linear-gradient(135deg, #ff3d3d, #ff7b7b);
            box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.2);
        }

        #copyMessage {
            margin-top: 10px;
            color: #28a745;
            font-weight: 600;
        }
    </style>
</head>
<body>

<div class="container">
    <h1>PROJECT ZAABYPASS</h1>
    <p>Enter the URL:</p>
    <input type="text" id="linkInput" placeholder="Enter the URL here">
    <br>
    <button onclick="bypassLink()">Bypass</button>

    <div id="result"></div>
    <button id="copyButton" style="display: none;" onclick="copyKey()">Copy Key</button>
    <p id="copyMessage"></p>
</div>

<script>
    function bypassLink() {
        var link = document.getElementById('linkInput').value;
        var apiUrl = `https://slr.kys.gay/api/premium/bypass?url=${encodeURIComponent(link)}&apikey=SLR-17361815487440892669587092723941-_pdip_`;
        var resultDiv = document.getElementById('result');
        var copyButton = document.getElementById('copyButton');
        var copyMessage = document.getElementById('copyMessage');

        resultDiv.innerHTML = '';
        copyButton.style.display = 'none';
        copyMessage.innerHTML = '';

        if (link === '') {
            resultDiv.innerHTML = '<p class="error">Please enter a URL.</p>';
            return;
        }

        fetch(apiUrl)
            .then(response => response.json())
            .then(data => {
                if (data.status === 'success') {
                    resultDiv.innerHTML = `
                        <p><strong>Key:</strong> <span id="bypassedKey">${data.key || 'N/A'}</span></p>
                    `;
                    copyButton.style.display = 'inline-block';
                } else {
                    resultDiv.innerHTML = `<p class="error">Error: ${data.error}</p>`;
                }
            })
            .catch(error => {
                resultDiv.innerHTML = `<p class="error">An error occurred: ${error.message}</p>`;
            });
    }

    function copyKey() {
        var keyText = document.getElementById('bypassedKey').innerText;
        var copyMessage = document.getElementById('copyMessage');

        navigator.clipboard.writeText(keyText).then(function() {
            copyMessage.innerHTML = 'Key copied to clipboard!';
        }, function() {
            copyMessage.innerHTML = 'Failed to copy key.';
        });
    }
</script>

</body>
</html>