<footer class="site-footer">
    <div class="footer-main">
        <div class="container">
            <div class="footer-grid">
                <div class="footer-col footer-about">
                    <h4>💒 阳泉婚礼宝典</h4>
                    <p>阳泉本地最专业的婚礼服务平台。从筹备到礼成，全程陪伴每一对新人。</p>
                </div>
                <div class="footer-col footer-links">
                    <h4>快速链接</h4>
                    <ul>
                        <li><a href="index.php">首页</a></li>
                        <li><a href="services.php">服务项目</a></li>
                        <li><a href="budget.php">预算管理</a></li>
                        <li><a href="checklist.php">婚礼清单</a></li>
                        <li><a href="traditions.php">婚俗文化</a></li>
                    </ul>
                </div>
                <div class="footer-col footer-links">
                    <h4>更多服务</h4>
                    <ul>
                        <li><a href="custom.php">风俗查询</a></li>
                        <li><a href="vendors.php">商家推荐</a></li>
                        <li><a href="gallery.php">婚礼案例</a></li>
                        <li><a href="dating.php">婚恋交友</a></li>
                        <li><a href="wedding_schedule.php">婚礼流程</a></li>
                        <li><a href="parent_attire.php">父母衣着</a></li>
                        <li><a href="parent_speech.php">父母致辞</a></li>
                        <li><a href="almanac.php">老黄历</a></li>
                        <li><a href="weather.php">天气查询</a></li>
                        <li><a href="bazi.php">八字测算</a></li>
                        <li><a href="invitation_create.php">电子请柬</a></li>
                        <li><a href="tickets.php">票务查询</a></li>
                        <li><a href="gallery_yulong.php">雪山婚礼</a></li>
                        <li><a href="about.php">关于我们</a></li>
                    </ul>
                </div>
                <div class="footer-col footer-contact">
                    <h4>联系我们</h4>
                    <p><i class="fas fa-map-marker-alt"></i> 山西省阳泉市平定县朝阳巷6号</p>
                    <p><i class="fas fa-phone-alt"></i>17535366336</p>
                    <p><i class="fas fa-envelope"></i> 18635381375@163.com</p>
                </div>
            </div>
        </div>
    </div>
    
    <div class="footer-bottom">
        <div class="container">
            <p>&copy; 2025 阳泉婚礼宝典 版权所有 | 为阳泉新人提供最优质的婚礼服务</p>
            <p class="footer-disclaimer">本网站信息均来源于公开渠道，仅供参考，具体以商家官方为准</p>
        </div>
    </div>
</footer>

<script src="js/main.js"></script>

<div id="pwaInstallBanner" class="pwa-install-banner" style="display:none;">
    <div class="pwa-banner-content">
        <span class="pwa-banner-icon">💒</span>
        <div class="pwa-banner-text">
            <strong>安装阳泉婚礼宝典</strong>
            <span>添加到主屏幕，随时使用</span>
        </div>
        <button id="pwaInstallBtn" class="pwa-install-btn">安装</button>
        <button id="pwaDismissBtn" class="pwa-dismiss-btn">✕</button>
    </div>
</div>

<script>
if ('serviceWorker' in navigator) {
    window.addEventListener('load', function() {
        navigator.serviceWorker.register('/sw.js').then(function(reg) {
            console.log('Service Worker 注册成功:', reg.scope);
        }).catch(function(err) {
            console.log('Service Worker 注册失败:', err);
        });
    });
}

var deferredPrompt = null;
window.addEventListener('beforeinstallprompt', function(e) {
    e.preventDefault();
    deferredPrompt = e;
    var banner = document.getElementById('pwaInstallBanner');
    if (banner && !sessionStorage.getItem('pwaDismissed')) {
        banner.style.display = 'block';
    }
});

var installBtn = document.getElementById('pwaInstallBtn');
if (installBtn) {
    installBtn.addEventListener('click', function() {
        if (deferredPrompt) {
            deferredPrompt.prompt();
            deferredPrompt.userChoice.then(function(choiceResult) {
                if (choiceResult.outcome === 'accepted') {
                    console.log('用户接受安装');
                }
                deferredPrompt = null;
                document.getElementById('pwaInstallBanner').style.display = 'none';
            });
        }
    });
}

var dismissBtn = document.getElementById('pwaDismissBtn');
if (dismissBtn) {
    dismissBtn.addEventListener('click', function() {
        document.getElementById('pwaInstallBanner').style.display = 'none';
        sessionStorage.setItem('pwaDismissed', 'true');
    });
}
</script>
</body>
</html>