/* ============================================
 * 批次4：首页组件
 * 1. 问候语打字机
 * 2. 最近更新滚动条
 * 3. 首页标签云
 * 4. 分类标签卡片墙
 * 5. 文章卡片重设计（Heo 风格）
 * ============================================ */
/* ===== 1. 问候语打字机 ===== */
.hero-greeting {
  text-align: center;
  padding: 1rem 1.2rem 0.9rem;
  margin: 0 auto 1.2rem;
  max-width: 560px;
  background: rgba(255,255,255,0.8);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 1rem;
  font-family: "Noto Serif SC", "Songti SC", serif;
}
[data-theme="dark"] .hero-greeting {
  background: rgba(18,18,18,0.55);
  border-color: rgba(255,255,255,0.12);
}
.hero-greeting .greeting-time {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--theme-color);
  letter-spacing: 0.08em;
}
.hero-greeting .greeting-sub {
  display: inline-block;
  min-height: 1.8em;
  margin-top: 0.6rem;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  color: var(--font-color);
}
.greeting-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  vertical-align: -2px;
  background: var(--theme-color);
  animation: cursor-blink 0.8s step-end infinite;
}
/* ===== 2. 最近更新滚动条 ===== */
.recent-strip {
  margin: 0 auto 1.5rem;
  padding: 0 0.5rem;
}
.recent-strip .strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}
.recent-strip .strip-title {
  font-size: 0.9rem;
  font-weight: 700;
  font-family: "Noto Serif SC", serif;
  color: var(--font-color);
}
.recent-strip .strip-title::before {
  content: "◈ ";
  color: var(--theme-color);
}
.recent-strip .strip-more {
  font-size: 0.75rem;
  color: var(--theme-color);
  text-decoration: none !important;
  opacity: 0.8;
}
.recent-strip .strip-more:hover {
  opacity: 1;
}
.recent-scroll {
  display: flex;
  gap: 0.8rem;
  overflow-x: auto;
  padding: 0.3rem 0.1rem 0.6rem;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(73,177,245,0.3) transparent;
}
.recent-scroll::-webkit-scrollbar {
  height: 5px;
}
.recent-scroll::-webkit-scrollbar-thumb {
  background: rgba(73,177,245,0.25);
  border-radius: 3px;
}
.recent-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.recent-item {
  flex: none;
  width: 200px;
  border-radius: 0.7rem;
  border: 1px solid rgba(73,177,245,0.15);
  background: var(--paper);
  overflow: hidden;
  text-decoration: none !important;
  transition: all 0.25s ease;
}
.recent-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px -8px rgba(7,17,27,0.03);
  border-color: rgba(73,177,245,0.35);
}
[data-theme="dark"] .recent-item {
  background: var(--paper);
  border-color: rgba(107,192,247,0.15);
}
[data-theme="dark"] .recent-item:hover {
  border-color: rgba(107,192,247,0.35);
}
.recent-item .recent-thumb {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
  background: rgba(73,177,245,0.06);
}
.recent-item .recent-meta {
  padding: 0.5rem 0.6rem;
}
.recent-item .recent-name {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--font-color);
}
.recent-item .recent-date {
  font-size: 0.65rem;
  opacity: 0.55;
  margin-top: 0.25rem;
}
/* ===== 3. 首页标签云 ===== */
.home-tag-cloud {
  margin: 0 auto 1.5rem;
  padding: 1rem;
  border-radius: 0.8rem;
  border: 1px solid rgba(73,177,245,0.12);
  background: var(--paper);
}
[data-theme="dark"] .home-tag-cloud {
  background: var(--paper);
  border-color: rgba(107,192,247,0.12);
}
.home-tag-cloud .cloud-title {
  font-size: 0.9rem;
  font-weight: 700;
  font-family: "Noto Serif SC", serif;
  margin-bottom: 0.7rem;
}
.home-tag-cloud .cloud-title::before {
  content: "◈ ";
  color: var(--theme-color);
}
.home-tag-cloud .tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.home-tag-cloud .tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.8rem;
  font-size: 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(73,177,245,0.25);
  background: rgba(73,177,245,0.05);
  color: var(--font-color);
  text-decoration: none !important;
  transition: all 0.2s ease;
}
.home-tag-cloud .tag-pill:hover {
  background: rgba(73,177,245,0.12);
  border-color: var(--theme-color);
  color: var(--theme-color);
  transform: translateY(-2px);
}
[data-theme="dark"] .home-tag-cloud .tag-pill {
  border-color: rgba(107,192,247,0.25);
  background: rgba(107,192,247,0.05);
}
[data-theme="dark"] .home-tag-cloud .tag-pill:hover {
  background: rgba(107,192,247,0.12);
}
.tag-pill .tag-count {
  font-size: 0.65rem;
  opacity: 0.6;
}
/* ===== 4. 分类标签卡片墙 ===== */
.home-category-wall {
  margin: 0 auto 1.5rem;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.8rem;
}
.cat-card {
  position: relative;
  padding: 1.2rem 0.9rem;
  border-radius: 0.8rem;
  border: 1px solid rgba(73,177,245,0.15);
  background: var(--paper);
  text-decoration: none !important;
  overflow: hidden;
  transition: all 0.25s ease;
}
.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px -10px rgba(7,17,27,0.035);
  border-color: rgba(73,177,245,0.4);
}
[data-theme="dark"] .cat-card {
  background: var(--paper);
  border-color: rgba(107,192,247,0.15);
}
[data-theme="dark"] .cat-card:hover {
  border-color: rgba(107,192,247,0.4);
}
.cat-card::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(73,177,245,0.06);
}
[data-theme="dark"] .cat-card::after {
  background: rgba(107,192,247,0.07);
}
.cat-card .cat-name {
  font-size: 0.95rem;
  font-weight: 700;
  font-family: "Noto Serif SC", serif;
  color: var(--font-color);
  position: relative;
  z-index: 1;
}
.cat-card .cat-count {
  font-size: 0.7rem;
  opacity: 0.55;
  margin-top: 0.2rem;
  position: relative;
  z-index: 1;
}
/* ===== 5. 文章卡片（仿 onektas：无边框纯白 + 冷色轻阴影 + 8px 圆角）===== */
#recent-posts .recent-post-item {
  border-radius: 8px !important;
  border: none !important;
  background: #fff !important;
  box-shadow: 0 3px 8px 6px rgba(7,17,27,0.05) !important;
  transition: box-shadow 0.3s ease, transform 0.3s ease !important;
  overflow: hidden;
  margin-bottom: 1.2rem !important;
}
#recent-posts .recent-post-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px 8px rgba(7,17,27,0.09) !important;
}
[data-theme="dark"] #recent-posts .recent-post-item {
  background: #121212 !important;
  box-shadow: 0 3px 8px 6px rgba(0,0,0,0.3) !important;
}
[data-theme="dark"] #recent-posts .recent-post-item:hover {
  box-shadow: 0 6px 16px 8px rgba(0,0,0,0.45) !important;
}
/* 封面圆角 */
#recent-posts .post_cover {
  border-radius: 1rem 1rem 0 0 !important;
  overflow: hidden;
}
#recent-posts .post_cover img {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
#recent-posts .recent-post-item:hover .post_cover img {
  transform: scale(1.05);
}
/* 卡片内标题 */
#recent-posts .recent-post-info .article-title {
  font-family: "Noto Serif SC", "Songti SC", serif !important;
  font-weight: 700 !important;
  transition: color 0.25s;
}
#recent-posts .recent-post-item:hover .article-title {
  color: var(--theme-color) !important;
}
/* 悬浮发光描边（Heo 标志效果）*/
#recent-posts .recent-post-item::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  padding: 1px;
  background: linear-gradient(135deg, rgba(73,177,245,0.35), transparent 40%, transparent 60%, rgba(73,177,245,0.35));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
#recent-posts .recent-post-item:hover::before {
  opacity: 1;
}
[data-theme="dark"] #recent-posts .recent-post-item::before {
  background: linear-gradient(135deg, rgba(107,192,247,0.4), transparent 40%, transparent 60%, rgba(107,192,247,0.4));
}
/* 首页打字机只在首页显示，首页容器统一宽度 */
@media (max-width: 768px) {
  .recent-strip,
  .home-tag-cloud,
  .home-category-wall {
    padding: 0 0.8rem;
  }
  .recent-item {
    width: 160px;
  }
}
@-moz-keyframes cursor-blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}
@-webkit-keyframes cursor-blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}
@-o-keyframes cursor-blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}
@keyframes cursor-blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}
