/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none; /* 禁止选中文字，优化拖拽体验 */
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden; /* 隐藏默认滚动条 */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    /* 关键：禁止移动端浏览器的默认拖拽/缩放行为 */
    touch-action: none; 
}

/* 画布背景：高级工作台网格 */
#canvas-container {
    width: 100%;
    height: 100%;
    background-color: #f4f4f5;
    background-image: 
        linear-gradient(#e4e4e7 1px, transparent 1px),
        linear-gradient(90deg, #e4e4e7 1px, transparent 1px);
    background-size: 50px 50px;
    overflow: hidden;
    position: relative;
}

#canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    transform-origin: 0 0;
    will-change: transform;
}

/* 图片样式 */
.image-wrapper {
    position: absolute;
    padding: 8px;
    background: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    cursor: grab;
    transition: transform 0.2s, box-shadow 0.2s;
}

.image-wrapper:hover {
    transform: scale(1.05) !important; /* 鼠标悬停时略微放大 */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    z-index: 999;
}

.image-wrapper img {
    width: 150px; /* 限制图片基础宽度 */
    height: auto;
    display: block;
    border-radius: 2px;
    background-color: #e0e0e0; /* 防止图片未加载时透明 */
}

/* 毛玻璃工具栏 */
.toolbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 8px 16px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.toolbar button {
    border: none;
    background: none;
    cursor: pointer;
    color: #333;
    font-size: 18px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#zoomLevel {
    font-size: 14px;
    color: #555;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
}

/* 加载提示 */
#loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    color: #666;
}