         });
            }
        }

        // 兼容旧的loadSlide函数
        function loadSlide(index) {
            loadSlideWithCache(index);
        }

        // 更新控制按钮状态
        function updateControls() {
            const prevBtn = document.getElementById('prevBtn');
            const nextBtn = document.getElementById('nextBtn');
            const slideCounter = document.getElementById('slideCounter');

            prevBtn.disabled = currentSlideIndex === 0;
            nextBt