* {
  margin: 0;
  padding: 0;
}

html {
  background: #ffffff;
}

body {
  background: #ffffff;
  margin: 0;
  padding: 0;
  /* ✅ 禁止选中任何内容 */
  -webkit-user-select: none;
  user-select: none;
  /* ✅ 禁止长按菜单 */
  -webkit-touch-callout: none;
  /* ✅ 禁止点击时出现半透明高亮 */
  -webkit-tap-highlight-color: transparent;
}

.image-wrapper {
  position: relative;
  width: 100%;
  height: auto;
  overflow: hidden;
  touch-action: none;
  background: #ffffff;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: env(safe-area-inset-top, 20px);
  box-sizing: border-box;
  /* ✅ 禁止用户选择 */
  -webkit-user-select: none;
  user-select: none;
}

#zoomImage {
  width: 100%;
  height: auto;
  display: block;
  transform-origin: center center;
  transition: transform 0.05s ease;
  flex-shrink: 0;
  /* ✅ 禁止图片被拖拽（浏览器默认拖拽保存） */
  -webkit-user-drag: none;
  /* ✅ 禁止用户选中图片 */
  -webkit-user-select: none;
  user-select: none;
  /* ✅ 禁止长按菜单（保存图片） */
  -webkit-touch-callout: none;
  /* ✅ 禁止点击时出现半透明高亮 */
  -webkit-tap-highlight-color: transparent;
  /* ✅ 禁止图片被拖拽到桌面/文件夹 */
  pointer-events: auto;
  /* ✅ 禁止图片被复制（Canvas 防护需要 JS） */
}

/* ===== 隐藏滚动条 ===== */
::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
  display: none !important;
}
::-webkit-scrollbar-track,
::-webkit-scrollbar-thumb,
::-webkit-scrollbar-button,
::-webkit-scrollbar-corner {
  display: none !important;
  background: transparent !important;
  width: 0 !important;
  height: 0 !important;
}
* {
  scrollbar-width: none !important;
  scrollbar-color: transparent transparent !important;
}
body {
  -ms-overflow-style: none !important;
}
html,
body {
  overflow: -moz-scrollbars-none;
  overflow: auto;
}

#protectOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  background: transparent;
  pointer-events: none; /* ✅ 让触摸事件穿透到图片，不影响缩放拖拽 */
}

.tab {
  position: fixed;
  top: 0;
  left: 0;
  padding: 1px 0 0 16px;
  z-index: 999;
  width: 100%;
  height: 66px;
  backdrop-filter: blur(8px);
  background-color: rgb(0, 0, 0, 0%);
  transform: translateY(-10px);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-back {
  position: absolute;
  left: 0;
  padding-left: 18px;
  box-sizing: border-box;
  width: 100px;
  height: 100%;
  background-color: #000;
}

.tab.active {
  transform: translateY(0);
  opacity: 1;
}

.tab-app {
  display: none;
}

/* 以下是app ------------------------------------------------------ */
@media (max-width: 605px) {
  .image-wrapper {
    touch-action: auto !important;
    background: transparent !important;
    height: 100dvh !important;
    overflow: visible !important;
    display: block !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding-top: 0 !important;
  }
  #zoomImage {
    width: 100% !important;
    height: auto !important;
    transform: none !important;
    transition: none !important;
    flex-shrink: 0 !important;
    -webkit-user-drag: auto !important;
  }
  html {
    background: transparent !important;
  }
  body {
    background: transparent !important;
  }

  .tab {
    display: none;
  }

  .tab-app {
    display: block;
    position: fixed; /* 固定在视口 */
    bottom: 80px; /* 距离底部 80px（可调整） */
    right: 24px; /* 距离右侧 20px（可调整） */
    z-index: 999; /* 确保在其他元素上面 */
  }
}
@media (orientation: landscape) and (max-height: 500px) {
  .image-wrapper {
    height: 100dvh !important; /* 保持全屏 */
    overflow: hidden !important;
  }
}
