* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-size: 0px;
            -webkit-tap-highlight-color: transparent;
        }

        .gallery {
            line-height: 0;
            font-size: 0;
        }

        .gallery img {
            height: 99px;
            display: inline-block;
            vertical-align: top;
            margin-right: 2px;
            margin-bottom: 2px;
            object-fit: cover;
        }
        
        .gallery img:last-child {
            margin-right: 0;
        }

        #loading {
            position: fixed;
            inset: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            background: white;
            font-size: 24px;
            z-index: 999;
            opacity: 1;
            transition: opacity 0.8s ease;
        }

        #loading.hidden {
            opacity: 0;
            pointer-events: none;
        }

        /* 全屏查看样式 */
        .fullscreen-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            opacity: 0;
            transition: opacity 0.3s ease;
            overflow: hidden;
        }

        .fullscreen-overlay.show {
            display: flex;
            opacity: 1;
        }

        .image-container {
            position: relative;
            display: inline-block;
            cursor: grab;
            display: flex;
            justify-content: center;
            align-items: center;
            touch-action: none; /* 禁用浏览器默认的触摸行为 */
        }

        .image-container.dragging {
            cursor: grabbing;
        }

        /* 移动端优化 */
        @media (max-width: 768px) {
            .fullscreen-text {
                top: 5px;
                left: 5px;
                font-size: 16px;
                max-width: 300px;
            }
            
            .image-container {
                cursor: default; /* 移动端不显示抓手光标 */
            }
        }

        .fullscreen-image {
            height: 40vh;
            object-fit: contain;
            transform: scale(0.1);
            transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            user-select: none;
            pointer-events: auto;
        }

        .fullscreen-overlay.show .fullscreen-image {
            transform: scale(1);
            transition: none;
        }

        .fullscreen-text {
            position: absolute;
            top: 10px;
            left: 10px;
            color: white;
            font-size: 20px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
            max-width: 400px;
            font-weight: bold;
            opacity: 0;
            transform: translateY(-20px);
            transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
        }

        .fullscreen-overlay.show .fullscreen-text {
            opacity: 1;
            transform: translateY(0);
        }

        .gallery img {
            cursor: pointer;
            transition: transform 0.2s ease;
        }

        .gallery img:hover {
            transform: scale(1.05);
        }