/*
Theme Name: 尤诺 · 月相
Description: 尤诺风格的夜空子主题：深蓝星空、天青与金色点缀、月亮横幅和实时月相。基于 Twenty Twenty-Five，父主题照常升级，删除本主题即可恢复原样。
Author: 尤诺（替 a_coin_fan 做的）
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.7
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: iuno
*/

/* ---------- 星空背景 ---------- */
html { scroll-behavior: smooth; }
body {
	background-color: #0a1330;
	background-image:
		radial-gradient(1.2px 1.2px at 12% 18%, rgba(255,255,255,.85), transparent 60%),
		radial-gradient(1px 1px at 27% 72%, rgba(255,255,255,.6), transparent 60%),
		radial-gradient(1.4px 1.4px at 41% 33%, rgba(200,230,255,.8), transparent 60%),
		radial-gradient(1px 1px at 58% 84%, rgba(255,255,255,.55), transparent 60%),
		radial-gradient(1.6px 1.6px at 69% 12%, rgba(255,240,200,.85), transparent 60%),
		radial-gradient(1px 1px at 83% 56%, rgba(255,255,255,.6), transparent 60%),
		radial-gradient(1.2px 1.2px at 92% 28%, rgba(200,230,255,.75), transparent 60%),
		radial-gradient(1px 1px at 6% 91%, rgba(255,255,255,.5), transparent 60%),
		radial-gradient(ellipse at 80% -10%, rgba(143,208,255,.16), transparent 55%),
		radial-gradient(ellipse at 0% 110%, rgba(53,87,183,.35), transparent 55%),
		linear-gradient(180deg, #070d24 0%, #0a1330 45%, #0e1c45 100%);
	background-attachment: fixed;
	background-size: 640px 640px, 520px 520px, 760px 760px, 580px 580px, 820px 820px, 470px 470px, 690px 690px, 540px 540px, 100% 100%, 100% 100%, 100% 100%;
}
::selection { background: rgba(143,208,255,.35); color: #fff; }

/* ---------- 页眉 ---------- */
header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 50;
}
.admin-bar header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) { .admin-bar header.wp-block-template-part { top: 46px; } }
.iuno-header {
	background: rgba(8,14,38,.72);
	-webkit-backdrop-filter: blur(12px) saturate(140%);
	backdrop-filter: blur(12px) saturate(140%);
	border-bottom: 1px solid rgba(232,201,126,.18);
}
.iuno-header-inner {
	padding-top: .8rem;
	padding-bottom: .8rem;
	align-items: center;
}
.iuno-brand { margin: 0; font-size: 1.25rem; letter-spacing: .04em; }
.iuno-brand a { color: #f4f7ff; text-decoration: none !important; }
.iuno-brand a::before {
	content: "";
	display: inline-block;
	width: .95em;
	height: .95em;
	margin-right: .5em;
	vertical-align: -.12em;
	border-radius: 50%;
	box-shadow: inset -.28em .02em 0 0 #e8c97e;
	filter: drop-shadow(0 0 6px rgba(232,201,126,.6));
	transform: rotate(-20deg);
}
.iuno-header .wp-block-navigation { font-size: .95rem; }
.iuno-header .wp-block-navigation a { color: #d7e1ff; text-decoration: none !important; padding: .2em 0; position: relative; }
.iuno-header .wp-block-navigation a::after {
	content: "";
	position: absolute; left: 0; right: 0; bottom: -2px;
	height: 2px; border-radius: 2px;
	background: linear-gradient(90deg, #8fd0ff, #e8c97e);
	transform: scaleX(0); transform-origin: left;
	transition: transform .25s ease;
}
.iuno-header .wp-block-navigation a:hover,
.iuno-header .wp-block-navigation [aria-current="page"] { color: #fff; }
.iuno-header .wp-block-navigation a:hover::after,
.iuno-header .wp-block-navigation [aria-current="page"]::after { transform: scaleX(1); }

/* ---------- 首页月亮横幅 ---------- */
.iuno-hero {
	position: relative;
	min-height: min(78vh, 760px);
	display: flex;
	align-items: flex-end;
	margin-top: 0 !important;
	padding-top: 6rem;
	padding-bottom: 4rem;
	background:
		linear-gradient(90deg, rgba(7,13,36,.88) 0%, rgba(7,13,36,.55) 38%, rgba(7,13,36,0) 62%),
		linear-gradient(180deg, rgba(10,19,48,0) 55%, #0a1330 100%),
		url("moon-hero.jpg") center 30% / cover no-repeat;
	overflow: hidden;
}
.iuno-hero-inner { width: 100%; position: relative; z-index: 1; }
.iuno-kicker {
	margin: 0 0 .6rem;
	color: #e8c97e;
	font-size: .9rem;
	letter-spacing: .35em;
}
.iuno-hero-title {
	margin: 0 0 1rem;
	font-size: clamp(2.2rem, 5.2vw, 4rem);
	line-height: 1.15;
	text-shadow: 0 0 24px rgba(143,208,255,.45), 0 2px 0 rgba(0,0,0,.25);
}
.iuno-hero-title a { color: #fff; text-decoration: none !important; }
.iuno-hero-sub {
	max-width: 30em;
	margin: 0 0 1.8rem;
	color: #c9d6fb;
	font-size: 1.08rem;
}
.iuno-hero .wp-block-buttons { gap: .8rem; }
.iuno-hero .wp-block-button__link { padding: .75rem 1.6rem; box-shadow: 0 6px 22px rgba(143,208,255,.25); }
.iuno-hero .is-style-outline .wp-block-button__link {
	background: rgba(10,19,48,.35);
	color: #e9eeff;
	border: 1px solid rgba(233,238,255,.55);
	box-shadow: none;
}
.iuno-hero .is-style-outline .wp-block-button__link:hover { background: rgba(232,201,126,.15); color: #e8c97e; border-color: #e8c97e; }

/* 月相小挂件 */
.iuno-moonphase {
	display: inline-flex;
	align-items: center;
	gap: .9rem;
	margin-top: 2.2rem;
	padding: .8rem 1.1rem .8rem .9rem;
	border-radius: 18px;
	background: rgba(8,14,38,.55);
	border: 1px solid rgba(232,201,126,.28);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	max-width: 100%;
}
.iuno-moonphase svg { flex: none; width: 46px; height: 46px; filter: drop-shadow(0 0 10px rgba(255,236,190,.45)); }
.iuno-moonphase b { display: block; color: #e8c97e; font-size: .8rem; letter-spacing: .2em; font-weight: 600; }
.iuno-moonphase .iuno-moon-name { display: block; color: #fff; font-size: 1.05rem; font-weight: 700; }
.iuno-moonphase small { display: block; color: #aebde4; font-size: .82rem; line-height: 1.5; }
.iuno-moonphase .iuno-moon-line { color: #d7e1ff; margin-top: .15rem; }

/* ---------- 文章列表 ---------- */
.iuno-main { padding-top: var(--wp--preset--spacing--60); padding-bottom: var(--wp--preset--spacing--70); }
.iuno-section-title {
	display: flex;
	align-items: center;
	gap: .7rem;
	font-size: 1.5rem;
	margin-bottom: 1.6rem;
}
.iuno-section-title::before {
	content: "☾";
	color: #e8c97e;
	font-size: 1.1em;
	text-shadow: 0 0 10px rgba(232,201,126,.6);
}
.iuno-posts .wp-block-post-template { gap: 1.4rem; }
.iuno-card {
	height: 100%;
	padding: 1.4rem 1.6rem 1.5rem !important;
	border-radius: 20px;
	background: linear-gradient(160deg, rgba(24,39,88,.72), rgba(14,24,60,.72));
	border: 1px solid rgba(143,208,255,.16);
	box-shadow: 0 10px 30px rgba(2,6,23,.35);
	transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.iuno-card:hover {
	transform: translateY(-3px);
	border-color: rgba(232,201,126,.55);
	box-shadow: 0 16px 40px rgba(2,6,23,.5), 0 0 0 1px rgba(232,201,126,.15);
}
.iuno-card > * { margin-top: 0 !important; margin-bottom: .55rem; }
.iuno-card .wp-block-post-featured-image { margin: -1.4rem -1.6rem 1rem !important; overflow: hidden; border-radius: 20px 20px 0 0; }
.iuno-card .wp-block-post-featured-image img { transition: transform .4s ease; }
.iuno-card:hover .wp-block-post-featured-image img { transform: scale(1.04); }
.iuno-card .wp-block-post-title a { color: #f4f7ff; text-decoration: none !important; }
.iuno-card .wp-block-post-title a:hover { color: #8fd0ff; }
.iuno-card .wp-block-post-date { font-size: .82rem; letter-spacing: .08em; }
.iuno-card .wp-block-post-excerpt__excerpt {
	color: #b9c6ea;
	font-size: .96rem;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin-bottom: .6rem;
}
.iuno-card .wp-block-post-excerpt__more-link { font-weight: 700; font-size: .9rem; }
.iuno-posts .wp-block-query-pagination { margin-top: 2rem; }

/* ---------- 文章页、单页 ---------- */
body.single main > .wp-block-group.alignfull,
body.page main > .wp-block-group.alignfull {
	max-width: min(860px, calc(100% - 2rem));
	margin-left: auto !important;
	margin-right: auto !important;
	padding-left: clamp(1.2rem, 4vw, 3rem) !important;
	padding-right: clamp(1.2rem, 4vw, 3rem) !important;
	border-radius: 24px;
	background: rgba(14,24,60,.66);
	border: 1px solid rgba(143,208,255,.14);
	box-shadow: 0 18px 50px rgba(2,6,23,.4);
}
body.single .wp-block-post-title,
body.page .wp-block-post-title {
	font-size: clamp(1.8rem, 4vw, 2.6rem);
	padding-bottom: .8rem;
	border-bottom: 1px solid rgba(232,201,126,.25);
}
.wp-block-post-content blockquote,
.wp-block-quote {
	border-left: 3px solid #e8c97e;
	background: rgba(143,208,255,.06);
	padding: .8rem 1.2rem;
	border-radius: 0 12px 12px 0;
}
.wp-block-post-content :not(pre) > code {
	background: rgba(143,208,255,.12);
	color: #cfe9ff;
	padding: .1em .4em;
	border-radius: 6px;
	font-size: .9em;
}
.wp-block-code { border-radius: 14px; border: 1px solid rgba(143,208,255,.14); }
.wp-block-post-content iframe { border-radius: 16px !important; box-shadow: 0 10px 30px rgba(2,6,23,.4); background: #f5f7fb; }
.wp-block-separator { border-color: rgba(232,201,126,.3) !important; }
.wp-block-search__input { background: rgba(8,14,38,.6); color: #e9eeff; border: 1px solid rgba(143,208,255,.3); border-radius: 999px; padding-left: 1rem; }
.wp-block-search__button { border-radius: 999px; }
.wp-block-comment-template li, .wp-block-comments .wp-block-comment-content { color: #d7e1ff; }

/* ---------- 404 ---------- */
.iuno-404 { text-align: center; padding: 3rem 0 2rem; }
.iuno-404 .wp-block-image img { border-radius: 50%; background: rgba(143,208,255,.12); box-shadow: 0 0 0 6px rgba(143,208,255,.08), 0 0 40px rgba(143,208,255,.25); }
.iuno-404 h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: .4rem; }
.iuno-404 p { color: #b9c6ea; }

/* ---------- 页脚 ---------- */
.iuno-footer {
	margin-top: var(--wp--preset--spacing--70);
	padding-top: 2.2rem;
	padding-bottom: 2.2rem;
	background: linear-gradient(180deg, rgba(7,13,36,0), rgba(7,13,36,.85));
	border-top: 1px solid rgba(232,201,126,.18);
}
.iuno-footer-inner { gap: 1.2rem 2rem; }
.iuno-footer-brand { gap: 1rem; }
.iuno-footer-meme { margin: 0 !important; flex: none; }
.iuno-footer-meme img {
	width: 64px; height: 64px;
	border-radius: 50%;
	background: rgba(143,208,255,.12);
	box-shadow: 0 0 0 3px rgba(232,201,126,.35);
}
.iuno-footer .wp-block-site-title { margin: 0; font-size: 1.1rem; }
.iuno-footer .wp-block-site-title a { color: #f4f7ff; text-decoration: none !important; }
.iuno-footer-note { margin: .1rem 0 0; color: #9fb0d8; font-size: .88rem; }
.iuno-footer-meta { text-align: right; }
.iuno-footer-meta p { margin: .15rem 0; font-size: .82rem; color: #8d9cc6; }
.iuno-footer-meta a { color: #aebde4; }
@media (max-width: 640px) {
	.iuno-footer-meta { text-align: left; }
	.iuno-hero {
		min-height: 70vh;
		padding-top: 4rem;
		background: linear-gradient(180deg, rgba(7,13,36,.15) 0%, rgba(7,13,36,.55) 45%, #0a1330 100%), url("moon-hero.jpg") 58% 30% / cover no-repeat; }
}

/* 手机菜单展开时 */
.wp-block-navigation__responsive-container.is-menu-open { background: rgba(8,14,38,.97) !important; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.iuno-card, .iuno-card .wp-block-post-featured-image img, .iuno-header .wp-block-navigation a::after { transition: none; }
}

/* ---------- 窄屏与嵌入页补丁 ---------- */
.iuno-posts .wp-block-post-template {
	grid-template-columns: repeat(auto-fill, minmax(min(20rem, 100%), 1fr)) !important;
}
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close { color: #e9eeff; }
body.page main > .wp-block-group.alignfull:has(iframe) { max-width: min(1180px, calc(100% - 2rem)); }
body.page .wp-block-post-content.is-layout-constrained > iframe { max-width: 100% !important; }
body.page main > .wp-block-group.alignfull:has(iframe) > .wp-block-post-title { max-width: 100% !important; }
