/* ============================================================
   统一沉浸式高级灯箱 & 二维码分享弹窗 - lry-lightbox.css
   供 ry_aurora 主题下说说、相册及发布预览共用
   ============================================================ */

.lry-lb {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  flex-direction: column;
  background: rgba(15, 23, 42, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
  pointer-events: none; /* 关闭后的淡出期间不能再挡住底下页面的点击 */
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.lry-lb.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* 顶部操作栏 */
.lry-lb-top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.72) 0%, rgba(15, 23, 42, 0) 100%);
  color: #f8fafc;
  flex-shrink: 0;
}
.lry-lb-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.lry-lb-counter {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.03em;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 4px 12px;
  border-radius: 9999px;
  white-space: nowrap;
}
.lry-lb-zoom-badge {
  font-size: var(--text-xs);
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 9px;
  border-radius: 9999px;
  white-space: nowrap;
}
.lry-lb-title {
  font-size: var(--text-sm);
  color: rgba(248, 250, 252, 0.78);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 34vw;
}
.lry-lb-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.lry-lb-tbtn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  font-size: var(--text-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
}
.lry-lb-tbtn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}
.lry-lb-tbtn.on {
  background: rgba(13, 148, 136, 0.85);
  border-color: #14b8a6;
  color: #fff;
}
.lry-lb-tbtn-close {
  margin-left: 4px;
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.35);
}
.lry-lb-tbtn-close:hover {
  background: rgba(239, 68, 68, 0.85);
  border-color: #ef4444;
  color: #fff;
}

/* 中央画布区 */
.lry-lb-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: zoom-out;
}
.lry-lb-img-wrap {
  position: relative;
  max-width: 92vw;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}
.lry-lb-img {
  max-width: 90vw;
  max-height: calc(100vh - 156px);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  transition: opacity 0.2s ease, transform 0.18s ease;
  transform-origin: center center;
  will-change: transform;
  -webkit-user-drag: none;
}
.lry-lb.no-thumbs .lry-lb-img {
  max-height: calc(100vh - 104px);
}
.lry-lb-img.dragging {
  transition: none;
  cursor: grabbing !important;
}
.lry-lb-img.zoomed {
  cursor: grab;
}
.lry-lb-spin {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--text-3xl);
  pointer-events: none;
}
.lry-lb-err {
  position: absolute;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 28px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  font-size: var(--text-md);
}
.lry-lb-err button {
  padding: 6px 16px;
  border-radius: 9999px;
  background: var(--color-primary, #0d9488);
  color: #fff;
  font-size: var(--text-sm);
  cursor: pointer;
}

/* 左右切图按钮 */
.lry-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 23, 42, 0.55);
  color: #f8fafc;
  font-size: var(--text-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.lry-lb-nav:hover {
  background: rgba(13, 148, 136, 0.85);
  border-color: #14b8a6;
  transform: translateY(-50%) scale(1.06);
}
.lry-lb-prev { left: 18px; }
.lry-lb-next { right: 18px; }

/* 底部区域：左下角「原图」+ 居中缩略图胶片条（避让右下角全站悬浮按钮） */
.lry-lb-bottom {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 8px 18px 14px;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.78) 0%, rgba(15, 23, 42, 0) 100%);
  flex-shrink: 0;
}
.lry-lb-orig {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(248, 250, 252, 0.9);
  font-size: var(--text-xs);
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.lry-lb-orig:hover {
  background: rgba(13, 148, 136, 0.85);
  border-color: #14b8a6;
  color: #fff;
  text-decoration: none;
}

/* 缩略图胶片条 */
.lry-lb-thumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 220px);
  overflow-x: auto;
  padding: 4px 6px;
  scrollbar-width: none;
}
.lry-lb-thumbs::-webkit-scrollbar { display: none; }
.lry-lb-thumb {
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  border-radius: 7px;
  overflow: hidden;
  border: 2px solid transparent;
  opacity: 0.56;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  padding: 0;
  transition: opacity 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.lry-lb-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lry-lb-thumb:hover {
  opacity: 0.9;
}
.lry-lb-thumb.active {
  opacity: 1;
  border-color: #14b8a6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.35);
}

@media (max-width: 768px) {
  .lry-lb-top { padding: 10px 12px; }
  .lry-lb-title, .lry-lb-zoom-badge { display: none; }
  .lry-lb-tbtn { width: 34px; height: 34px; font-size: var(--text-sm); }
  .lry-lb-tbtn[data-act="fullscreen"] { display: none; }
  .lry-lb-nav { width: 38px; height: 38px; font-size: var(--text-base); }
  .lry-lb-prev { left: 8px; }
  .lry-lb-next { right: 8px; }
  .lry-lb-bottom { padding: 6px 12px 12px; min-height: 50px; }
  .lry-lb-orig { left: 10px; bottom: 14px; padding: 4px 11px; font-size: var(--text-xs); }
  .lry-lb-thumbs { max-width: calc(100vw - 150px); margin-left: 58px; gap: 6px; }
  .lry-lb-thumb { flex: 0 0 40px; width: 40px; height: 40px; }
  .lry-lb-img { max-width: 96vw; max-height: calc(100vh - 134px); }
}

/* ============================================================
   二维码与链接分享弹窗 - lry-share-modal
   ============================================================ */
.lry-share-mask {
  position: fixed;
  inset: 0;
  z-index: 10040;
  background: rgba(15, 23, 42, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: lryShareFade 0.18s ease;
}
@keyframes lryShareFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.lry-share-card {
  width: 100%;
  max-width: 380px;
  background: var(--color-bg-card, #ffffff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: var(--radius-lg, 16px);
  box-shadow: var(--shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.16));
  padding: 22px 24px 24px;
  position: relative;
  text-align: center;
}
.lry-share-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--color-text-light, #94a3b8);
  background: var(--color-bg-alt, #f1f5f9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.lry-share-close:hover {
  background: #e2e8f0;
  color: var(--color-text, #1e293b);
}
.lry-share-head {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text, #1e293b);
  margin-bottom: 4px;
}
.lry-share-sub {
  font-size: var(--text-sm);
  color: var(--color-text-secondary, #64748b);
  margin-bottom: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 20px;
}
.lry-share-qr {
  width: 184px;
  height: 184px;
  margin: 0 auto 14px;
  padding: 10px;
  border-radius: var(--radius-md, 12px);
  border: 1px solid var(--color-border, #e2e8f0);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lry-share-qr img,
.lry-share-qr canvas,
.lry-share-qr svg {
  display: block !important;
  max-width: 100%;
  height: auto;
}
/* qrcode-generator 的 scalable SVG 不带宽高，由这里定尺寸 */
.lry-share-qr svg {
  width: 162px;
  height: 162px;
}
.lry-share-qr-err {
  font-size: var(--text-xs);
  line-height: 1.7;
  text-align: center;
  color: var(--color-text-light, #94a3b8);
}
.lry-share-tip {
  font-size: var(--text-xs);
  color: var(--color-text-light, #94a3b8);
  margin-bottom: 16px;
}
.lry-share-copy-row {
  display: flex;
  gap: 8px;
}
.lry-share-url {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: var(--radius-sm, 8px);
  background: var(--color-bg, #f8fafc);
  color: var(--color-text-secondary, #64748b);
  font-size: var(--text-xs);
  outline: none;
}
.lry-share-copy-btn {
  flex-shrink: 0;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-sm, 8px);
  background: var(--color-primary, #0d9488);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.18s;
}
.lry-share-copy-btn:hover {
  background: var(--color-primary-dark, #0f766e);
}
