/* ==========================================================================
   HT188 Tech · 深色科技风补充样式
   theme.json 负责设计令牌与块级排版，本文件只补充交互、装饰与响应式细节。
   ========================================================================== */

:root {
	color-scheme: dark;
}

/* 页面背景：双层光晕 + 细网格 */
body {
	background-color: var(--wp--preset--color--base);
	background-image:
		radial-gradient(900px 520px at 12% -12%, rgba(34, 211, 238, 0.10), transparent 62%),
		radial-gradient(820px 480px at 88% -6%, rgba(124, 92, 255, 0.12), transparent 62%),
		linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
	background-size: auto, auto, 48px 48px, 48px 48px;
	background-attachment: fixed;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

::selection {
	background: rgba(34, 211, 238, 0.28);
}

a:focus-visible,
.wp-block-button__link:focus-visible,
input:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

/* ---------- 页头 ---------- */
header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 100;
	background-color: rgba(11, 15, 20, 0.74);
	-webkit-backdrop-filter: blur(14px) saturate(140%);
	backdrop-filter: blur(14px) saturate(140%);
	border-bottom: 1px solid var(--wp--preset--color--border);
	padding-top: var(--wp--preset--spacing--30);
	padding-bottom: var(--wp--preset--spacing--30);
}

.ht188-brand a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.ht188-brand a:hover {
	color: var(--wp--preset--color--accent);
}

.ht188-nav .wp-block-navigation-item__content,
.ht188-footer-nav .wp-block-navigation-item__content {
	color: var(--wp--preset--color--muted);
	text-decoration: none;
	transition: color 0.2s ease;
}

.ht188-nav .wp-block-navigation-item__content:hover,
.ht188-footer-nav .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--accent);
}

/* ---------- 首页 Hero ---------- */
.ht188-hero {
	position: relative;
	text-align: center;
	padding-top: clamp(3rem, 8vw, 6rem);
	padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

.ht188-eyebrow {
	display: inline-block;
	margin: 0 0 1.25rem;
	padding: 0.35rem 1rem;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
	background: rgba(34, 211, 238, 0.08);
	border: 1px solid rgba(34, 211, 238, 0.32);
	border-radius: 999px;
}

.ht188-hero-title {
	margin: 0 0 1rem;
	line-height: 1.15;
	letter-spacing: -0.03em;
	background: linear-gradient(100deg, #ffffff 0%, #22d3ee 52%, #7c5cff 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.ht188-hero-sub {
	max-width: 46ch;
	margin: 0 auto 2rem;
}

.ht188-hero .wp-block-buttons {
	justify-content: center;
	gap: 0.75rem;
}

.ht188-hero .wp-block-button.is-style-outline > .wp-block-button__link {
	color: var(--wp--preset--color--contrast);
	background: transparent;
	border: 1px solid var(--wp--preset--color--border);
}

.ht188-hero .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	color: var(--wp--preset--color--accent);
	border-color: rgba(34, 211, 238, 0.55);
}

/* ---------- 区块标题 ---------- */
.ht188-section-head {
	padding-bottom: var(--wp--preset--spacing--30);
	margin-top: var(--wp--preset--spacing--40);
}

.ht188-section-head h2 {
	font-size: 1.35rem;
	letter-spacing: -0.01em;
}

/* ---------- 文章卡片 ---------- */
.ht188-card {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	height: 100%;
	padding: 1.25rem !important;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 16px;
	transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.ht188-card:hover {
	transform: translateY(-4px);
	border-color: rgba(34, 211, 238, 0.45);
	box-shadow: 0 22px 44px -24px rgba(34, 211, 238, 0.45);
}

.ht188-card-title {
	margin: 0.15rem 0 0.35rem;
	line-height: 1.35;
}

.ht188-card-title a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.ht188-card-title a:hover {
	color: var(--wp--preset--color--accent);
}

.ht188-card-media img {
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 10px;
}

.ht188-card .wp-block-post-excerpt__more-link {
	color: var(--wp--preset--color--accent);
}

/* 分类小胶囊 */
.ht188-chip {
	margin: 0;
}

.ht188-chip a {
	display: inline-block;
	padding: 0.18rem 0.7rem;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
	background: rgba(34, 211, 238, 0.1);
	border: 1px solid rgba(34, 211, 238, 0.26);
	border-radius: 999px;
	text-decoration: none;
}

.ht188-chip a:hover {
	color: var(--wp--preset--color--base);
	background: var(--wp--preset--color--accent);
}

.ht188-meta {
	color: var(--wp--preset--color--muted);
	font-size: 0.85rem;
}

.ht188-meta .wp-block-post-date,
.ht188-meta .wp-block-post-author-name {
	margin: 0;
}

/* ---------- 文章页 ---------- */
.ht188-article-head {
	padding-top: clamp(2rem, 5vw, 3.5rem);
	padding-bottom: var(--wp--preset--spacing--40);
}

.ht188-article-head h1 {
	margin: 0.5rem 0 0.75rem;
	line-height: 1.2;
}

.ht188-hero-media img {
	border-radius: 16px;
	border: 1px solid var(--wp--preset--color--border);
}

.wp-block-post-content {
	color: #d7e0ea;
}

.wp-block-post-content > * + * {
	margin-top: 1.35em;
}

.wp-block-post-content h2 {
	margin-top: 2.2em;
	padding-bottom: 0.4em;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.wp-block-post-content h3 {
	margin-top: 1.8em;
}

.wp-block-post-content li {
	margin-top: 0.35em;
}

.wp-block-post-content li::marker {
	color: var(--wp--preset--color--accent);
}

.wp-block-post-content img {
	border-radius: 12px;
	border: 1px solid var(--wp--preset--color--border);
}

/* 正文里未经块化处理的裸 <pre> 也套用与「代码」块一致的样式（AI 稿件常用裸标签） */
.wp-block-post-content pre {
	overflow-x: auto;
	padding: 1.15rem 1.25rem;
	background: var(--wp--preset--color--code);
	color: #D7E7F5;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 12px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.9rem;
	line-height: 1.7;
}

.wp-block-post-content table {
	width: 100%;
	border-collapse: collapse;
}

.wp-block-post-content th,
.wp-block-post-content td {
	padding: 0.6rem 0.8rem;
	border: 1px solid var(--wp--preset--color--border);
	text-align: left;
}

.wp-block-post-content th {
	background: var(--wp--preset--color--surface-2);
}

/* ---------- 归档 / 搜索标题 ---------- */
.ht188-archive-head {
	padding-top: clamp(2rem, 5vw, 3rem);
	padding-bottom: var(--wp--preset--spacing--40);
}

.ht188-archive-head .wp-block-query-title {
	margin: 0;
}

/* ---------- 分页 ---------- */
.wp-block-query-pagination {
	margin-top: var(--wp--preset--spacing--50);
	gap: 0.5rem;
}

.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
	padding: 0.35rem 0.75rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	color: var(--wp--preset--color--muted);
	text-decoration: none;
}

.wp-block-query-pagination a:hover,
.wp-block-query-pagination .current {
	color: var(--wp--preset--color--accent);
	border-color: rgba(34, 211, 238, 0.45);
}

/* ---------- 页脚 ---------- */
footer.wp-block-template-part {
	margin-top: var(--wp--preset--spacing--80);
	padding-top: var(--wp--preset--spacing--50);
	padding-bottom: var(--wp--preset--spacing--30);
	background: rgba(17, 24, 35, 0.6);
	border-top: 1px solid var(--wp--preset--color--border);
}

.ht188-footer-brand {
	margin: 0 0 0.35rem;
}

/* 备案号（由 mu-plugin 输出） */
.site-icp {
	margin: 0;
	padding: 0 24px 24px;
	text-align: center;
	font-size: 13px;
	line-height: 1.6;
	opacity: 0.72;
}

.site-icp a {
	color: inherit;
	text-decoration: none;
}

.site-icp a:hover {
	text-decoration: underline;
}

/* ---------- 移动端 ---------- */
@media (max-width: 700px) {
	body {
		background-attachment: scroll;
	}

	.ht188-card {
		padding: 1rem !important;
	}

	.ht188-hero {
		text-align: left;
	}

	.ht188-hero-sub {
		margin-left: 0;
	}

	.ht188-hero .wp-block-buttons {
		justify-content: flex-start;
	}
}
