/**
 * 登录安全验证 —— 弹窗样式。
 * 全部类名带 lv- 前缀，避免与主题冲突。
 */

.lv-mask {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(15, 23, 42, 0.55);
	opacity: 0;
	transition: opacity 0.18s ease;
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
}

.lv-mask.lv-open {
	opacity: 1;
}

.lv-modal {
	width: 100%;
	max-width: 360px;
	box-sizing: border-box;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 20px 48px rgba(15, 23, 42, 0.28);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
		"Hiragino Sans GB", "Microsoft YaHei", sans-serif;
	transform: translateY(12px) scale(0.98);
	transition: transform 0.18s ease;
}

.lv-mask.lv-open .lv-modal {
	transform: translateY(0) scale(1);
}

/* ------------------------------------------------------------------ 头部 */

.lv-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	border-bottom: 1px solid #eef1f5;
}

.lv-title {
	font-size: 15px;
	font-weight: 600;
	color: #1f2937;
	line-height: 1.2;
}

.lv-close {
	all: unset;
	cursor: pointer;
	width: 26px;
	height: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	font-size: 20px;
	line-height: 1;
	color: #98a2b3;
	transition: background 0.15s ease, color 0.15s ease;
}

.lv-close:hover {
	background: #f2f4f7;
	color: #475467;
}

/* ------------------------------------------------------------------ 主体 */

.lv-body {
	padding: 18px 16px 6px;
}

.lv-loading {
	padding: 26px 0;
	text-align: center;
	font-size: 13px;
	color: #98a2b3;
}

.lv-msg {
	min-height: 18px;
	padding: 4px 16px 14px;
	font-size: 12.5px;
	line-height: 1.5;
	color: #98a2b3;
}

.lv-msg-error {
	color: #d92d20;
}

.lv-msg-ok {
	color: #039855;
}

.lv-msg-info {
	color: #667085;
}

/* ------------------------------------------------------------------ 滑块 */

.lv-slider {
	position: relative;
	height: 44px;
	border-radius: 8px;
	background: #f2f4f7;
	border: 1px solid #e4e7ec;
	overflow: hidden;
	user-select: none;
	-webkit-user-select: none;
	touch-action: none;
}

.lv-slider-fill {
	position: absolute;
	inset: 0 auto 0 0;
	width: 0;
	background: #d1fadf;
	border-right: 1px solid #a6f4c5;
}

.lv-slider-text {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	color: #667085;
	pointer-events: none;
}

.lv-slider-handle {
	position: relative;
	width: 46px;
	height: 100%;
	background: #fff;
	border-radius: 7px;
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.16);
	cursor: grab;
}

.lv-slider-handle::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 8px;
	height: 8px;
	margin: -5px 0 0 -5px;
	border-top: 2px solid #667085;
	border-right: 2px solid #667085;
	transform: rotate(45deg);
}

.lv-slider-active .lv-slider-handle {
	cursor: grabbing;
}

.lv-slider-reset .lv-slider-handle,
.lv-slider-reset .lv-slider-fill {
	transition: transform 0.25s ease, width 0.25s ease;
}

.lv-slider-done .lv-slider-text {
	color: #027a48;
	font-weight: 600;
}

.lv-slider-done .lv-slider-handle::after {
	width: 5px;
	height: 10px;
	margin: -6px 0 0 -3px;
	border-top: none;
	border-right: 2px solid #12b76a;
	border-bottom: 2px solid #12b76a;
	transform: rotate(45deg);
}

/* -------------------------------------------------- 算术题 / 图形验证码 */

.lv-quiz-label {
	font-size: 13px;
	color: #475467;
	margin-bottom: 10px;
}

.lv-quiz-stage {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 12px;
	background: #f9fafb;
	border: 1px solid #eef1f5;
	border-radius: 8px;
}

.lv-question {
	font-size: 20px;
	font-weight: 600;
	letter-spacing: 1px;
	color: #1f2937;
	font-variant-numeric: tabular-nums;
}

.lv-captcha {
	display: block;
	height: 44px;
	width: auto;
	max-width: 100%;
	border-radius: 4px;
	cursor: pointer;
}

.lv-refresh {
	all: unset;
	cursor: pointer;
	flex: none;
	font-size: 12.5px;
	color: #3538cd;
	padding: 4px 6px;
	border-radius: 5px;
}

.lv-refresh:hover {
	background: #eef4ff;
}

.lv-quiz-row {
	display: flex;
	gap: 8px;
	margin-top: 12px;
}

.lv-input {
	flex: 1 1 auto;
	min-width: 0;
	box-sizing: border-box;
	height: 40px;
	padding: 0 12px;
	font-size: 14px;
	color: #1f2937;
	background: #fff;
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.lv-input:focus {
	border-color: #849dff;
	box-shadow: 0 0 0 3px rgba(132, 157, 255, 0.24);
}

.lv-submit {
	all: unset;
	box-sizing: border-box;
	flex: none;
	cursor: pointer;
	height: 40px;
	padding: 0 18px;
	border-radius: 8px;
	background: #3538cd;
	color: #fff;
	font-size: 14px;
	font-weight: 500;
	text-align: center;
	transition: background 0.15s ease;
}

.lv-submit:hover {
	background: #2d30a6;
}

.lv-submit:disabled {
	opacity: 0.55;
	cursor: default;
}

/*
 * 刻意不跟随 prefers-color-scheme。
 * 弹窗浮在深色遮罩之上，浅色卡片在浅色和深色主题下都成立；
 * 跟随系统反而会出现"浅色登录页 + 深色弹窗"的割裂感。
 */

/* ---------------------------------------------------------------- 窄屏 */

@media (max-width: 400px) {
	.lv-modal {
		max-width: 100%;
	}

	.lv-question {
		font-size: 18px;
	}

	.lv-submit {
		padding: 0 14px;
	}
}
