/* 禁用Web手势滑动的CSS配置 */

/* 全局禁用滑动手势 */
html, body {
  /* 禁用水平滚动和手势 */
  overscroll-behavior-x: none;
  overscroll-behavior-y: auto;
  
  /* 禁用触摸操作手势 */
  touch-action: pan-y pinch-zoom;
  
  /* 防止意外滚动 */
  overflow-x: hidden;
  
  /* 禁用用户选择（防止拖拽） */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Flutter 应用容器 */
#flutter-view, 
flutter-view, 
flt-glass-pane,
.flt-glass-pane {
  /* 禁用触摸手势 */
  touch-action: pan-y pinch-zoom !important;
  overscroll-behavior-x: none !important;
  
  /* 防止意外的浏览器手势 */
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* 移动端特定的手势禁用 */
@media (max-width: 768px) {
  * {
    /* 禁用长按菜单 */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    
    /* 禁用双击放大 */
    touch-action: manipulation;
  }
  
  /* 输入框保持可选择 */
  input, textarea, [contenteditable] {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
    
    touch-action: manipulation !important;
  }
}

/* iOS Safari 特定优化 */
@supports (-webkit-touch-callout: none) {
  body {
    /* 禁用 iOS Safari 的边缘滑动 */
    -webkit-user-select: none;
    -webkit-touch-callout: none;
  }
  
  /* 禁用 iOS 的弹性滚动 */
  html, body {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
  }
}

/* Android Chrome 特定优化 */
@media screen and (max-width: 768px) {
  html {
    /* 禁用 Android Chrome 的滑动刷新 */
    overscroll-behavior-y: none;
  }
}

/* 防止意外的拖拽操作 */
img, svg, canvas {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  
  pointer-events: none;
  user-select: none;
}

/* Flutter 画布保持交互性 */
canvas[flt-id], 
flt-canvas, 
.flt-canvas {
  pointer-events: auto !important;
  touch-action: pan-y pinch-zoom !important;
}

/* 链接和按钮保持可点击 */
a, button, [role="button"], .clickable {
  pointer-events: auto;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* 滚动条样式（可选） */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}