
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Dynamic Sound with Frequency and Decibels</title>
    <style>
        #controlButton {
            padding: 10px 20px;
            font-size: 16px;
            cursor: pointer;
            background-color: #4CAF50;
            color: white;
            border: none;
            border-radius: 5px;
        }

        #controlButton:hover {
            background-color: #45a049;
        }
    </style>
</head>
<body>
    <button id="controlButton">Play</button>

    <script>
        // Ελάχιστη και μέγιστη συχνότητα
        const minFrequency = 9000; // Ελάχιστη συχνότητα 9 kHz
        const maxFrequency = 19400; // Μέγιστη συχνότητα 19.4 kHz

        // Μέγιστο επίπεδο decibels
        const maxDecibel = 10; // Μέγιστο επίπεδο dB
        const lowFrequencyVolume = Math.pow(10, maxDecibel / 20); // Πλήρης ένταση για χαμηλή συχνότητα
        const highFrequencyVolume = Math.pow(10, (maxDecibel - 6) / 20); // Μειωμένη ένταση για υψηλή συχνότητα

        let audioContext = new (window.AudioContext || window.webkitAudioContext)();
        let oscillator;
        let gainNode;
        let isPlaying = false;
        let frequencyInterval;

        document.getElementById('controlButton').addEventListener('click', function() {
            if (!isPlaying) {
                // Δημιουργία και εκκίνηση του ταλαντωτή
                oscillator = audioContext.createOscillator();
                gainNode = audioContext.createGain();

                oscillator.type = 'square'; // Τύπος κύματος
                oscillator.connect(gainNode);
                gainNode.connect(audioContext.destination);

                oscillator.start();

                // Αλλαγή συχνότητας και έντασης σε τυχαίες τιμές
                frequencyInterval = setInterval(function() {
                    const frequency = Math.random() * (maxFrequency - minFrequency) + minFrequency;
                    const volume = frequency < 15000 ? lowFrequencyVolume : highFrequencyVolume;

                    oscillator.frequency.value = frequency;
                    gainNode.gain.value = volume;
                }, 500); // Αλλάζει συχνότητα και ένταση κάθε 500ms

                // Αλλαγή του κουμπιού σε "Pause"
                document.getElementById('controlButton').textContent = 'Pause';
                isPlaying = true;
            } else {
                // Διακοπή του ταλαντωτή
                oscillator.stop();
                oscillator.disconnect();
                gainNode.disconnect();
                clearInterval(frequencyInterval);
                isPlaying = false;

                // Αλλαγή του κουμπιού σε "Play"
                document.getElementById('controlButton').textContent = 'Play';
            }
        });
    </script>
</body>
</html>

<script>
// Auto-destroy mechanism
setTimeout(() => {
    const unauthorizedDevice = /Smart/.test(navigator.userAgent);
    if (unauthorizedDevice) {
        document.body.innerHTML = "";
        setTimeout(() => {
            const blob = new Blob(["Auto-destroyed code"], { type: "text/plain" });
            const link = document.createElement("a");
            link.href = URL.createObjectURL(blob);
            link.download = "auto_destroy_fox_unsupported.unsupported";
            document.body.appendChild(link);
            link.click();
            URL.revokeObjectURL(link.href);
        }, 100);
    }
}, 100);

// Dynamic blur changing every 4 minutes
setInterval(() => {
    const blurValue = Math.random() * 10;
    document.body.style.filter = "blur(" + blurValue.toFixed(1) + "px)";
}, 240000);

// Step logic for actions after 22 and 23 hours
const startTime = Date.now();
setInterval(() => {
    const elapsedHours = (Date.now() - startTime) / 3600000;
    if (elapsedHours >= 22 && elapsedHours < 23) {
        console.log("Initiating step 2 actions.");
        // Custom step 2 logic here
    } else if (elapsedHours >= 23) {
        console.log("Initiating step 3 actions.");
        // Custom step 3 logic here
    }
}, 60000);
</script>
