/* 友链页面样式表 */
:root {
  --main-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  --title-font: var(--main-font);
  /* 卡片背景色变量 */
  --card-bg-light: rgba(0, 0, 0, 0.02);
  --card-bg-dark: rgba(255, 255, 255, 0.02);
  --card-hover-light: rgba(0, 0, 0, 0.04);
  --card-hover-dark: rgba(255, 255, 255, 0.04);
}

/* 统一字体设置 */
.friends-container,
.friends-container * {
  font-family: var(--main-font);
  box-sizing: border-box;
}

/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 友链列表网格布局 */
.friends-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
}

/* 友链卡片样式 - 恢复到之前的大小 */
.friend-card {
  list-style: none;
}

.friend-link {
  display: flex;
  align-items: center;
  background: var(--card-bg-light);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  padding: 12px; /* 恢复较小的内边距 */
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* 深色模式下的卡片调整 */
.dark .friend-link {
  background: var(--card-bg-dark);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.friend-link:hover {
  background: var(--card-hover-light);
  border-color: rgba(0, 0, 0, 0.2);
  transform: translateY(-1px); /* 恢复较小的悬浮效果 */
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.07);
}

.dark .friend-link:hover {
  background: var(--card-hover-dark);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* 左侧图标样式 - 恢复到之前的大小 */
.friend-avatar {
  width: 44px; /* 恢复原尺寸 */
  height: 44px;
  border-radius: 4px; /* 恢复方形带圆角 */
  object-fit: cover;
  margin-right: 12px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
}

.dark .friend-avatar {
  border-color: rgba(255, 255, 255, 0.05);
}

.friend-link:hover .friend-avatar {
  transform: scale(1.05);
}

/* 右侧内容样式 */
.friend-content {
  flex: 1;
  min-width: 0;
}

/* 标题样式 */
.friend-name {
  font-size: 17px; /* 恢复较小的字体 */
  font-weight: 600;
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--main);
  transition: color 0.3s;
}

.friend-name:hover {
  color: var(--theme-hover);
}

/* 描述样式 */
.friend-desc {
  font-size: 12px;
  line-height: 1.4;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--routine);
}

/* 分类标题样式 - 缩小字体 */
.friends-category {
  margin: 24px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.dark .friends-category {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.friends-category h3 {
  font-size: 18px; /* 缩小分类标题字体 */
  font-weight: 700;
  margin: 0;
  display: inline-block;
  color: var(--theme);
  line-height: 1.5;
  font-family: var(--title-font);
}

.friends-category .count {
  font-size: 14px;
  margin-left: 8px;
  font-weight: normal;
  color: var(--routine);
}

/* 暂无友链样式 */
.no-friends {
  padding: 30px 0;
  text-align: center;
  border: 1px dashed rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  margin-top: 12px;
  color: var(--routine);
  font-size: 16px;
  line-height: 1.5;
  background: var(--card-bg-light);
}

.dark .no-friends {
  background: var(--card-bg-dark);
  border-color: rgba(255, 255, 255, 0.1);
}

.no-friends:before {
  content: "😢";
  font-size: 24px;
  display: block;
  margin-bottom: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .friends-category h3 {
    font-size: 17px;
  }
  
  .friend-name {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .friend-name {
    font-size: 13px;
  }
  
  .friend-desc {
    font-size: 11px;
  }
}
    