/* AI related layer: related-post cards and back-to-blog controls. */
/* ========== 相关文章 + 返回博客 ========== */
.ai-related {
  width: 720px;
  max-width: calc(100% - 2em);
  margin: 2.5rem auto 1.5rem;
}
.ai-related-title {
  font-size: 0.9em;
  color: rgba(172, 228, 252, 0.88);
  margin-bottom: 1rem;
  font-weight: 500;
}
.ai-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 780px) {
  .ai-related-grid {
    grid-template-columns: 1fr;
  }
}
.ai-related-card {
  display: block;
  background: rgba(12, 10, 20, 0.7);
  border: 1px solid rgba(126, 192, 224, 0.24);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}
.ai-related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 24px rgba(124, 206, 246, 0.2);
  border-color: rgba(172, 228, 255, 0.34);
}
.ai-related-img {
  aspect-ratio: 16/9;
  overflow: hidden;
}
.ai-related-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ai-related-placeholder {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, rgba(22, 8, 16, 0.9), rgba(14, 24, 42, 0.8));
  border-bottom: 1px solid rgba(126, 192, 224, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ai-related-placeholder span {
  font-size: 2em;
  color: rgba(168, 222, 246, 0.62);
  font-weight: 600;
}
.ai-related-card-title {
  padding: 0.75rem 1rem 0.25rem;
  font-size: 0.95em;
  margin: 0;
  color: rgba(220, 245, 255, 0.95);
}
.ai-related-card-date {
  padding: 0 1rem 0.75rem;
  font-size: 0.75em;
  color: rgba(176, 216, 238, 0.66);
  margin: 0;
}
.ai-back-to-blog {
  width: 720px;
  max-width: calc(100% - 2em);
  margin: 0 auto 2.5rem;
}
.ai-back-to-blog a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: ui-monospace, monospace;
  font-size: 0.9em;
  color: rgba(188, 226, 248, 0.84);
  text-decoration: none;
  padding: 0.5rem 0;
  transition:
    color 0.2s ease,
    text-shadow 0.2s ease;
}
.ai-back-to-blog a:hover {
  color: rgba(188, 236, 255, 0.98);
  text-shadow: 0 0 12px rgba(124, 206, 246, 0.3);
}
.ai-back-prompt {
  color: rgba(154, 218, 246, 0.78);
}

/* 回到顶部按钮：芯片电路图风格 */
