<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Crown Gen Website</title>
    <link href="https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@700&family=Marcellus&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script>
    <style>
        /* Original styles remain unchanged */
        :root {
            --void-black: #000000;
            --imperial-gold: #FFD700;
            --gilded-edge: #C5A020;
        }
        body {
            font-family: 'Marcellus', serif;
            background: linear-gradient(135deg, var(--void-black) 0%, #0A0A0A 100%);
            color: rgba(255, 255, 255, 0.9);
            margin: 0;
            min-height: 100vh;
            overflow: auto;
            position: relative;
        }
        #particles-js {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
        }
        .nav-container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 1rem;
            position: relative;
            z-index: 1;
        }
        .nav-tabs {
            display: flex;
            gap: 2rem;
            justify-content: center;
            margin-bottom: 2rem;
        }
        .tab-button {
            background: none;
            border: none;
            color: var(--imperial-gold);
            font-family: 'Cinzel Decorative', cursive;
            font-size: 1.2rem;
            cursor: pointer;
            padding: 0.5rem 1.5rem;
            border-radius: 8px;
            transition: all 0.3s ease;
            text-decoration: none;
        }
        .tab-button.active {
            background: rgba(255, 215, 0, 0.1);
            border: 2px solid var(--gilded-edge);
            text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
        }
        .hero-section {
            text-align: center;
            padding: 4rem 1rem;
            max-width: 1200px;
            margin: 0 auto;
            opacity: 0;
            animation: fadeInUp 0.8s ease-out 0.2s forwards;
            position: relative;
            z-index: 1;
        }
        .hero-title {
            font-family: 'Cinzel Decorative', cursive;
            font-size: clamp(2.5rem, 6vw, 3.5rem);
            color: var(--imperial-gold);
            margin-bottom: 1.5rem;
            text-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
            animation: titleFlicker 4s ease-in-out infinite;
        }
        .hero-description {
            font-size: 1.2rem;
            max-width: 800px;
            margin: 0 auto 2rem;
            line-height: 1.6;
            opacity: 0;
            animation: fadeInUp 0.8s ease-out 0.6s forwards;
        }
        .cta-button {
            background: linear-gradient(45deg, var(--gilded-edge), var(--imperial-gold));
            color: var(--void-black);
            padding: 1rem 2.5rem;
            border-radius: 8px;
            font-family: 'Cinzel Decorative', cursive;
            font-size: 1.2rem;
            border: none;
            cursor: pointer;
            transition: transform 0.3s ease;
            margin-top: 1rem;
            opacity: 0;
            animation: fadeInUp 0.8s ease-out 1s forwards;
        }
    </style>
</head>
<body>
    <div id="particles-js"></div>
    <nav class="nav-container">
        <div class="nav-tabs">
            <button class="tab-button active" onclick="showTab('home')">Home</button>
            <button class="tab-button" onclick="loadTabContent('tiers')">Tiers</button>
            <a href="tutorials.html" class="tab-button">View Tutorials</a>
        </div>
    </nav>

    <div id="home" class="hero-section active">
        <h1 class="hero-title">Crown Gen Home</h1>
        <p class="hero-description">
            Welcome to the new and improved CrownGen website. Here, you can view information in a clear and informative way. In addition to many other features, enjoy.
        </p>
        <button class="cta-button" onclick="loadTabContent('tiers')">View Tiers</button>
    </div>

    <div id="dynamic-content"></div>

    <script>
        function showTab(tabName) {
            document.querySelectorAll('[class*="active"]').forEach(el => {
                el.classList.remove('active');
            });
            document.getElementById(tabName).classList.add('active');
        }

        function loadTabContent(tabName) {
            fetch(`${tabName}.html`)
                .then(response => response.text())
                .then(html => {
                    document.getElementById('dynamic-content').innerHTML = html;
                    document.querySelector('.tab-button.active').classList.remove('active');
                    document.querySelector(`[onclick*="${tabName}"]`).classList.add('active');
                })
                .catch(error => console.error('Error loading tab content:', error));
        }

        particlesJS('particles-js', {
            particles: {
                number: { value: 80, density: { enable: true, value_area: 800 } },
                color: { value: "#ffffff" },
                shape: { type: "circle" },
                opacity: { value: 0.7, random: true, anim: { enable: true, speed: 1, opacity_min: 0.1 } },
                size: { value: 3, random: true, anim: { enable: true, speed: 2, size_min: 0.1 } },
                line_linked: { enable: false },
                move: {
                    enable: true,
                    speed: 2,
                    direction: "top",
                    random: true,
                    straight: false,
                    out_mode: "out",
                    bounce: false
                }
            },
            interactivity: {
                detect_on: "canvas",
                events: { onhover: { enable: false }, onclick: { enable: false }, resize: true }
            },
            retina_detect: true
        });
    </script>
</body>
</html>
