/* ============================================================
   assets/css/lightbox.css
   图片浏览模式：顶部工具栏 + 底部缩略图条
   ============================================================ */

.zl-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(20, 20, 24, .96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  user-select: none;
}
.zl-lightbox.show {
  display: block;
  animation: zlLbFadeIn .22s ease;
}
@keyframes zlLbFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ============================================================
   顶部工具栏
   ============================================================ */
.zl-lb-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,.4), transparent);
}

.zl-lb-top-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  pointer-events: auto;
}

.zl-lb-counter {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .02em;
  flex-shrink: 0;
}

.zl-lb-title {
  color: rgba(255, 255, 255, .7);
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40vw;
}

.zl-lb-top-right {
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
  flex-shrink: 0;
}

.zl-lb-btn {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 0;
  background: rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .85);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: .2s;
  padding: 0;
  position: relative;
}
.zl-lb-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, .22);
  color: #fff;
}
.zl-lb-btn:disabled {
  opacity: .3;
  cursor: not-allowed;
}
.zl-lb-btn.is-active {
  background: rgba(255, 255, 255, .28);
  color: #fff;
}
.zl-lb-btn svg {
  width: 20px;
  height: 20px;
}

/* 播放按钮图标切换 */
.zl-lb-icon-pause { display: none; }
.zl-lb-play.is-playing .zl-lb-icon-play { display: none; }
.zl-lb-play.is-playing .zl-lb-icon-pause { display: block; }

/* 关闭按钮红色 hover */
.zl-lb-close:hover {
  background: #e4572e;
  color: #fff;
}

/* ============================================================
   舞台
   ============================================================ */
.zl-lb-stage {
  position: absolute;
  inset: 60px 0 140px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 84px;
  overflow: hidden;
}

.zl-lb-img {
  max-width: 100%;
  max-height: 100%;
  display: block;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  transform-origin: center center;
  transition: transform .15s ease;
  will-change: transform;
  -webkit-user-drag: none;
  user-select: none;
  cursor: zoom-in;
}

/* ============================================================
   左右箭头
   ============================================================ */
.zl-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  border: 0;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: .2s;
  z-index: 4;
  padding: 0;
}
.zl-lb-nav:hover:not(:disabled) {
  background: rgba(255, 255, 255, .25);
}
.zl-lb-nav:disabled {
  opacity: .2;
  cursor: not-allowed;
}
.zl-lb-nav svg {
  width: 24px;
  height: 24px;
}
.zl-lb-prev { left: 20px; }
.zl-lb-next { right: 20px; }

/* ============================================================
   底部：描述 + 缩略图条
   ============================================================ */
.zl-lb-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 0 12px;
  z-index: 5;
  background: linear-gradient(to top, rgba(0,0,0,.5), transparent);
  pointer-events: none;
}

.zl-lb-caption {
  text-align: center;
  color: rgba(255, 255, 255, .9);
  font-size: 13.5px;
  line-height: 1.6;
  padding: 0 24px 6px;
  pointer-events: auto;
}
.zl-lb-caption:empty { display: none; }

/* 缩略图条 */
.zl-lb-thumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  pointer-events: auto;
}
.zl-lb-thumbs::-webkit-scrollbar {
  height: 4px;
}
.zl-lb-thumbs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .2);
  border-radius: 2px;
}
.zl-lb-thumbs::-webkit-scrollbar-track {
  background: transparent;
}

.zl-lb-thumb {
  flex-shrink: 0;
  width: 76px;
  height: 56px;
  border-radius: 6px;
  border: 2px solid transparent;
  padding: 0;
  background: rgba(255, 255, 255, .05);
  overflow: hidden;
  cursor: pointer;
  transition: .2s;
  position: relative;
}
.zl-lb-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: .55;
  transition: .2s;
}
.zl-lb-thumb:hover {
  border-color: rgba(255, 255, 255, .3);
}
.zl-lb-thumb:hover img {
  opacity: .85;
}
.zl-lb-thumb.active {
  border-color: #fff;
  transform: scale(1.05);
}
.zl-lb-thumb.active img {
  opacity: 1;
}

/* ============================================================
   内容区图片提示
   ============================================================ */
.article-content img.zl-lb-bound {
  cursor: zoom-in;
  transition: opacity .2s;
}
.article-content img.zl-lb-bound:hover {
  opacity: .92;
}

/* ============================================================
   移动端适配
   ============================================================ */
@media (max-width: 640px) {
  .zl-lb-top {
    height: 52px;
    padding: 0 12px;
  }
  .zl-lb-counter { font-size: 13px; }
  .zl-lb-title { max-width: 30vw; font-size: 12.5px; }

  .zl-lb-top-right { gap: 4px; }
  .zl-lb-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }
  .zl-lb-btn svg { width: 17px; height: 17px; }

  .zl-lb-stage {
    inset: 52px 0 120px 0;
    padding: 12px 56px;
  }

  .zl-lb-nav {
    width: 40px;
    height: 40px;
  }
  .zl-lb-nav svg { width: 20px; height: 20px; }
  .zl-lb-prev { left: 8px; }
  .zl-lb-next { right: 8px; }

  .zl-lb-bottom { padding: 6px 0 10px; }
  .zl-lb-caption { font-size: 12.5px; padding: 0 16px 4px; }
  .zl-lb-thumbs { padding: 6px 12px; gap: 6px; }
  .zl-lb-thumb {
    width: 60px;
    height: 44px;
    border-radius: 5px;
  }
}
/* ============================================================
   播放按钮内的进度条（宽度 = 按钮宽度）
   ============================================================ */
.zl-lb-play {
  position: relative;
  overflow: hidden;
}

.zl-lb-play-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, .12);
  border-radius: 0 0 10px 10px;
  overflow: hidden;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}
.zl-lb-play-progress.show {
  opacity: 1;
}

.zl-lb-play-progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #e4572e, #ff9166);
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 6px rgba(228, 87, 46, .7);
  will-change: width;
}

@keyframes zlLbPlayProgress {
  from { width: 0%; }
  to   { width: 100%; }
}

/* 移动端按钮略小，进度条同步 */
@media (max-width: 640px) {
  .zl-lb-play-progress {
    height: 2px;
    border-radius: 0 0 8px 8px;
  }
}