/**
 * 文章详情页样式
 */

body.apple-id-single {
	background: #f0f0f0;
}

.single-wrap {
	padding-top: 16px;
}

.single-breadcrumb {
	background: transparent;
	border: none;
	padding: 0 0 12px;
	margin-bottom: 0;
}

.breadcrumb-current {
	color: #999;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 280px;
	display: inline-block;
	vertical-align: bottom;
}

.single-layout {
	margin-top: 0;
}

.single-main {
	background: #fff;
	border: 1px solid #e8e8e8;
	padding: 24px 28px 32px;
}

/* Article header */
.single-header {
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 1px solid #f0f0f0;
}

.single-title {
	font-size: 26px;
	font-weight: 700;
	color: #222;
	line-height: 1.4;
	margin-bottom: 12px;
}

.single-meta {
	font-size: 13px;
	color: #999;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 0;
}

.single-meta a {
	color: #666;
	text-decoration: none;
}

.single-meta a:hover {
	color: #0066cc;
	text-decoration: none;
}

.meta-sep {
	margin: 0 8px;
	color: #ddd;
}

/* Article content */
.single-content {
	font-size: 15px;
	line-height: 1.85;
	color: #444;
	word-wrap: break-word;
}

.single-content p {
	margin-bottom: 1.2em;
}

.single-content img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 1.5em auto;
	border-radius: 2px;
}

.single-content figure {
	margin: 1.5em 0;
}

.single-content figure img {
	margin: 0 auto;
}

.single-content h2,
.single-content h3,
.single-content h4 {
	font-weight: 700;
	color: #222;
	margin: 1.6em 0 0.8em;
	line-height: 1.4;
}

.single-content h2 {
	font-size: 20px;
	padding-left: 12px;
	border-left: 4px solid #0066cc;
}

.single-content h3 {
	font-size: 18px;
	padding-left: 10px;
	border-left: 3px solid #0066cc;
}

.single-content h4 {
	font-size: 16px;
}

.single-content ul,
.single-content ol {
	margin: 0 0 1.2em 1.5em;
}

.single-content li {
	margin-bottom: 0.4em;
}

.single-content blockquote {
	margin: 1.2em 0;
	padding: 12px 16px;
	background: #f9f9f9;
	border-left: 4px solid #0066cc;
	color: #666;
}

.single-content a {
	color: #0066cc;
}

.single-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.2em 0;
	font-size: 14px;
}

.single-content th,
.single-content td {
	border: 1px solid #e8e8e8;
	padding: 8px 12px;
}

.single-content th {
	background: #f5f5f5;
}

/* Source box */
.single-source-box {
	margin-top: 32px;
	padding: 16px;
	background: #fafafa;
	border: 1px solid #e8e8e8;
	font-size: 13px;
	color: #666;
	line-height: 1.8;
}

.single-source-box p {
	margin: 0 0 6px;
}

.single-source-box p:last-child {
	margin-bottom: 0;
}

.single-source-box a {
	color: #0066cc;
	word-break: break-all;
}

/* Prev / Next navigation */
.single-post-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin: 8px 0 32px;
}

.post-nav-item {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 120px;
	padding: 16px;
	background: #333 center/cover no-repeat;
	border-radius: 2px;
	overflow: hidden;
	text-decoration: none;
	color: #fff;
}

.post-nav-item::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.post-nav-item:not([href]) {
	background: #eee;
	min-height: 0;
	padding: 0;
}

.post-nav-empty {
	display: block;
	min-height: 0;
}

.post-nav-label,
.post-nav-title {
	position: relative;
	z-index: 1;
}

.post-nav-label {
	font-size: 12px;
	opacity: 0.85;
	margin-bottom: 6px;
}

.post-nav-title {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.post-nav-item:hover {
	text-decoration: none;
	color: #fff;
	opacity: 0.92;
}

/* Related posts */
.section-heading-bar {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 18px;
	font-weight: 700;
	color: #222;
	margin-bottom: 16px;
}

.heading-bar-icon {
	display: inline-block;
	width: 4px;
	height: 18px;
	background: #0066cc;
	border-radius: 1px;
}

.related-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

.related-card {
	position: relative;
	display: block;
	height: 160px;
	background: #444 center/cover no-repeat;
	border-radius: 2px;
	overflow: hidden;
	text-decoration: none;
	color: #fff;
}

.related-card:not([style*="background-image"]) {
	background-color: #666;
}

.related-cat-badge {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 2;
	padding: 2px 8px;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	font-size: 11px;
	border-radius: 2px;
}

.related-card-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 12px;
	background: linear-gradient(transparent 30%, rgba(0, 0, 0, 0.75));
}

.related-card-title {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	margin-bottom: 4px;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.related-card-overlay time {
	font-size: 12px;
	opacity: 0.85;
}

.related-card:hover {
	text-decoration: none;
	color: #fff;
	opacity: 0.95;
}

/* Sidebar tags */
.sidebar-tag-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.sidebar-tag-item {
	display: inline-block;
	padding: 4px 10px;
	background: #f5f5f5;
	border: 1px solid #e8e8e8;
	border-radius: 2px;
	font-size: 12px;
	color: #666;
	text-decoration: none;
}

.sidebar-tag-item:hover {
	background: #e8f4ff;
	border-color: #0066cc;
	color: #0066cc;
	text-decoration: none;
}

/* Responsive */
@media (max-width: 960px) {
	.related-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.single-main {
		padding: 16px;
	}

	.single-title {
		font-size: 20px;
	}

	.single-meta {
		font-size: 12px;
	}

	.breadcrumb-current {
		max-width: 140px;
	}

	.single-post-nav {
		grid-template-columns: 1fr;
	}

	.related-grid {
		grid-template-columns: 1fr;
	}

	.related-card {
		height: 140px;
	}
}
