/* 全局重置 */
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	font-family: "Microsoft YaHei", sans-serif;
}

html, body {
	height: auto;
	margin: 0;
	padding: 0;
}

body {
	background-color: #f5f5f5;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

/* 注册卡片容器 */
.register-container {
	background-color: #fff;
	width: 850px;
	max-width: 100%;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
	border-radius: 4px;
	overflow: hidden;
	padding-bottom: 25px;
	margin: 0;
	height: auto;
}

/* 顶部蓝色栏 */
.header {
	background-color: #e6f2ff;
	padding: 18px 0;
	text-align: center;
	border-bottom: 1px solid #d0e4f5;
}

.header h2 {
	display: inline-block;
	color: #1e90ff;
	font-weight: bold;
	font-size: 22px;
	margin-right: 15px;
}

.header .login-link {
	font-size: 13px;
	color: #666;
}

.header .login-link a {
	color: #1e90ff;
	text-decoration: none;
}

.header .login-link a:hover {
	text-decoration: underline;
}

/* 表单区域 */
.form-area {
	padding: 25px 50px 10px;
}

.form-group {
	display: flex;
	align-items: center;
	margin-bottom: 20px;
	position: relative;
	width: 100%;
	flex-wrap: nowrap !important;
	justify-content: center;
}

.form-group label {
	width: 110px;
	text-align: right;
	padding-right: 15px;
	font-size: 14px;
	color: #333;
	flex-shrink: 0;
}

.form-group label span.required {
	color: #ff4d4f;
	margin-right: 4px;
}

/* 输入框容器 - 变窄 */
.input-wrapper {
	flex: none;
	width: 420px;
	max-width: 70%;
	position: relative;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.form-control {
	width: 100%;
	height: 36px;
	padding: 0 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	color: #333;
	outline: none;
	transition: border-color 0.3s;
}

.form-control:focus {
	border-color: #1e90ff;
}

.form-control::placeholder {
	color: #c5c5c5;
}

.password-wrapper {
	position: relative;
	width: 100%;
}

.toggle-password {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	cursor: pointer;
	color: #999;
}

.toggle-password:hover {
	color: #333;
}

.helper-text {
	font-size: 12px;
	color: #999;
	margin-top: 3px;
	padding-left: 0;
}

/* 图形验证码 - 样式参考找回密码 */
.captcha-wrapper {
	display: flex;
	width: 100%;
}

.captcha-input {
	flex: 1;
	height: 36px;
	padding: 0 10px;
	border: 1px solid #ddd;
	border-right: none;
	border-radius: 4px 0 0 4px;
	font-size: 14px;
	outline: none;
}

.captcha-input:focus {
	border-color: #1e90ff;
}

.captcha-img-box {
	width: 110px;
	height: 36px;
	border: 1px solid #ddd;
	background: #f0f0f0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 0 4px 4px 0;
	overflow: hidden;
	flex-shrink: 0;
}

.captcha-img-box canvas {
	width: 100%;
	height: 100%;
	display: block;
}

/* 短信验证码 - 样式参考找回密码 */
.sms-wrapper {
	display: flex;
	width: 100%;
}

.sms-input {
	flex: 1;
	height: 36px;
	padding: 0 10px;
	border: 1px solid #ddd;
	border-right: none;
	border-radius: 4px 0 0 4px;
	font-size: 14px;
	outline: none;
}

.sms-input:focus {
	border-color: #1e90ff;
}

.sms-btn {
	height: 36px;
	padding: 0 15px;
	background: #4da2e9;
	color: #fff;
	border: 1px solid #4da2e9;
	border-radius: 0 4px 4px 0;
	cursor: pointer;
	font-size: 13px;
	white-space: nowrap;
	flex-shrink: 0;
}

.sms-btn:hover {
	background: #3b8ac9;
}

.sms-btn:disabled {
	background: #ccc;
	border-color: #ccc;
	cursor: not-allowed;
}

/* 注册按钮 */
.btn-submit {
	width: 420px;
	max-width: 70%;
	height: 40px;
	background-color: #3b9cff;
	color: white;
	border: none;
	border-radius: 4px;
	font-size: 16px;
	cursor: pointer;
	margin-top: 12px;
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.btn-submit:hover {
	background-color: #2a8bee;
}

.agreement {
	text-align: center;
	margin-top: 15px;
	font-size: 13px;
	color: #666;
}

.agreement input[type="checkbox"] {
	margin-right: 5px;
	vertical-align: middle;
}

.agreement a {
	color: #1e90ff;
	text-decoration: none;
}

.agreement a:hover {
	text-decoration: underline;
}

.form-control.error {
	border-color: #ff4d4f;
}

.error-msg {
	color: #ff4d4f;
	font-size: 12px;
	position: absolute;
	bottom: -20px;
	left: 0;
	display: none;
}

/* 手机端适配 */
@media ( max-width : 900px) {
	.register-container {
		width: 95%;
	}
	.form-group {
		flex-wrap: wrap !important;
		justify-content: flex-start;
	}
	.form-group label {
		width: 100%;
		text-align: left;
		padding-right: 0;
		margin-bottom: 5px;
	}
	.input-wrapper {
		width: 100%;
		max-width: 100%;
	}
	.btn-submit {
		width: 100%;
		max-width: 100%;
	}
	.form-area {
		padding: 15px 20px;
	}
	.captcha-wrapper, .sms-wrapper {
		flex-wrap: wrap;
	}
	.captcha-input, .sms-input {
		border-radius: 4px;
		border-right: 1px solid #ddd;
		margin-bottom: 5px;
	}
	.captcha-img-box {
		border-radius: 4px;
		width: 100%;
	}
	.sms-btn {
		border-radius: 4px;
		width: 100%;
		margin-top: 5px;
	}
}