/* 图片预览模态框样式 */
#imagePreviewModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.preview-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 85vh;
  overflow: hidden;
}

#previewImage {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  cursor: grab;
  transition: transform 0.2s ease;
  transform-origin: center;
}

#previewImage:active {
  cursor: grabbing;
}

#closePreview {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: white;
  font-size: 36px;
  cursor: pointer;
  z-index: 1001;
  transition: color 0.2s ease;
}

#closePreview:hover {
  color: #f00;
}

/* 控制按钮容器 */
.preview-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  background: rgba(0, 0, 0, 0.7);
  padding: 10px 20px;
  border-radius: 30px;
  backdrop-filter: blur(5px);
}

/* 控制按钮样式 */
.control-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  transition: all 0.2s ease;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.control-btn:active {
  transform: scale(0.95);
}

/* 放大镜效果 */
.magnifier {
  position: absolute;
  width: 200px;
  height: 200px;
  border: 2px solid white;
  border-radius: 50%;
  overflow: hidden;
  cursor: none;
  display: none;
  pointer-events: none;
  z-index: 1002;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.magnifier img {
  position: absolute;
  width: 400%;
  height: 400%;
  object-fit: contain;
}

/* 缩放比例显示 */
.scale-info {
  position: absolute;
  top: 20px;
  left: 20px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 14px;
  backdrop-filter: blur(5px);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .preview-controls {
    padding: 8px 15px;
  }
  
  .control-btn {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }
  
  #closePreview {
    font-size: 28px;
  }
  
  .magnifier {
    width: 150px;
    height: 150px;
  }
}