body { margin: 0; padding: 0; overflow: hidden;background:#000 }
        #viewport {
            width: 100vw;
            height: 100vh;
            position: relative;
            overflow: hidden;
            touch-action: none;
        }
        #sceneContainer {
            position: absolute;
            top: 0;
            left: 0;
            width: 2560px; /* 从map.json读取，先写死占位 */
            height: 3013px; /* 从map.json读取，先写死占位 */
            transform-origin: top left;
        }
       .cell-img {
            position: absolute;
            width: 400px; /* 从map.json读取cellWidth */
            height: 400px; /* 从map.json读取cellHeight */
            top: 0;
            left: 0;
            object-fit: cover;
            image-rendering: crisp-edges;
            z-index: 1;
            display: block;
        }
        .poly-area {
            position: absolute;
            background: transparent;
            border: 0px solid #007aff; /* 保留对齐关键：无边框干扰 */
            z-index: 2;
            pointer-events: none;
        }
        /* 角色改为图片帧：保留中心点对齐（关键对齐逻辑） */
        #player {
            position: absolute;
            width: 80px; /* 角色图宽度（可按实际图调整，建议偶数避免偏移） */
            height: 80px; /* 角色图高度（同上） */
            z-index: 3;
            transform: translate(-50%, -50%); /* 核心：角色中心点对齐坐标（和多边形基准一致） */
            visibility: hidden; /* 初始隐藏，加载后显示 */
        }

#joystick {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-image: url("../../../bj/clan_skill_garden.png");
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat; 
    /* 原有样式保留 */
    background-color: rgba(0, 0, 0, 0.3);
    touch-action: none;
    position: fixed;
            bottom: 100px;
            right: 50px;z-index:99998
}
        #joystickKnob {
            position: absolute;
            top: 50%;
            left: 50%;
            width: 60px;
            height: 60px;
            background: rgba(0,0,0,0.7);
            border-radius: 50%;
            transform: translate(-50%, -50%);
            touch-action: none;

    /* 核心：滑块背景图 */
    background-image: url("../../../tx/bg_joystick_center.png");
    background-size: 70%; /* 图片完整显示在滑块内（避免被圆形裁剪边缘） */
    background-position: center;
    background-repeat: no-repeat;
    /* 原有样式保留 */
    background-color:rgba(30, 30, 30, 0.5); /* 备用背景色 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.05s ease;
        }
    
   
        /* 只保留加载层必要样式 */
        .loading-overlay {position: fixed;top:0;left:0;width:100vw;height:100vh;background:#f4f4f4;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#333;font-size:22px;}
        .loading-progress {width:90%;height:15px;background:#eee;border-radius:5px;margin:20px 0;overflow:hidden;}
        .loading-bar {width:0%;height:100%;background:#4CAF50;transition:width 0.3s;}
