<!DOCTYPE html>
<html lang="zh-CN" class="h-full scroll-smooth">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>玉兰集团 | YULAN GROUP</title>
    <!-- Tailwind CSS 引入 -->
    <script src="http://cdn.tailwindcss.com"></script>
    <!-- Google Fonts Inter & Playfair Display 引入 -->
    <link href="http://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap" rel="stylesheet">
    
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    fontFamily: {
                        sans: ['Inter', 'system-ui', '-apple-system', 'sans-serif'],
                        serif: ['Playfair Display', 'Georgia', 'serif'],
                    },
                    colors: {
                        'yulan-gold': '#D4AF37',
                        'yulan-dark': '#111111', 
                        'yulan-light': '#FAFAFA', 
                    },
                    transitionDuration: {
                        '1200': '1200ms',
                        '1500': '1500ms',
                        '2000': '2000ms',
                    },
                    letterSpacing: {
                        'widest-lux': '0.35em',
                        'monumental': '0.5em',
                    }
                }
            }
        }
    </script>
    
    <style>
        /* 物理高阻尼惯性曲线 */
        .lux-transition {
            transition: all 1200ms cubic-bezier(0.16, 1, 0.3, 1);
        }
        .lux-bg-transition {
            transition: transform 2200ms cubic-bezier(0.16, 1, 0.3, 1), filter 1200ms ease;
        }
        .lux-line-transition {
            transition: width 1200ms cubic-bezier(0.16, 1, 0.3, 1), background-color 1000ms ease, opacity 1000ms ease;
        }

        /* ==================== 显著增强版：明亮画廊空气感动画库 ==================== */
        /* 提升缩放振幅至 1.08-1.12，增加可察觉的对角线位移，缩短错峰周期增强存在感 */
        @keyframes lux-breath-intense-1 {
            0%, 100% { transform: scale(1.02) translate(0px, 0px); }
            50% { transform: scale(1.10) translate(8px, -5px); }
        }
        @keyframes lux-breath-intense-2 {
            0%, 100% { transform: scale(1.12) translate(0px, 0px); }
            50% { transform: scale(1.03) translate(-6px, 8px); }
        }
        @keyframes lux-breath-intense-3 {
            0%, 100% { transform: scale(1.04) translate(0px, 0px); }
            50% { transform: scale(1.11) translate(5px, 6px); }
        }
        .animate-breath-1 { animation: lux-breath-intense-1 14s ease-in-out infinite; }
        .animate-breath-2 { animation: lux-breath-intense-2 18s ease-in-out infinite; }
        .animate-breath-3 { animation: lux-breath-intense-3 16s ease-in-out infinite; }

        /* 浮雕轻量化数字空间漂浮 */
        @keyframes float-ambient {
            0%, 100% { transform: translateY(0) scale(1); }
            50% { transform: translateY(-12px) scale(1.04); }
        }
        .animate-float-1 { animation: float-ambient 7s ease-in-out infinite; }
        .animate-float-2 { animation: float-ambient 8s ease-in-out infinite; animation-delay: 1.2s; }
        .animate-float-3 { animation: float-ambient 9s ease-in-out infinite; animation-delay: 2.4s; }

        /* 高定微光漫反射呼吸 */
        @keyframes border-glow-breath {
            0%, 100% { border-color: rgba(214, 175, 55, 0.3); box-shadow: 0 4px 20px rgba(0,0,0,0.15), 0 0 8px rgba(214, 175, 55, 0.05); }
            50% { border-color: rgba(214, 175, 55, 0.7); box-shadow: 0 4px 25px rgba(0,0,0,0.2), 0 0 15px rgba(214, 175, 55, 0.3); }
        }
        .animate-glow-breath { animation: border-glow-breath 3.5s ease-in-out infinite; }
        /* ======================================================================== */

        /* 隐藏移动端内部滚动条 */
        .hide-scrollbar::-webkit-scrollbar {
            display: none;
        }
        .hide-scrollbar {
            -ms-overflow-style: none;
            scrollbar-width: none;
        }

        /* 电脑端高定滚动条 */
        @media (min-width: 768px) {
            ::-webkit-scrollbar {
                width: 4px;
            }
            ::-webkit-scrollbar-track {
                background: #FAFAFA;
            }
            ::-webkit-scrollbar-thumb {
                background: #D4AF37;
                border-radius: 2px;
            }
        }

        @supports (height: 100dvh) {
            .mobile-screen-h { height: 100dvh; }
        }
        @supports not (height: 100dvh) {
            .mobile-screen-h { height: 100vh; }
        }
    </style>
</head>

<body class="font-sans text-stone-800 antialiased overflow-x-hidden md:overflow-hidden bg-yulan-light h-full w-full">

    <!-- 1. 璀璨艺术进入页 (Splash Page / Loader) -->
    <div id="loader" class="fixed inset-0 z-[9999] flex flex-col items-center justify-center bg-yulan-light transition-all duration-[1200ms] ease-out">
        
        <div class="absolute w-[300px] md:w-[600px] h-[300px] md:h-[600px] rounded-full bg-yulan-gold/10 filter blur-[80px] md:blur-[140px] pointer-events-none"></div>

        <canvas id="preloader-canvas" class="absolute inset-0 pointer-events-none opacity-80"></canvas>

        <div class="relative z-10 text-center flex flex-col items-center px-4 md:px-6 w-full max-w-4xl opacity-0 transition-all duration-[1500ms] scale-[0.98]" id="loader-brand-group">
            
            <div class="flex flex-col items-center mb-8 md:mb-10 w-full">
                <div class="mt-8 mb-3 md:mt-[60px] md:mb-[9px] select-none flex justify-center items-center h-[140px] md:h-[213px] w-full relative">
                    <img id="loader-logo-img" 
                         src="s5_logo_yulan.png" 
                         alt="玉兰集团 Logo" 
                         class="h-[140px] md:h-[213px] w-auto object-contain animate-[pulse_6s_infinite] drop-shadow-sm" 
                         onerror="this.style.display='none'; document.getElementById('loader-logo-fallback').classList.remove('hidden');" />
                    
                    <div id="loader-logo-fallback" class="hidden w-[140px] h-[140px] md:w-[213px] md:h-[213px]">
                        <svg class="animate-[pulse_4s_infinite] w-full h-full" viewBox="0 0 100 100" fill="none" stroke="#0d221a" stroke-width="1.5">
                            <polygon points="50,12 62.5,39 92,39 68,56.5 77.5,85 50,67 22.5,85 32,56.5 8,39 37.5,39" />
                            <circle cx="50" cy="50" r="4" stroke-width="1" fill="#0d221a" />
                        </svg>
                    </div>
                </div>
                
                <h1 class="text-4xl sm:text-5xl md:text-6xl lg:text-7xl font-normal tracking-[0.2em] md:tracking-[0.25em] pl-[0.2em] md:pl-[0.25em] text-[#0d221a] mb-3 md:mb-4 drop-shadow-sm font-serif" style="font-family: 'Playfair Display', 'Noto Serif SC', 'Songti SC', 'STZhongsong', serif;">
                    玉兰集团
                </h1>
                <p class="text-[#C5A059] tracking-[0.4em] md:tracking-[0.6em] text-[10px] md:text-sm font-medium uppercase pl-[0.4em] md:pl-[0.6em]">
                    YULAN GROUP
                </p>
            </div>

            <div class="flex flex-col items-center relative w-full max-w-md mb-10 md:mb-12">
                <div class="w-6 h-[1px] bg-[#C5A059]/50 mb-4 md:mb-6"></div>
                
                <div class="flex items-center justify-center gap-2 md:gap-3 mb-4 md:mb-5">
                    <span class="bg-[#C5A059] text-white text-[9px] md:text-[10px] font-bold px-2 py-0.5 rounded-[2px] shadow-sm tracking-wider">SINCE 1984</span>
                    <span class="text-stone-500 text-[10px] md:text-xs tracking-[0.15em] md:tracking-[0.2em] font-medium">42载空间美学沉淀</span>
                </div>
                
                <p class="text-[#0d221a] text-base md:text-xl tracking-[0.2em] md:tracking-[0.3em] pl-[0.2em] md:pl-[0.3em] font-serif mb-2" style="font-family: 'Playfair Display', 'Noto Serif SC', 'Songti SC', serif;">
                    把艺术带给生活
                </p>
                <p class="text-[#C5A059] text-[8px] md:text-[10px] tracking-[0.3em] md:tracking-[0.4em] uppercase font-light pl-[0.3em] md:pl-[0.4em]">
                    We bring art to life
                </p>
            </div>
            
            <button onclick="dismissLoader()" class="group relative flex items-center gap-3 border border-[#C5A059]/50 hover:border-[#0d221a] px-8 md:px-12 py-3 md:py-3.5 rounded-full text-stone-600 hover:text-white text-[10px] md:text-xs tracking-[0.2em] md:tracking-[0.25em] transition-all duration-500 overflow-hidden bg-transparent cursor-pointer shadow-sm hover:shadow-md hover:bg-[#0d221a]">
                <span class="w-1.5 h-1.5 rounded-full bg-[#C5A059] animate-pulse group-hover:bg-white shadow-[0_0_8px_rgba(197,160,89,0.8)] group-hover:shadow-[0_0_8px_rgba(255,255,255,0.8)] transition-colors"></span>
                <span class="relative z-10 pl-[0.25em] font-medium transition-colors">开启艺术视界</span>
                <span class="relative z-10 transition-transform duration-300 group-hover:translate-x-1 text-[#C5A059] group-hover:text-white">&gt;</span>
            </button>
        </div>

        <div class="absolute bottom-6 md:bottom-8 left-0 w-full text-center z-10 opacity-0 transition-opacity duration-[2000ms] delay-300 px-4" id="loader-footer">
            <div class="text-stone-400 text-[8px] md:text-[10px] tracking-[0.1em] md:tracking-[0.15em] flex flex-col md:flex-row items-center justify-center gap-1 md:gap-4 font-light leading-relaxed">
                <span>广东玉兰集团股份有限公司</span>
                <span class="hidden md:inline text-stone-300 font-light">|</span>
                <span>股票代码：836867</span>
            </div>
        </div>
    </div>

    <!-- 2. 主面板展示页 (明亮高定画廊呼吸版) -->
    <!-- 背景改为明亮的 bg-stone-100，营造高级美术馆的通透感 -->
    <main class="relative h-[100dvh] md:h-screen w-screen flex flex-col md:flex-row overflow-y-auto md:overflow-hidden overflow-x-hidden snap-y snap-mandatory md:snap-none bg-stone-100 hide-scrollbar">
        
        <!-- ==================== 1. 蜜乐涂料版块 ==================== -->
        <section onclick="window.open('http://millerpaint.com.cn', '_blank')" class="group relative flex-none w-full mobile-screen-h md:flex-1 md:h-full md:w-auto flex flex-col justify-end pb-20 md:pb-32 px-6 md:px-12 overflow-hidden lux-transition md:hover:flex-[1.75] border-b md:border-b-0 md:border-r border-stone-200 cursor-pointer bg-stone-100 snap-start">
            
            <!-- 大幅提升默认明亮度 (brightness-[0.98])，内层嵌套大幅度异步呼吸动画 -->
            <div class="absolute inset-0 overflow-hidden brightness-[0.98] group-hover:brightness-105 scale-100 group-hover:scale-105 lux-bg-transition">
                <div class="absolute inset-0 bg-cover bg-center scale-100 animate-breath-1" 
                     style="background-image: url('miller_paint_bg.webp'), url('http://images.unsplash.com/photo-1562184560-a11b7cf7c169?auto=format&fit=crop&w=1200&q=80');">
                </div>
            </div>
            
            <!-- 将原本厚重的纯黑遮罩改为极轻薄的空气感渐变，兼顾明亮度与文字可读性 -->
            <div class="absolute inset-0 bg-gradient-to-t from-black/60 via-black/15 to-transparent opacity-90 group-hover:opacity-95 lux-transition"></div>

            <!-- 明亮模式高定浮雕印记数字，附带高动态浮动 -->
            <div class="absolute -right-2 md:-right-4 bottom-12 md:bottom-12 font-serif text-[8rem] md:text-[14rem] leading-none text-stone-900/[0.04] group-hover:text-yulan-gold/[0.12] group-hover:-translate-y-8 group-hover:scale-110 lux-transition pointer-events-none select-none animate-float-1">
                01
            </div>

            <div class="relative z-10 flex flex-col items-start text-left w-full max-w-[280px] sm:max-w-sm md:max-w-md lg:max-w-lg select-none mx-auto transition-transform duration-[1200ms] md:group-hover:-translate-y-5">
                
                <!-- 搭载强化的边缘微光慢闪呼吸 -->
                <div class="bg-black/40 backdrop-blur-md border px-3 md:px-4 py-1 md:py-1.5 rounded-full text-[10px] md:text-xs tracking-wider text-yulan-gold mb-4 md:mb-6 font-light animate-glow-breath">
                    美国原装进口涂料
                </div>
                
                <h2 class="font-serif text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-normal text-stone-100 tracking-wide mb-2 md:mb-3 leading-tight drop-shadow-md group-hover:text-white transition-colors duration-500">
                    蜜乐涂料
                </h2>
                
                <p class="text-stone-300 text-[10px] md:text-sm tracking-wider font-light mb-5 md:mb-6 drop-shadow-sm">
                    百年积淀 · 美国进口高端原装色彩
                </p>
                
                <div class="w-[25%] md:w-[15%] group-hover:w-full h-[1px] bg-stone-400/60 group-hover:bg-yulan-gold mb-5 md:mb-6 lux-line-transition"></div>
                
                <div class="flex flex-col sm:flex-row justify-start items-start sm:items-center gap-3 md:gap-4 w-full">
                    <div class="group/btn flex items-center gap-2 md:gap-3 text-stone-200 group-hover:text-yulan-gold transition-colors duration-500">
                        <span class="text-[11px] md:text-sm tracking-[0.15em] md:tracking-widest font-normal drop-shadow-sm">探索蜜乐色彩视界</span>
                        <div class="w-6 h-6 md:w-8 md:h-8 rounded-full border border-stone-400/70 group-hover:border-yulan-gold group-hover:bg-yulan-gold/10 flex items-center justify-center text-stone-300 group-hover:text-yulan-gold transition-all duration-300 shadow-sm">
                            <span class="text-[10px] md:text-xs transform group-hover:translate-x-0.5 transition-transform">→</span>
                        </div>
                    </div>
                    <span onclick="event.stopPropagation()" class="text-[9px] md:text-xs text-stone-400 tracking-wider font-light select-all transition-colors group-hover:text-stone-200 mt-1 sm:mt-0.5">millerpaint.com.cn</span>
                </div>
            </div>
        </section>

        <!-- ==================== 2. 玉兰家居版块 (C位) ==================== -->
        <section onclick="window.open('http://www.yulanhome.cn', '_blank')" class="group relative flex-none w-full mobile-screen-h md:flex-1 md:h-full md:w-auto flex flex-col justify-end pb-20 md:pb-32 px-6 md:px-12 overflow-hidden lux-transition md:hover:flex-[1.75] border-b md:border-b-0 md:border-r border-stone-200 cursor-pointer bg-stone-100 snap-start">
            
            <div class="absolute inset-0 overflow-hidden brightness-[0.98] group-hover:brightness-105 scale-100 group-hover:scale-105 lux-bg-transition">
                <div class="absolute inset-0 bg-cover bg-center scale-100 animate-breath-2" 
                     style="background-image: url('yulan_home_bg.webp'), url('http://images.unsplash.com/photo-1616486338812-3dadae4b4ace?auto=format&fit=crop&w=1200&q=80');">
                </div>
            </div>
            
            <div class="absolute inset-0 bg-gradient-to-t from-black/60 via-black/15 to-transparent opacity-90 group-hover:opacity-95 lux-transition"></div>

            <div class="absolute -right-2 md:-right-4 bottom-12 md:bottom-12 font-serif text-[8rem] md:text-[14rem] leading-none text-stone-900/[0.04] group-hover:text-yulan-gold/[0.12] group-hover:-translate-y-8 group-hover:scale-110 lux-transition pointer-events-none select-none animate-float-2">
                02
            </div>

            <div class="relative z-10 flex flex-col items-start text-left w-full max-w-[280px] sm:max-w-sm md:max-w-md lg:max-w-lg select-none mx-auto transition-transform duration-[1200ms] md:group-hover:-translate-y-5">
                <div class="bg-black/40 backdrop-blur-md border px-3 md:px-4 py-1 md:py-1.5 rounded-full text-[10px] md:text-xs tracking-wider text-yulan-gold mb-4 md:mb-6 font-light animate-glow-breath" style="animation-delay: 0.8s;">
                    高端软装系列品牌
                </div>
                
                <h2 class="font-serif text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-normal text-stone-100 tracking-wide mb-2 md:mb-3 leading-tight drop-shadow-md group-hover:text-white transition-colors duration-500">
                    玉兰家居
                </h2>
                
                <p class="text-stone-300 text-[10px] md:text-sm tracking-wider font-light mb-5 md:mb-6 drop-shadow-sm">
                    集成墙纸、墙布、窗帘软装一体化制造
                </p>
                
                <div class="w-[25%] md:w-[15%] group-hover:w-full h-[1px] bg-stone-400/60 group-hover:bg-yulan-gold mb-5 md:mb-6 lux-line-transition"></div>
                
                <div class="flex flex-col sm:flex-row justify-start items-start sm:items-center gap-3 md:gap-4 w-full">
                    <div class="group/btn flex items-center gap-2 md:gap-3 text-stone-200 group-hover:text-yulan-gold transition-colors duration-500">
                        <span class="text-[11px] md:text-sm tracking-[0.15em] md:tracking-widest font-normal drop-shadow-sm">品鉴高定生活</span>
                        <div class="w-6 h-6 md:w-8 md:h-8 rounded-full border border-stone-400/70 group-hover:border-yulan-gold group-hover:bg-yulan-gold/10 flex items-center justify-center text-stone-300 group-hover:text-yulan-gold transition-all duration-300 shadow-sm">
                            <span class="text-[10px] md:text-xs transform group-hover:translate-x-0.5 transition-transform">→</span>
                        </div>
                    </div>
                    <span onclick="event.stopPropagation()" class="text-[9px] md:text-xs text-stone-400 tracking-wider font-light select-all transition-colors group-hover:text-stone-200 mt-1 sm:mt-0.5">yulanhome.cn</span>
                </div>
            </div>
        </section>

        <!-- ==================== 3. Mullano艺术涂料版块 ==================== -->
        <section onclick="window.open('http://mullanopaint.com', '_blank')" class="group relative flex-none w-full mobile-screen-h md:flex-1 md:h-full md:w-auto flex flex-col justify-end pb-20 md:pb-32 px-6 md:px-12 overflow-hidden lux-transition md:hover:flex-[1.75] cursor-pointer bg-stone-100 snap-start">
            
            <div class="absolute inset-0 overflow-hidden brightness-[0.98] group-hover:brightness-105 scale-100 group-hover:scale-105 lux-bg-transition">
                <div class="absolute inset-0 bg-cover bg-center scale-100 animate-breath-3" 
                     style="background-image: url('mullan_art_bg.webp'), url('http://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&w=1200&q=80');">
                </div>
            </div>
            
            <div class="absolute inset-0 bg-gradient-to-t from-black/60 via-black/15 to-transparent opacity-90 group-hover:opacity-95 lux-transition"></div>

            <div class="absolute -right-2 md:-right-4 bottom-12 md:bottom-12 font-serif text-[8rem] md:text-[14rem] leading-none text-stone-900/[0.04] group-hover:text-yulan-gold/[0.12] group-hover:-translate-y-8 group-hover:scale-110 lux-transition pointer-events-none select-none animate-float-3">
                03
            </div>

            <div class="relative z-10 flex flex-col items-start text-left w-full max-w-[280px] sm:max-w-sm md:max-w-md lg:max-w-lg select-none mx-auto transition-transform duration-[1200ms] md:group-hover:-translate-y-5">
                <div class="bg-black/40 backdrop-blur-md border px-3 md:px-4 py-1 md:py-1.5 rounded-full text-[10px] md:text-xs tracking-wider text-yulan-gold mb-4 md:mb-6 font-light animate-glow-breath" style="animation-delay: 1.6s;">
                    自主艺术涂料品牌
                </div>
                
                <h2 class="font-serif text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-normal text-stone-100 tracking-wide mb-2 md:mb-3 leading-tight break-words drop-shadow-md group-hover:text-white transition-colors duration-500">
                    Mullano 艺术涂料
                </h2>
                
                <p class="text-stone-300 text-[10px] md:text-sm tracking-wider font-light mb-5 md:mb-6 drop-shadow-sm">
                    意式设计 · 定制空间立体光影肌理
                </p>
                
                <div class="w-[25%] md:w-[15%] group-hover:w-full h-[1px] bg-stone-400/60 group-hover:bg-yulan-gold mb-5 md:mb-6 lux-line-transition"></div>
                
                <div class="flex flex-col sm:flex-row justify-start items-start sm:items-center gap-3 md:gap-4 w-full">
                    <div class="group/btn flex items-center gap-2 md:gap-3 text-stone-200 group-hover:text-yulan-gold transition-colors duration-500">
                        <span class="text-[11px] md:text-sm tracking-[0.15em] md:tracking-widest font-normal drop-shadow-sm">体验高定艺术美学</span>
                        <div class="w-6 h-6 md:w-8 md:h-8 rounded-full border border-stone-400/70 group-hover:border-yulan-gold group-hover:bg-yulan-gold/10 flex items-center justify-center text-stone-300 group-hover:text-yulan-gold transition-all duration-300 shadow-sm">
                            <span class="text-[10px] md:text-xs transform group-hover:translate-x-0.5 transition-transform">→</span>
                        </div>
                    </div>
                    <span onclick="event.stopPropagation()" class="text-[9px] md:text-xs text-stone-400 tracking-wider font-light select-all transition-colors group-hover:text-stone-200 mt-1 sm:mt-0.5">mullanopaint.com</span>
                </div>
            </div>
        </section>

    </main>

    <!-- JS 逻辑处理 -->
    <script>
        let inactivityTimer;
        let isLoaderDismissed = false;

        function resetInactivityTimer() {
            if (isLoaderDismissed) return;
            clearTimeout(inactivityTimer);
            inactivityTimer = setTimeout(() => {
                if (!isLoaderDismissed) {
                    dismissLoader();
                }
            }, 5000);
        }

        document.addEventListener('mousemove', resetInactivityTimer);
        document.addEventListener('touchstart', resetInactivityTimer);
        document.addEventListener('keydown', resetInactivityTimer);

        window.addEventListener('load', () => {
            const group = document.getElementById('loader-brand-group');
            if (group) {
                group.classList.remove('opacity-0', 'scale-[0.98]');
                group.classList.add('opacity-100', 'scale-100');
            }
            const footer = document.getElementById('loader-footer');
            if (footer) {
                footer.classList.remove('opacity-0');
            }
            initPreloaderCanvas();
            resetInactivityTimer();
        });

        function dismissLoader() {
            isLoaderDismissed = true; 
            clearTimeout(inactivityTimer); 
            
            const loader = document.getElementById('loader');
            if (loader) {
                loader.classList.add('opacity-0', 'pointer-events-none');
                setTimeout(() => {
                    loader.style.display = 'none';
                }, 1200);
            }
        }

        function initPreloaderCanvas() {
            const canvas = document.getElementById('preloader-canvas');
            if (!canvas) return;
            const ctx = canvas.getContext('2d');

            let width = (canvas.width = window.innerWidth);
            let height = (canvas.height = window.innerHeight);

            const mouse = { x: null, y: null };

            window.addEventListener('mousemove', (e) => {
                mouse.x = e.clientX;
                mouse.y = e.clientY;
            });
            window.addEventListener('mouseleave', () => {
                mouse.x = null;
                mouse.y = null;
            });
            window.addEventListener('touchmove', (e) => {
                if(e.touches.length > 0) {
                    mouse.x = e.touches[0].clientX;
                    mouse.y = e.touches[0].clientY;
                }
            }, {passive: true});
            window.addEventListener('touchend', () => {
                mouse.x = null;
                mouse.y = null;
            });

            window.addEventListener('resize', () => {
                width = canvas.width = window.innerWidth;
                height = canvas.height = window.innerHeight;
            });

            const particles = [];
            const isMobile = window.innerWidth < 768;
            const particleCount = isMobile ? 40 : 80; 
            const connectionDistance = isMobile ? 100 : 150;

            for (let i = 0; i < particleCount; i++) {
                const baseVx = (Math.random() - 0.5) * 0.6;
                const baseVy = (Math.random() - 0.5) * 0.6;
                
                particles.push({
                    x: Math.random() * width,
                    y: Math.random() * height,
                    vx: baseVx,
                    vy: baseVy,
                    baseVx: baseVx,
                    baseVy: baseVy,
                    radius: Math.random() * 1.5 + 0.8
                });
            }

            function draw() {
                ctx.clearRect(0, 0, width, height);

                particles.forEach(p => {
                    p.x += p.vx;
                    p.y += p.vy;

                    if (p.x < 0 || p.x > width) { p.vx *= -1; p.baseVx *= -1; p.x = Math.max(0, Math.min(p.x, width)); }
                    if (p.y < 0 || p.y > height) { p.vy *= -1; p.baseVy *= -1; p.y = Math.max(0, Math.min(p.y, height)); }

                    if (mouse.x !== null && mouse.y !== null) {
                        const dx = mouse.x - p.x;
                        const dy = mouse.y - p.y;
                        const dist = Math.sqrt(dx * dx + dy * dy);

                        if (dist < 400) {
                            const force = (400 - dist) / 400; 
                            p.vx += (dx / dist) * force * 0.015;
                            p.vy += (dy / dist) * force * 0.015;
                        }
                    }

                    p.vx = p.vx * 0.98 + p.baseVx * 0.02;
                    p.vy = p.vy * 0.98 + p.baseVy * 0.02;

                    const dxCenter = p.x - (width / 2);
                    const dyCenter = p.y - (height / 2);
                    const distCenter = Math.sqrt(dxCenter * dxCenter + dyCenter * dyCenter);
                    let particleAlpha = 0.6;
                    
                    const barrierRadius = isMobile ? 150 : 250;
                    if (distCenter < barrierRadius) {
                        particleAlpha = 0.6 * (distCenter / barrierRadius); 
                    }

                    ctx.beginPath();
                    ctx.arc(p.x, p.y, p.radius, 0, Math.PI * 2);
                    ctx.fillStyle = `rgba(212, 175, 55, ${particleAlpha})`; 
                    ctx.fill();
                });

                for (let i = 0; i < particleCount; i++) {
                    for (let j = i + 1; j < particleCount; j++) {
                        const p1 = particles[i];
                        const p2 = particles[j];
                        const dx = p1.x - p2.x;
                        const dy = p1.y - p2.y;
                        const dist = Math.sqrt(dx * dx + dy * dy);

                        if (dist < connectionDistance) {
                            let alpha = (1 - dist / connectionDistance) * 0.15;
                            
                            if (mouse.x !== null && mouse.y !== null) {
                                const midX = (p1.x + p2.x) / 2;
                                const midY = (p1.y + p2.y) / 2;
                                const mDist = Math.sqrt((mouse.x - midX) ** 2 + (mouse.y - midY) ** 2);
                                if (mDist < 300) {
                                    alpha += (1 - mDist / 300) * 0.3; 
                                }
                            }

                            const midLineX = (p1.x + p2.x) / 2;
                            const midLineY = (p1.y + p2.y) / 2;
                            const distLineCenter = Math.sqrt((midLineX - width/2)**2 + (midLineY - height/2)**2);
                            const barrierRadius = isMobile ? 150 : 250;
                            if (distLineCenter < barrierRadius) {
                                alpha *= (distLineCenter / barrierRadius);
                            }

                            ctx.beginPath();
                            ctx.moveTo(p1.x, p1.y);
                            ctx.lineTo(p2.x, p2.y);
                            ctx.strokeStyle = `rgba(212, 175, 55, ${alpha})`;
                            ctx.lineWidth = 0.6; 
                            ctx.stroke();
                        }
                    }
                }

                requestAnimationFrame(draw);
            }

            draw();
        }
    </script>
</body>
</html>