.ai-img-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  background: rgba(0, 0, 0, 0.92);
}
.ai-img-lightbox.ai-active {
  opacity: 1;
  visibility: visible;
}
.ai-lightbox-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px 80px;
  box-sizing: border-box;
  touch-action: none; /* 新增：禁止浏览器默认触摸手势，缩放拖拽交给JS处理 */
}
.ai-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.ai-lightbox-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 5;
}
.ai-lightbox-prev,
.ai-lightbox-next {
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  cursor: pointer;
}
.ai-lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 75vh;
  cursor: grab; /* 新增：提示可拖拽 */
}
.ai-lightbox-content.ai-grabbing {
  cursor: grabbing; /* 新增：拖拽中的手型 */
}
.ai-lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  display: block; /* 新增：去掉inline基线空隙，保证缩放中心计算精准 */
  transform: scale(0.9);
  opacity: 0;
  transition: 0.4s;
  user-select: none; /* 新增：拖拽时禁止选中 */
}
.ai-img-lightbox.ai-active .ai-lightbox-img {
  transform: scale(1);
  opacity: 1;
}
.ai-lightbox-img.ai-zoomed {
  transform: scale(1.5);
  cursor: grab;
}
.ai-lightbox-img.ai-no-trans {
  transition: none; /* 新增：拖拽/滚轮时关掉过渡，操作跟手不拖泥带水 */
}
.ai-lightbox-info {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  padding: 8px 16px;
  background: rgba(0,0,0,0.6);
  border-radius: 20px;
}
.ai-lightbox-toolbar {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  padding: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 28px;
}
.ai-toolbar-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
}
.ai-lightbox-loading {
  display: none;
}
/* 文章内图片鼠标样式 */
#vsb_content img {
  cursor: zoom-in;
}

@media(max-width:556px){
  .ai-lightbox-info{display:none;}
  .ai-lightbox-prev, .ai-lightbox-next{ width: 30px;height: 30px;}
  .ai-lightbox-toolbar{padding:4px;}
  .ai-toolbar-btn{width: 28px;height: 28px;}
}