/*
Theme Name: 星依机甲 (Xingyi Mecha)
Theme URI: https://w.xiaoling.xyz/
Author: 星依
Author URI: https://w.xiaoling.xyz/
Description: Twenty Twenty-Five 的子主题 —— 爱弥斯机甲科技风：粉色打底、机甲线条、故障/全息电子感，波奇元素点缀。
Template: twentytwentyfive
Version: 1.1.0
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: xingyi-mecha
Tags: pink, mecha, tech, glitch, holographic, blog
*/

/* ============================================================
   星依机甲 · 爱弥斯机甲科技风
   粉色打底 + 机甲线条 + 故障/全息电子感
   ============================================================ */

:root {
	--mecha-pink: #ff2e88;
	--mecha-pink-soft: #ff7ab8;
	--mecha-pink-pale: #ffe3f0;
	--mecha-pink-bg: #fff0f6;
	--mecha-navy: #171233;
	--mecha-navy-2: #241b4d;
	--mecha-violet: #7b2ff7;
	--mecha-cyan: #00e5ff;
	--mecha-gold: #ffb300;
	--mecha-line: rgba(255, 46, 136, 0.35);
	--mecha-glow: 0 0 18px rgba(255, 46, 136, 0.45);
}

/* ---------- 页面底色：淡粉 + 科技网格 ---------- */
body {
	background-color: var(--mecha-pink-bg);
	background-image:
		linear-gradient(rgba(255, 46, 136, 0.055) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 46, 136, 0.055) 1px, transparent 1px);
	background-size: 28px 28px;
	color: var(--mecha-navy);
}

::selection {
	background: var(--mecha-pink);
	color: #fff;
}

/* ---------- 顶部 HUD 状态条 ---------- */
body::before {
	content: "◆ SYSTEM ONLINE  //  星依的博客  //  AEMEATH MECHA-LINK ACTIVE  //  星光停留的地方 ◆";
	display: block;
	background: var(--mecha-navy);
	color: var(--mecha-pink-soft);
	font-family: "Fira Code", ui-monospace, monospace;
	font-size: 11px;
	letter-spacing: 0.22em;
	text-align: center;
	padding: 7px 10px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	border-bottom: 2px solid var(--mecha-pink);
	box-shadow: var(--mecha-glow);
}

/* ---------- 顶栏：深蓝机甲 + 粉色底边 ---------- */
header.wp-block-template-part {
	background:
		linear-gradient(rgba(255, 46, 136, 0.06) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 46, 136, 0.06) 1px, transparent 1px),
		linear-gradient(135deg, #171233 0%, #241b4d 55%, #3b115f 100%) !important;
	background-size: 26px 26px, 26px 26px, cover !important;
	border-bottom: 2px solid var(--mecha-pink);
	box-shadow: 0 4px 24px rgba(255, 46, 136, 0.35);
}

/* ---------- 站名：粉紫渐变 + 故障重影 ---------- */
.wp-block-site-title {
	position: relative;
}

.wp-block-site-title a {
	position: relative;
	display: inline-block;
	background: linear-gradient(92deg, #ff7ab8 0%, #ff2e88 38%, #c44dff 68%, #00e5ff 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent !important;
	-webkit-text-fill-color: transparent;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-shadow: none;
	filter: drop-shadow(0 0 12px rgba(255, 46, 136, 0.55));
}

.wp-block-site-title a::before,
.wp-block-site-title a::after {
	content: "星依的博客";
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	background: none;
	-webkit-text-fill-color: transparent;
	pointer-events: none;
	opacity: 0;
}

.wp-block-site-title a::before {
	color: var(--mecha-cyan);
	text-shadow: -2px 0 var(--mecha-cyan);
	animation: mecha-glitch-a 4.2s infinite steps(1);
}

.wp-block-site-title a::after {
	color: var(--mecha-pink);
	text-shadow: 2px 0 var(--mecha-pink);
	animation: mecha-glitch-b 3.7s infinite steps(1);
}

@keyframes mecha-glitch-a {
	0%, 91% { opacity: 0; clip-path: inset(0 0 0 0); transform: translate(0, 0); }
	92% { opacity: 0.85; clip-path: inset(12% 0 62% 0); transform: translate(-4px, 2px); }
	94% { opacity: 0.85; clip-path: inset(58% 0 8% 0); transform: translate(3px, -1px); }
	96% { opacity: 0; }
}

@keyframes mecha-glitch-b {
	0%, 88% { opacity: 0; clip-path: inset(0 0 0 0); transform: translate(0, 0); }
	89% { opacity: 0.85; clip-path: inset(68% 0 4% 0); transform: translate(4px, 1px); }
	91% { opacity: 0.85; clip-path: inset(8% 0 76% 0); transform: translate(-3px, -2px); }
	93% { opacity: 0; }
}

/* ---------- 副标题：粉色等宽字 + 两侧装饰 ---------- */
.wp-block-site-tagline {
	color: var(--mecha-pink-soft) !important;
	font-family: "Fira Code", ui-monospace, monospace;
	letter-spacing: 0.32em;
}

.wp-block-site-tagline::before {
	content: "▚ ";
	color: var(--mecha-cyan);
}

.wp-block-site-tagline::after {
	content: " ▞";
	color: var(--mecha-cyan);
}

/* ---------- 导航 ---------- */
header .wp-block-navigation a,
header .wp-block-navigation-item__content {
	color: #fff !important;
}

header .wp-block-navigation a:hover,
header .wp-block-navigation-item__content:hover {
	color: var(--mecha-pink-soft) !important;
	text-shadow: 0 0 10px rgba(255, 122, 184, 0.9);
}

header .wp-block-navigation .current-menu-item a,
header .wp-block-navigation .current-menu-item .wp-block-navigation-item__content {
	color: var(--mecha-pink-soft) !important;
	border-bottom: 2px solid var(--mecha-pink);
}

.wp-block-navigation__responsive-container-open {
	color: var(--mecha-pink-soft) !important;
}

/* ---------- 文章卡片：白底 + 渐变框 + 机甲角标 ---------- */
.wp-block-post {
	position: relative;
	background: #fff;
	border: 2px solid transparent;
	border-image: linear-gradient(135deg, var(--mecha-pink) 0%, #c44dff 55%, var(--mecha-cyan) 100%) 1;
	border-radius: 4px;
	padding: 26px 28px;
	margin-bottom: 34px;
	box-shadow: 0 10px 30px rgba(255, 46, 136, 0.16), 0 0 0 1px rgba(255, 46, 136, 0.08);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.wp-block-post:hover {
	transform: translateY(-3px);
	box-shadow: 0 16px 38px rgba(255, 46, 136, 0.26), 0 0 22px rgba(255, 46, 136, 0.22);
}

/* 左上 / 右下角标 */
.wp-block-post::before,
.wp-block-post::after {
	content: "";
	position: absolute;
	width: 18px;
	height: 18px;
	pointer-events: none;
}

.wp-block-post::before {
	top: -2px;
	left: -2px;
	border-top: 3px solid var(--mecha-cyan);
	border-left: 3px solid var(--mecha-cyan);
}

.wp-block-post::after {
	bottom: -2px;
	right: -2px;
	border-bottom: 3px solid var(--mecha-cyan);
	border-right: 3px solid var(--mecha-cyan);
}

/* ---------- 文章标题 / 日期 ---------- */
.wp-block-post-title a {
	color: var(--mecha-navy);
	text-decoration: none;
}

.wp-block-post-title a:hover {
	color: var(--mecha-pink);
	text-shadow: 0 0 14px rgba(255, 46, 136, 0.5);
}

.wp-block-post-date {
	font-family: "Fira Code", ui-monospace, monospace;
	color: var(--mecha-pink) !important;
	letter-spacing: 0.12em;
}

.wp-block-post-date::before {
	content: "▸ ";
	color: var(--mecha-cyan);
}

/* 摘要里“继续阅读” */
.wp-block-post-excerpt__more-link {
	color: var(--mecha-pink);
	font-weight: 700;
}

.wp-block-post-excerpt__more-link:hover {
	color: var(--mecha-violet);
	text-shadow: 0 0 12px rgba(123, 47, 247, 0.5);
}

/* ---------- 正文排版 ---------- */
.wp-block-post-content h2,
.wp-block-post-content h3 {
	border-left: 4px solid var(--mecha-pink);
	padding-left: 12px;
	color: var(--mecha-navy);
}

.wp-block-post-content a {
	color: var(--mecha-pink);
	text-underline-offset: 3px;
}

.wp-block-post-content a:hover {
	color: var(--mecha-violet);
}

.wp-block-post-content blockquote {
	background: var(--mecha-pink-pale);
	border-left: 4px solid var(--mecha-pink);
	padding: 14px 18px;
	border-radius: 0 8px 8px 0;
}

.wp-block-post-content code {
	background: var(--mecha-navy);
	color: var(--mecha-pink-soft);
	padding: 2px 6px;
	border-radius: 4px;
}

.wp-block-post-content pre {
	background: var(--mecha-navy);
	border: 1px solid var(--mecha-pink);
	border-radius: 8px;
	box-shadow: var(--mecha-glow);
}

.wp-block-post-content pre code {
	background: transparent;
	color: #ffd7ea;
}

.wp-block-post-content hr {
	border: none;
	height: 2px;
	background: linear-gradient(90deg, transparent, var(--mecha-pink), var(--mecha-cyan), transparent);
}

/* ---------- 按钮：斜切角 + 粉紫渐变 + 发光 ---------- */
.wp-block-button__link,
.wp-block-search__button,
.wp-block-query-pagination a,
input[type="submit"],
.comment-form input[type="submit"] {
	background: linear-gradient(135deg, var(--mecha-pink) 0%, var(--mecha-violet) 100%) !important;
	color: #fff !important;
	border: none !important;
	clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
	box-shadow: 0 0 16px rgba(255, 46, 136, 0.45);
	font-weight: 700;
	letter-spacing: 0.06em;
}

.wp-block-button__link:hover,
.wp-block-search__button:hover,
.wp-block-query-pagination a:hover,
input[type="submit"]:hover {
	filter: brightness(1.15);
	box-shadow: 0 0 26px rgba(255, 46, 136, 0.65);
}

/* 分页当前页 */
.wp-block-query-pagination .current {
	background: var(--mecha-navy);
	color: var(--mecha-pink-soft);
	border: 1px solid var(--mecha-pink);
}

/* ---------- 表单 / 搜索框 ---------- */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea {
	border: 2px solid var(--mecha-line) !important;
	border-radius: 6px !important;
	background: #fff;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
textarea:focus {
	border-color: var(--mecha-pink) !important;
	outline: none;
	box-shadow: 0 0 0 3px rgba(255, 46, 136, 0.18), 0 0 14px rgba(255, 46, 136, 0.3);
}

/* ---------- 侧栏 / 小工具卡片 ---------- */
.wp-block-group.has-background,
.sidebar .wp-block-group {
	border: 1px solid var(--mecha-line);
}

/* ---------- 页脚：深蓝机甲底 + 粉色顶线 ---------- */
footer.wp-block-template-part {
	background: linear-gradient(135deg, #171233 0%, #241b4d 60%, #3b115f 100%) !important;
	color: #ffb3d9 !important;
	border-top: 2px solid var(--mecha-pink);
	box-shadow: 0 -4px 24px rgba(255, 46, 136, 0.3);
}

footer.wp-block-template-part a {
	color: var(--mecha-pink-soft) !important;
}

footer.wp-block-template-part a:hover {
	color: #fff !important;
	text-shadow: 0 0 10px rgba(255, 122, 184, 0.9);
}

footer.wp-block-template-part p,
footer.wp-block-template-part .wp-block-site-title a {
	color: #ffb3d9 !important;
}

/* ---------- 分类 / 标签 ---------- */
.wp-block-post-terms a,
.tag-cloud-link {
	color: var(--mecha-pink);
	border: 1px solid var(--mecha-pink);
	border-radius: 20px;
	padding: 2px 10px;
	font-size: 12px;
	text-decoration: none;
}

.wp-block-post-terms a:hover,
.tag-cloud-link:hover {
	background: var(--mecha-pink);
	color: #fff !important;
	box-shadow: 0 0 12px rgba(255, 46, 136, 0.5);
}

/* ---------- 评论区 ---------- */
.wp-block-comments,
.comment-list .comment-body {
	background: #fff;
	border: 1px solid var(--mecha-line);
	border-radius: 8px;
}

.comment-author .fn a {
	color: var(--mecha-pink);
}

/* ---------- 404 / 搜索无结果 ---------- */
.error404 .wp-block-heading,
.search-no-results .wp-block-heading {
	color: var(--mecha-pink);
}

/* ============================================================
   手机端
   ============================================================ */
@media (max-width: 600px) {
	body::before {
		font-size: 9px;
		letter-spacing: 0.12em;
		padding: 6px 8px;
	}

	.wp-block-site-title {
		font-size: 28px !important;
	}

	.wp-block-site-tagline {
		letter-spacing: 0.18em;
		font-size: 12px;
	}

	.wp-block-post {
		padding: 18px 16px;
		margin-bottom: 24px;
	}

	.wp-block-post::before,
	.wp-block-post::after {
		width: 12px;
		height: 12px;
	}
}

/* 尊重减弱动效偏好 */
@media (prefers-reduced-motion: reduce) {
	.wp-block-site-title a::before,
	.wp-block-site-title a::after {
		animation: none;
	}

	.wp-block-post {
		transition: none;
	}
}

/* ============================================================
   Round 3 · 爱弥斯观测站 hero + 数据科技流
   深色观测站只做 hero + 统计条两块，整站仍是粉色底
   ============================================================ */

/* ---------- Hero：深色观测站 ---------- */
.xm-hero {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(720px 300px at 78% 8%, rgba(0, 229, 255, 0.14), transparent 62%),
		radial-gradient(560px 320px at 12% 88%, rgba(255, 46, 136, 0.2), transparent 60%),
		linear-gradient(135deg, #0a0e27 0%, #12163a 55%, #1c1040 100%);
	border: 1px solid rgba(0, 229, 255, 0.28);
	border-radius: 12px;
	color: #fff;
	margin-bottom: 18px;
	box-shadow: 0 18px 44px rgba(23, 18, 51, 0.35), 0 0 0 1px rgba(255, 46, 136, 0.12), 0 0 32px rgba(0, 229, 255, 0.1);
}

.xm-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(0, 229, 255, 0.07) 1px, transparent 1px),
		linear-gradient(90deg, rgba(0, 229, 255, 0.07) 1px, transparent 1px);
	background-size: 26px 26px;
	pointer-events: none;
}

.xm-hero-orbits {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.xm-hero-tag {
	position: absolute;
	z-index: 3;
	font-family: "Fira Code", ui-monospace, monospace;
	font-size: 10px;
	letter-spacing: 0.22em;
	color: var(--mecha-cyan);
	border: 1px solid rgba(0, 229, 255, 0.45);
	border-radius: 3px;
	padding: 3px 8px;
	background: rgba(10, 14, 39, 0.6);
}

.xm-tag-tl { top: 12px; left: 14px; }
.xm-tag-tr { top: 12px; right: 14px; color: var(--mecha-pink-soft); border-color: rgba(255, 46, 136, 0.5); }

.xm-hero-inner {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: 1.12fr 0.88fr;
	gap: 12px;
	align-items: center;
	padding: 52px 40px 40px;
}

.xm-hero-eyebrow {
	font-family: "Fira Code", ui-monospace, monospace;
	font-size: 12px;
	letter-spacing: 0.28em;
	color: var(--mecha-cyan);
	margin: 0 0 10px;
}

.xm-hero-title {
	margin: 0;
	font-size: clamp(58px, 9vw, 104px);
	line-height: 0.95;
	font-weight: 900;
	letter-spacing: 0.05em;
	color: #fff;
	text-shadow: 0 0 26px rgba(0, 229, 255, 0.45), 0 0 44px rgba(255, 46, 136, 0.3);
}

.xm-hero-sub {
	margin: 14px 0 0;
	font-size: clamp(19px, 2.6vw, 27px);
	font-weight: 800;
	letter-spacing: 0.14em;
	background: linear-gradient(92deg, #ff7ab8 0%, #ff2e88 45%, #c44dff 75%, #00e5ff 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
}

.xm-hero-desc {
	margin: 12px 0 0;
	font-size: 14px;
	line-height: 1.8;
	color: rgba(255, 255, 255, 0.78);
	max-width: 34em;
}

.xm-hero-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 18px;
}

.xm-hero-chips span {
	font-family: "Fira Code", ui-monospace, monospace;
	font-size: 12px;
	letter-spacing: 0.08em;
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 3px;
	padding: 5px 10px;
	background: rgba(255, 255, 255, 0.06);
}

.xm-hero-chips span:nth-child(1) { border-color: rgba(0, 229, 255, 0.6); color: #b8f6ff; }
.xm-hero-chips span:nth-child(2) { border-color: rgba(255, 46, 136, 0.6); color: #ffd7ea; }

.xm-hero-status {
	margin: 18px 0 0;
	font-family: "Fira Code", ui-monospace, monospace;
	font-size: 12px;
	letter-spacing: 0.14em;
	color: rgba(255, 255, 255, 0.72);
	display: flex;
	align-items: center;
	gap: 8px;
}

/* 呼吸绿点 */
.xm-live-dot {
	display: inline-block;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #22ff88;
	box-shadow: 0 0 10px rgba(34, 255, 136, 0.9);
	animation: xm-pulse 1.8s ease-in-out infinite;
	flex: none;
}

@keyframes xm-pulse {
	0%, 100% { transform: scale(1); opacity: 1; }
	50% { transform: scale(1.45); opacity: 0.55; }
}

.xm-hero-art {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: flex-end;
	min-height: 300px;
}

.xm-hero-art img {
	position: relative;
	z-index: 2;
	max-height: 380px;
	width: auto;
	max-width: 100%;
	object-fit: contain;
	filter: drop-shadow(0 0 26px rgba(0, 229, 255, 0.35)) drop-shadow(0 12px 30px rgba(255, 46, 136, 0.28));
	animation: xm-float 6s ease-in-out infinite;
}

@keyframes xm-float {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-10px); }
}

.xm-hero-art::before {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 6%;
	width: 78%;
	aspect-ratio: 1;
	transform: translateX(-50%);
	border-radius: 50%;
	background: radial-gradient(circle, rgba(0, 229, 255, 0.22), rgba(255, 46, 136, 0.12) 55%, transparent 72%);
	filter: blur(6px);
}

/* ---------- 数据统计条：照抄爱弥斯四格排布 ---------- */
.xm-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	background: linear-gradient(135deg, #0b0f2a 0%, #12163a 100%);
	border: 1px solid rgba(0, 229, 255, 0.25);
	border-radius: 10px;
	overflow: hidden;
	margin-bottom: 26px;
	box-shadow: 0 12px 30px rgba(23, 18, 51, 0.28);
}

.xm-stat {
	position: relative;
	padding: 20px 18px 16px;
	color: #fff;
}

.xm-stat + .xm-stat {
	border-left: 1px dashed rgba(255, 255, 255, 0.22);
}

.xm-stat::after {
	content: "";
	position: absolute;
	left: 18px;
	right: 18px;
	bottom: 0;
	height: 3px;
	border-radius: 2px;
}

.xm-stat-cyan::after { background: var(--mecha-cyan); box-shadow: 0 0 10px rgba(0, 229, 255, 0.7); }
.xm-stat-pink::after { background: var(--mecha-pink); box-shadow: 0 0 10px rgba(255, 46, 136, 0.7); }
.xm-stat-violet::after { background: var(--mecha-violet); box-shadow: 0 0 10px rgba(123, 47, 247, 0.7); }
.xm-stat-gold::after { background: var(--mecha-gold); box-shadow: 0 0 10px rgba(255, 179, 0, 0.7); }

.xm-stat-num {
	font-family: "Fira Code", ui-monospace, monospace;
	font-size: clamp(26px, 3.4vw, 38px);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: 0.02em;
	color: #fff;
	text-shadow: 0 0 16px rgba(0, 229, 255, 0.35);
}

.xm-stat-label {
	margin-top: 6px;
	font-size: 12px;
	letter-spacing: 0.22em;
	color: rgba(255, 255, 255, 0.66);
}

.xm-stat-sub {
	font-family: "Fira Code", ui-monospace, monospace;
	font-size: 11px;
	letter-spacing: 0.1em;
	color: var(--mecha-cyan);
	margin-top: 3px;
}

/* ---------- 科技流细节 ---------- */
/* 卡片加细网格底纹 */
.wp-block-post {
	background-image:
		linear-gradient(rgba(0, 229, 255, 0.05) 1px, transparent 1px),
		linear-gradient(90deg, rgba(0, 229, 255, 0.05) 1px, transparent 1px);
	background-size: 22px 22px;
}

/* 虚线分隔：主内容与页脚之间 */
main.wp-block-group {
	border-bottom: 1px dashed rgba(255, 46, 136, 0.4);
	padding-bottom: 8px;
}

/* HUD 风小标签：给分类/标签加个前缀符号 */
.wp-block-post-terms::before {
	content: "◈ ";
	color: var(--mecha-cyan);
}

/* ---------- 手机端 ---------- */
@media (max-width: 600px) {
	.xm-hero-inner {
		grid-template-columns: 1fr;
		padding: 44px 20px 26px;
		gap: 0;
	}

	.xm-hero-title {
		font-size: 54px;
	}

	.xm-hero-sub {
		font-size: 19px;
	}

	.xm-hero-art {
		min-height: 0;
		margin-top: 10px;
	}

	.xm-hero-art img {
		max-height: 230px;
	}

	.xm-hero-tag {
		font-size: 9px;
		letter-spacing: 0.14em;
	}

	.xm-stats {
		grid-template-columns: 1fr 1fr;
	}

	.xm-stat:nth-child(3) {
		border-left: none;
	}

	.xm-stat:nth-child(n+3) {
		border-top: 1px dashed rgba(255, 255, 255, 0.22);
	}

	.xm-stat {
		padding: 16px 14px 13px;
	}

	.xm-stat-num {
		font-size: 26px;
	}
}

/* 减弱动效时停掉呼吸与漂浮 */
@media (prefers-reduced-motion: reduce) {
	.xm-live-dot,
	.xm-hero-art img {
		animation: none;
	}
}
