/* ==========================================================================
   小相册 (Album) — Modern Gallery Redesign v2.1
   设计语言：天青画廊 · 毛玻璃 · 微动效 · 瀑布流
   v2.1: 渐显加载 · 方向动画 · 退出过渡 · 滚动条美化 · 无障碍
   配色：天青蓝 × 柔紫 (Sky Cyan × Soft Violet)
   ========================================================================== */

/* ---- CSS 变量 — 天青蓝 × 柔紫 配色 ---- */
.page#page-album {
  --ab-accent: #4a9ced;
  --ab-accent-soft: rgba(74,156,237,0.12);
  --ab-accent-glow: rgba(74,156,237,0.25);
  --ab-warm: #818cf8;
  --ab-warm-soft: rgba(129,140,248,0.10);
  --ab-surface: rgba(255,255,255,0.72);
  --ab-surface-solid: #fff;
  --ab-surface-hover: rgba(255,255,255,0.9);
  --ab-text: #1a2744;
  --ab-text-secondary: #506480;
  --ab-text-muted: #8da0b8;
  --ab-border: rgba(20,40,80,0.06);
  --ab-radius: 16px;
  --ab-radius-sm: 10px;
  --ab-radius-xs: 6px;
  --ab-shadow-sm: 0 1px 3px rgba(20,40,80,0.06);
  --ab-shadow-md: 0 4px 16px rgba(20,40,80,0.08);
  --ab-shadow-lg: 0 12px 40px rgba(20,40,80,0.12);
  --ab-shadow-glow: 0 0 0 3px var(--ab-accent-glow);
  --ab-transition: 0.25s cubic-bezier(0.4,0,0.2,1);
  --ab-spring: 0.4s cubic-bezier(0.34,1.56,0.64,1);
}

/* ---- Hero 顶部 — 天青蓝 × 柔紫 ---- */
.ab-hero {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 28px;
  background: linear-gradient(135deg, #1a2744 0%, #243b6a 35%, #3b5998 70%, #5b8dd9 100%);
  padding: 40px 32px 36px;
  min-height: 120px;
  touch-action: pan-y;
}
.ab-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.ab-hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image:
    radial-gradient(circle at 15% 25%, rgba(255,255,255,0.4) 1px, transparent 1px),
    radial-gradient(circle at 55% 65%, rgba(255,255,255,0.3) 1px, transparent 1px),
    radial-gradient(circle at 85% 15%, rgba(255,255,255,0.35) 1px, transparent 1px);
  background-size: 50px 50px, 70px 70px, 40px 40px;
}
/* 装饰光斑 — 天蓝 */
.ab-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56,189,248,0.25) 0%, transparent 70%);
  pointer-events: none;
}
/* 装饰光斑 — 柔紫 */
.ab-hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(129,140,248,0.3) 0%, transparent 70%);
  pointer-events: none;
}
.ab-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 18px;
}
.ab-hero-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.2);
}
.ab-hero-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.ab-hero-sub {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.75);
  margin: 5px 0 0;
  font-weight: 400;
}

/* ---- 相册列表视图 ---- */
.ab-album-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 20px;
}
.ab-create-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: 14px;
  border: none;
  background: var(--ab-accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--ab-transition);
  box-shadow: 0 2px 12px var(--ab-accent-glow);
  letter-spacing: 0.02em;
}
.ab-create-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--ab-accent-glow);
}
.ab-create-btn:active {
  transform: translateY(0) scale(0.97);
}

/* 相册卡片网格 */
.ab-album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 20px;
}
@media(max-width: 480px) {
  .ab-album-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

.ab-album-card {
  border-radius: var(--ab-radius);
  overflow: hidden;
  background: var(--ab-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--ab-border);
  cursor: pointer;
  transition: all var(--ab-transition);
  position: relative;
  animation: abCardFadeIn 0.5s ease both;
}
@keyframes abCardFadeIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.ab-album-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--ab-radius);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.3);
  pointer-events: none;
  transition: opacity var(--ab-transition);
  opacity: 0;
}
.ab-album-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--ab-shadow-lg);
  border-color: rgba(74,156,237,0.2);
}
.ab-album-card:hover::after {
  opacity: 1;
}
.ab-album-card:active {
  transform: translateY(-1px) scale(0.99);
}

.ab-album-cover {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #dbe9f8, #c8d8f0, #d5e3f5);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
/* 封面图片悬浮效果已在底部定义 */
.ab-album-cover-empty {
  color: #a5b4fc;
  opacity: 0.7;
}
.ab-album-info {
  padding: 14px 16px;
}
.ab-album-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ab-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.ab-album-meta {
  font-size: 0.75rem;
  color: var(--ab-text-muted);
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ---- 空状态 ---- */
.ab-empty {
  text-align: center;
  padding: 72px 20px;
  color: var(--ab-text-muted);
}
.ab-empty-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  filter: grayscale(0.2);
}
.ab-empty-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ab-text);
  margin-bottom: 8px;
}
.ab-empty-sub {
  font-size: 0.85rem;
  color: var(--ab-text-secondary);
}

/* ---- 相册详情视图 ---- */
.ab-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.ab-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  border-radius: var(--ab-radius-sm);
  border: 1px solid var(--ab-border);
  background: var(--ab-surface);
  backdrop-filter: blur(8px);
  color: var(--ab-text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--ab-transition);
}
.ab-back-btn:hover {
  background: var(--ab-surface-hover);
  color: var(--ab-text);
  border-color: rgba(74,156,237,0.2);
}
.ab-detail-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ab-text);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.02em;
}
.ab-detail-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.ab-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  border-radius: var(--ab-radius-sm);
  border: 1px solid transparent;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--ab-transition);
}
.ab-action-btn.primary {
  background: var(--ab-accent);
  color: #fff;
  box-shadow: 0 2px 10px var(--ab-accent-glow);
}
.ab-action-btn.primary:hover {
  box-shadow: 0 4px 16px var(--ab-accent-glow);
  transform: translateY(-1px);
}
.ab-action-btn.secondary {
  background: var(--ab-surface);
  border-color: var(--ab-border);
  color: var(--ab-text-secondary);
}
.ab-action-btn.secondary:hover {
  background: var(--ab-surface-hover);
  color: var(--ab-text);
}
.ab-action-btn.danger {
  background: rgba(239,68,68,0.08);
  color: #ef4444;
  border-color: rgba(239,68,68,0.12);
}
.ab-action-btn.danger:hover {
  background: rgba(239,68,68,0.15);
}

/* ---- 上传进度 ---- */
.ab-upload-progress {
  margin-bottom: 20px;
  padding: 14px 18px;
  border-radius: var(--ab-radius);
  background: var(--ab-surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--ab-border);
}
.ab-upload-bar-wrap {
  height: 5px;
  border-radius: 3px;
  background: rgba(74,156,237,0.1);
  overflow: hidden;
  margin-bottom: 8px;
}
.ab-upload-bar {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--ab-accent), #818cf8);
  transition: width 0.3s ease;
  width: 0;
  position: relative;
}
.ab-upload-bar::after {
  content: '';
  position: absolute;
  right: 0;
  top: -1px;
  width: 12px;
  height: 7px;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 0 8px var(--ab-accent);
}
.ab-upload-text {
  font-size: 0.78rem;
  color: var(--ab-text-secondary);
  font-weight: 500;
}

/* ---- 照片瀑布流网格 ---- */
.ab-photo-grid {
  column-count: 3;
  column-gap: 10px;
}
@media(min-width: 768px) {
  .ab-photo-grid { column-count: 4; column-gap: 12px; }
}
@media(max-width: 480px) {
  .ab-photo-grid { column-count: 2; column-gap: 8px; }
}

.ab-photo-item {
  break-inside: avoid;
  margin-bottom: 10px;
  border-radius: var(--ab-radius-sm);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform var(--ab-transition), box-shadow var(--ab-transition);
  /* 骨架屏占位背景 — 天蓝灰 */
  background: linear-gradient(135deg, #dce6f0 25%, #ebf1f8 50%, #dce6f0 75%);
  background-size: 200% 100%;
  animation: abSkeletonShimmer 1.5s ease-in-out infinite, abPhotoFadeIn 0.5s ease both;
  min-height: 80px;
}
.ab-photo-item.loaded {
  background: transparent;
  animation: abPhotoFadeIn 0.5s ease both;
}
.ab-photo-item:hover {
  transform: scale(1.03);
  box-shadow: var(--ab-shadow-md);
  z-index: 2;
}
.ab-photo-item:active {
  transform: scale(0.98);
}

/* 照片评论计数角标 */
.ab-photo-comment-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px 3px 6px;
  border-radius: 20px;
  background: rgba(12, 12, 20, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.92);
  font-size: 0.7rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.ab-photo-item.loaded .ab-photo-comment-badge {
  opacity: 1;
  transform: translateY(0);
}
.ab-photo-comment-badge svg {
  flex-shrink: 0;
  opacity: 0.85;
}

/* 照片悬浮遮罩 */
.ab-photo-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.25) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--ab-transition);
  border-radius: var(--ab-radius-sm);
  pointer-events: none;
}
.ab-photo-item:hover::after {
  opacity: 1;
}

.ab-photo-item img {
  width: 100%;
  height: auto;
  display: block;
  /* 图片渐显：初始透明，加载完成后由 JS 添加 .loaded 渐显 */
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.ab-photo-item.loaded img {
  opacity: 1;
}
.ab-photo-item:hover img {
  transform: scale(1.05);
}

@keyframes abSkeletonShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes abPhotoFadeIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ab-photo-loading {
  text-align: center;
  padding: 48px;
  color: var(--ab-text-muted);
  font-size: 0.85rem;
}
.ab-photo-loading::before {
  content: '';
  display: block;
  width: 32px;
  height: 32px;
  margin: 0 auto 12px;
  border: 3px solid var(--ab-accent-soft);
  border-top-color: var(--ab-accent);
  border-radius: 50%;
  animation: abSpin 0.8s linear infinite;
}
@keyframes abSpin {
  to { transform: rotate(360deg); }
}

/* ---- Lightbox 查看器 — 沉浸式 ---- */
.ab-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.95);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.ab-lightbox.open {
  display: flex;
  opacity: 1;
  animation: abLbFadeIn 0.3s ease;
}
.ab-lightbox.closing {
  display: flex;
  animation: abLbFadeOut 0.25s ease forwards;
}
@keyframes abLbFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes abLbFadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* 缩放容器 */
.ab-lightbox-zoom-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 94vw;
  max-height: 78vh;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  user-select: none;
}
.ab-lightbox-zoom-wrap:active {
  cursor: grabbing;
}
.ab-lightbox-img {
  max-width: 94vw;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 6px;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform 0.15s ease-out;
  transform-origin: center center;
  /* 默认进入动画 */
  animation: abImgEntry 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
/* 方向感知：从右侧滑入（下一张） */
.ab-lightbox-img.slide-from-right {
  animation: abImgSlideFromRight 0.3s cubic-bezier(0.25,0.46,0.45,0.94);
}
/* 方向感知：从左侧滑入（上一张） */
.ab-lightbox-img.slide-from-left {
  animation: abImgSlideFromLeft 0.3s cubic-bezier(0.25,0.46,0.45,0.94);
}
@keyframes abImgEntry {
  from { transform: scale(0.85); opacity: 0.5; }
  to   { transform: scale(1); opacity: 1; }
}
@keyframes abImgSlideFromRight {
  from { transform: translateX(60px) scale(0.95); opacity: 0; }
  to   { transform: translateX(0) scale(1); opacity: 1; }
}
@keyframes abImgSlideFromLeft {
  from { transform: translateX(-60px) scale(0.95); opacity: 0; }
  to   { transform: translateX(0) scale(1); opacity: 1; }
}

/* 顶部工具栏 — 胶囊式 */
.ab-lightbox-toolbar {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 16px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
}
.ab-toolbar-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--ab-transition);
}
.ab-toolbar-btn:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}
.ab-toolbar-btn:active {
  transform: scale(0.9);
}
.ab-zoom-level {
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
  min-width: 40px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

/* 关闭按钮 */
.ab-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.8);
  font-size: 1.15rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all var(--ab-transition);
}
.ab-lightbox-close:hover {
  background: rgba(255,255,255,0.18);
  color: #fff;
  transform: rotate(90deg);
}

/* 左右导航 */
.ab-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7);
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all var(--ab-transition);
}
.ab-lightbox-nav:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
  transform: translateY(-50%) scale(1.08);
}
.ab-lightbox-nav:active {
  transform: translateY(-50%) scale(0.95);
}
.ab-lightbox-nav.prev { left: 20px; }
.ab-lightbox-nav.next { right: 20px; }

/* 底部操作栏 v3 — 悬浮胶囊 */
.ab-lightbox-bottom {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 22px;
  background: rgba(12,12,20,0.72);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.ab-lightbox-counter {
  color: rgba(255,255,255,0.5);
  font-size: 0.78rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  padding: 0 8px;
  white-space: nowrap;
}
.ab-lb-divider {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.1);
  margin: 0 2px;
  flex-shrink: 0;
}
/* 统一的操作按钮 */
.ab-lb-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;
}
.ab-lb-action svg {
  flex-shrink: 0;
}
.ab-lb-action span {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0.8;
}
.ab-lb-action:hover {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.92);
}
.ab-lb-action:active {
  transform: scale(0.92);
}
/* 强调色按钮 */
.ab-lb-action--accent {
  color: rgba(74,156,237,0.8);
}
.ab-lb-action--accent:hover {
  background: rgba(74,156,237,0.15);
  color: #7ab8f5;
}
/* 危险色按钮 */
.ab-lb-action--danger {
  color: rgba(239,100,100,0.7);
}
.ab-lb-action--danger:hover {
  background: rgba(239,68,68,0.15);
  color: #f87171;
}

/* ---- 照片信息面板 — 侧抽屉 ---- */
.ab-photo-info-panel {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 320px;
  max-width: 82vw;
  background: rgba(15,15,25,0.88);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border-right: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  z-index: 12;
  border-radius: 0 20px 20px 0;
}
.ab-photo-info-panel.open {
  transform: translateX(0);
}
.ab-photo-info-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.ab-photo-info-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  flex: 1;
}
.ab-photo-info-close {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: none;
  background: rgba(255,255,255,0.08);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.ab-photo-info-close:hover {
  background: rgba(239,68,68,0.3);
  color: #fca5a5;
}
.ab-photo-info-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}
.ab-info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.ab-info-row:last-child {
  border-bottom: none;
}
.ab-info-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: rgba(255,255,255,0.4);
  min-width: 56px;
  flex-shrink: 0;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ab-info-value {
  font-size: 0.84rem;
  color: rgba(255,255,255,0.85);
  word-break: break-all;
  line-height: 1.5;
}
.ab-info-desc-wrap {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 1;
}
.ab-info-desc-text {
  font-size: 0.84rem;
  color: rgba(255,255,255,0.85);
  flex: 1;
  line-height: 1.6;
  white-space: pre-wrap;
}
.ab-info-edit-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: none;
  background: rgba(255,255,255,0.08);
  cursor: pointer;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: rgba(255,255,255,0.5);
}
.ab-info-edit-btn:hover {
  background: rgba(74,156,237,0.3);
  color: #c8ddf8;
}

/* ---- 输入弹窗 v2 ---- */
.ab-prompt-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.ab-prompt-overlay.open {
  display: flex;
}
.ab-prompt-box {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.04);
  animation: abModalIn 0.35s var(--ab-spring);
}
@keyframes abModalIn {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.ab-prompt-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ab-text);
  margin-bottom: 16px;
  text-align: center;
}
.ab-prompt-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(20,40,80,0.08);
  background: #f8f9fc;
  font-size: 0.88rem;
  color: var(--ab-text);
  outline: none;
  resize: vertical;
  min-height: 60px;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  font-family: inherit;
  line-height: 1.6;
}
.ab-prompt-input:focus {
  border-color: #4a9ced;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(74,156,237,0.12);
}
.ab-prompt-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

/* 移动端：信息面板变为底部抽屉 */
@media (max-width: 600px) {
  .ab-photo-info-panel {
    left: 0;
    top: auto;
    bottom: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    max-height: 55vh;
    border-radius: 24px 24px 0 0;
    border-right: none;
    border-top: 1px solid rgba(255,255,255,0.08);
    transform: translateY(100%);
  }
  .ab-photo-info-panel.open {
    transform: translateY(0);
  }
  .ab-lightbox-toolbar {
    top: 12px;
    padding: 4px 8px;
    gap: 4px;
  }
  .ab-toolbar-btn {
    width: 32px;
    height: 32px;
  }
  .ab-lightbox-nav {
    width: 40px;
    height: 40px;
  }
  .ab-lightbox-nav.prev { left: 10px; }
  .ab-lightbox-nav.next { right: 10px; }
  .ab-lightbox-bottom {
    bottom: 12px;
    gap: 2px;
    padding: 5px 8px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 96vw;
    border-radius: 18px;
  }
  .ab-lb-action {
    padding: 4px 7px;
  }
  .ab-lb-action svg {
    width: 16px;
    height: 16px;
  }
  .ab-lb-action span {
    font-size: 0.56rem;
  }
  .ab-lightbox-counter {
    font-size: 0.72rem;
    padding: 0 6px;
  }
}

/* ---- 创建/编辑相册弹窗 v2 ---- */
.ab-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.ab-modal-overlay.open {
  display: flex;
}
.ab-modal {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.04);
  animation: abModalIn 0.35s var(--ab-spring);
  overflow: hidden;
}
.ab-modal-header {
  text-align: center;
  padding: 28px 24px 0;
}
.ab-modal-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(74,156,237,0.12), rgba(129,140,248,0.12));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4a9ced;
}
.ab-modal-icon--edit {
  background: linear-gradient(135deg, rgba(74,156,237,0.12), rgba(59,130,246,0.15));
  color: #3b82f6;
}
.ab-modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ab-text);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.ab-modal-subtitle {
  font-size: 0.8rem;
  color: var(--ab-text-muted);
  font-weight: 400;
}
.ab-modal-body {
  padding: 20px 24px 0;
}
.ab-modal-field {
  margin-bottom: 16px;
}
.ab-modal-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ab-text-secondary);
  margin-bottom: 6px;
  display: block;
  letter-spacing: 0.01em;
}
.ab-modal-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(20,40,80,0.08);
  background: #f8f9fc;
  font-size: 0.88rem;
  color: var(--ab-text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  box-sizing: border-box;
}
.ab-modal-input:focus {
  border-color: #4a9ced;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(74,156,237,0.12);
}
.ab-modal-textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(20,40,80,0.08);
  background: #f8f9fc;
  font-size: 0.88rem;
  color: var(--ab-text);
  outline: none;
  resize: vertical;
  min-height: 56px;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  font-family: inherit;
  line-height: 1.5;
}
.ab-modal-textarea:focus {
  border-color: #4a9ced;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(74,156,237,0.12);
}
.ab-modal-actions {
  display: flex;
  gap: 10px;
  padding: 20px 24px 24px;
}
.ab-modal-btn {
  flex: 1;
  padding: 11px 16px;
  border-radius: 12px;
  border: none;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.ab-modal-btn:active {
  transform: scale(0.97);
}
.ab-modal-btn.cancel {
  background: #f1f3f7;
  color: var(--ab-text-secondary);
}
.ab-modal-btn.cancel:hover {
  background: #e4e7ed;
  color: var(--ab-text);
}
.ab-modal-btn.confirm {
  background: #4a9ced;
  color: #fff;
  box-shadow: 0 2px 12px rgba(74,156,237,0.3);
}
.ab-modal-btn.confirm:hover {
  background: #3d8ad8;
  box-shadow: 0 4px 16px rgba(74,156,237,0.35);
  transform: translateY(-1px);
}

/* =========================================
   相册评论区
   ========================================= */
.ab-comment-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--ab-border);
}
.ab-comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.ab-comment-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ab-text);
}
.ab-comment-count {
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--ab-accent);
  color: white;
  padding: 2px 8px;
  border-radius: 20px;
  min-width: 20px;
  text-align: center;
}
.ab-comment-section .anni-comment-list {
  padding: 0 0 8px;
}
.ab-comment-section .anni-comment-empty {
  padding: 20px;
  color: var(--ab-text-muted);
}
.ab-comment-section .anni-comment-input-area {
  padding: 12px 0 0;
  border-top: 1px solid var(--ab-border);
  background: transparent;
  position: static;
}

/* =========================================
   照片评论面板（Lightbox 内侧抽屉）
   ========================================= */
.ab-photo-comment-panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 340px;
  max-width: 82vw;
  background: rgba(15,15,25,0.88);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border-left: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  z-index: 12;
  border-radius: 20px 0 0 20px;
}
.ab-photo-comment-panel.open {
  transform: translateX(0);
}
.ab-photo-comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.ab-photo-comment-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  flex: 1;
}
.ab-photo-comment-close {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: none;
  background: rgba(255,255,255,0.08);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.ab-photo-comment-close:hover {
  background: rgba(239,68,68,0.3);
  color: #fca5a5;
}
.ab-photo-comment-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.ab-photo-comment-body .anni-comment-list {
  padding: 0 16px;
}
.ab-photo-comment-body .anni-comment-empty {
  padding: 24px 16px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
}
.ab-photo-comment-panel .anni-comment-input-area {
  padding: 10px 16px 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.2);
  flex-shrink: 0;
  position: static;
}
.ab-photo-comment-panel .comment-input {
  font-size: 0.82rem;
  padding: 8px 14px;
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
}
.ab-photo-comment-panel .comment-input::placeholder {
  color: rgba(255,255,255,0.3);
}
.ab-photo-comment-panel .comment-input:focus {
  border-color: var(--ab-accent);
}
.ab-photo-comment-panel .comment-send-btn {
  color: rgba(255,255,255,0.7);
}
.ab-photo-comment-panel .comment-emoji-btn {
  filter: brightness(0.8);
}

/* 移动端：照片评论面板变为底部抽屉 */
@media (max-width: 600px) {
  .ab-photo-comment-panel {
    right: 0;
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    max-height: 60vh;
    border-radius: 24px 24px 0 0;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.08);
    transform: translateY(100%);
  }
  .ab-photo-comment-panel.open {
    transform: translateY(0);
  }
}

/* ---- 暗色面板自定义滚动条 ---- */
.ab-photo-info-body::-webkit-scrollbar,
.ab-photo-comment-body::-webkit-scrollbar {
  width: 4px;
}
.ab-photo-info-body::-webkit-scrollbar-track,
.ab-photo-comment-body::-webkit-scrollbar-track {
  background: transparent;
}
.ab-photo-info-body::-webkit-scrollbar-thumb,
.ab-photo-comment-body::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 4px;
}
.ab-photo-info-body::-webkit-scrollbar-thumb:hover,
.ab-photo-comment-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.25);
}

/* ---- 底部操作栏：面板打开时平滑避让 ---- */
.ab-lightbox-bottom {
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1),
              opacity 0.35s ease;
}
.ab-lightbox.panel-open .ab-lightbox-bottom {
  opacity: 0.4;
  transform: translateX(-50%) scale(0.92);
  pointer-events: none;
}

/* ---- Lightbox 缩放容器：面板打开时留出空间 ---- */
.ab-lightbox-zoom-wrap {
  transition: max-width 0.35s cubic-bezier(0.4,0,0.2,1);
}
.ab-lightbox.info-panel-open .ab-lightbox-zoom-wrap {
  margin-left: 320px;
}
.ab-lightbox.comment-panel-open .ab-lightbox-zoom-wrap {
  margin-right: 340px;
}
@media (max-width: 600px) {
  .ab-lightbox.info-panel-open .ab-lightbox-zoom-wrap,
  .ab-lightbox.comment-panel-open .ab-lightbox-zoom-wrap {
    margin-left: 0;
    margin-right: 0;
  }
}

/* ---- 导航按钮：面板打开时隐藏被遮挡的一侧 ---- */
.ab-lightbox.info-panel-open .ab-lightbox-nav.prev {
  opacity: 0;
  pointer-events: none;
}
.ab-lightbox.comment-panel-open .ab-lightbox-nav.next {
  opacity: 0;
  pointer-events: none;
}

/* ---- 焦点环（无障碍） ---- */
.ab-album-card:focus-visible,
.ab-action-btn:focus-visible,
.ab-lb-action:focus-visible,
.ab-toolbar-btn:focus-visible,
.ab-lightbox-nav:focus-visible,
.ab-create-btn:focus-visible,
.ab-back-btn:focus-visible,
.ab-modal-btn:focus-visible {
  outline: 2px solid var(--ab-accent);
  outline-offset: 2px;
}

/* ---- 封面图片悬浮渐显放大 ---- */
.ab-album-cover {
  transition: transform 0.4s ease;
}
.ab-album-card:hover .ab-album-cover {
  transform: scale(1.06);
}

/* ---- 空状态呼吸动效 ---- */
.ab-empty-icon {
  animation: abEmptyBreathe 3s ease-in-out infinite;
}
@keyframes abEmptyBreathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}

/* ---- 上传进度条发光脉冲 ---- */
.ab-upload-bar {
  position: relative;
}
.ab-upload-bar::after {
  animation: abBarPulse 1.5s ease-in-out infinite;
}
@keyframes abBarPulse {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1; }
}

/* ---- 移动端底部栏：两行布局避免过于拥挤 ---- */
@media (max-width: 380px) {
  .ab-lightbox-bottom {
    flex-direction: column;
    gap: 6px;
    padding: 10px 14px;
  }
  .ab-lightbox-counter {
    border-right: none;
    padding-right: 0;
    margin-right: 0;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 2px;
    width: 100%;
    text-align: center;
  }
}

/* ---- 移动端长按保存覆盖层 ---- */
.ab-longpress-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: abFadeIn 0.2s ease;
}
.ab-longpress-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px;
  max-width: 92vw;
  max-height: 90vh;
}
.ab-longpress-hint {
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  padding: 8px 20px;
  background: rgba(59,130,246,0.25);
  border-radius: 20px;
  border: 1px solid rgba(59,130,246,0.4);
  animation: abPulseGlow 2s ease-in-out infinite;
}
@keyframes abPulseGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(59,130,246,0.2); }
  50% { box-shadow: 0 0 16px rgba(59,130,246,0.5); }
}
.ab-longpress-img-wrap {
  max-width: 88vw;
  max-height: 68vh;
  overflow: hidden;
  border-radius: 8px;
}
.ab-longpress-img {
  display: block;
  max-width: 88vw;
  max-height: 68vh;
  object-fit: contain;
  border-radius: 8px;
  -webkit-user-select: none;
  user-select: none;
  /* 确保 iOS 长按弹出菜单正常工作 */
  -webkit-touch-callout: default !important;
}
.ab-longpress-close {
  margin-top: 4px;
  padding: 8px 32px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  font-size: 15px;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.2s;
}
.ab-longpress-close:active {
  background: rgba(255,255,255,0.3);
}
