<html>
<head>
<base href="/">
<style>
  /* [Styles remain unchanged from the original code.] */
</style>
</head>
<body>

<div class="hypno-background"></div>
<div id="portal"></div>

<h1 class="rainbow-text floating">Weenersnitchel HOT FDOIA: </h1>

<marquee scrollamount="30" class="rainbow-text" direction="right">rasgntool</marquee>
<marquee scrollamount="40" class="rainbow-text" direction="left">owo</marquee>

<button class="dance-button" onclick="makeMoreChaos()">generic the click me alots of tims</button>

<div class="spinning-pizza">🍕</div>
<div class="cat">😺</div>

<audio id="backgroundMusic" loop>
  <source src="https://cdn.glitch.global/0a2cc7ab-272d-4666-b000-a6f8441dd027/youtube_Axfs4NR5Z10_audio.mp3?v=1734849973280" type="audio/mpeg">
</audio>

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script>
let chaos = 0;

const randomImageUrls = [
  "https://basket-02.wbbasket.ru/vol192/part19252/19252625/images/c516x688/1.webp",
  "https://elkay.scene7.com/is/image/Elkay/EWMA9620C_RND?$WOLVERINE_MAIN$",
  "https://img.restaurantguru.com/reviews/original/567556.jpg"
];

// Display random images on the screen
function displayRandomImage() {
  const url = randomImageUrls[Math.floor(Math.random() * randomImageUrls.length)];
  const img = document.createElement('img');
  img.src = url;
  img.style.position = 'absolute';
  img.style.left = Math.random() * window.innerWidth + 'px';
  img.style.top = Math.random() * window.innerHeight + 'px';
  img.style.width = '150px'; // Set image size
  img.style.height = 'auto'; // Maintain aspect ratio
  img.style.animation = 'float 3s ease-in-out infinite alternate';
  document.body.appendChild(img);
}

// Play background music
function playBackgroundMusic() {
  const music = document.getElementById('backgroundMusic');
  music.play().catch(error => {
    console.error("Error playing background music:", error);
  });
}

// Original makeMoreChaos function
function makeMoreChaos() {
  chaos++;
  const emojis = ['VAINA', '👽za', 'OIMPosi', '🎪', '🦄', '🌙', '🎭', '🎪', '👻', '🤪', '🌞', '🎡', '🎢', '🌈'];
  for (let i = 0; i < 10; i++) {
    const emoji = emojis[Math.floor(Math.random() * emojis.length)];
    const div = document.createElement('div');
    div.className = 'floating';
    div.style.left = Math.random() * window.innerWidth + 'px';
    div.style.top = Math.random() * window.innerHeight + 'px';
    div.style.fontSize = (Math.random() * 200 + 50) + 'px';
    div.style.filter = `hue-rotate(${Math.random() * 360}deg) blur(${Math.random() * 5}px)`;
    div.textContent = emoji;
    document.body.appendChild(div);
  }

  document.body.style.background = `
    repeating-conic-gradient(from ${chaos * 45}deg, 
    hsl(${Math.random() * 360}deg, 100%, 50%), 
    hsl(${Math.random() * 360}deg, 100%, 50%), 
    hsl(${Math.random() * 360}deg, 100%, 50%) ${chaos * 10}%)
  `;

  document.body.style.animation = `bodyPulse ${0.2 + Math.random()}s infinite`;

  const phrases = ['jgerg', 'The drylands vesper mouse (Calomys musculinus) is a species of rodent in the family Cricetidae.', 'xass', 'breadd', 'wheeee', 'boop'];
  const utterance = new SpeechSynthesisUtterance(phrases[Math.floor(Math.random() * phrases.length)]);
  utterance.pitch = Math.random() * 4;
  utterance.rate = Math.random() * 6;
  window.speechSynthesis.speak(utterance);

  const portal = document.getElementById('portal');
  portal.style.left = Math.random() * window.innerWidth + 'px';
  portal.style.top = Math.random() * window.innerHeight + 'px';
  portal.style.transform = `scale(${Math.random() * 3}) rotate3d(${Math.random()}, ${Math.random()}, ${Math.random()}, ${Math.random() * 360}deg)`;

  if (chaos > 5) {
    document.title = "🤪🌈👽".repeat(chaos);
    for (let i = 0; i < 3; i++) {
      const cat = document.createElement('div');
      cat.className = 'floating cat';
      cat.textContent = ['🐱', '🐈', '😺', '😸', '😹'][Math.floor(Math.random() * 5)];
      cat.style.animation = 'catParty 0.2s infinite';
      document.body.appendChild(cat);
    }
  }
}

// Replace interval for image download with display logic
setInterval(displayRandomImage, 2000);

// Automatically play music on load
playBackgroundMusic();

document.addEventListener('keypress', () => {
  const synth = window.speechSynthesis;
  const utterance = new SpeechSynthesisUtterance('beep boop');
  utterance.pitch = Math.random() * 2;
  utterance.rate = Math.random() * 4;
  synth.speak(utterance);

  document.body.style.filter = `hue-rotate(${Math.random() * 360}deg)`;
});
</script>

</body>
</html>
