/* 登录弹窗样式 - NativeUI风格 */
.login-modal-overlay,
.register-modal-overlay { 
	position: fixed;
	top: 0;
	left: 0; 
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.4);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	z-index: 9999; 
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.25s cubic-bezier(0.4, 0, 0.2, 1);
} 

.login-modal-overlay.active,
.register-modal-overlay.active {
	opacity: 1;
	visibility: visible;
}

.login-modal-container {
	position: relative;
	background: #ffffff;
	border-radius: 12px;
	padding: 32px;
	max-width: 420px;
	width: 90%;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
	transform: scale(0.95) translateY(10px);
	transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.register-modal-container {
	position: relative;
	background: #ffffff;
	border-radius: 12px;
	padding: 32px;
	max-width: 420px;
	width: 90%;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
	transform: scale(0.95) translateY(10px);
	transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	overflow: visible;
}

.login-modal-overlay.active .login-modal-container,
.register-modal-overlay.active .register-modal-container {
	transform: scale(1) translateY(0);
}


.register-modal-back {
	position: absolute;
	top: 16px;
	left: 16px;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: transparent;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background-color 0.2s ease;
	z-index: 10;
	border: none;
	padding: 0;
}

.register-modal-back:hover {
	background: rgba(0, 0, 0, 0.05);
}

.register-modal-back:active {
	background: rgba(0, 0, 0, 0.1);
}

.register-modal-back i {
	color: #1a1a2e;
	font-size: 16px;
}

.login-modal-content {
	width: 100%;
}

.login-tabs {
	display: flex;
	gap: 0;
	margin-bottom: 24px;
	border-bottom: 1px solid #e5e5e7;
}

.login-tab {
	flex: 1;
	padding: 12px 16px;
	background: transparent;
	border: none;
	font-size: 15px;
	font-weight: 500;
	color: #8e8e93;
	cursor: pointer;
	position: relative;
	transition: color 0.2s ease;
	outline: none;
}

.login-tab:hover {
	color: #1d1d1f;
}

.login-tab.active {
	color: #1d1d1f;
}

.login-tab.active::after {
	content: '';
	position: absolute;
	bottom: -1px;
	left: 0;
	right: 0;
	height: 2px;
	background: #1a1a2e;
	border-radius: 1px 1px 0 0;
}

.login-form-wrapper {
	display: none;
}

.login-form-wrapper.active {
	display: block;
}

.login-form,
.register-form {
	width: 100%;
}

.form-group {
	margin-bottom: 20px;
	position: relative;
}

.form-control {
	width: 100%;
	padding: 12px 20px;
	border: 1px solid #d1d1d6;
	border-radius: 8px;
	font-size: 15px;
	line-height: 1.5;
	min-height: 44px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	background: #ffffff;
	color: #1d1d1f;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
}

.form-control:focus {
	outline: none;
	border-color: #1a1a2e;
	box-shadow: 0 0 0 3px rgba(26, 26, 46, 0.1);
}

.form-control::placeholder {
	color: #8e8e93;
}

.form-control:disabled {
	background: #f5f5f7;
	color: #8e8e93;
	cursor: not-allowed;
}

/* 错误状态 */
.form-control.error {
	border-color: #ff3b30;
}

.form-control.error:focus {
	border-color: #ff3b30;
	box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.1);
}

.form-error-message {
	display: none;
	margin-top: 6px;
	font-size: 13px;
	color: #ff3b30;
	line-height: 1.4;
}

.form-group.has-error .form-error-message {
	display: block;
}

.form-group.has-error {
	margin-bottom: 6px;
}

/* 单选按钮组样式 */
.radio-group-label {
	display: block;
	font-size: 14px;
	color: #1d1d1f;
	margin-bottom: 12px;
	font-weight: 500;
}

.radio-group {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.radio-option {
	display: flex;
	align-items: center;
	cursor: pointer;
	user-select: none;
}

.radio-option input[type="radio"] {
	width: 20px;
	height: 20px;
	margin: 0;
	margin-right: 8px;
	cursor: pointer;
	accent-color: #1a1a2e;
	flex-shrink: 0;
	-webkit-appearance: none;
	appearance: none;
	border: 2px solid #d1d1d6;
	border-radius: 50%;
	background: #ffffff;
	position: relative;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.radio-option input[type="radio"]:checked {
	border-color: #1a1a2e;
	background: #1a1a2e;
}

.radio-option input[type="radio"]:checked::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #ffffff;
}

.radio-option input[type="radio"]:hover {
	border-color: #a1a1aa;
}

.radio-option input[type="radio"]:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(26, 26, 46, 0.1);
}

.radio-label {
	font-size: 15px;
	color: #1d1d1f;
	line-height: 1.5;
}

.radio-option input[type="radio"]:checked + .radio-label {
	color: #1a1a2e;
	font-weight: 500;
}

.verification-group {
	display: flex;
	gap: 8px;
	align-items: flex-start;
}

.verification-group > div {
	flex: 1;
	min-width: 0;
}

.verification-input {
	width: 100%;
}

.verification-btn {
	padding: 12px 20px;
	background: #1a1a2e;
	color: #ffffff;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	white-space: nowrap;
	min-height: 44px;
	transition: background-color 0.2s ease, opacity 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.verification-btn:hover {
	background: #0f0f1e;
}

.verification-btn:active {
	background: #0a0a14;
	opacity: 0.9;
}

.verification-btn:disabled {
	background: #c7c7cc;
	cursor: not-allowed;
	opacity: 1;
}

.form-options {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 24px;
}

.checkbox-label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: 14px;
	color: #1d1d1f;
	user-select: none;
}

.checkbox-label input[type="checkbox"] {
	width: 18px;
	height: 18px;
	cursor: pointer;
	accent-color: #1a1a2e;
	margin: 0;
	flex-shrink: 0;
}

.forgot-password {
	color: #1a1a2e;
	text-decoration: none;
	font-size: 14px;
	transition: opacity 0.2s ease;
}

.forgot-password:hover {
	opacity: 0.7;
}

.forgot-password:active {
	opacity: 0.5;
}

.login-submit-btn,
.register-submit-btn {
	width: 100%;
	padding: 14px;
	background: #1a1a2e;
	color: #ffffff;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 500;
	cursor: pointer;
	transition: background-color 0.2s ease, opacity 0.2s ease;
	margin-top: 8px;
	-webkit-appearance: none;
	appearance: none;
}

.login-submit-btn:hover,
.register-submit-btn:hover {
	background: #0f0f1e;
}

.login-submit-btn:active,
.register-submit-btn:active {
	background: #0a0a14;
	opacity: 0.9;
}

.login-submit-btn:disabled,
.register-submit-btn:disabled {
	background: #c7c7cc;
	cursor: not-allowed;
	opacity: 1;
}

.register-link-wrapper {
	text-align: center;
	margin-top: 24px;
	font-size: 14px;
	color: #8e8e93;
}

.register-link {
	color: #1a1a2e;
	text-decoration: none;
	font-weight: 500;
	margin-left: 4px;
	transition: opacity 0.2s ease;
}

.register-link:hover {
	opacity: 0.7;
}

.register-link:active {
	opacity: 0.5;
}

.register-modal-content {
	width: 100%;
}

.register-title {
	font-size: 24px;
	font-weight: 600;
	color: #1d1d1f;
	margin-bottom: 24px;
	text-align: center;
	letter-spacing: -0.5px;
}

.register-form .form-group:last-of-type {
	margin-bottom: 24px;
}

.agreement-link {
	color: #1a1a2e;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.agreement-link:hover {
	opacity: 0.7;
	text-decoration: underline;
}

.agreement-link:active {
	opacity: 0.5;
}

/* 自定义下拉选择框样式 - NativeUI风格 */
.form-group > .custom-select {
	margin-bottom: 0;
}

.form-group > .custom-select + .form-group,
.form-group:nth-child(5),
.form-group:nth-child(6) {
	margin-top: 0;
}

.register-form .form-group {
	margin-bottom: 20px !important;
}

.custom-select {
	position: relative;
	display: block;
	width: 100%;
	user-select: none;
	border: none;
	outline: none;
	box-shadow: none;
	background: transparent;
	padding: 0;
	margin: 0;
}

.custom-select input[type="hidden"] {
	display: none;
}

.custom-select-trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 20px;
	background: #ffffff;
	border: 1px solid #d1d1d6;
	border-radius: 8px;
	cursor: pointer;
	min-height: 44px;
	box-sizing: border-box;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.custom-select-trigger:hover {
	border-color: #a1a1aa;
}

.custom-select.open .custom-select-trigger {
	border-color: #1a1a2e;
	box-shadow: 0 0 0 3px rgba(26, 26, 46, 0.1);
	border-radius: 8px 8px 0 0;
}

.custom-select-value {
	font-size: 15px;
	color: #1d1d1f;
	line-height: 1.5;
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.custom-select-value.placeholder {
	color: #8e8e93;
}

.custom-select-arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	color: #8e8e93;
	transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
	flex-shrink: 0;
	margin-left: 8px;
}

.custom-select.open .custom-select-arrow {
	transform: rotate(180deg);
	color: #1a1a2e;
}

.custom-select-options {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: #ffffff;
	border: 1px solid #1a1a2e;
	border-top: none;
	border-radius: 0 0 8px 8px;
	max-height: 0;
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	z-index: 1000;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
	transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
				opacity 0.2s ease,
				visibility 0.2s ease;
}

.custom-select.open .custom-select-options {
	max-height: 240px;
	opacity: 1;
	visibility: visible;
	overflow-y: auto;
}

.custom-select-option {
	padding: 12px 16px;
	font-size: 15px;
	color: #1d1d1f;
	cursor: pointer;
	transition: background-color 0.15s ease;
	line-height: 1.5;
}

.custom-select-option:hover {
	background: #f5f5f7;
}

.custom-select-option:active {
	background: #e8e8ed;
}

.custom-select-option.selected {
	background: rgba(26, 26, 46, 0.08);
	color: #1a1a2e;
	font-weight: 500;
	position: relative;
}

.custom-select-option.selected::after {
	content: '';
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	width: 16px;
	height: 16px;
	background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 8.5L6.5 12L13 4' stroke='%231a1a2e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
}

/* 下拉框滚动条样式 */
.custom-select-options::-webkit-scrollbar {
	width: 6px;
}

.custom-select-options::-webkit-scrollbar-track {
	background: transparent;
}

.custom-select-options::-webkit-scrollbar-thumb {
	background: #d1d1d6;
	border-radius: 3px;
}

.custom-select-options::-webkit-scrollbar-thumb:hover {
	background: #a1a1aa;
}

@media (max-width: 768px) {
	.login-modal-container,
	.register-modal-container {
		padding: 24px 20px;
		max-width: 95%;
		border-radius: 10px;
		overflow: visible;
	}
	
	.login-tab {
		padding: 10px 12px;
		font-size: 14px;
	}
	
	.verification-group {
		flex-direction: column;
	}
	
	.verification-btn {
		width: 100%;
	}
	
	.register-title {
		font-size: 22px;
		margin-bottom: 20px;
	}
	
	/* 移动端下拉框优化 */
	.custom-select-trigger {
		padding: 14px 16px;
	}
	
	.custom-select-option {
		padding: 14px 16px;
	}
}

