@charset "UTF-8";
/* ===========================
   Layer 3: Blog 页面专用样式
   Hero / 文章卡片 / 侧边栏 / 标签云 / 归档 / 分页
   仅在 blog.html 中引入
   =========================== */


/* ========== Hero Section ========== */
.blog-hero {
  background:
    linear-gradient(135deg, rgba(249, 189, 221, 0.35) 0%, rgba(180, 223, 251, 0.3) 100%),
    url(../assets/backgrounds/checker.gif);
  background-size: auto, 200px;
  border-bottom: 2px solid #000;
  padding: 36px 28px 28px;
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: "";
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(249, 189, 221, 0.5) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.blog-hero-inner {
  position: relative;
  z-index: 1;
}

.blog-hero-title {
  font-family: "PC98", "MS PGothic", "Unifont", monospace;
  font-size: 32px;
  font-weight: bold;
  color: #000;
  margin: 0 0 6px;
  letter-spacing: 1px;
  text-shadow: 2px 2px 0 rgba(249, 189, 221, 0.5);
}

.blog-hero-sub {
  font-family: "MS PGothic", "Unifont", sans-serif;
  font-size: 13px;
  color: #5a3e4b;
  margin: 0 0 14px;
  line-height: 1.6;
}

/* 装饰分隔线 */
.blog-hero-deco {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 160px;
}

.hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c44569;
  flex-shrink: 0;
}

.hero-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, #c44569, #f9bddd, #b4dffb);
}


/* ========== Blog Body: 两栏布局 ========== */
.blog-body {
  display: flex;
  gap: 16px;
  padding: 16px 10px;
  align-items: flex-start;
}

.blog-list {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.blog-sidebar {
  width: 210px;
  min-width: 210px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 60px;
}


/* ========== Post Card ========== */
.post-card {
  display: flex;
  gap: 14px;
  background: #fff;
  border: 1px solid #000;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  /* 入场动画 */
  animation: cardSlideIn 0.45s ease both;
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.post-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 6px 20px rgba(196, 69, 105, 0.15), 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* 封面缩略图 */
.post-cover {
  display: block;
  width: 170px;
  min-width: 170px;
  min-height: 150px;
  overflow: hidden;
  border-right: 1px solid #e0cfd6;
  background: #fef6f9;
  text-decoration: none;
}

.post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.post-card:hover .post-cover img {
  transform: scale(1.06);
}

/* 文章信息区 */
.post-info {
  flex: 1;
  padding: 14px 16px 12px 2px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.post-meta time {
  font-family: "PC98", "MS PGothic", "Unifont", monospace;
  font-size: 11px;
  color: #999;
  letter-spacing: 0.5px;
}

.post-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.post-tag {
  display: inline-block;
  font-size: 10px;
  padding: 1px 7px;
  border: 1px solid #e8a0b4;
  border-radius: 10px;
  background: #fff0f5;
  color: #c44569;
  line-height: 1.6;
  white-space: nowrap;
}

/* 标题 */
.post-title {
  font-family: "MS PGothic", "Unifont", sans-serif;
  font-size: 15px;
  font-weight: bold;
  color: #2a1a2e;
  margin: 0 0 6px;
  line-height: 1.4;
  transition: color 0.2s ease;
  /* 超出截断 */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-title a {
  color: inherit;
  text-decoration: none;
}

.post-card:hover .post-title,
.post-card:hover .post-title a {
  color: #c44569;
}

/* 摘要 */
.post-excerpt {
  font-size: 11.5px;
  color: #5a3e4b;
  line-height: 1.65;
  margin: 0 0 8px;
  flex: 1;
  /* 两行截断 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Read more 链接 */
.post-readmore {
  font-family: "PC98", "MS PGothic", "Unifont", monospace;
  font-size: 11px;
  color: #d46493;
  text-decoration: none;
  align-self: flex-start;
  padding: 2px 0;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.post-readmore:hover {
  color: #c44569;
  border-bottom-color: #c44569;
  text-decoration: none;
}


/* ========== Sidebar Blocks ========== */
.sidebar-block {
  border-radius: 10px;
  overflow: hidden;
}

.sidebar-heading {
  background: #f9bddd;
  border: 1px solid #000;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  padding: 3px 8px;
  color: #fff;
  text-shadow:
    0 0 1px color-mix(in srgb, #f9bddd 70%, #000),
    1px 1px 0 color-mix(in srgb, #f9bddd 70%, #000),
    -1px -1px 0 color-mix(in srgb, #f9bddd 70%, #000);
}

.sidebar-heading h4 {
  font-size: 13px;
  font-weight: 400;
  text-transform: uppercase;
  margin: 0;
  font-family: "MS PGothic", "Unifont", sans-serif;
}

.sidebar-inner {
  border: 1px solid #000;
  border-radius: 0 0 10px 10px;
  background: #fff;
  padding: 10px;
}


/* ---- 搜索框 ---- */
.search-box {
  display: flex;
  gap: 4px;
}

.search-input {
  flex: 1;
  border: 1.5px solid #d3a6b4;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 11px;
  font-family: "MS PGothic", "Unifont", sans-serif;
  outline: none;
  background: #fffbfd;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.search-input:focus {
  border-color: #c44569;
  animation: searchGlow 2s ease-in-out infinite;
}

/* 搜索框粉色呼吸灯 */
@keyframes searchGlow {
  0%, 100% { box-shadow: 0 0 4px rgba(196, 69, 105, 0.2); }
  50%      { box-shadow: 0 0 12px rgba(249, 189, 221, 0.6), 0 0 4px rgba(196, 69, 105, 0.3); }
}

/* 搜索关键词高亮 */
.search-highlight {
  background: linear-gradient(180deg, transparent 50%, rgba(249, 189, 221, 0.4) 50%);
  color: #c44569;
  font-weight: 700;
  padding: 0 1px;
  border-radius: 2px;
}

/* 搜索为空提示 */
.search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  text-align: center;
  animation: cardSlideIn 0.4s ease both;
}

.search-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  animation: emptyFloat 3s ease-in-out infinite;
}

@keyframes emptyFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25%      { transform: translateY(-6px) rotate(-3deg); }
  75%      { transform: translateY(-6px) rotate(3deg); }
}

.search-empty h3 {
  font-family: "PC98", "MS PGothic", "Unifont", monospace;
  font-size: 16px;
  color: #2a1a2e;
  margin: 0 0 8px;
}

.search-empty p {
  font-size: 12px;
  color: #bba3ad;
  line-height: 1.6;
  margin: 0 0 16px;
}

.search-clear-btn {
  font-family: "PC98", "MS PGothic", "Unifont", monospace;
  font-size: 11px;
  padding: 5px 16px;
  border: 1.5px solid #e0cfd6;
  border-radius: 8px;
  background: #fff;
  color: #5a3e4b;
  cursor: url(../assets/items/select.png), pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.search-clear-btn:hover {
  background: #f9bddd;
  color: #fff;
  border-color: #c44569;
}

/* 搜索结果统计 */
.search-result-count {
  font-size: 11px;
  color: #bba3ad;
  padding: 0 2px 8px;
  font-family: "MS PGothic", "Unifont", sans-serif;
}

.search-result-count strong {
  color: #c44569;
}

.search-input::placeholder {
  color: #cba8b5;
}

.search-btn {
  padding: 5px 10px;
  font-size: 11px;
  font-family: "PC98", "MS PGothic", "Unifont", monospace;
  border: 1.5px solid #d3a6b4;
  border-radius: 6px;
  background: #fef0f5;
  color: #c44569;
  cursor: url(../assets/items/select.png), pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.search-btn:hover {
  background: #f9bddd;
  color: #fff;
  box-shadow: 0 2px 6px rgba(196, 69, 105, 0.2);
}


/* ---- 标签云 ---- */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cloud-tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 9px;
  border: 1px solid #e0cfd6;
  border-radius: 12px;
  background: #fff;
  color: #5a3e4b;
  cursor: url(../assets/items/select.png), pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
  white-space: nowrap;
}

.cloud-tag:hover {
  background: #f9bddd;
  color: #fff;
  border-color: #c44569;
  transform: scale(1.08);
}


/* ---- 按月归档 ---- */
.archive-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.archive-list li {
  padding: 4px 0;
  border-bottom: 1px dashed #e8a0b4;
  font-size: 12px;
}

.archive-list li:last-child {
  border-bottom: none;
}

.archive-list a {
  color: #5a3e4b;
  text-decoration: none;
  transition: color 0.2s;
}

.archive-list a:hover {
  color: #c44569;
}

.archive-count {
  color: #bba3ad;
  font-size: 11px;
}


/* ========== 分页 ========== */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 18px 10px 28px;
  border-top: 1px dashed #e0cfd6;
  margin: 0 10px;
}

.page-btn {
  font-family: "PC98", "MS PGothic", "Unifont", monospace;
  font-size: 12px;
  padding: 6px 16px;
  border: 1.5px solid #000;
  border-radius: 8px;
  background: #fff;
  color: #2a1a2e;
  cursor: url(../assets/items/select.png), pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.12);
}

.page-btn:hover:not(:disabled) {
  background: #f9bddd;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.15);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-indicator {
  font-family: "PC98", "MS PGothic", "Unifont", monospace;
  font-size: 13px;
  color: #5a3e4b;
}

.page-current {
  color: #c44569;
  font-weight: bold;
}


/* ========== 响应式: 移动端适配 ========== */
@media (max-width: 1024px) {
  /* 侧边栏收至列表下方 */
  .blog-body {
    flex-direction: column;
  }

  .blog-sidebar {
    width: 100%;
    min-width: 0;
    flex-direction: row;
    flex-wrap: wrap;
    position: static;
  }

  .sidebar-block {
    flex: 1;
    min-width: 180px;
  }
}

@media (max-width: 768px) {
  /* 隐藏左栏，右栏全宽 */
  .left-col {
    display: none;
  }

  .col.right {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    border: none;
  }

  /* 卡片竖排 */
  .post-card {
    flex-direction: column;
  }

  .post-cover {
    width: 100%;
    min-width: 0;
    min-height: 120px;
    max-height: 180px;
    border-right: none;
    border-bottom: 1px solid #e0cfd6;
  }

  .post-info {
    padding: 12px 14px;
  }

  .post-title {
    white-space: normal;
  }

  /* Hero 缩小 */
  .blog-hero {
    padding: 24px 16px 20px;
  }

  .blog-hero-title {
    font-size: 24px;
  }

  /* 侧边栏纵向 */
  .blog-sidebar {
    flex-direction: column;
  }

  .sidebar-block {
    min-width: 0;
  }
}
