/* ============================================
   works-lightbox.css — 作品详情弹窗
   ============================================ */

/* ── 遮罩层（默认隐藏） ── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.15); /* 半透明黑色遮罩 */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.15s ease,
    visibility 0.15s ease;
  /* ── 全局禁选：杜绝切换时的蓝色选中块 ── */
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* ── 遮罩层（打开状态） ── */
.lightbox-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ── 弹窗主体 ── */
.lightbox-modal {
  position: relative;
  display: flex;
  width: 90vw;
  max-width: 1200px;
  height: 80vh;
  max-height: 750px;
  background: transparent;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  transform: scale(0.92) translateY(30px); /* 初始缩小 + 下移 */
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── 弹窗打开时的主体动画 ── */
.lightbox-overlay.open .lightbox-modal {
  transform: scale(1) translateY(0);
}

/* ── 子元素淡入动画（替代整体 opacity） ── */
.lightbox-close,
.lightbox-media,
.lightbox-info {
  opacity: 0;
  transition: opacity 0.35s ease;
}

.lightbox-overlay.open .lightbox-close,
.lightbox-overlay.open .lightbox-media,
.lightbox-overlay.open .lightbox-info {
  opacity: 1;
}

/* ── 关闭按钮（深色毛玻璃） ── */
#lightboxClose {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    transform 0.5s ease,
    background 0.3s ease;
  z-index: 20;
}

#lightboxClose:hover {
  background: rgba(0, 0, 0, 0.75);
  transform: rotate(90deg) scale(1.1); /* 旋转 + 放大 */
}

#lightboxClose:active {
  transform: rotate(90deg) scale(0.95); /* 按下缩小 */
}

/* 焦点环只给键盘用户：鼠标点击不显示黑圈 */
#lightboxClose:focus {
  outline: none;
}
#lightboxClose:focus-visible {
  outline: transparent;
  outline-offset: 3px;
}

/* ── 左侧：媒体预览区 ── */
.lightbox-media {
  flex: 1 1 65%; /* 占 65% 宽度 */
  min-width: 0;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.lightbox-media img,
.lightbox-media video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; /* 等比缩放，完整显示 */
  display: block;
  /* ── 媒体防选中 + 防拖拽 ── */
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
}

/* ── 媒体类型角标（左上，纯提示，不拦截点击） ── */
.media-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 5px 14px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 5px;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}
.media-badge svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
}

/* ── 右侧：信息展示区 ── */
.lightbox-info {
  flex: 1 1 35%;
  min-width: 0;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-left: 1px solid rgba(255, 255, 255, 0.8);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  scrollbar-gutter: stable; /* ← 新增：滚动条位置预留，弹窗不再抖 */
  position: relative;
  z-index: 1;
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
}

.lightbox-info::-webkit-scrollbar {
  width: 4px;
}
.lightbox-info::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 4px;
}

/* ── 顶部高光线条（增强玻璃质感） ── */
.lightbox-info::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.8),
    transparent
  );
  pointer-events: none;
}

/* ── 信息区头部 ── */
.lightbox-info__header {
  margin-bottom: 4px;
}

/* ── 分类角标（沿用站点品牌金；--accent 存在时自动跟随） ── */
.lightbox-info__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent, var(--brand, #ffc000));
  background: color-mix(
    in srgb,
    var(--accent, var(--brand, #ffc000)) 12%,
    transparent
  );
  padding: 4px 12px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.lightbox-info__badge::before {
  content: "";
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

/* ── 标题 ── */
.lightbox-info__title {
  font-family: var(--font-display, inherit);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #1f2937;
  margin: 0;
  line-height: 1.3;
}

/* ── 元数据行（label / value 竖排，| 分隔多组） ── */
.lightbox-info__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.lb-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lb-meta-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #9ca3af;
}
.lb-meta-value {
  font-size: 13px;
  font-weight: 500;
  color: #1f2937;
}

/* ── 正文区域 ── */
.lightbox-info__body {
  flex: 1;
}

/* ── 描述文字 ── */
.lightbox-info__desc {
  font-size: 14px;
  line-height: 1.8;
  color: #4b5563;
  margin: 0;
}

/* ── 作者行（右对齐：姓名在前，头像在后） ── */
.lightbox-info__author {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.lb-author-name {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
}
.lb-author-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand, #ffc000);
  color: #1f2937;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* ── 互动按钮区（点赞/评论/分享） ── */
.lightbox-info__actions {
  display: flex;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid #b3b3b3;
}

/* ── 单个互动按钮 ── */
.lb-action-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.4); /* 半透明玻璃感 */
  color: #666;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  transition: all 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.lb-action-btn:hover {
  background: rgba(255, 255, 255, 0.7);
  color: #222;
  border-color: #ccc;
}

.lb-action-btn:active {
  transform: scale(0.94);
}

/* ── 点赞激活状态 ── */
.lb-action-btn.liked {
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.4);
  background: rgba(255, 107, 107, 0.06);
}

.lb-action-btn.liked svg {
  fill: #ff6b6b;
  stroke: #ff6b6b;
}

/* 点赞瞬间的心跳反馈 */
.lb-action-btn.like-pop svg {
  animation: likePop 0.45s cubic-bezier(0.17, 0.89, 0.32, 1.49);
}
@keyframes likePop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.45);
  }
  100% {
    transform: scale(1);
  }
}

/* 点赞粒子迸发（--tx/--ty 由 JS 写入随机方向） */
.like-burst {
  position: absolute;
  left: 15px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ff6b6b;
  pointer-events: none;
  animation: burst 0.6s ease-out forwards;
}
@keyframes burst {
  from {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(var(--tx), var(--ty)) scale(0.2);
  }
}

/* ── 分享成功提示（按钮内临时替换） ── */
.lb-share-done {
  color: #2f9e63;
  font-weight: 600;
}

/* ── 标签区 ── */
.lightbox-info__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── 单个标签 ── */
.lb-tag {
  font-size: 12px;
  color: #555;
  background: rgba(255, 255, 255, 0.5);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* ============================================
   works-hotzone.css — 弹窗左右切换热区
   ============================================ */
:root {
  --hz-w: 90px; /* 兜底值，JS 实时覆写 */
}

.lightbox-hotzone {
  position: fixed;
  top: 0;
  bottom: 0;
  width: var(--hz-w);
  z-index: 10010;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: none; /* 默认关闭，弹窗打开时才放行 */
  /* ── 防选中 + 防点按高亮 ── */
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* 弹窗打开 → 热区放行 */
.lightbox-overlay.open .lightbox-hotzone {
  pointer-events: auto;
}

.lightbox-hotzone-left {
  left: 0;
  right: auto;
  width: calc(var(--hz-w) - 50px); /* 靠弹窗一侧缩进 10px */
}
.lightbox-hotzone-right {
  right: 0;
  left: auto;
  width: calc(var(--hz-w) - 50px); /* 靠弹窗一侧缩进 10px */
}

/* ── 纯箭头：仅 SVG stroke，hover 时白色光晕 ── */
.nav-arrow {
  width: 28px;
  height: 50px;
  opacity: 0.15;
  transform: scale(0.75);
  transition:
    opacity 0.35s ease,
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.35s ease;
  pointer-events: none;
  filter: blur(0px);
}
.nav-arrow path {
  stroke: #fff;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* hover 热区 → 箭头放大、发亮、光晕 */
.lightbox-hotzone:hover .nav-arrow {
  opacity: 1;
  transform: scale(1.2);
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5))
    drop-shadow(0 0 24px rgba(255, 255, 255, 0.2)) blur(0.3px);
}

/* 按压反馈 */
.lightbox-hotzone:active .nav-arrow {
  transform: scale(0.9);
  opacity: 0.8;
}
