/* 资源插件 — 登录/注册/找回密码弹窗（BlogHao 样式）。
 * 登录蓝 / 注册绿 / 找回密码橙；卡片居中，上方显示网站 LOGO。
 * 同时屏蔽 DUX 自带的 .sign 弹窗（不改主题文件，只用 CSS 隐藏）。 */

/* DUX 自带弹窗不再出现：我们的弹窗接管所有 .signin-loader / .signup-loader 点击。 */
.sign {
	display: none !important;
}

.zy-auth-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
	overflow-y: auto;
}

.zy-auth-overlay[hidden] {
	display: none;
}

.zy-auth-mask {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
}

.zy-auth-card {
	position: relative;
	width: 100%;
	max-width: 380px;
	max-height: 92vh;
	max-height: 92dvh;
	margin: auto;
	overflow-y: auto;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 24px 60px rgba(2, 6, 23, 0.35);
	box-sizing: border-box;
	--zy-auth-accent: #2563eb;
	--zy-auth-accent-dark: #1d4ed8;
	--zy-auth-accent-soft: #eff6ff;
}

.zy-auth-card.zy-auth-mode-register {
	--zy-auth-accent: #16a34a;
	--zy-auth-accent-dark: #15803d;
	--zy-auth-accent-soft: #f0fdf4;
}

.zy-auth-card.zy-auth-mode-reset {
	--zy-auth-accent: #ea580c;
	--zy-auth-accent-dark: #c2410c;
	--zy-auth-accent-soft: #fff7ed;
}

.zy-auth-close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 50%;
	background: rgba(15, 23, 42, 0.06);
	color: #64748b;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.zy-auth-close:hover {
	background: rgba(15, 23, 42, 0.12);
	color: #0f172a;
}

.zy-auth-head {
	padding: 28px 24px 8px;
	text-align: center;
	background: var(--zy-auth-accent-soft);
	border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.zy-auth-logo-img {
	display: block;
	width: 56px;
	height: 56px;
	margin: 0 auto 10px;
	border-radius: 50%;
	object-fit: cover;
	background: #fff;
	box-shadow: 0 1px 6px rgba(2, 6, 23, 0.15);
}

.zy-auth-logo-text {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin: 0 auto 10px;
	border-radius: 50%;
	background: var(--zy-auth-accent);
	color: #fff;
	font-size: 28px;
	font-weight: 700;
	box-shadow: 0 1px 6px rgba(2, 6, 23, 0.2);
}

.zy-auth-title {
	font-size: 18px;
	font-weight: 700;
	color: #0f172a;
}

.zy-auth-tabs {
	display: flex;
	padding: 0 24px;
	border-bottom: 1px solid #e2e8f0;
}

.zy-auth-card.zy-auth-on-reset .zy-auth-tabs {
	display: none;
}

.zy-auth-tab {
	flex: 1;
	padding: 12px 0 10px;
	border: 0;
	border-bottom: 2px solid transparent;
	background: none;
	color: #64748b;
	font-size: 15px;
	cursor: pointer;
}

.zy-auth-tab.is-active {
	border-bottom-color: var(--zy-auth-accent);
	color: var(--zy-auth-accent);
	font-weight: 700;
}

.zy-auth-body {
	padding: 20px 24px 24px;
}

.zy-auth-pane {
	display: none;
}

.zy-auth-pane.is-active {
	display: block;
}

.zy-auth-mode {
	display: flex;
	gap: 8px;
	margin-bottom: 16px;
}

.zy-auth-mode-btn {
	flex: 1;
	padding: 8px 0;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #f8fafc;
	color: #475569;
	font-size: 13px;
	cursor: pointer;
}

.zy-auth-mode-btn.is-active {
	border-color: var(--zy-auth-accent);
	background: var(--zy-auth-accent-soft);
	color: var(--zy-auth-accent);
	font-weight: 700;
}

.zy-auth-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.zy-auth-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 14px;
	color: #334155;
}

.zy-auth-field input {
	width: 100%;
	height: 44px;
	padding: 0 12px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #fff;
	font-size: 15px;
	color: #0f172a;
	box-sizing: border-box;
	outline: none;
}

.zy-auth-field input:focus {
	border-color: var(--zy-auth-accent);
	box-shadow: 0 0 0 3px var(--zy-auth-accent-soft);
}

.zy-auth-field-code {
	position: relative;
}

.zy-auth-field-code input {
	padding-right: 118px;
}

.zy-auth-code-btn {
	position: absolute;
	right: 6px;
	bottom: 6px;
	height: 32px;
	padding: 0 12px;
	border: 0;
	border-radius: 6px;
	background: var(--zy-auth-accent);
	color: #fff;
	font-size: 13px;
	white-space: nowrap;
	cursor: pointer;
}

.zy-auth-code-btn:disabled {
	background: #94a3b8;
	cursor: not-allowed;
}

.zy-auth-error {
	color: #e11d48;
	font-size: 13px;
	line-height: 1.6;
}

.zy-auth-submit {
	width: 100%;
	height: 44px;
	border: 0;
	border-radius: 8px;
	background: var(--zy-auth-accent);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
}

.zy-auth-submit:hover {
	background: var(--zy-auth-accent-dark);
}

.zy-auth-submit:disabled {
	background: #94a3b8;
	cursor: not-allowed;
}

.zy-auth-foot {
	display: flex;
	justify-content: space-between;
	margin-top: 16px;
}

.zy-auth-foot-center {
	justify-content: center;
}

.zy-auth-link {
	padding: 0;
	border: 0;
	background: none;
	color: var(--zy-auth-accent);
	font-size: 13px;
	cursor: pointer;
}

.zy-auth-link:hover {
	text-decoration: underline;
}

@media (max-width: 480px) {
	.zy-auth-card {
		max-width: 100%;
	}
}
