/* ===== Posts pages layout helpers ===== */
.posts-shell, .post-shell {
  position: absolute;
  left: 50%;
  top: 14vh;
  transform: translateX(-50%);
  width: min(1100px, 92vw);
  max-height: 78vh;
  overflow: auto;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(231, 16, 16, 0.22);
  background: rgba(255, 255, 255, 0);
  backdrop-filter: blur(8px);
}

.posts-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.posts-search {
  width: min(520px, 70vw);
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.12);
  color: #fff;
  outline: none;
}

.posts-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

/*tag 过滤按钮（这是 posts 专用，放这里最合适）*/
.tag-filter {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.10);
  color: #fff;
  cursor: pointer;
}
.tag-filter.active {
  background: rgba(255,180,220,.35);
  border-color: rgba(255,180,220,.55);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 980px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .posts-grid { grid-template-columns: 1fr; }
}

.posts-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

/* ===== Post cards (列表卡片) ===== */
.post-card{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.25);
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease;
  cursor: pointer;
}
.post-card:hover{
  transform: translateY(-2px);
  border-color: rgba(255,180,220,.38);
}

.post-cover img{
  width: 100%;
  height: 190px;
  object-fit: cover;
  display:block;
}

.post-body{ padding: 12px; }
.post-meta{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,.78);
}

.post-title{
  margin: 8px 0 6px;
  color: #e2cdd8;
}

.post-excerpt{ color: rgba(255,255,255,.88); margin: 0 0 10px; }

/* ===== Post page typography ===== */
.post-head { margin-bottom: 10px; }
.post-h2 { color: #fff; margin: 0 0 6px; }

.post-hero img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.18);
  margin: 10px 0 12px;
}

/* markdown 内容容器 */
.prose {
  padding: 12px;
  border-radius: 14px;
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.14);
}

.prose h1, .prose h2, .prose h3 { color: #fff; }
.prose p, .prose li { color: rgba(255,255,255,.92); }

.prose a { color: rgba(255,180,220, .95); font-weight: 700; }
.prose a:hover { opacity: .9; }

/* code block + copy button */
pre.code-block {
  position: relative;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  overflow: auto;
  margin: 12px 0;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.12);
  color: #fff;
  cursor: pointer;
}
.copy-btn:hover { transform: translateY(-1px); }

/* 详情页底部导航 */
.post-nav{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 3vh;
  display: flex;
  gap: 10px;
  z-index: 2;
}

.post-card:focus-visible{
  outline: 2px solid rgba(255,180,220,.75);
  outline-offset: 2px;
}
