/*
 * work-viewer.css
 * 统一作品图片查看器样式（圆角无边框版 - 匹配后台作品内容图片弹窗）
 */

/* ===== 遮罩 ===== */
#workViewer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.8);
  align-items: center;
  justify-content: center;
}

/* ===== 关闭按钮 ===== */
.wv-close-btn {
  position: fixed;
  top: 20px;
  right: 30px;
  width: 44px;
  height: 44px;
  line-height: 40px;
  text-align: center;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  z-index: 100001;
  background: rgba(0, 0, 0, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  user-select: none;
}
.wv-close-btn:hover {
  color: #D92121;
  background: rgba(255, 255, 255, 0.9);
  border-color: #fff;
}

/* ===== 导航按钮 ===== */
.wv-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  cursor: pointer;
  user-select: none;
  line-height: 1.4;
  z-index: 100000;
  background: rgba(0,0,0,0.3);
  border-radius: 10px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.2s;
}
.wv-nav:hover {
  background: rgba(0,0,0,0.6);
}
.wv-prev {
  left: 100px;
}
.wv-next {
  right: 100px;
}
.wv-nav-text {
  font-size: 20px;
  font-weight: bold;
  white-space: nowrap;
}
.wv-nav-arrow {
  font-size: 19px;
  font-weight: bold;
  line-height: 1;
}
.wv-disabled {
  display: none !important;
}

/* ===== 图片容（居中） ===== */
.wv-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 90vh;
}

/* ===== 图片 ===== */
.wv-img {
  display: block;
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 5px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  border: solid #fff;
  border-width: 10px 8px 30px 8px;
}

/* ===== 入场动画 ===== */
.wv-img.wv-enter {
  animation: wvFadeIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
@keyframes wvFadeIn {
  0%   { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ===== 移动端适配（<768px）：翻页按钮固定在底部，桌面端不变 ===== */
@media (max-width: 767px) {
  /* 关闭按钮：保持右上角，略缩以防遮挡 */
  .wv-close-btn {
    top: 12px;
    right: 16px;
    width: 38px;
    height: 38px;
    line-height: 34px;
    font-size: 26px;
  }

  /* 底部按钮容器：水平两端对齐，悬浮底部 */
  .wv-nav {
    position: fixed;
    top: auto;
    bottom: 24px;
    transform: none;
    left: auto;
    right: auto;
    padding: 14px 22px;
    gap: 12px;
    border-radius: 12px;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
  .wv-nav:hover {
    background: rgba(0,0,0,0.75);
  }
  .wv-prev {
    left: 20px;
  }
  .wv-next {
    right: 20px;
  }
  .wv-nav-text {
    font-size: 18px;
  }

  /* 图片：为底部按钮留出空间，略微缩小垂直占高 */
  .wv-img-wrap,
  .wv-img {
    max-width: 92vw;
    max-height: 74vh;
  }

  /* 图片白边在移动端简化，避免过度占空间 */
  .wv-img {
    border-width: 8px 6px 20px 6px;
  }
}
