/* ===== 朋友圈页 /circle/ 专用样式 ===== */

.circle-loading,
.circle-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-color, #999);
}

/* 统计卡片 */
.circle-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.circle-stat-card {
  text-align: center;
  padding: 1.2rem 0.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.circle-stat-num {
  font-size: 1.6rem;
  font-weight: 700;
  color: #b854d4;
}
.circle-stat-label {
  font-size: 0.8rem;
  color: var(--text-color, #999);
  margin-top: 0.25rem;
}

/* 友链筛选 */
.circle-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}
.circle-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.25s ease;
}
.circle-chip:hover {
  border-color: #b854d4;
  color: #b854d4;
}
.circle-chip.active {
  background: #b854d4;
  border-color: #b854d4;
  color: #fff;
}
.circle-chip-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

/* 头像包裹容器：img 加载失败或地址为空时，显示首字母彩色占位，避免破图 */
.circle-avatar-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: #eee;
}
.circle-avatar-wrap.av-article {
  width: 36px;
  height: 36px;
  font-size: 0.95rem;
}
.circle-avatar-wrap.av-chip {
  width: 20px;
  height: 20px;
  font-size: 0.7rem;
}
.circle-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.circle-avatar-wrap.is-fallback::before {
  content: attr(data-letter);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, #b854d4, #6a5acd);
}
.circle-chip-count {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* 月份分组 */
.circle-month {
  margin-bottom: 2rem;
}
.circle-month-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 1rem;
  padding-left: 0.75rem;
  border-left: 3px solid #b854d4;
}

/* 单条文章 */
.circle-article {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem 1rem;
  margin-bottom: 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.circle-article:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
  text-decoration: none;
}
.circle-day {
  flex-shrink: 0;
  width: 38px;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: #b854d4;
}
.circle-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.circle-article-main {
  flex: 1;
  min-width: 0;
}
.circle-article-title {
  font-size: 0.95rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.circle-article-author {
  font-size: 0.78rem;
  color: var(--text-color, #999);
  margin-top: 0.2rem;
}

.circle-footnote {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-color, #aaa);
  margin-top: 2rem;
}

/* 移动端：统计卡片改 1 列 */
@media (max-width: 600px) {
  .circle-stats {
    grid-template-columns: 1fr;
  }
  .circle-article-title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}

/* ===== 暗色模式适配 ===== */
html[data-user-color-scheme="dark"] .circle-stat-card,
html[data-user-color-scheme="dark"] .circle-article {
  background: rgba(35, 35, 45, 0.55);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
html[data-user-color-scheme="dark"] .circle-chip {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(35, 35, 45, 0.5);
  color: #ddd;
}
html[data-user-color-scheme="dark"] .circle-chip:hover {
  border-color: #b854d4;
  color: #b854d4;
}
