/* feed.css — 首页 Feed 网格布局，基础框架见 common.css */

/*
 * 布局：CSS Grid 5列，影集 (feed-video) 占1格竖排，
 * 图集/攻略 (feed-wide) span 2列横排，混排后自然填充。
 * 同一行最多5列，wide 卡片占2格，video 卡片占1格，
 * 配比 3:2 或 2:3 均自然适配。
 */

.feed {
  max-width: 1200px; margin: 0 auto; padding: 24px 24px 60px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: auto;
  gap: 18px;
  align-items: start;
}

/* ── 影集卡：竖版 3:4，占1列 ── */
.feed-video {
  grid-column: span 1;
}
/* 复用 ccard / cc-cover / cc-body / cc-title from common.css */

/* ── 图集 / 攻略卡：横版，占2列 ── */
.feed-wide {
  grid-column: span 2;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .2s cubic-bezier(.34,1.4,.64,1), box-shadow .2s;
}
.feed-wide:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255,255,255,.12);
}

/* ── 图集卡内部 ── */
.gallery-card .gh-inner {
  display: flex; flex-direction: column; color: inherit; text-decoration: none;
}
.gallery-card .gh-mosaic {
  flex-shrink: 0;
}
.gallery-card .gh-info {
  padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 6px;
}
.gallery-card .gh-type { }
.gallery-card .gh-title {
  font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gallery-card .gh-cate { font-size: 11px; color: var(--text-3); }
.gallery-card .gh-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.gallery-card .gh-tags .tag {
  font-size: 11px; color: var(--text-2);
  background: rgba(255,255,255,.06); padding: 2px 8px; border-radius: 4px;
}

/* 马赛克封面固定 16:9 */
.gallery-card .mosaic {
  border-radius: 0; overflow: hidden;
  display: grid; gap: 2px; aspect-ratio: 16/9; background: var(--bg2);
}
.gallery-card .mosaic.lead { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.gallery-card .mosaic.lead .lead-main { grid-row: 1 / span 2; grid-column: 1; }
.gallery-card .mosaic.pair { grid-template-columns: repeat(2,1fr); grid-template-rows: 1fr; }
.gallery-card .mosaic.single { grid-template-columns: 1fr; grid-template-rows: 1fr; gap: 0; }
.gallery-card .mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-card .mosaic .cell { position: relative; overflow: hidden; }
.gallery-card .mosaic .cell:hover img { transform: scale(1.05); }
.gallery-card .mosaic .more {
  position: absolute; inset: 0; background: rgba(0,0,0,.55);
  color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
}
.gallery-card .mosaic .more small { font-size: 11px; font-weight: 400; opacity: .85; margin-top: 2px; }
.gallery-card .mosaic.single .count-tag {
  position: absolute; right: 10px; bottom: 10px;
  background: rgba(0,0,0,.55); color: #fff;
  font-size: 11px; padding: 3px 9px; border-radius: 12px; backdrop-filter: blur(6px);
  transition: opacity .2s;
}
.gallery-card .mosaic.single .zoom-hint {
  position: absolute; right: 10px; bottom: 10px;
  background: rgba(255,255,255,.15); color: #fff;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  opacity: 0; transform: scale(.8); transition: opacity .2s, transform .2s;
}
.gallery-card .mosaic.single:hover .count-tag { opacity: 0; }
.gallery-card .mosaic.single:hover .zoom-hint { opacity: 1; transform: scale(1); }

/* ── 攻略卡内部 ── */
.article-card .art-inner {
  display: flex; gap: 0; color: inherit; text-decoration: none;
}
.article-card .art-cover {
  flex-shrink: 0; width: 42%;
  aspect-ratio: 16/9; overflow: hidden; background: var(--bg2); position: relative;
}
.article-card .art-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.article-card:hover .art-cover img { transform: scale(1.05); }
.article-card .art-body {
  flex: 1; min-width: 0; padding: 14px 16px 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.article-card .art-type { }
.article-card .art-title {
  font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.article-card .art-excerpt {
  font-size: 12px; color: var(--text-2); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-card .art-meta {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 11px; color: var(--text-3); margin-top: auto;
}
.article-card .art-author { color: var(--text-2); font-weight: 500; }
.article-card .art-dot { color: var(--text-3); }
.article-card .art-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.article-card .art-tags .tag {
  font-size: 11px; color: var(--atype-3);
  background: rgba(245,166,35,.12); padding: 2px 8px; border-radius: 4px;
}

/* ── type-badge ── */
.type-badge {
  font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: 10px; flex-shrink: 0; letter-spacing: .3px;
}
.type-badge.t1 { background: rgba(26,115,232,.15); color: var(--atype-1); }
.type-badge.t2 { background: rgba(43,164,113,.15);  color: var(--atype-2); }
.type-badge.t3 { background: rgba(245,166,35,.15);  color: var(--atype-3); }

/* ── 空状态 ── */
.empty {
  grid-column: 1 / -1; text-align: center; color: var(--text-3);
  padding: 80px 20px; font-size: 14px;
}

/* ── loader (占满整行) ── */
.loader { grid-column: 1 / -1; padding: 20px; }

/* ── chip-bar 居中窄轨 ── */

/* ── 搜索状态条 ── */
.search-status { max-width: 1200px; }

/* ── 响应式 ── */
@media (max-width: 1100px) {
  .feed { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
}
@media (max-width: 800px) {
  .feed { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 16px 14px 40px; }
  .feed-wide { grid-column: span 2; }
  .article-card .art-cover { width: 38%; }
}
@media (max-width: 560px) {
  .feed { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px 12px 32px; }
  .feed-wide { grid-column: span 2; }
  .gallery-card .gh-info { padding: 8px 10px 10px; }
  .gallery-card .gh-title { font-size: 13px; }
  .article-card .art-body { padding: 10px 12px; }
  .article-card .art-title { font-size: 13px; -webkit-line-clamp: 2; }
  .article-card .art-excerpt { display: none; }
}

/* ── H5 ── */
body.h5 .topbar { padding: 0 14px; height: 50px; }
body.h5 .topbar .brand { font-size: 18px; margin-right: 14px; }
body.h5 .topbar .nav-links { gap: 14px; }
body.h5 .topbar .nav-links a { font-size: 13px; }
body.h5 .chip-bar { padding: 0 14px; top: 50px; }
body.h5 .chip { padding: 5px 12px; font-size: 12px; }
