Changed around line 1
+ document.addEventListener('DOMContentLoaded', () => {
+ // Create floating question marks
+ const floatingQuestions = document.querySelector('.floating-questions');
+ for (let i = 0; i < 20; i++) {
+ const span = document.createElement('span');
+ span.textContent = '?';
+ span.style.left = `${Math.random() * 100}%`;
+ span.style.top = `${Math.random() * 100}%`;
+ span.style.animationDelay = `${Math.random() * 5}s`;
+ floatingQuestions.appendChild(span);
+ }
+
+ // Handle question input
+ const input = document.getElementById('your-question');
+ const response = document.querySelector('.response');
+ const responses = [
+ "That's a great question!",
+ "Have you considered why you're asking that?",
+ "What do you think?",
+ "Perhaps...",
+ "The answer lies within.",
+ "¯\\_(ツ)_/¯"
+ ];
+
+ input.addEventListener('keypress', (e) => {
+ if (e.key === 'Enter' && input.value.trim()) {
+ const randomResponse = responses[Math.floor(Math.random() * responses.length)];
+ response.textContent = randomResponse;
+ response.style.opacity = 0;
+ setTimeout(() => {
+ response.style.opacity = 1;
+ }, 100);
+ input.value = '';
+ }
+ });
+
+ // Add parallax effect to floating questions
+ document.addEventListener('mousemove', (e) => {
+ const moveX = (e.clientX - window.innerWidth / 2) * 0.01;
+ const moveY = (e.clientY - window.innerHeight / 2) * 0.01;
+ floatingQuestions.style.transform = `translate(${moveX}px, ${moveY}px)`;
+ });
+ });