/* ============================================
   文章中心（列表页 + 内容页）样式
   article.php / post.php 共用；安装时自动同步到 template/css/
   ============================================ */

/* ---------- 面包屑 ---------- */
.crumbs { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: #8a7f9c; margin-top: 18px; min-width: 0; }
.crumbs a { color: #8a7f9c; text-decoration: none; white-space: nowrap; transition: color .25s; }
.crumbs a:hover { color: #ff2d6a; }
.crumbs .sep { opacity: .55; flex: none; }
.crumbs .cur { color: #ff2d6a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 列表页 · 顶部 banner 卡片 ---------- */
.art-hero { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 14px; padding: 28px 30px; background: radial-gradient(circle at calc(100% - 60px) -70px, rgba(255,45,106,.14), transparent 120px), var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); position: relative; }
.art-hero-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: rgba(255,45,106,.12); color: #ff2d6a; font-size: .74rem; font-weight: 600; margin-bottom: 12px; }
.art-hero h1 { margin: 0 0 6px; font-size: 1.55rem; color: var(--text); }
.art-hero .desc { margin: 0 0 14px; color: #b8aec9; font-size: .9rem; }
.art-hero .stat { display: flex; align-items: center; gap: 14px; color: #8a7f9c; font-size: .8rem; }
.art-hero .stat svg { vertical-align: -2px; margin-right: 4px; }
.art-hero .stat .tag { color: #ff2d6a; opacity: .85; }

/* ---------- 列表页 · 自定义排序下拉 ---------- */
.sort-dd { position: relative; flex: none; }
.sort-btn { display: inline-flex; align-items: center; gap: 9px; background: rgba(255,255,255,.05); color: var(--text); border: 1px solid var(--border); border-radius: 999px; padding: 9px 18px; font-size: .84rem; cursor: pointer; transition: border-color .25s ease, background .25s ease, box-shadow .25s ease; }
.sort-btn:hover, .sort-dd.open .sort-btn { border-color: rgba(255,45,106,.5); background: rgba(255,45,106,.08); box-shadow: 0 0 0 3px rgba(255,45,106,.08); }
.sort-btn .caret { display: inline-flex; color: #ff2d6a; transition: transform .3s cubic-bezier(.22,1,.36,1); }
.sort-dd.open .sort-btn .caret { transform: rotate(180deg); }
.sort-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 100%; background: #221831; border: 1px solid var(--border); border-radius: 12px; padding: 6px; box-shadow: 0 18px 44px -12px rgba(0,0,0,.65); opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98); transform-origin: top right; transition: opacity .28s ease, transform .28s cubic-bezier(.22,1,.36,1), visibility .28s; z-index: 50; }
.sort-dd.open .sort-menu { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.sort-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; border-radius: 8px; color: #cfc6dd; font-size: .82rem; text-decoration: none; white-space: nowrap; transition: background .2s ease, color .2s ease, padding-left .2s ease; }
.sort-item:hover { background: rgba(255,45,106,.12); color: #fff; padding-left: 18px; }
.sort-item.active { color: #ff2d6a; background: rgba(255,45,106,.1); font-weight: 600; }
.sort-item.active::after { content: '✓'; font-size: .74rem; line-height: 1; }

/* ---------- 列表页 · 卡片网格 ---------- */
.art-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 24px; }
.art-card { display: flex; flex-direction: column; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; transition: all .35s cubic-bezier(.22,1,.36,1); }
.art-card:hover { transform: translateY(-5px); border-color: rgba(255,45,106,.45); box-shadow: 0 18px 38px -14px var(--pink-glow); }
.art-cover { aspect-ratio: 16/10; background: linear-gradient(135deg, #2a1e3d, #1c1428); overflow: hidden; }
.art-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.22,1,.36,1); }
.art-card:hover .art-cover img { transform: scale(1.05); }
.art-body { flex: 1; display: flex; flex-direction: column; padding: 16px 18px 14px; gap: 9px; min-width: 0; }
.art-badge { align-self: flex-start; padding: 3px 10px; border-radius: 999px; background: rgba(255,45,106,.12); color: #ff2d6a; font-size: .7rem; font-weight: 600; letter-spacing: .5px; }
.art-title { margin: 0; font-size: 1.02rem; font-weight: 700; line-height: 1.5; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color .25s; }
.art-card:hover .art-title { color: #ff2d6a; }
.art-summary { margin: 0; color: #a99cbf; font-size: .85rem; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.art-meta { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 14px; color: #8a7f9c; font-size: .76rem; }
.art-meta svg { vertical-align: -1.5px; margin-right: 4px; opacity: .85; }

.art-empty { text-align: center; color: #8a7f9c; padding: 70px 0; grid-column: 1 / -1; }
.art-pager-info { text-align: center; color: #8a7f9c; font-size: .8rem; margin: 26px 0 10px; }
.art-pager { display: flex; justify-content: center; }

/* ---------- 内容页 · 双栏布局 ---------- */
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 22px; align-items: start; margin-top: 14px; }

.post-wrap { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 34px 38px 30px; }
.post-title { margin: 0 0 16px; font-size: 1.7rem; line-height: 1.45; color: var(--text); }
.post-excerpt { margin: 0 0 18px; padding: 14px 18px; border-left: 4px solid rgba(255,45,106,.5); background: rgba(255,45,106,.06); border-radius: 0 10px 10px 0; color: #b8aec9; font-size: .92rem; line-height: 1.9; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; color: #8a7f9c; font-size: .8rem; padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.post-meta svg { vertical-align: -2px; margin-right: 5px; opacity: .85; }
.post-meta time { color: #ff2d6a; }
.post-cover { margin: 0 0 26px; border-radius: 12px; overflow: hidden; aspect-ratio: 16/9; background: linear-gradient(135deg, #2a1e3d, #1c1428); }
.post-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- 内容页 · 正文排版 ---------- */
.article-content { color: #cfc6dd; font-size: 1rem; line-height: 2; word-break: break-word; }
.article-content p { margin: 0 0 16px; }
.article-content h2, .article-content h3, .article-content h4 { color: var(--text); margin: 28px 0 14px; line-height: 1.5; }
.article-content h2 { font-size: 1.3rem; padding-left: 12px; border-left: 4px solid #ff2d6a; }
.article-content h3 { font-size: 1.12rem; }
.article-content img { max-width: 100%; height: auto; border-radius: 10px; }
.article-content a { color: #ff2d6a; }
.article-content ul, .article-content ol { padding-left: 24px; margin: 0 0 16px; }
.article-content li { margin-bottom: 6px; }
.article-content blockquote { margin: 18px 0; padding: 12px 18px; border-left: 4px solid rgba(255,45,106,.5); background: rgba(255,45,106,.06); border-radius: 0 8px 8px 0; color: #b8aec9; }
.article-content pre { background: #14151d; border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; overflow-x: auto; font-size: .88rem; }
.article-content table { width: 100%; border-collapse: collapse; margin: 0 0 16px; }
.article-content th, .article-content td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.article-content th { background: rgba(255,45,106,.08); color: var(--text); }
.article-content video { max-width: 100%; border-radius: 10px; }

/* ---------- 内容页 · 上一篇 / 下一篇（自适应宽度卡片） ---------- */
.post-nav { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.post-nav > div { flex: 1 1 0; max-width: 320px; min-width: 0; }
.post-nav a { display: block; width: 100%; box-sizing: border-box; padding: 12px 18px; background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 12px; text-decoration: none; transition: all .3s ease; }
.post-nav a:hover { border-color: rgba(255,45,106,.5); background: rgba(255,45,106,.05); box-shadow: 0 10px 24px -12px var(--pink-glow); transform: translateY(-2px); }
.post-nav .label { display: flex; align-items: center; gap: 5px; font-size: .74rem; color: #8a7f9c; margin-bottom: 5px; transition: color .25s; }
.post-nav .label svg { flex: none; }
.post-nav a:hover .label { color: #ff2d6a; }
.post-nav .nv { display: block; max-width: 100%; color: var(--text); font-size: .88rem; font-weight: 600; line-height: 1.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .25s; }
.post-nav a:hover .nv { color: #ff2d6a; }
.post-nav .next { text-align: right; }
.post-nav .next .label { justify-content: flex-end; }

/* ---------- 内容页 · 右侧信息卡 ---------- */
.post-side { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 14px; }
.side-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.side-card h4 { margin: 0 0 12px; font-size: .82rem; color: var(--text); display: flex; align-items: center; gap: 6px; }
.side-card h4::before { content: ''; width: 3px; height: 12px; border-radius: 2px; background: #ff2d6a; }
.side-card dl { margin: 0; display: flex; flex-direction: column; gap: 9px; }
.side-card dl > div { display: flex; justify-content: space-between; gap: 10px; font-size: .78rem; }
.side-card dt { color: #8a7f9c; flex: none; }
.side-card dd { margin: 0; color: #cfc6dd; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-card .btn-back { display: block; text-align: center; padding: 9px 0; border-radius: 999px; border: 1px solid rgba(255,45,106,.4); color: #ff2d6a; font-size: .8rem; text-decoration: none; transition: all .25s; }
.side-card .btn-back:hover { background: rgba(255,45,106,.1); }

/* ---------- 内容页 · 相关阅读推荐 ---------- */
.post-rel { margin-top: 30px; }
.rel-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.rel-head h2 { margin: 0; font-size: 1.15rem; color: var(--text); display: flex; align-items: center; gap: 8px; }
.rel-head h2::before { content: ''; width: 4px; height: 16px; border-radius: 2px; background: #ff2d6a; }
.rel-head a { color: #8a7f9c; font-size: .78rem; text-decoration: none; transition: color .25s; }
.rel-head a:hover { color: #ff2d6a; }
.rel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.rel-card { display: flex; flex-direction: column; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; transition: all .35s cubic-bezier(.22,1,.36,1); }
.rel-card:hover { transform: translateY(-4px); border-color: rgba(255,45,106,.45); box-shadow: 0 16px 32px -14px var(--pink-glow); }
.rel-cover { aspect-ratio: 16/10; background: linear-gradient(135deg, #2a1e3d, #1c1428); overflow: hidden; }
.rel-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.22,1,.36,1); }
.rel-card:hover .rel-cover img { transform: scale(1.05); }
.rel-body { padding: 13px 15px 12px; display: flex; flex-direction: column; gap: 8px; }
.rel-badge { align-self: flex-start; padding: 2px 9px; border-radius: 999px; background: rgba(255,45,106,.12); color: #ff2d6a; font-size: .68rem; font-weight: 600; }
.rel-title { margin: 0; font-size: .92rem; font-weight: 700; line-height: 1.5; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color .25s; }
.rel-card:hover .rel-title { color: #ff2d6a; }
.rel-meta { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border); display: flex; gap: 12px; color: #8a7f9c; font-size: .72rem; }
.rel-meta svg { vertical-align: -1.5px; margin-right: 4px; opacity: .85; }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .post-layout { grid-template-columns: 1fr; }
  .post-side { position: static; flex-direction: row; }
  .post-side .side-card { flex: 1; }
  .post-side .side-card .btn-back { display: none; }
}
@media (max-width: 960px) {
  .art-grid { grid-template-columns: repeat(2, 1fr); }
  .rel-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .art-hero { flex-direction: column; align-items: flex-start; padding: 22px 20px; }
  .art-grid { grid-template-columns: 1fr; gap: 16px; }
  .post-wrap { padding: 22px 18px 22px; }
  .post-title { font-size: 1.35rem; }
  .post-side { flex-direction: column; }
  .post-nav { flex-direction: column; }
  .post-nav > div { width: 100%; max-width: 100%; }
  .post-nav .next { text-align: left; }
  .post-nav a { width: 100%; }
  .rel-grid { grid-template-columns: 1fr; }
}
