<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>BBFS Generator - KANTORTOTO</title>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
    <link rel="icon" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhE7ANxCe_ooNy5rVZvp9RH7P1BY9XT7wiJDrp0gSpsmOj1lzbQGighoq3qhAD8cTxFiXZqVFAMOqhZ1Nygtu7I4CDlOLqitMJhyrUtBAPouVzjPtzM8CEucCWz968IaNoeQ1QwJ4LAcsKqoif-e6aK9a0zBgdDUhwwHo7rzsciHyqnC04/s1600/favikan.png" type="image/x-icon">

    <style>

body {
    font-family: 'Arial', sans-serif;
    background-image: url('https://kantortoto.bocoran-guru.com/assets/bckgim.jpg'); 
    background-color: #121212;
    color: #fff;
    overflow-x: hidden;
    transition: background-color 0.3s ease;

    background-size: cover;
    background-position: center center;
    background-attachment: fixed; 
}

@media (max-width: 768px) {
    body {

        background-size: cover;
        background-position: center center;
    }
}

@media (max-width: 480px) {
    body {

        background-size: cover;
        background-position: center center;
    }
}

        a {
            text-decoration: none;
            color: inherit;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }

header {
    background-color: #121211;
    color: #fff;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo-container {
    text-align: center; 
    margin-bottom: 10px; 
}

.logo {
    max-width: 100%; 
    height: auto; 
    display: inline-block; 
    margin: 0 auto; 
}

h1 {
    font-size: 3rem; 
    color: #fff; 
    font-family: 'Georgia', serif; 
    font-weight: 900; 
    text-align: center; 
    margin-top: 40px; 
    letter-spacing: 3px; 
    position: relative;
    display: inline-block;
    padding: 20px;
    border-radius: 10px; 
    background: linear-gradient(45deg, #D6A77A, #C97D48); 
    background-image: url('https://www.transparenttextures.com/patterns/wood-pattern.png'); 
    background-size: cover;
    background-blend-mode: overlay; 
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.1); 
}

@keyframes shine {
    0% {
        text-shadow: 0 0 10px #FFD700, 0 0 20px #FFD700, 0 0 30px #FFD700, 0 0 40px #FFD700;
    }
    50% {
        text-shadow: 0 0 20px #FF6347, 0 0 30px #FF6347, 0 0 40px #FF6347, 0 0 50px #FF6347;
    }
    100% {
        text-shadow: 0 0 10px #FFD700, 0 0 20px #FFD700, 0 0 30px #FFD700, 0 0 40px #FFD700;
    }
}

h1 {
    animation: shine 3s ease-in-out infinite; 
}

h1::before {
    content: ''; 
    position: absolute; 
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0; 
    background: rgba(0, 0, 0, 0.3); 
    border-radius: 10px;
    z-index: -1; 
}

@keyframes shine {
    0% {
        text-shadow: 0 0 10px #FFD700, 0 0 20px #FFD700, 0 0 30px #FFD700, 0 0 40px #FFD700;
    }
    50% {
        text-shadow: 0 0 20px #FF6347, 0 0 30px #FF6347, 0 0 40px #FF6347, 0 0 50px #FF6347;
    }
    100% {
        text-shadow: 0 0 10px #FFD700, 0 0 20px #FFD700, 0 0 30px #FFD700, 0 0 40px #FFD700;
    }
}

h1 {
    animation: shine 3s ease-in-out infinite; 
}

.header-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.header-buttons button {
    background-color: #FFD700; 
    color: #000; 
    padding: 12px 25px; 
    border: none;
    border-radius: 8px; 
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); 
    transition: all 0.3s ease-in-out;
    text-transform: uppercase;
    width: 180px; 
    height: 50px; 
}

.header-buttons button i {
    font-size: 20px; 
}

.header-buttons button:hover {
    background-color: #FFCC00; 
    transform: translateY(-4px); 
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); 
}

.header-buttons button:active {
    transform: translateY(-2px); 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.header-buttons button:focus {
    outline: none;
    box-shadow: 0 0 10px 2px rgba(255, 99, 71, 0.7); 
}

.login-btn {
    background-color: #1E90FF;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.login-btn:hover {
    background-color: #00BFFF; 
}

.register-btn {
    background-color: #FF1493;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.register-btn:hover {
    background-color: #FF69B4; 
}

.telegram-btn {
    background-color: #0088cc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.telegram-btn:hover {
    background-color: #00A9FF; 
}

.livechat-btn {
    background-color: #32CD32;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.livechat-btn:hover {
    background-color: #66FF66; 
}

.datetime {
    font-size: 1.4rem; 
    margin-top: 20px;
    color: #fff; 
    background-color: #8a3c00; 
    padding: 12px 25px; 
    border-radius: 25px; 
    text-align: center; 
    font-family: 'Arial', sans-serif; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); 
    transition: all 0.3s ease; 
}

.datetime:hover {
    background-color: #ffae00; 
    transform: translateY(-5px); 
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); 
}

.datetime::after {
    content: '';
    display: block;
    width: 50%; 
    height: 2px;
    background-color: #fff; 
    margin: 10px auto 0; 
    border-radius: 5px; 
}

@media (max-width: 768px) {
    .datetime {
        font-size: 1.2rem; 
        padding: 8px 20px;
    }
}

.container {
    background-color: #1F1F1F; 
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 800px;
    text-align: center;
    margin: 30px auto;
    box-sizing: border-box;
    overflow: hidden; 
}

input[type="number"] {
    background-color: #2E2E2E; 
    color: #FFF; 
    font-size: 1.2rem;
    border: 2px solid #444; 
    padding: 15px 20px;
    border-radius: 12px;
    width: 100%; 
    margin-bottom: 15px; 
    box-sizing: border-box;
    outline: none;
    transition: all 0.3s ease;
}

input[type="number"]:focus {
    border-color: #FF6F00;
    background-color: #333;
    box-shadow: 0 0 8px rgba(255, 111, 0, 0.7);
}

.btn-container {
    display: flex;
    justify-content: center; 
    gap: 15px; 
    margin-top: 20px;
    flex-wrap: wrap; 
}

.generate-btn, .delete-btn {
    background: linear-gradient(45deg, #f20800, #a80a05);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 48%; 
    box-sizing: border-box;
}

.generate-btn:hover, .delete-btn:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #960808, #ba0606);
}

.delete-btn {
    background-color: #8c0000;
}

@media (max-width: 768px) {
    .generate-btn, .delete-btn {
        width: 100%; 
        font-size: 1rem;
        padding: 10px 15px;
    }
}

@media (max-width: 480px) {
    .generate-btn, .delete-btn {
        font-size: 1rem;
        padding: 10px 12px;
    }
}

.output-box {
    margin-top: 30px;
    padding: 20px;
    border-radius: 8px;
    font-size: 1.1rem;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    background-color: #FFF;
    color: #333;
    display: none;
    max-height: 200px;
    overflow-y: auto;
    font-weight: bold;
}

.header-permutasi {
    background-color: #333;
    color: #FFF;
    padding: 10px 15px;
    font-size: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    border-radius: 5px;
    margin-top: 20px;
}

.copy-btn {
    background: linear-gradient(45deg, #0081CF, #1F6F8B);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s ease, background-color 0.3s ease;
    margin-left: 10px;
}

.copy-btn:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #006C99, #0A4C7B);
}

@media (max-width: 768px) {
    .generate-btn, .delete-btn {
        width: 100%; 
        font-size: 1rem;
        padding: 10px 15px;
    }

    .header-permutasi {
        font-size: 1rem;
        padding: 8px 12px;
    }

    .copy-btn {
        font-size: 1rem;
        padding: 10px 15px;
        margin-left: 0;
    }

    .container {
        padding: 15px;
    }

    h2 {
        font-size: 1.6rem;
    }

    input[type="number"] {
        font-size: 1rem;
        padding: 12px 15px;
    }

    .output-box {
        max-height: 150px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    h2 {
        font-size: 1.4rem;
    }

    .generate-btn, .delete-btn {
        font-size: 1rem;
        padding: 10px 12px;
    }

    input[type="number"] {
        font-size: 1rem;
        padding: 10px;
    }

    .copy-btn {
        font-size: 1rem;
        padding: 10px 12px;
    }

    .output-box {
        max-height: 150px;
        padding: 15px;
    }

    .container {
        padding: 10px;
        margin-top: 15px;
    }
}

    </style>
</head>
<body>
    <div class="container">
    <header>
    <div class="logo-container">
        <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwgim1MjckVamat3FKwDm9keCywYdM8UA4n5NBScJx_WT7jI1mhB2V2q8gjSmGxq8wA4EXziB43fkUGHZ6n_TgGlLZ7F_9EhGWYDJ3bWfay4Xx37OMGKYqAAWso-eZYQht-fR1c7vI4KNN-Uv_lWPIfa7MW9U5rrNWfC1oChuQf4F8ozM/s1600/logokant.png" alt="Logo" class="logo">
    </div>
<div class="header-buttons">
    <!-- Tombol Home -->
    <a href="https://kantortoto.bocoran-guru.com/">
        <button class="home-btn">
            <i class="fas fa-home"></i> Home
        </button>
    </a>

    <a href="/jadwal">
        <button class="jadwal-btn">
            <i class="fas fa-calendar-alt"></i> JADWAL PASARAN
        </button>
    </a>
    <a href="/bbfs">
        <button class="bbfs-btn">
            <i class="fas fa-cogs"></i> BBFS GENERATOR
        </button>
    </a>
    <a href="https://biolinku.co/kantortoto">
        <button class="login-btn">
            <i class="fas fa-sign-in-alt"></i> LOGIN KANTORTOTO
        </button>
    </a>
    <a href="https://qoolink.co/kantortoto">
        <button class="register-btn">
            <i class="fas fa-user-plus"></i> DAFTAR KANTORTOTO
        </button>
    </a>
    <a href="http://t.me/kantortoto_bot">
        <button class="telegram-btn">
            <i class="fab fa-telegram-plane"></i> TELEGRAM
        </button>
    </a>
    <a href="https://direct.lc.chat/18371925/">
        <button class="livechat-btn">
            <i class="fas fa-comment-dots"></i> LIVECHAT
        </button>
    </a>
</div>     
<!-- Add Date-Time display here -->
        <div class="datetime" id="datetime"></div>
    </header>

    <!-- Kontainer Utama (Berada di Tengah Layar) -->
    <div class="container">
        <h2>MASUKAN ANGKA BBFS HOKI ANDA, LALU PILIH 2,3 ATAU 4 DIGIT</h2>

        <input type="number" id="inputNumber" placeholder="Contoh: 0123" inputmode="numeric"/>
        <input type="number" id="combinationCount" placeholder="Pilih 2, 3, atau 4 digit" min="2" max="4" inputmode="numeric"/>

        <div class="btn-container">
            <button class="generate-btn" onclick="generatePermutations()">
                <i class="fas fa-random"></i> Generate
            </button>
            <button class="delete-btn" onclick="clearResults()">
                <i class="fas fa-trash-alt"></i> Hapus
            </button>
        </div>

        <div class="header-permutasi" id="header-permutasi">
            <span id="permutasi-header">HASIL BBFS GENERATOR</span>
            <button class="copy-btn" onclick="copyToClipboard()">
                <i class="fas fa-copy"></i> Copy
            </button>
        </div>

        <div class="output-box" id="output-4d">
            <div id="permutasi-4d"></div>
        </div>
        <div class="output-box" id="output-3d">
            <div id="permutasi-3d"></div>
        </div>
        <div class="output-box" id="output-2d">
            <div id="permutasi-2d"></div>
        </div>

        <div id="result-info"></div>
    </div>

    <script>

        function displayDateTime() {
            const options = {
                weekday: 'long', 
                year: 'numeric', 
                month: 'long', 
                day: 'numeric', 
                hour: '2-digit',
                minute: '2-digit',
                second: '2-digit',
                timeZone: 'Asia/Jakarta',
                hour12: false, 
            };
            const date = new Date().toLocaleString('id-ID', options);
            document.getElementById('datetime').textContent = date;
        }

        setInterval(displayDateTime, 1000);

        displayDateTime();
        function generatePermutations() {
            let inputNumber = document.getElementById('inputNumber').value;
            let combinationCount = document.getElementById('combinationCount').value || 4;
            let output4d = document.getElementById('permutasi-4d');
            let output3d = document.getElementById('permutasi-3d');
            let output2d = document.getElementById('permutasi-2d');
            let resultInfoDiv = document.getElementById('result-info');

            if (inputNumber.length < 2 || isNaN(inputNumber)) {
                output4d.innerHTML = "<p class='error'>Masukkan angka yang valid dengan minimal 2 digit.</p>";
                output3d.innerHTML = "";
                output2d.innerHTML = "";
                resultInfoDiv.innerHTML = "";
                toggleOutputBoxes(false, false, false);
                return;
            }

            let result4dArray = [];
            let result3dArray = [];
            let result2dArray = [];

            if (combinationCount == 4 || combinationCount == "") {
                let combinations4D = getCombinations(inputNumber, 4);
                combinations4D.forEach(combination => {
                    let permutations = getPermutations(combination);
                    permutations.forEach(permutation => {
                        result4dArray.push(permutation);
                    });
                });
                output4d.innerHTML = result4dArray.join('*') + "*";
                toggleOutputBoxes(true, false, false);
            }

            if (combinationCount == 3) {
                let combinations3D = getCombinations(inputNumber, 3);
                combinations3D.forEach(combination => {
                    let permutations = getPermutations(combination);
                    permutations.forEach(permutation => {
                        result3dArray.push(permutation);
                    });
                });
                output3d.innerHTML = result3dArray.join('*') + "*";
                toggleOutputBoxes(false, true, false);
            }

            if (combinationCount == 2) {
                let combinations2D = getCombinations(inputNumber, 2);
                combinations2D.forEach(combination => {
                    let permutations = getPermutations(combination);
                    permutations.forEach(permutation => {
                        result2dArray.push(permutation);
                    });
                });
                output2d.innerHTML = result2dArray.join('*') + "*";
                toggleOutputBoxes(false, false, true);
            }

            resultInfoDiv.innerHTML = `Jumlah total hasil permutasi: ${result4dArray.length + result3dArray.length + result2dArray.length}`;
        }

        function getCombinations(input, length) {
            let results = [];
            function combine(prefix, remaining) {
                if (prefix.length === length) {
                    results.push(prefix);
                    return;
                }
                for (let i = 0; i < remaining.length; i++) {
                    combine(prefix + remaining[i], remaining.slice(i + 1));
                }
            }
            combine("", input.split(''));
            return results;
        }

        function getPermutations(input) {
            if (input.length <= 1) return [input];
            let result = [];
            for (let i = 0; i < input.length; i++) {
                let char = input[i];
                let rest = input.slice(0, i) + input.slice(i + 1);
                let restPerms = getPermutations(rest);
                restPerms.forEach(permutation => {
                    result.push(char + permutation);
                });
            }
            return result;
        }

        function toggleOutputBoxes(visible4d, visible3d, visible2d) {
            document.getElementById('output-4d').style.display = visible4d ? 'block' : 'none';
            document.getElementById('output-3d').style.display = visible3d ? 'block' : 'none';
            document.getElementById('output-2d').style.display = visible2d ? 'block' : 'none';
        }

        function clearResults() {
            document.getElementById('inputNumber').value = '';
            document.getElementById('combinationCount').value = '';
            document.getElementById('permutasi-4d').innerHTML = '';
            document.getElementById('permutasi-3d').innerHTML = '';
            document.getElementById('permutasi-2d').innerHTML = '';
            document.getElementById('result-info').innerHTML = '';
            toggleOutputBoxes(false, false, false);
        }

        function copyToClipboard() {
            let allResults = "";
            let output4d = document.getElementById('permutasi-4d').innerText;
            let output3d = document.getElementById('permutasi-3d').innerText;
            let output2d = document.getElementById('permutasi-2d').innerText;

            allResults = output4d + "\n" + output3d + "\n" + output2d;
            navigator.clipboard.writeText(allResults).then(() => {
                alert("Hasil Bbfs telah disalin!");
            });
        }
    </script>
    
        <script>
// Disable F12 (Developer Tools)
document.addEventListener('keydown', function(event) {
    if (event.key === 'F12' || (event.ctrlKey && event.key === 'u')) {
        event.preventDefault();
    }
});

// Disable Right-Click
document.addEventListener('contextmenu', function(event) {
    event.preventDefault();  // Disable the right-click menu
});

// Disable F12 and Ctrl+U for good measure
document.addEventListener('keydown', function(event) {
    if (event.key === 'F12' || (event.ctrlKey && event.key === 'u')) {
        event.preventDefault(); // Prevent the default action (open developer tools or view source)
    }
});

// Disable Inspect Element via the mouse (right-click or other triggers)
document.addEventListener('contextmenu', function(event) {
    event.preventDefault();  // Disable the context menu (right-click)
});

// Disable keyboard shortcuts like F12, Ctrl+Shift+I (used for developer tools)
document.addEventListener('keydown', function(event) {
    // Disable F12 and the combination of Ctrl + Shift + I (dev tools)
    if (event.key === 'F12' || (event.ctrlKey && event.shiftKey && event.key === 'I')) {
        event.preventDefault();
    }
});

// Disable right-click context menu
document.addEventListener('contextmenu', function(event) {
    event.preventDefault(); // Disable the right-click menu
});

</script>
</body>
</html>