/* ===== 友情链接页样式 ===== */
:root {
  --bg: #ffffff;
  --muted: #6b7280;
  --card-bg: #fbfdff;
  --accent: #2563eb;
  --accent-2: #7dd3fc;
  --shadow: 0 6px 24px rgba(16,24,40,0.06);
  --radius: 12px;
  --gap: 18px;
}

.friends-wrap {
  max-width: 1100px;
  margin: 18px auto 60px;
  padding: 8px 18px;
}

.friends-header {
  text-align: center;
  margin-bottom: 18px;
}
.friends-header h1 {
  margin: 0;
  font-size: 1.7rem;
  letter-spacing: -0.5px;
}
.friends-header p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.friends-divider {
  height: 1px;
  width: 86%;
  max-width: 840px;
  margin: 18px auto 6px;
  background: linear-gradient(90deg, rgba(0,0,0,0.04), rgba(0,0,0,0.01));
}

.friends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--gap);
  align-items: stretch;
}

/* 卡片 */
.friend {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(180deg, var(--card-bg) 0%, #f7fbff 100%);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  transition: transform .22s cubic-bezier(.2,.9,.3,1), box-shadow .22s;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(16,24,40,0.04);
  overflow: hidden;
  min-height: 120px;
}
.friend:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 10px 30px rgba(16,24,40,0.12);
}

.friend-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.friend-icon {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: 0 4px 12px rgba(37,99,235,0.12);
}

.friend-title {
  font-weight: 700;
  font-size: 1.02rem;
}
.friend-sub {
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 4px;
}

.friend-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  gap: 10px;
}
.friend-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tag {
  font-size: 0.78rem;
  color: var(--accent);
  background: rgba(37,99,235,0.08);
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(37,99,235,0.06);
}

.friend-bottom {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.friend-visit {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(37,99,235,1), rgba(34,197,94,0.95));
  color: white;
  box-shadow: 0 6px 18px rgba(37,99,235,0.12);
  transition: transform .14s ease, opacity .14s;
}
.friend-visit:hover {
  transform: translateY(-2px);
  opacity: .98;
}

/* 移动端适配 */
@media (max-width: 520px) {
  .friend-icon { width: 48px; height: 48px; min-width: 48px; font-size: 1.3rem; }
  .friend { padding: 12px; }
  .friends-wrap { padding: 6px 12px; }
}
