/* 梗多多主题 */
:root {
	--gdd-blue: #1890ff;
	--gdd-blue-hover: #40a9ff;
	--gdd-text: #333;
	--gdd-text-muted: #999;
	--gdd-border: #eee;
	--gdd-bg: #fff;
	--gdd-container: 1200px;
	--gdd-radius: 8px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
	font-size: 14px;
	line-height: 1.6;
	color: var(--gdd-text);
	background: var(--gdd-bg);
}

a {
	color: inherit;
	text-decoration: none;
}

a:hover {
	color: var(--gdd-blue);
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

.gdd-container {
	max-width: var(--gdd-container);
	margin: 0 auto;
	padding: 0 16px;
}

/* Header */
.gdd-header {
	background: #fff;
	border-bottom: 1px solid var(--gdd-border);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	position: sticky;
	top: 0;
	z-index: 100;
}

.gdd-header-inner {
	display: flex;
	align-items: center;
	min-height: 64px;
	gap: 20px;
}

.gdd-logo a {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 22px;
	font-weight: 700;
	color: #000;
}

.gdd-logo a:hover {
	color: #000;
}

.gdd-logo-mark {
	width: 36px;
	height: 36px;
	border-radius: 6px;
	background: linear-gradient(135deg, #1890ff 0%, #1890ff 50%, #fa8c16 50%, #fa8c16 100%);
	flex-shrink: 0;
}

.gdd-logo img {
	max-height: 44px;
	width: auto;
}

.gdd-nav {
	flex: 1;
	display: flex;
	justify-content: center;
	overflow-x: auto;
}

.gdd-nav-list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 4px 22px;
}

.gdd-nav-list li {
	margin: 0;
}

.gdd-nav-list a {
	display: block;
	padding: 20px 2px;
	color: #333;
	font-size: 15px;
	white-space: nowrap;
}

.gdd-nav-list .current-menu-item a,
.gdd-nav-list .is-active a,
.gdd-nav-list a:hover {
	color: var(--gdd-blue);
}

.gdd-header-actions {
	flex-shrink: 0;
}

.gdd-search-toggle {
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
	color: #666;
	display: flex;
	align-items: center;
}

.gdd-search-toggle:hover {
	color: var(--gdd-blue);
}

.gdd-search-panel {
	background: #fff;
	border-bottom: 1px solid var(--gdd-border);
	padding: 12px 0;
}

.gdd-search-panel[hidden] {
	display: none;
}

.gdd-search-form {
	display: flex;
	gap: 8px;
	max-width: 480px;
}

.gdd-search-input {
	flex: 1;
	padding: 8px 12px;
	border: 1px solid var(--gdd-border);
	border-radius: 4px;
	font-size: 14px;
}

.gdd-search-submit {
	padding: 8px 20px;
	background: var(--gdd-blue);
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
}

.gdd-search-submit:hover {
	background: var(--gdd-blue-hover);
}

/* Layout */
.gdd-main {
	padding: 24px 0 48px;
}

.gdd-layout {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 28px;
	align-items: start;
}

.gdd-content {
	min-width: 0;
}

.gdd-empty {
	color: var(--gdd-text-muted);
	margin: 16px 0;
}

/* Hero featured */
.gdd-hero {
	display: grid;
	grid-template-columns: 2fr 1fr;
	grid-template-rows: repeat(2, 1fr);
	gap: 10px;
	min-height: 340px;
	margin-bottom: 28px;
}

.gdd-hero-main {
	grid-column: 1;
	grid-row: 1 / 3;
}

.gdd-hero-item:nth-child(2) {
	grid-column: 2;
	grid-row: 1;
}

.gdd-hero-item:nth-child(3) {
	grid-column: 2;
	grid-row: 2;
}

.gdd-hero-item {
	position: relative;
	border-radius: var(--gdd-radius);
	overflow: hidden;
	min-height: 0;
}

.gdd-hero-link {
	display: block;
	height: 100%;
	position: relative;
	color: #fff;
}

.gdd-hero-link:hover {
	color: #fff;
}

.gdd-hero-media {
	position: absolute;
	inset: 0;
	background: #e8e8e8;
}

.gdd-hero-img,
.gdd-hero-media .gdd-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gdd-hero-media .gdd-thumb-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 48px;
	color: var(--gdd-blue);
	background: #f0f0f0;
}

.gdd-hero-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 40px 16px 14px;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
}

.gdd-hero-title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.4;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.gdd-hero-main .gdd-hero-title {
	font-size: 20px;
}

/* Latest list */
.gdd-list-item {
	display: flex;
	gap: 20px;
	padding: 24px 0;
	border-bottom: 1px solid var(--gdd-border);
}

.gdd-list-item:first-child {
	padding-top: 0;
}

.gdd-list-item:last-child {
	border-bottom: none;
}

.gdd-list-thumb-wrap {
	position: relative;
	flex-shrink: 0;
	width: 220px;
	border-radius: var(--gdd-radius);
	overflow: hidden;
	background: #f5f5f5;
}

.gdd-list-thumb,
.gdd-list-thumb-wrap .gdd-thumb {
	width: 220px;
	height: 140px;
	object-fit: cover;
}

.gdd-list-thumb-wrap .gdd-thumb-placeholder {
	width: 220px;
	height: 140px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 40px;
	color: var(--gdd-blue);
}

.gdd-cat-badge {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 2;
	padding: 2px 8px;
	font-size: 12px;
	color: #fff;
	border-radius: 3px;
	line-height: 1.4;
}

.gdd-cat-0 { background: #595959; }
.gdd-cat-1 { background: var(--gdd-blue); }
.gdd-cat-2 { background: #eb2f96; }
.gdd-cat-3 { background: #52c41a; }
.gdd-cat-4 { background: #fa8c16; }
.gdd-cat-default { background: #8c8c8c; }

.gdd-list-body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.gdd-list-title {
	margin: 0 0 10px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.45;
}

.gdd-list-title a:hover {
	color: var(--gdd-blue);
}

.gdd-list-excerpt {
	margin: 0 0 auto;
	color: #666;
	font-size: 14px;
	line-height: 1.75;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.gdd-list-date {
	margin-top: 12px;
	font-size: 13px;
	color: var(--gdd-text-muted);
}

/* Sidebar */
.gdd-sidebar {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.gdd-widget-title {
	margin: 0 0 14px;
	font-size: 17px;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 8px;
	color: #000;
}

.gdd-widget-bar {
	display: inline-block;
	width: 4px;
	height: 18px;
	background: var(--gdd-blue);
	border-radius: 2px;
	flex-shrink: 0;
}

.gdd-sidebar-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.gdd-sidebar-item {
	display: flex;
	gap: 10px;
	padding: 14px 0;
	border-bottom: 1px solid var(--gdd-border);
}

.gdd-sidebar-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.gdd-sidebar-item:first-child {
	padding-top: 0;
}

.gdd-sidebar-thumb-link {
	flex-shrink: 0;
	width: 72px;
	height: 72px;
	border-radius: 6px;
	overflow: hidden;
	background: #f5f5f5;
}

.gdd-sidebar-thumb,
.gdd-sidebar-thumb-link .gdd-thumb {
	width: 72px;
	height: 72px;
	object-fit: cover;
}

.gdd-sidebar-thumb-link .gdd-thumb-placeholder {
	width: 72px;
	height: 72px;
	font-size: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--gdd-blue);
}

.gdd-sidebar-text {
	flex: 1;
	min-width: 0;
}

.gdd-sidebar-title {
	display: block;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.45;
	color: #333;
	margin-bottom: 6px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.gdd-sidebar-title:hover {
	color: var(--gdd-blue);
}

.gdd-sidebar-date {
	font-size: 12px;
	color: var(--gdd-text-muted);
}

/* Archive / single */
.gdd-archive-header {
	margin-bottom: 20px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--gdd-border);
}

.gdd-archive-title {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
}

.gdd-archive-desc {
	margin-top: 8px;
	color: #666;
	font-size: 14px;
}

.gdd-archive-desc p {
	margin: 0;
}

.gdd-single {
	padding-bottom: 24px;
}

.gdd-single-header {
	margin-bottom: 20px;
}

.gdd-single-header .gdd-cat-badge {
	position: static;
	display: inline-block;
	margin-bottom: 10px;
}

.gdd-single-title {
	margin: 0 0 10px;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.35;
}

.gdd-single-date {
	font-size: 14px;
	color: var(--gdd-text-muted);
}

.gdd-single-content {
	font-size: 16px;
	line-height: 1.85;
	color: #444;
}

.gdd-single-content img {
	border-radius: var(--gdd-radius);
	margin: 16px auto;
}

.gdd-single-content p {
	margin: 0 0 1em;
}

.gdd-single-tags {
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid var(--gdd-border);
	font-size: 14px;
	color: #666;
}

.gdd-single-tags a {
	color: var(--gdd-blue);
	margin-right: 8px;
}

/* 文章底部：上下篇 + 相关推荐 */
.gdd-post-footer {
	margin-top: 32px;
}

.gdd-adjacent-nav {
	margin-bottom: 28px;
}

.gdd-adjacent-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.gdd-adjacent-card {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: 140px;
	padding: 16px;
	border-radius: var(--gdd-radius);
	overflow: hidden;
	color: #fff;
	background-color: #4a4a4a;
	background-size: cover;
	background-position: center;
	text-decoration: none;
}

.gdd-adjacent-card:hover {
	color: #fff;
}

.gdd-adjacent-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.72) 100%);
	pointer-events: none;
}

.gdd-adjacent-title,
.gdd-adjacent-meta {
	position: relative;
	z-index: 1;
}

.gdd-adjacent-title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.45;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.gdd-adjacent-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	padding-top: 20px;
	font-size: 12px;
}

.gdd-adjacent-label {
	flex-shrink: 0;
	opacity: 0.95;
}

.gdd-adjacent-date {
	font-size: 12px;
	opacity: 0.9;
	white-space: nowrap;
}

.gdd-adjacent-next .gdd-adjacent-meta {
	flex-direction: row;
}

.gdd-adjacent-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 140px;
	padding: 16px;
	border-radius: var(--gdd-radius);
	background: #f5f5f5;
	border: 1px dashed var(--gdd-border);
	color: var(--gdd-text-muted);
	font-size: 14px;
}

.gdd-related-section {
	margin-top: 8px;
}

.gdd-related-heading {
	margin: 0 0 14px;
	font-size: 18px;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 8px;
	color: #000;
}

.gdd-related-panel {
	background: #fff;
	border: 1px solid var(--gdd-border);
	border-radius: var(--gdd-radius);
	padding: 8px 20px;
}

.gdd-related-item {
	display: flex;
	gap: 20px;
	padding: 20px 0;
	border-bottom: 1px solid var(--gdd-border);
}

.gdd-related-item:last-child {
	border-bottom: none;
}

.gdd-related-thumb-wrap {
	position: relative;
	flex-shrink: 0;
	width: 200px;
	border-radius: var(--gdd-radius);
	overflow: hidden;
	background: #f5f5f5;
}

.gdd-related-thumb,
.gdd-related-thumb-wrap .gdd-thumb {
	width: 200px;
	height: 130px;
	object-fit: cover;
}

.gdd-related-thumb-wrap .gdd-thumb-placeholder {
	width: 200px;
	height: 130px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 36px;
	color: var(--gdd-blue);
}

.gdd-related-body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.gdd-related-title {
	margin: 0 0 10px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.45;
}

.gdd-related-title a:hover {
	color: var(--gdd-blue);
}

.gdd-related-excerpt {
	margin: 0 0 auto;
	color: #666;
	font-size: 14px;
	line-height: 1.75;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.gdd-related-date {
	margin-top: 12px;
	font-size: 13px;
	color: var(--gdd-text-muted);
}

.gdd-back-home {
	color: var(--gdd-blue);
}

/* Pagination */
.gdd-pagination,
.gdd-latest .page-numbers {
	margin-top: 28px;
}

.gdd-pagination ul,
.gdd-latest .page-numbers {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.gdd-pagination li {
	margin: 0;
}

.gdd-pagination a,
.gdd-pagination span,
.gdd-latest .page-numbers a,
.gdd-latest .page-numbers span {
	display: inline-block;
	padding: 6px 14px;
	border: 1px solid var(--gdd-border);
	border-radius: 4px;
	color: #666;
}

.gdd-pagination .current,
.gdd-latest .page-numbers .current {
	background: var(--gdd-blue);
	border-color: var(--gdd-blue);
	color: #fff;
}

/* Footer */
.gdd-footer {
	border-top: 1px solid var(--gdd-border);
	padding: 24px 0;
	background: #fafafa;
	text-align: center;
}

.gdd-copyright {
	margin: 0;
	font-size: 13px;
	color: var(--gdd-text-muted);
}

.gdd-copyright a {
	color: var(--gdd-text-muted);
}

.gdd-copyright a:hover {
	color: var(--gdd-text);
	text-decoration: underline;
}

.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	height: 1px;
	overflow: hidden;
	position: absolute;
	width: 1px;
}

/* Responsive */
@media (max-width: 992px) {
	.gdd-layout {
		grid-template-columns: 1fr;
	}

	.gdd-nav {
		justify-content: flex-start;
	}

	.gdd-header-inner {
		flex-wrap: wrap;
	}

	.gdd-hero {
		min-height: 280px;
	}
}

@media (max-width: 640px) {
	.gdd-adjacent-grid {
		grid-template-columns: 1fr;
	}

	.gdd-related-item {
		flex-direction: column;
	}

	.gdd-related-thumb-wrap,
	.gdd-related-thumb,
	.gdd-related-thumb-wrap .gdd-thumb,
	.gdd-related-thumb-wrap .gdd-thumb-placeholder {
		width: 100%;
		height: auto;
		aspect-ratio: 16 / 10;
	}

	.gdd-related-thumb,
	.gdd-related-thumb-wrap .gdd-thumb {
		height: 100%;
	}

	.gdd-hero {
		grid-template-columns: 1fr;
		grid-template-rows: auto;
		min-height: 0;
	}

	.gdd-hero-main,
	.gdd-hero-sub:nth-of-type(2),
	.gdd-hero-sub:nth-of-type(3) {
		grid-column: 1;
		grid-row: auto;
	}

	.gdd-hero-item {
		min-height: 180px;
	}

	.gdd-list-item {
		flex-direction: column;
	}

	.gdd-list-thumb-wrap,
	.gdd-list-thumb,
	.gdd-list-thumb-wrap .gdd-thumb,
	.gdd-list-thumb-wrap .gdd-thumb-placeholder {
		width: 100%;
		height: auto;
		aspect-ratio: 16 / 10;
	}

	.gdd-list-thumb,
	.gdd-list-thumb-wrap .gdd-thumb {
		height: 100%;
	}
}
