/* 全局重置 */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 页面背景 */
body {
	width: 100vw;
	height: 100vh;
	overflow: hidden;
	background: url(../image/background.jpg) center/cover no-repeat;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

/* 登录卡片 - 毛玻璃+悬浮阴影 */
.login-card {
	position: relative;
	z-index: 1;
	width: 420px;
	padding: 20px 40px;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid #fff;
	border-radius: 30px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(23, 228, 231, 0.04) 100%);
	box-shadow: 0 4px 50px 0 rgba(23, 228, 231, 0.20);
}

/* 欢迎标题 */
.login-title {
	font-size: 36px;
	font-weight: 600;
	color: #ffffff;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	margin-bottom: 20px;
	text-align: left;
}

/* 登录方式切换 */
.login-tabs {
	display: flex;
	gap: 32px;
	margin-bottom: 20px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.3);
	padding-bottom: 8px;
}

.tab-item {
	font-size: 18px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.7);
	cursor: pointer;
	transition: all 0.3s ease;
	position: relative;
	padding-bottom: 8px;
}

.tab-item.active {
	color: #ffffff;
}

.tab-item.active::after {
	content: '';
	position: absolute;
	bottom: -9px;
	left: 0;
	width: 100%;
	height: 2px;
	background: #ffffff;
}

/* ===================== 新版输入框：fieldset + legend ===================== */
.input-frame {
	position: relative;
	border: 1px solid #fff;
	border-radius: 12px;
	padding: 0 16px;
	margin-bottom: 24px;
	background: transparent;
	transition: all 0.3s ease;
}

.input-frame legend {
	font-size: 14px;
	font-weight: 500;
	color: #fff;
	padding: 0 8px;
	margin: 0;
	width: auto;
	float: none;
	transition: all 0.3s ease;
}

.input-frame input {
	width: 100%;
	height: 35px;
	border: none;
	background: transparent;
	outline: none;
	color: #ffffff;
	font-size: 14px;
	padding: 0;
	transform: translateY(-3px) translateX(8px);
}

.input-frame input::placeholder {
	color: rgba(255, 255, 255, 0.60);
}

/* 聚焦状态 */
.input-frame:focus-within {
	border-color: #62F7F9;
}

.input-frame:focus-within legend {
	color: #62F7F9;
}

/* 验证码行 */
.code-row {
	display: flex;
	gap: 12px;
	align-items: stretch;
	margin-bottom: 24px;
}

.code-row .input-frame {
	flex: 1;
	margin-bottom: 0;
}

.code-img,
.send-code {
	width: 152px;
	height: 40px;
	border-radius: 10px;
	cursor: pointer;
	position: absolute;
	right: 2px;
	top: 50%;
	transform: translateY(-62%);
	background: #fff;
	color: #000;
	text-align: center;
	line-height: 40px;
	border: none;
}

/* 切换链接 */
.code-login-link,
.pwd-login-link {
	text-align: right;
	margin-top: -8px;
	margin-bottom: 24px;
}

.code-login-link a,
.pwd-login-link a {
	color: rgba(0, 0, 0, 0.80);
	font-size: 14px;
	text-decoration: none;
	transition: all 0.3s ease;
}

.code-login-link a:hover,
.pwd-login-link a:hover {
	color: #ffffff;
}

/* 登录按钮 */
.login-btn {
	width: 100%;
	height: 45px;
	background: #ffffff;
	border: none;
	border-radius: 12px;
	font-size: 16px;
	font-weight: 600;
	color: #000;
	cursor: pointer;
	transition: all 0.3s ease;
	margin-bottom: 16px;
}

.login-btn:hover {
	background: #f8fafc;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 底部链接 */
.footer-links {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.footer-link {
	color: rgba(0, 0, 0, 0.80);
	font-size: 14px;
	text-decoration: none;
	transition: all 0.3s ease;
}

.footer-link:hover {
	color: #ffffff;
}

/* 响应式 */
@media (max-width: 576px) {
	.login-card {
		width: 90%;
		padding: 24px 20px 32px;
	}

	.login-title {
		font-size: 28px;
	}
}

/* 核心：页面互斥隐藏样式 */
.login-page,
.reg-page {
	display: none;
}

.login-page.show,
.reg-page.show {
	display: block;
}

/* 注册模块默认隐藏控制 */
.reg-box {
	display: none;
}

.reg-box.active {
	display: block;
}

/* ===================== 错误状态样式 ===================== */
.input-frame.error {
	border-color: #FB5151 !important;
}

.input-frame.error legend {
	color: #FB5151 !important;
}

.error-tip {
	font-size: 14px;
	color: #FB5151;
	/* display: none; */
	position: absolute;
	bottom: -25px;
	left: 24px;
}


/* ===================== 协议同意区域样式 ===================== */
.agree-agreement {
	margin-bottom: 12px;
	/* 距离上面输入框，距离下面按钮的间距 */
}

.agree-label {
	display: flex;
	align-items: center;
	/* 垂直居中 */
	cursor: pointer;
	font-size: 14px;
	color: #000;
	position: relative;
	padding-left: 28px;
	/* 给勾选框留出位置 */
}

/* 隐藏原生 checkbox */
.agree-check {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

/* 模拟勾选框外观 */
.check-icon {
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 16px;
	height: 16px;
	border: 1.5px solid #000;
	border-radius: 4px;
	transition: all 0.2s ease;
	box-sizing: border-box;
}

/* 勾选状态：变橙色、显示对勾 */
.agree-check:checked+.check-icon {
	background-color: #FF6B3E;
	border-color: #FF6B3E;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3E%3Cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3E%3C/svg%3E");
	background-size: 100%;
	background-repeat: no-repeat;
	background-position: center;
}

/* 文字样式 */
.agree-text {
	line-height: 1.5;
	margin-left: -8px;
}

/* 协议链接高亮 */
.protocol-link {
	color: #FF6B3E;
	/* 橙色高亮 */
	text-decoration: none;
}

.protocol-link:hover {
	text-decoration: underline;
}

/* 找回密码页面控制 */
.forgot-page {
	display: none;
}

.forgot-page.show {
	display: block;
	color: transparent;
}

input {
	caret-color: #fff !important;
	background: transparent !important;
}

input:-webkit-autofill {
	-webkit-text-fill-color: #fff !important;
	-webkit-box-shadow: 0 0 0 1000px transparent inset !important;
	background: transparent !important;
	transition: background-color 999999s ease-in-out 0s !important;
}