/* ============ Wallcoo 专辑模板 + 详情页扩展 ============ */

/* ===== 专辑页（暗色，同上传页规范）===== */
.wc-album-page, .wc-album-archive {
  --acc: #667eea; --acc-l: #a5b4fc;
  --grad: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --txt: rgba(255,255,255,0.88); --txt2: rgba(255,255,255,0.6); --txt3: rgba(255,255,255,0.4);
  --bd: rgba(255,255,255,0.12); --card: rgba(255,255,255,0.05);
  min-height: 100vh; color: var(--txt);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.wc-album-inner { padding: 32px 0 80px; }
.wc-muted { color: var(--txt3); }
.wc-album-denied, .wc-album-empty { padding: 60px; text-align: center; color: var(--txt2); }

/* 头部 */
.wc-album-header { display: flex; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.wc-album-cover { width: 240px; border-radius: 16px; overflow: hidden; background: var(--card); flex: 0 0 auto; align-self: flex-start; }
.wc-album-cover img { width: 100%; height: auto; display: block; }
.wc-album-cover-ph { width: 100%; height: 160px; display: flex; align-items: center; justify-content: center; font-size: 48px; color: var(--txt3); }
.wc-album-info { flex: 1; min-width: 260px; }
.wc-album-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wc-album-title-row h1 { margin: 0; font-size: 1.7rem; color: #fff; }
.wc-album-badge { font-size: 12px; padding: 3px 10px; border-radius: 8px; background: rgba(102,126,234,0.15); color: var(--acc-l); }
.wc-album-badge.private { background: rgba(245,108,108,0.15); color: #f56c6c; }
.wc-album-desc { color: var(--txt2); margin: 10px 0; line-height: 1.6; }
.wc-album-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--txt2); font-size: 14px; }
.wc-album-author { display: inline-flex; align-items: center; gap: 6px; color: var(--acc-l); text-decoration: none; }
.wc-album-author img { width: 26px; height: 26px; border-radius: 50%; }
.wc-album-actions { margin-top: 16px; display: flex; gap: 10px; }
.wc-btn-like, .wc-btn-edit { padding: 8px 18px; border-radius: 12px; border: 1px solid var(--bd); background: var(--card); color: var(--txt); cursor: pointer; font-size: 14px; text-decoration: none; }
.wc-btn-like.liked { background: rgba(245,108,108,0.2); border-color: #f56c6c; color: #f56c6c; }

/* 视图切换 */
.wc-view-toggle { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.wc-view-toggle-left { display: flex; gap: 8px; }
.wc-view-btn { padding: 8px 18px; border-radius: 12px; border: 1px solid var(--bd); background: var(--card); color: var(--txt2); cursor: pointer; font-size: 13px; }
.wc-view-btn.active { border-color: var(--acc); background: rgba(102,126,234,0.12); color: var(--acc-l); }

/* justified 行布局模式 */
.wc-wp-waterfall.wc-justified { column-count: unset !important; }
.wc-wp-waterfall.wc-justified .wc-wp-card .wc-wp-imgbox {
  position: absolute;
  inset: 0;
}
.wc-wp-waterfall.wc-justified .wc-wp-card .wc-wp-imgbox img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== 瀑布流模式：左瀑布 + 右评论栏 ===== */
.wc-mode-masonry { display: flex; gap: 24px; align-items: flex-start; }
.wc-masonry-main { flex: 1; min-width: 0; }
.wc-wp-waterfall { column-count: 4; column-gap: 8px; }
@media (max-width: 1280px) { .wc-wp-waterfall { column-count: 3; } }
@media (max-width: 760px)  { .wc-wp-waterfall { column-count: 2; } }
/* 小屏折行：sidebar 下移，不与瀑布流重叠 */
@media (max-width: 1100px) {
  .wc-mode-masonry { flex-direction: column; }
  .wc-masonry-side { width: 100% !important; flex: none !important; position: static !important; max-height: none !important; }
}
.wc-wp-card { break-inside: avoid; margin-bottom: 8px; border-radius: 3px; overflow: hidden; position: relative; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.wc-wp-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.wc-wp-imgbox { position: relative; }
.wc-wp-imgbox img { width: 100%; height: auto; display: block; transition: transform .3s; }
.wc-wp-card:hover .wc-wp-imgbox img { transform: scale(1.05); }
.wc-wp-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 10px; background: linear-gradient(transparent 50%, rgba(0,0,0,.75)); opacity: 0; transition: opacity .2s; }
.wc-wp-card:hover .wc-wp-overlay { opacity: 1; }
.wc-wp-ov-title { display: block; color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-wp-ov-meta { font-size: 11px; color: rgba(255,255,255,.7); }
.wc-wp-like { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; background: rgba(0,0,0,.5); border: none; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.wc-wp-like.is-favorited { color: #ef4444; } .wc-wp-like.is-favorited svg { fill: #ef4444; }
.wc-masonry-side { width: 450px; flex: 0 0 450px; position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow-y: auto; scrollbar-width: thin; }
@media (max-width: 1000px) { .wc-mode-masonry { flex-direction: column; } .wc-masonry-side { width: 100%; flex: none; position: static; max-height: none; } }

/* ===== 大图模式：左大图 + 右内容 ===== */
.wc-mode-article { display: flex; gap: 32px; align-items: flex-start; }
.wc-article-imgarea { flex: 1; min-width: 0; position: sticky; top: 20px; }
.wc-article-main { position: relative; display: flex; align-items: center; justify-content: center; background: var(--card); border-radius: 14px; min-height: 60vh; max-height: 80vh; overflow: hidden; }
.wc-article-imgwrap { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; cursor: zoom-in; }
.wc-article-imgwrap img { max-width: 100%; max-height: 78vh; object-fit: contain; display: block; }
.wc-art-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,.5); border: none; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; z-index: 2; }
.wc-art-arrow.left { left: 12px; } .wc-art-arrow.right { right: 12px; }
.wc-art-arrow:disabled { opacity: .3; cursor: default; }
.wc-thumb-carousel { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.wc-thumb-track-wrap { flex: 1; overflow: hidden; }
.wc-thumb-track { display: flex; gap: 8px; transition: transform .25s; }
.wc-thumb-item { width: 60px; height: 60px; flex: 0 0 60px; border-radius: 6px; overflow: hidden; cursor: pointer; border: 2px solid transparent; }
.wc-thumb-item.active { border-color: var(--acc); }
.wc-thumb-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wc-thumb-arrow { width: 28px; height: 60px; flex: 0 0 28px; border: none; background: var(--card); color: var(--txt2); border-radius: 6px; cursor: pointer; }
.wc-article-content { width: 450px; flex: 0 0 450px; min-width: 0; }
.wc-article-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.wc-article-title { font-size: 1.2rem; color: #fff; margin: 0; }
.wc-art-like { background: none; border: none; color: var(--txt2); cursor: pointer; flex: 0 0 auto; padding: 0; }
.wc-art-like.is-favorited { color: #ef4444; } .wc-art-like.is-favorited svg { fill: #ef4444; }
.wc-article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--txt2); font-size: 13px; margin: 8px 0; }
.wc-art-dot { color: var(--txt3); }
.wc-article-desc { color: var(--txt2); line-height: 1.6; font-size: 14px; margin: 0 0 18px; }
@media (max-width: 1000px) { .wc-mode-article { flex-direction: column; } .wc-article-imgarea { position: static; width: 100%; } .wc-article-content { width: 100%; flex: none; } }

/* 评论 slot：让主题评论在暗底可读（变量已由 comments.css 的 .wc-album-page 提供） */
.wc-comments-slot a { color: var(--acc-l); }
.wc-comments-pool { } /* 评论被 JS 搬到 slot 后此容器自然为空、不占高度 */

/* ===== 专辑存档 ===== */
.wc-archive-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.wc-archive-head h1 { color: #fff; margin: 0; }
.wc-archive-sort a { color: var(--txt2); text-decoration: none; margin-left: 14px; font-size: 14px; }
.wc-archive-sort a.active { color: var(--acc-l); font-weight: 600; }
.wc-album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.wc-album-grid-card { background: var(--card); border: 1px solid var(--bd); border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--txt); transition: transform .2s; }
.wc-album-grid-card:hover { transform: translateY(-4px); }
.wc-album-grid-cover { position: relative; aspect-ratio: 3/2; background: #1a1a2e; }
.wc-album-grid-cover img { width: 100%; height: 100%; object-fit: cover; }
.wc-album-grid-count { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,0.6); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 8px; }
.wc-album-grid-body { padding: 12px; }
.wc-album-grid-body h3 { margin: 0 0 4px; font-size: 15px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-album-grid-author { font-size: 12px; color: var(--txt3); }
.wc-album-pagination { margin-top: 28px; text-align: center; }
.wc-album-pagination .page-numbers { display: inline-block; padding: 6px 12px; margin: 0 3px; border-radius: 8px; background: var(--card); color: var(--txt2); text-decoration: none; }
.wc-album-pagination .page-numbers.current { background: var(--acc); color: #fff; }

/* ===== 详情页扩展（浅色，融入主题 single.php）===== */
.wc-single-extras { margin: 16px 0; display: flex; flex-direction: column; gap: 16px; }
.wc-copyright-card { border-radius: 10px; overflow: hidden; border: 1px solid #eee; font-size: 13px; }
.wc-cr-head { padding: 8px 14px; font-weight: 600; color: #fff; }
.wc-cr-photo  .wc-cr-head { background: #4a78c4; } .wc-cr-photo  { border-color: #cfe0fb; }
.wc-cr-art    .wc-cr-head { background: #8b5cf6; } .wc-cr-art    { border-color: #e3d8fb; }
.wc-cr-repost .wc-cr-head { background: #22a06b; } .wc-cr-repost { border-color: #cdeede; }
.wc-cr-ai     .wc-cr-head { background: #e6943c; } .wc-cr-ai     { border-color: #f7e3c8; }
.wc-cr-body { padding: 12px 14px; background: #fafafa; }
.wc-cr-row { display: flex; gap: 10px; padding: 4px 0; }
.wc-cr-label { color: #888; flex: 0 0 84px; }
.wc-cr-val { color: #333; word-break: break-word; }
.wc-cr-val a { color: #4a78c4; }
.wc-cr-note { color: #666; } .wc-cr-locked { padding: 12px 14px; background: #fafafa; color: #999; }

.wc-belong-albums { border: 1px solid #eee; border-radius: 10px; padding: 14px; }
.wc-belong-head { font-size: 14px; font-weight: 600; margin-bottom: 10px; color: #333; }
.wc-belong-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wc-belong-card { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #333; background: #fafafa; border-radius: 8px; padding: 6px; }
.wc-belong-card img, .wc-belong-ph { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: #eee; display: flex; align-items: center; justify-content: center; }
.wc-belong-name { font-size: 13px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-belong-count { font-size: 12px; color: #999; }

.wc-btn-add-album { padding: 8px 18px; border-radius: 10px; border: 1px solid #ddd; background: #fff; color: #333; cursor: pointer; font-size: 14px; }
.wc-btn-add-album:hover { border-color: #667eea; color: #667eea; }

/* 加入专辑对话框 */
.wc-album-dialog-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9998; }
.wc-album-dialog { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 480px; max-width: 92vw; max-height: 80vh;
  background: #1e1e2e; color: rgba(255,255,255,0.9); border: 1px solid rgba(255,255,255,0.12); border-radius: 14px; z-index: 9999; display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.wc-dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,0.12); font-weight: 600; color: #fff; }
.wc-dialog-close { background: none; border: none; cursor: pointer; font-size: 16px; color: rgba(255,255,255,0.5); }
.wc-dialog-close:hover { color: #fff; }
.wc-dialog-list { padding: 12px 18px; overflow-y: auto; flex: 1; }
.wc-dialog-album { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; cursor: pointer; }
.wc-dialog-album:hover { background: rgba(255,255,255,0.08); }
.wc-dialog-album img, .wc-dialog-album .ph { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: rgba(102,126,234,0.15); display:flex;align-items:center;justify-content:center; flex: 0 0 auto; }
.wc-dialog-album .name { flex: 1; min-width: 0; font-size: 14px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-dialog-album .cnt { font-size: 12px; color: rgba(255,255,255,0.5); flex: 0 0 auto; }
.wc-dialog-foot { display: flex; gap: 8px; padding: 14px 18px; border-top: 1px solid rgba(255,255,255,0.12); }
.wc-dialog-foot input { flex: 1; min-width: 0; padding: 8px 12px; border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; background: rgba(255,255,255,0.08); color: #fff; }
.wc-dialog-foot input::placeholder { color: rgba(255,255,255,0.4); }
.wc-btn-create-album { padding: 8px 16px; border: none; border-radius: 8px; background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; cursor: pointer; white-space: nowrap; }

/* 编辑专辑弹层（创作者，暗色） */
.wc-aedit-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9998; }
.wc-aedit-dialog { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 480px; max-width: 92vw; max-height: 88vh; overflow-y: auto;
  background: #1e1e2e; color: rgba(255,255,255,0.9); border: 1px solid rgba(255,255,255,0.12); border-radius: 14px; z-index: 9999; box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.wc-aedit-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,0.12); font-weight: 600; color: #fff; }
.wc-aedit-close { background: none; border: none; cursor: pointer; font-size: 16px; color: rgba(255,255,255,0.5); }
.wc-aedit-close:hover { color: #fff; }
.wc-aedit-body { padding: 14px 18px; }
.wc-aedit-body label { display: block; font-size: 13px; color: rgba(255,255,255,0.6); margin: 12px 0 5px; }
.wc-aedit-body label:first-child { margin-top: 0; }
.wc-aedit-body input[type=text], .wc-aedit-body textarea { width: 100%; box-sizing: border-box; padding: 9px 11px; border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; background: rgba(255,255,255,0.08); color: #fff; font-size: 14px; font-family: inherit; }
.wc-aedit-radio { display: flex; gap: 16px; }
.wc-aedit-radio label { display: inline-flex; align-items: center; gap: 5px; margin: 0; font-size: 14px; color: rgba(255,255,255,0.85); }
.wc-aedit-cover-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 8px; max-height: 180px; overflow-y: auto; padding: 2px; }
.wc-aedit-cover-opt { padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: rgba(255,255,255,0.06); aspect-ratio: 1/1; }
.wc-aedit-cover-opt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wc-aedit-cover-opt.active { border-color: #9a7be0; box-shadow: 0 0 0 2px rgba(154,123,224,.35); }
.wc-aedit-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 18px; border-top: 1px solid rgba(255,255,255,0.12); }
.wc-aedit-cancel { padding: 8px 18px; border: none; border-radius: 8px; background: rgba(255,255,255,0.12); color: #fff; cursor: pointer; }
.wc-aedit-save { padding: 8px 18px; border: none; border-radius: 8px; background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; cursor: pointer; }
.wc-aedit-save:disabled { opacity: .6; cursor: default; }

/* 统一标签按钮 + 弹层 */
.wc-btn-unitags { padding: 8px 18px; border-radius: 12px; border: 1px solid var(--bd); background: var(--card); color: var(--txt); cursor: pointer; font-size: 14px; }
.wc-btn-unitags:hover { border-color: #764ba2; color: #764ba2; }
.wc-unitags-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9998; }
.wc-unitags-dialog { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 460px; max-width: 92vw;
  background: #1e1e2e; color: rgba(255,255,255,0.9); border: 1px solid rgba(255,255,255,0.12); border-radius: 14px; z-index: 9999; box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.wc-unitags-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,0.12); font-weight: 600; color: #fff; }
.wc-unitags-close { background: none; border: none; cursor: pointer; font-size: 16px; color: rgba(255,255,255,0.5); }
.wc-unitags-close:hover { color: #fff; }
.wc-unitags-body { padding: 16px 18px; }
.wc-unitags-tip { font-size: 13px; color: rgba(255,255,255,0.6); margin: 0 0 12px; line-height: 1.5; }
.wc-unitags-tip strong { color: #fff; }
.wc-unitags-input { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; background: rgba(255,255,255,0.08); color: #fff; font-size: 14px; }
.wc-unitags-input::placeholder { color: rgba(255,255,255,0.4); }
.wc-unitags-result { margin-top: 12px; font-size: 13px; color: #9ece9e; min-height: 18px; }
.wc-unitags-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 18px; border-top: 1px solid rgba(255,255,255,0.12); }
.wc-unitags-cancel { padding: 8px 18px; border: none; border-radius: 8px; background: rgba(255,255,255,0.12); color: #fff; cursor: pointer; }
.wc-unitags-save { padding: 8px 18px; border: none; border-radius: 8px; background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; cursor: pointer; }
.wc-unitags-save:disabled { opacity: .6; cursor: default; }

/* toast */
.wc-toast-wrap { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); z-index: 99999; display: flex; flex-direction: column; gap: 8px; }
.wc-toast { padding: 10px 18px; border-radius: 10px; color: #fff; font-size: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.3); }
.wc-toast.success { background: #22c55e; } .wc-toast.error { background: #f56c6c; }
.wc-toast.warning { background: #e6a23c; } .wc-toast.info { background: #667eea; }
