﻿/* =========================================================
   友情链接页（friends/index.html）
   风格参考：blog.heheda.top/friends
   ========================================================= */

/* 页面容器 */
.friends-wrap {
	max-width: 960px;
	margin: 90px auto 40px;
	padding: 0 20px;
}

.friends-header {
	text-align: center;
	margin-bottom: 32px;
}
.friends-header h1 {
	font-weight: 700;
	font-size: 28px;
	margin: 0 0 8px;
}
.friends-header p {
	color: rgba(0, 0, 0, .54);
	font-size: 14px;
	margin: 0;
}

/* 分组标题 */
.friends-group-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 28px 0 14px;
	font-weight: 600;
	font-size: 16px;
	color: #333;
}
.friends-group-title .mdui-icon {
	font-size: 20px;
	color: #3f51b5;
}
.friends-group-title::after {
	content: "";
	flex: 1;
	height: 1px;
	background: linear-gradient(to right, #e0e0e0, transparent);
}

/* 卡片网格 */
.friends-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 16px;
}

/* 友链卡片 */
.friend-card {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 16px;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
	text-decoration: none;
	color: inherit;
	transition: transform .2s, box-shadow .2s;
	border: 1px solid transparent;
}
.friend-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 4px 14px rgba(63, 81, 181, .15);
	border-color: rgba(63, 81, 181, .25);
}

/* 头像 */
.friend-avatar {
	flex-shrink: 0;
	width: 52px;
	height: 52px;
	border-radius: 12px;
	background: linear-gradient(135deg, #3f51b5, #448aff);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	font-weight: 700;
	overflow: hidden;
}
.friend-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* 内容区 */
.friend-info {
	flex: 1;
	min-width: 0;
}
.friend-name {
	font-size: 15px;
	font-weight: 600;
	color: #333;
	margin-bottom: 4px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.friend-desc {
	font-size: 12.5px;
	color: #888;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* 卡片底部：前往 + RSS */
.friend-card .friend-actions {
	display: flex;
	gap: 6px;
	margin-top: 10px;
}
.friend-card .friend-actions a {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 3px 10px;
	font-size: 11.5px;
	border-radius: 4px;
	text-decoration: none;
	transition: background .15s;
}
.friend-go {
	background: rgba(63, 81, 181, .1);
	color: #3f51b5 !important;
}
.friend-go:hover {
	background: rgba(63, 81, 181, .18);
}
.friend-rss {
	background: rgba(255, 152, 0, .1);
	color: #ff9800 !important;
}
.friend-rss:hover {
	background: rgba(255, 152, 0, .2);
}
.friend-card .friend-actions .mdui-icon {
	font-size: 14px;
}

/* 空态 */
.friends-empty {
	text-align: center;
	padding: 60px 20px;
	color: rgba(0, 0, 0, .54);
}

/* ---- 暗色模式 ---- */
[data-theme="dark"] .friends-header h1 { color: #eee; }
[data-theme="dark"] .friends-header p { color: rgba(255, 255, 255, .5); }
[data-theme="dark"] .friends-group-title { color: #ddd; }
[data-theme="dark"] .friends-group-title::after { background: linear-gradient(to right, #333, transparent); }

[data-theme="dark"] .friend-card {
	background: #222;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}
[data-theme="dark"] .friend-card:hover {
	border-color: rgba(121, 134, 203, .4);
	box-shadow: 0 4px 14px rgba(121, 134, 203, .15);
}
[data-theme="dark"] .friend-name { color: #eee; }
[data-theme="dark"] .friend-desc { color: #888; }
[data-theme="dark"] .friend-go { background: rgba(121, 134, 203, .15); color: #7986cb !important; }
[data-theme="dark"] .friend-go:hover { background: rgba(121, 134, 203, .25); }

/* ---- 响应式 ---- */
@media (max-width: 640px) {
	.friends-grid { grid-template-columns: 1fr; }
	.friends-wrap { margin-top: 80px; }
}
