<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>IOT - The 2nd best Memecoin on SOL</title>
    <link rel="stylesheet" href="styles.css">
    <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap" rel="stylesheet">
    <link rel="preload" href="sounds/bgmusic.mp3" as="audio">
    <link rel="preload" href="sounds/sound1.mp3" as="audio">
    <link rel="preload" href="sounds/sound2.mp3" as="audio">
</head>
<body>
    <audio id="bgMusic" loop preload="auto">
        <source src="sounds/bgmusic.mp3" type="audio/mpeg">
    </audio>
    <audio id="bgMusic2" loop preload="auto">
        <source src="sounds/bg2.mp3" type="audio/mpeg">
    </audio>
    <div class="background"></div>
    <div class="section_welcome">
        <div class="title" style="opacity: 0;">
            <span class="highlight">Ready For Chaos?</span>
        </div>
        <a href="#" class="continue w-button" style="opacity: 0;">Yep!</a>
    </div>
    <div class="center-gif">
        <img src="IOT.gif" alt="IOT">
    </div>
    <div class="images-container">
        <img src="1Pzk.gif" class="random-image" alt="Image 1">
        <img src="1d9c8cee984a3fb223a410768b1bff31_w200.gif" class="random-image" alt="Image 2">
        <img src="5f6da5_09df12feed3642bea92ab858f81685ca~mv2.gif" class="random-image" alt="Image 3">
        <img src="6mx.gif" class="random-image" alt="Image 4">
        <img src="7Uw.gif" class="random-image" alt="Image 5">
        <img src="7VE.gif" class="random-image" alt="Image 6">
        <img src="9c1e6fd886e3130d148b5100a979403f_w200.gif" class="random-image" alt="Image 7">
        <img src="99aef119bc7972d95af475b81c545d3b.gif" class="random-image" alt="Image 8">
        <img src="2183061_37476.gif" class="random-image" alt="Image 9">
        <img src="1546087.png" class="random-image" alt="Image 10">
        <img src="Bill-Gates-PNG.png" class="random-image" alt="Bill Gates">
        <img src="DMT.png" class="random-image" alt="DMT">
        <img src="dancing-banana.gif" class="random-image" alt="Dancing Banana">
        <img src="Download (1).png" class="random-image" alt="Download 1">
        <img src="Download (2).png" class="random-image" alt="Download 2">
        <img src="Download.png" class="random-image" alt="Download">
        <img src="ef49f0663ee5a1c09974a405ca7d6f49.gif" class="random-image" alt="Image 11">
        <img src="evil-vitalik-ethereum-bad.gif" class="random-image" alt="Evil Vitalik">
        <img src="fred-fred-mopping.gif" class="random-image" alt="Fred Mopping">
        <img src="gifgphy.gif" class="random-image" alt="GIF 1">
        <img src="gip3hy.gif" class="random-image" alt="GIF 2">
        <img src="giphy-preview.gif" class="random-image" alt="GIF Preview">
        <img src="giphy.gif" class="random-image" alt="Giphy">
        <img src="heatr.png" class="random-image" alt="Heatr">
        <img src="images.png" class="random-image" alt="Images">
        <img src="icegif-1139.gif" class="random-image" alt="Ice GIF">
        <img src="nyan-cat-poptart-cat.gif" class="random-image" alt="Nyan Cat">
        <img src="pngimg.com - star_PNG76847.png" class="random-image" alt="Star">
        <img src="png-clipart-green-and-yellow-frog-pixel-artwork-frogger-ancient-shadow-frogger-s-adventures-temple-of-the-frog-arcade-game-pixel-miscellaneous-game-thumbnail.png" class="random-image" alt="Frog">
        <img src="pngtree-hand-gesturing-with-middle-finger-finger-png-image_11213293.png" class="random-image" alt="Middle Finger">
        <img src="pngtree-peace-hands-gesture-png-image_6097747.png" class="random-image" alt="Peace Hand">
        <img src="pngtree-psilocybe-semilanceata-eat-png-image_10057336.png" class="random-image" alt="Mushrooms">
        <img src="Space-Invaders-Alien-PNG-Image.png" class="random-image" alt="Space Invader">
        <img src="unnamed.png" class="random-image" alt="Unnamed">
        <img src="tumblr_28e5bb246cb572bc5f52bda217c17ca0_832c20a2_500.gif" class="random-image" alt="Tumblr GIF">
        <img src="vita.png" class="random-image" alt="Vita">
        <img src="YaDQ.gif" class="random-image" alt="YaDQ">
        <img src="ZXut.gif" class="random-image" alt="ZXut">
    </div>

    <div class="ape-button-container">
        <button class="continue meme-btn" onclick="openMemeDashboard()">Meme Dashboard</button>
        <button class="continue manifest-btn">The Manifest</button>
    </div>

    <div class="ca-button-container" style="display: none;">
        <button class="ca-button" onclick="copyCA()">
            CA: iot7tMW1...
        </button>
    </div>

    <!-- Add Meme Dashboard Popup -->
    <div id="meme-dashboard-popup" class="popup-overlay">
        <div class="meme-dashboard-container">
            <button class="close-meme-dashboard" onclick="closeMemeDashboard()">×</button>
            <iframe id="meme-dashboard-frame" src="about:blank" frameborder="0"></iframe>
        </div>
    </div>

    <div class="manifesto">
        <div class="manifesto-content">
            <h1>The Internet of Things: OG Relaunch!</h1>
            
            <p class="intro">Forget the FUD and the noise— $IOT is back, bolder and more unhinged than ever. We’re not here to be some polished, overhyped utility token. No, $IOT is still your favorite degenerate playground, now with an extra layer of chaos for good measure.</p>
            
            <h2>Why Are We the 2nd Best Memecoin on Solana? Let’s Break It Down:</h2>
            
            <div class="reason">
                <h3>1. IOT doesn’t just not care—it refuses to care.</h3>
                <p>Other coins promise the moon. $IOT promises memes, mayhem, and questionable financial decisions. If you're looking for stability, you're in the wrong place, friend. If you’re looking for fun, strap in—we do Thingz.</p>
            </div>
            
            <div class="reason">
                <h3>2. We’re shameless, and proud of it.</h3>
                <p>Roadmaps are for tourists. Buzzwords are for marketers. $IOT gives you none of that fluff—just raw, unfiltered degeneracy. We’re here to make you laugh, meme, and maybe bag a moonshot or two. Or not. Either way, it’s a ride.</p>
            </div>
            
            <div class="reason">
                <h3>3. It’s a community of degens, for degens.</h3>
                <p>This isn’t just a coin; it’s a vibe. $IOT is your ticket to the wildest crypto party, where jeeting, vibing, and laughing at your own mistakes are part of the fun. Because if we’re not laughing, are we even living?</p>
            </div>
            
            <div class="reason">
                <h3>4. We’re the OG, and don’t let anyone tell you otherwise.</h3>
                <p>This isn’t a knock-off. This is the **real $IOT**, relaunched and ready to pump and meme its way back into your hearts. Legends don’t quit after one bad run. If Elon Musk gave up after his first rocket crashed, there’d be no SpaceX. And if $IOT quit now, there’d be no memecoin worth holding.</p>
            </div>
            
            <hr>
            
            <h2>What’s New With $IOT?</h2>
            <p>Not much—because chaos doesn’t need fixing. But the vibes are stronger, the community is louder, and the memes are sharper. Think of it as $IOT 2.0: the same degeneracy you love, just turned up to 11.</p>
            
            <hr>
            
            <h2>Ready to Do Thingz?</h2>
            <p>If you’ve got the stomach for the absurdity and the heart for the chaos, then stop lurking. Join the party, embrace the ride, and let’s make crypto ridiculous again.</p>
            
            <p>It’s not just a coin. It’s $IOT. **Still degenerate. Still legendary.**</p>
            
            <p class="hashtag">#WeDoThingz 🦡💸</p>
        </div>
    </div>

    <!-- Popup Structure -->
    <div id="popup" class="popup">
        <div class="popup-content">
            <h2>Are you ready for Thingz?</h2>
            <button id="okButton" class="continue">Yep!</button>
        </div>
    </div>

    <div id="video-popup" class="video-popup">
        <div class="video-container">
            <video id="manifest-video" controls>
                <source src="manifest.mp4" type="video/mp4">
                Your browser does not support the video tag.
            </video>
            <button class="close-video">×</button>
        </div>
    </div>

    <script src="script.js"></script>
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // Initialize background music
            const bgMusic = document.getElementById('bgMusic');
            const bgMusic2 = document.getElementById('bgMusic2');
            
            function initializeAudio() {
                if (bgMusic) {
                    bgMusic.volume = 0.5;
                    bgMusic.play().catch(error => console.log("Audio playback failed:", error));
                }
                if (bgMusic2) {
                    bgMusic2.volume = 0.5;
                    bgMusic2.play().catch(error => console.log("Audio playback failed:", error));
                }
            }

            // Check if we're coming back from memes.html
            if (document.referrer.includes('memes.html')) {
                // Hide the welcome section and show the buttons immediately
                document.querySelector('.section_welcome').style.display = 'none';
                document.querySelector('.ape-button-container').style.display = 'flex';
                document.querySelector('.ca-button-container').style.display = 'flex';
                document.querySelector('.images-container').style.display = 'block';
                document.querySelector('.center-gif').style.display = 'block';
                
                // Initialize audio and animations
                initializeAudio();
                initializeRandomImages();
                return;
            }

            // Original initialization code
            const continueButton = document.querySelector('.continue');
            if (continueButton) {
                setTimeout(() => {
                    continueButton.style.opacity = '1';
                }, 500);
            }

            // Initialize random images animation
            function initializeRandomImages() {
                const container = document.querySelector('.images-container');
                const images = document.querySelectorAll('.random-image');
                
                if (container && images.length > 0) {
                    container.style.display = 'block';
                    images.forEach(img => {
                        setRandomPosition(img);
                        setRandomAnimation(img);
                    });
                }
            }

            // Video popup functionality
            const manifestBtn = document.querySelector('.manifest-btn');
            const videoPopup = document.getElementById('video-popup');
            const video = document.getElementById('manifest-video');
            const closeBtn = document.querySelector('.close-video');

            manifestBtn.addEventListener('click', () => {
                videoPopup.style.display = 'flex';
                video.play();
                // Pause background music when video plays
                if (bgMusic) bgMusic.pause();
                if (bgMusic2) bgMusic2.pause();
            });

            closeBtn.addEventListener('click', () => {
                videoPopup.style.display = 'none';
                video.pause();
                video.currentTime = 0;
                // Resume background music when video closes
                if (bgMusic) bgMusic.play().catch(error => console.log("Audio playback failed:", error));
                if (bgMusic2) bgMusic2.play().catch(error => console.log("Audio playback failed:", error));
            });

            videoPopup.addEventListener('click', (e) => {
                if (e.target === videoPopup) {
                    videoPopup.style.display = 'none';
                    video.pause();
                    video.currentTime = 0;
                    // Resume background music when video closes
                    if (bgMusic) bgMusic.play().catch(error => console.log("Audio playback failed:", error));
                    if (bgMusic2) bgMusic2.play().catch(error => console.log("Audio playback failed:", error));
                }
            });
        });

        // Helper functions for random images
        function setRandomPosition(element) {
            const x = Math.random() * (window.innerWidth - element.width);
            const y = Math.random() * (window.innerHeight - element.height);
            element.style.left = x + 'px';
            element.style.top = y + 'px';
        }

        function setRandomAnimation(element) {
            const animations = ['spinAndGrow', 'jellyShake', 'glitchEffect', 'rainbowPulse', 'crazyFlip'];
            const randomAnim = animations[Math.floor(Math.random() * animations.length)];
            const duration = 2 + Math.random() * 3;
            element.style.animation = `${randomAnim} ${duration}s infinite`;
        }

        function openMemeDashboard() {
            const popup = document.getElementById('meme-dashboard-popup');
            const iframe = document.getElementById('meme-dashboard-frame');
            popup.style.display = 'flex';
            iframe.src = 'memes.html?embedded=true';
        }

        function closeMemeDashboard() {
            const popup = document.getElementById('meme-dashboard-popup');
            const iframe = document.getElementById('meme-dashboard-frame');
            popup.style.display = 'none';
            iframe.src = 'about:blank';
        }
    </script>
</body>
</html>