/* ============================================================
   登录 / 注册 / 找回密码 —— 卡片式布局 v2
   左插画封面 + 右白色表单，整卡居中
   注意：主题 customlogin.min.css 里把 #login 写成了
   position:fixed; right:15%; width:320px，这里必须用
   body.login #login 提高优先级并 !important 覆盖掉
   ============================================================ */

/* ---------- 页面背景 ---------- */
html body.login {
	background: #0f1626 !important;
	min-height: 100vh !important;
	height: auto !important;
	/* 用块级流 + auto 外边距居中，比 flex 稳：
	   页面上任何游离元素都不会把卡片挤到一边 */
	display: block !important;
	padding: min(max(24px, calc(50vh - 280px)), 150px) 20px 48px !important;
	margin: 0 !important;
	position: relative;
	overflow-x: hidden;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;

	/* 图片地址做成变量，PHP 只需覆盖这两个变量就能加版本号绕缓存 */
	--moe-bg: url(login-bg.jpg);
	--moe-cover: url(login-cover.jpg);
}

html body.login::before {
	content: "";
	position: fixed;
	inset: -6%;
	background-image: var(--moe-bg);
	background-repeat: no-repeat;
	background-position: center;
	background-size: cover;
	filter: blur(6px) saturate(1.05) brightness(.92);
	transform: scale(1.05);
	z-index: 0;
	pointer-events: none;
}

html body.login::after {
	content: "";
	position: fixed;
	inset: 0;
	background:
		radial-gradient(120% 90% at 20% 10%, rgba(58, 92, 150, .45), transparent 60%),
		linear-gradient(135deg, rgba(12, 18, 32, .78), rgba(22, 34, 58, .68));
	z-index: 0;
	pointer-events: none;
}

/* ---------- 卡片本体 ---------- */
html body.login #login {
	position: relative !important;
	top: auto !important;
	right: auto !important;
	bottom: auto !important;
	left: auto !important;
	float: none !important;
	z-index: 2;

	width: 920px !important;
	max-width: 100% !important;
	height: auto !important;
	min-height: 560px;
	margin: 0 auto !important;
	padding: 54px 56px 36px 410px !important;

	background-color: #fff !important;
	background-image: none !important;

	border-radius: 18px !important;
	box-shadow: 0 30px 80px rgba(8, 14, 26, .55), 0 2px 10px rgba(8, 14, 26, .25) !important;
	overflow: hidden !important;
	box-sizing: border-box !important;
}

/* 左侧插画封面：只占左边 372px，用 cover 裁切所以不管卡片多高都不会变形 */
html body.login #login::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 372px;
	background-image: var(--moe-cover);
	background-repeat: no-repeat;
	background-position: center top;
	background-size: cover;
	pointer-events: none;
	z-index: 0;
}

/* 封面上的站名 */
html body.login #login::after {
	content: "我欲乘风归去";
	position: absolute;
	left: 32px;
	bottom: 34px;
	top: auto;
	width: 300px;
	color: #fff;
	font-size: 18px;
	font-weight: 600;
	letter-spacing: 4px;
	line-height: 1.6;
	text-shadow: 0 2px 16px rgba(0, 0, 0, .5);
	z-index: 1;
	pointer-events: none;
}

/* 表单区必须压在封面之上；底部两个链接不需要抬层级，避免再盖住按钮 */
html body.login #login > * {
	position: relative;
	z-index: 1;
}

html body.login #login > #nav,
html body.login #login > #backtoblog {
	z-index: 0;
}

/* ---------- 站名 / logo ---------- */
html body.login #login h1 {
	margin: 0 0 28px !important;
	text-align: left !important;
	padding: 0 !important;
}

html body.login #login h1 a {
	position: static !important;
	background: none !important;
	background-image: none !important;
	width: auto !important;
	height: auto !important;
	min-height: 0 !important;
	text-indent: 0 !important;
	overflow: visible !important;
	display: block !important;
	margin: 0 !important;
	padding: 0 !important;
	font-size: 25px !important;
	line-height: 1.3 !important;
	font-weight: 600;
	color: #1d2433 !important;
	letter-spacing: 1px;
	text-decoration: none;
	box-shadow: none !important;
	outline: none;
}

html body.login #login h1 a::after {
	content: "欢迎回来，请登录";
	display: block;
	margin-top: 8px;
	font-size: 13px;
	font-weight: 400;
	color: #9aa4b8;
	letter-spacing: 0;
}

/* ---------- 提示条 ---------- */
html body.login .message,
html body.login .success,
html body.login #login_error,
html body.login .notice {
	position: relative;
	margin: 0 0 20px !important;
	padding: 11px 14px !important;
	border-radius: 9px !important;
	border: 0 !important;
	border-left: 3px solid #6ec39a !important;
	background: #f1fbf5 !important;
	box-shadow: none !important;
	font-size: 13px !important;
	line-height: 1.65;
	color: #33584a !important;
}

html body.login #login_error {
	border-left-color: #ff8fab !important;
	background: #fff6f8 !important;
	color: #8a3c50 !important;
}

/* 注册页那句「不发确认邮件」的提示 */
html body.login #login .moe-hint {
	margin: 0 0 18px !important;
	padding: 10px 14px !important;
	font-size: 13px !important;
	line-height: 1.65;
	color: #8a5470 !important;
	background: #fff6f9 !important;
	border: 0 !important;
	border-left: 3px solid #ffb3c6 !important;
	border-radius: 0 9px 9px 0 !important;
	box-shadow: none !important;
}

/* ---------- 表单 ---------- */
html body.login #login form {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	padding: 0 !important;
	margin: 0 !important;
	overflow: visible !important;
}

html body.login #login form p {
	margin: 0 0 15px !important;
}

html body.login #login label {
	display: block;
	font-size: 13px !important;
	color: #5a6478 !important;
	margin-bottom: 7px !important;
	font-weight: 500;
}

html body.login #login form .input,
html body.login #login input[type="text"],
html body.login #login input[type="password"],
html body.login #login input[type="email"] {
	width: 100% !important;
	box-sizing: border-box;
	border: 1px solid #dde4f0 !important;
	border-radius: 10px !important;
	padding: 12px 14px !important;
	font-size: 14px !important;
	line-height: 1.4 !important;
	color: #1d2433 !important;
	background: #f8fafd !important;
	box-shadow: none !important;
	transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
	margin: 0 !important;
}

html body.login #login form .input:focus,
html body.login #login input[type="text"]:focus,
html body.login #login input[type="password"]:focus,
html body.login #login input[type="email"]:focus {
	border-color: #7ea9e8 !important;
	background: #fff !important;
	box-shadow: 0 0 0 3px rgba(126, 169, 232, .22) !important;
	outline: none !important;
}

/* 密码框 + 眼睛按钮 */
html body.login #login .wp-pwd,
html body.login #login .password-input-wrapper {
	position: relative;
	display: block;
}

html body.login #login .wp-pwd .input,
html body.login #login .password-input-wrapper .input {
	padding-right: 46px !important;
}

html body.login #login .button.wp-hide-pw,
html body.login #login .moe-eye {
	position: absolute;
	right: 7px;
	top: 50%;
	transform: translateY(-50%);
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	color: #9aa7bb !important;
	width: 30px;
	height: 30px;
	line-height: 30px;
	padding: 0 !important;
	cursor: pointer;
	border-radius: 7px;
	transition: color .2s, background .2s;
	display: flex;
	align-items: center;
	justify-content: center;
}

html body.login #login .moe-eye:hover {
	color: #3b7ddd !important;
	background: #eef4fd !important;
}

html body.login #login .moe-eye svg {
	width: 17px;
	height: 17px;
	vertical-align: middle;
}

/* 记住我 */
html body.login #login .forgetmenot {
	float: none !important;
	margin: 4px 0 18px !important;
	font-size: 13px !important;
}

html body.login #login .forgetmenot label {
	display: inline-flex !important;
	align-items: center;
	gap: 7px;
	margin: 0 !important;
	font-weight: 400;
	color: #6b7690 !important;
	cursor: pointer;
}

html body.login #login input[type="checkbox"] {
	width: 15px;
	height: 15px;
	border: 1px solid #c8d3e6;
	border-radius: 4px;
	background: #fff;
	margin: 0;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	position: relative;
}

html body.login #login input[type="checkbox"]:checked {
	background: #3b7ddd;
	border-color: #3b7ddd;
}

html body.login #login input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	left: 4px;
	top: 1px;
	width: 5px;
	height: 9px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(42deg);
}

/* 登录按钮
   WordPress 默认给 #wp-submit 加了 float:right，父级 .submit 会高度塌成 0，
   下面的 #nav 就会顶上来盖住按钮，点击被它吃掉（表现为「点登录没反应」）。
   必须先 float:none 再清浮动。 */
html body.login #login .submit {
	margin: 0 0 6px !important;
	clear: both !important;
	overflow: visible !important;
}

html body.login #login .button-primary,
html body.login #login input[type="submit"],
html body.login #login #wp-submit {
	float: none !important;
	clear: both !important;
	display: block !important;
	width: 100% !important;
	height: 47px !important;
	line-height: 47px !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 10px !important;
	background: linear-gradient(135deg, #4a90e2 0%, #2f6fd0 100%) !important;
	box-shadow: 0 8px 22px rgba(58, 116, 208, .38) !important;
	color: #fff !important;
	font-size: 15px !important;
	font-weight: 500;
	letter-spacing: 3px;
	text-shadow: none !important;
	cursor: pointer;
	position: relative;
	z-index: 2;
	transition: transform .2s cubic-bezier(.3, 1.4, .5, 1), box-shadow .2s ease;
}

html body.login #login .button-primary:hover,
html body.login #login input[type="submit"]:hover,
html body.login #login #wp-submit:hover {
	transform: translateY(-1px);
	box-shadow: 0 11px 28px rgba(58, 116, 208, .48) !important;
	background: linear-gradient(135deg, #5a9ceb 0%, #3a7cd9 100%) !important;
}

html body.login #login .button-primary:active {
	transform: translateY(0);
	box-shadow: 0 4px 12px rgba(58, 116, 208, .35) !important;
}

/* ---------- 底部链接 ---------- */
html body.login #login #nav,
html body.login #login #backtoblog {
	margin: 18px 0 0 !important;
	padding: 0 !important;
	text-align: left !important;
	font-size: 13px !important;
	line-height: 1.9;
	color: #8a94a8;
	float: none !important;
}

html body.login #login #nav a,
html body.login #login #backtoblog a {
	color: #6b7690 !important;
	text-decoration: none;
	padding: 0 5px;
	border-radius: 4px;
	transition: color .2s;
}

html body.login #login #nav a:hover,
html body.login #login #backtoblog a:hover {
	color: #3b7ddd !important;
	text-decoration: none;
}

/* 注册链接做得醒目一点 */
html body.login #login #nav a[href*="action=register"] {
	color: #ff6f95 !important;
	font-weight: 500;
}

html body.login #login #nav a[href*="action=register"]:hover {
	color: #ff4d7d !important;
}

/* 隐藏语言切换 */
html body.login .language-switcher,
html body.login #language-switcher {
	display: none !important;
}

html body.login .privacy-policy-page-link {
	font-size: 12px;
	color: #a3acbe;
	margin-top: 12px !important;
	text-align: left !important;
}

html body.login .privacy-policy-page-link a {
	color: #8a94a8 !important;
}

/* ---------- 注册页 / 找回密码页：字段更多，卡片自然变高 ---------- */
html body.login #login #registerform p,
html body.login #login #lostpasswordform p {
	margin-bottom: 13px !important;
}

/* 注册页的昵称说明、密码强度提示 */
html body.login #login .indicator-hint,
html body.login #login .description {
	font-size: 12px !important;
	color: #9aa4b8 !important;
	margin-top: 6px !important;
}

html body.login #login .pw-weak .indicator-hint {
	color: #e06a82 !important;
}

/* ---------- 小屏 ---------- */
@media (max-width: 860px) {
	html body.login {
		padding: 22px 14px 34px !important;
	}

	html body.login #login {
		width: 100% !important;
		min-height: 0;
		padding: 26px 26px 30px !important;
		border-radius: 15px !important;
		background-image: none !important;
		padding-top: 202px !important;
	}

	/* 手机上封面变成顶部一条横幅：白渐变叠加在图上，向下过渡到卡片底色 */
	html body.login #login::before {
		width: auto;
		height: 178px;
		right: 0;
		bottom: auto;
		background-image: linear-gradient(180deg, rgba(10, 16, 28, .30) 0%, rgba(255, 255, 255, 0) 46%, #fff 100%), var(--moe-cover);
		background-position: center, center 22%;
		background-size: 100% 100%, cover;
	}

	html body.login #login::after {
		left: 26px;
		top: 28px;
		bottom: auto;
		width: auto;
		font-size: 15px;
		letter-spacing: 3px;
		text-shadow: 0 2px 12px rgba(0, 0, 0, .75), 0 0 22px rgba(0, 0, 0, .45);
	}

	html body.login #login h1 {
		margin-bottom: 22px !important;
	}

	html body.login #login h1 a {
		font-size: 21px !important;
	}
}

/* ---------- 动画偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
	html body.login #login .button-primary,
	html body.login #login input[type="submit"] {
		transition: none;
	}
}
