/* 首页特定样式 */
.main-content {
	padding-top: 20px;
}

/* 轮播图样式 */
.carousel-container {
	margin-bottom: 20px;
	border-radius: 8px;
	overflow: hidden;
	position: relative;
}

.carousel {
	position: relative;
	height: 300px;
}

.carousel-item {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	transition: opacity 0.5s;
}

.carousel-item.active {
	opacity: 1;
}

.carousel-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.carousel-caption {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	padding: 30px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
	color: #fff;
}

.carousel-caption h2 {
	font-size: 28px;
	margin-bottom: 10px;
}

.carousel-caption p {
	font-size: 16px;
	opacity: 0.9;
}

.carousel-indicators {
	position: absolute;
	bottom: 20px;
	right: 20px;
	display: flex;
	gap: 10px;
}

.carousel-indicators span {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.5);
	cursor: pointer;
}

.carousel-indicators span.active {
	background-color: #fff;
}

/* 内容区域布局 */
.content-wrapper {
	display: flex;
	gap: 20px;
}

.content-left {
	flex: 3;
}

.content-right {
	flex: 1;
}


/* 内容分类标签 */
.content-tabs {
	background-color: #fff;
	border-radius: 8px;
	padding: 16px;
	margin-bottom: 20px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.tab-nav {
	display: flex;
	gap: 16px;
	margin-bottom: 16px;
}

.tab-item {
	padding: 8px 16px;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 500;
	color: #666;
}

.tab-item.active {
	background-color: #e6f7ff;
	color: #1890ff;
}

.filter-options {
	display: flex;
	gap: 12px;
	align-items: center;
}

.category-filter,
.sort-filter {
	padding: 6px 12px;
	border: 1px solid #d9d9d9;
	border-radius: 4px;
	font-size: 14px;
	background-color: #fff;
	cursor: pointer;
}

/* 帖子列表样式 */
.posts-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.post-item {
	padding: 20px;
}

.post-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}

.post-header .user-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
}

.user-info h4 {
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 4px;
}

.post-time {
	font-size: 12px;
	color: #999;
}

.post-category {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 8px;
}

.category-tag {
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 500;
}

.category-tag.tech {
	background-color: #e6f7ff;
	color: #1890ff;
}

.category-tag.music {
	background-color: #fff1f0;
	color: #ff4d4f;
}

.category-name {
	font-size: 12px;
	color: #666;
}

.post-title {
	font-size: 18px;
	font-weight: 600;
	margin-bottom: 12px;
	line-height: 1.5;
}

.post-title a {
	color: #333;
}

.post-title a:hover {
	color: #1890ff;
}

.post-summary {
	font-size: 14px;
	color: #666;
	line-height: 1.8;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.post-summary-container {
	display: flex;
	gap: 12px;
}

.post-cover {}

.post-cover img {
	border-radius: 6px;
	width: 120px;
	height: auto;
	transition: transform 0.3s;
}

.post-item:hover .post-cover img {
	transform: scale(1.02);
}

.post-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 16px;
	border-top: 1px solid #f0f0f0;
}

.post-stats {
	display: flex;
	gap: 20px;
}

.stat-item {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 14px;
	color: #999;
}

.post-actions {
	display: flex;
	gap: 12px;
}

.action-btn {
	padding: 6px 12px;
	border: 1px solid #d9d9d9;
	border-radius: 4px;
	font-size: 14px;
	background-color: #fff;
	cursor: pointer;
	transition: all 0.3s;
	display: flex;
    align-items: center;
    gap: 5px;
}

.like-btn.liked {
	color: #ff4d4f;
	border-color: #ff4d4f;
}

.action-btn:hover {
	color: #1890ff;
	border-color: #1890ff;
}

.load-more {
	text-align: center;
	margin-top: 20px;
}

/* 右侧边栏样式 */
.user-card {
	padding: 20px;
	text-align: center;
	margin-bottom: 20px;
}

.user-card-avatar {
	margin-bottom: 16px;
}

.user-card-avatar img {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	object-fit: cover;
}

.user-card-info h3 {
	font-size: 16px;
	font-weight: 600;
	margin-bottom: 8px;
}

.user-card-info p {
	font-size: 14px;
	color: #666;
	margin-bottom: 16px;
	line-height: 1.5;
}

.user-card-actions {
	display: flex;
	gap: 12px;
	justify-content: center;
}

.btn-sm {
	padding: 6px 11px;
	font-size: 12px;
}

.hot-topics,
.hot-tags,
.recommended-follows {
	margin-bottom: 20px;
}

.card-header {
	padding: 16px 20px;
	border-bottom: 1px solid #f0f0f0;
}

.card-header h3 {
	font-size: 16px;
	font-weight: 600;
}

.card-body {
	padding: 16px 20px;
}

.topics-list {
	list-style: none;
}

.topic-item {
	display: flex;
	align-items: center;
	padding: 12px 0;
	border-bottom: 1px solid #f0f0f0;
}

.topic-item:last-child {
	border-bottom: none;
}

.topic-rank {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	margin-right: 12px;
	font-size: 12px;
	font-weight: 600;
	background-color: #f5f5f5;
	border-radius: 4px;
	color: #666;
}

.topic-item:nth-child(1) .topic-rank {
	background-color: #ff4d4f;
	color: #fff;
}

.topic-item:nth-child(2) .topic-rank {
	background-color: #ff7a45;
	color: #fff;
}

.topic-item:nth-child(3) .topic-rank {
	background-color: #ffa940;
	color: #fff;
}

.topic-name {
	flex: 1;
	font-size: 14px;
	color: #333;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.topic-count {
	font-size: 12px;
	color: #999;
	margin-left: 8px;
}

.follows-list {
	list-style: none;
}

.follow-item {
	display: flex;
	align-items: center;
	padding: 12px 0;
	border-bottom: 1px solid #f0f0f0;
}

.follow-item:last-child {
	border-bottom: none;
}

.follow-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	margin-right: 12px;
}

.follow-info {
	flex: 1;
	overflow: hidden;
}

.follow-name {
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 4px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.follow-bio {
	font-size: 12px;
	color: #999;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.follow-btn {
	margin-left: auto;
}

/* 分页样式 */
.pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-top: 30px;
	gap: 8px;
	padding: 20px;
	background-color: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.pagination .page-item {
	padding: 8px 16px;
	border: 1px solid #d9d9d9;
	border-radius: 6px;
	background-color: #fff;
	color: #666;
	font-size: 14px;
	text-decoration: none;
	transition: all 0.3s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 36px;
}

.pagination .page-item:hover {
	border-color: #1890ff;
	color: #1890ff;
	box-shadow: 0 2px 4px rgba(24, 144, 255, 0.15);
}

.pagination .page-item.active {
	background-color: #1890ff;
	border-color: #1890ff;
	color: #fff;
	font-weight: 500;
}

.pagination .page-item.disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.pagination .page-item.disabled:hover {
	border-color: #d9d9d9;
	color: #666;
	box-shadow: none;
}

/* 分页省略号样式 */
.pagination .ellipsis {
	padding: 0 8px;
	color: #999;
	font-size: 16px;
}

/* 首页/尾页按钮样式增强 */
.pagination .page-item.first,
.pagination .page-item.last {
	font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
	.pagination {
		flex-wrap: wrap;
		gap: 4px;
		padding: 15px;
	}

	.pagination .page-item {
		padding: 6px 12px;
		min-width: 32px;
		height: 32px;
		font-size: 13px;
	}

	/* 在小屏幕上优化页码显示，只保留关键页码 */
	.pagination .page-item:not(.first):not(.prev):not(.next):not(.last) {
		display: none;
	}

	/* 保留当前页码和前后各一个页码 */
	.pagination .page-item.active,
	.pagination .page-item.active+.page-item,
	.pagination .page-item.active+.page-item+.page-item,
	.page-item.active~.page-item.prev,
	.page-item.active~.page-item.prev+.page-item {
		display: inline-flex;
	}
}

@media (max-width: 480px) {
	.pagination {
		gap: 3px;
	}

	.pagination .page-item {
		padding: 4px 10px;
		min-width: 28px;
		height: 28px;
		font-size: 12px;
	}
}

/* 添加数字页码点击反馈效果 */
.pagination .page-item:not(.active):not(.disabled) {
	position: relative;
	overflow: hidden;
}

.pagination .page-item:not(.active):not(.disabled)::after {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(24, 144, 255, 0.1), transparent);
	transition: left 0.5s;
}

.pagination .page-item:not(.active):not(.disabled):hover::after {
	left: 100%;
}

/* 响应式设计 */
@media (max-width: 1024px) {
	.content-right {
		display: none;
	}
}

@media (max-width: 768px) {
	.carousel {
		height: 250px;
	}

	.carousel-caption h2 {
		font-size: 20px;
	}

	.carousel-caption p {
		font-size: 14px;
	}

	.post-title {
		font-size: 16px;
	}

	.post-summary {
		-webkit-line-clamp: 3;
	}

	.post-header {
		flex-wrap: wrap;
	}

	.post-category {
		margin-left: 0;
		margin-top: 8px;
	}

	.post-footer {
		flex-direction: column;
		gap: 12px;
		align-items: stretch;
	}

	.post-stats {
		justify-content: center;
	}

	.post-actions {
		justify-content: center;
	}
}