/* ============================================================
   数链云仓 slcy-dev 店铺管理中心登录页 - iOS 苹果风格重构
   说明：纯前端表现层样式，不涉及任何后端逻辑
   设计语言：磨砂玻璃 / 大圆角 / 柔和光影 / SF 字体栈 / 科技动态背景
   配色：数链云仓统一蓝色体系，与商家手机端保持一致
   ============================================================ */

:root {
	/* 数链云仓商家端统一蓝色 */
	--ios-blue: #2F80FF;
	--ios-blue-light: #69A7FF;
	--ios-blue-deep: #1558D6;
	--ios-cyan: #55B8FF;
	/* 卡片与文本 */
	--glass-bg: rgba(255, 255, 255, 0.10);
	--glass-border: rgba(255, 255, 255, 0.18);
	--glass-highlight: rgba(255, 255, 255, 0.32);
	--text-primary: rgba(255, 255, 255, 0.96);
	--text-secondary: rgba(255, 255, 255, 0.62);
	--text-placeholder: rgba(255, 255, 255, 0.45);
	/* 尺寸 */
	--radius-lg: 28px;
	--radius-md: 16px;
	--radius-sm: 12px;
	/* iOS 弹性曲线 */
	--ease-ios: cubic-bezier(0.25, 0.1, 0.25, 1);
	--ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============ 全局 ============ */
html, body {
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
		"Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
	background: #06172F !important;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow: hidden;
}

/* ============ 科技动态背景层 ============ */
/* 深海蓝夜空底 */
.ns-bg-deep {
	position: fixed;
	inset: 0;
	z-index: 0;
	background:
		radial-gradient(ellipse 80% 60% at 50% -10%, #143E83 0%, transparent 60%),
		radial-gradient(ellipse 60% 50% at 100% 100%, #0C3F86 0%, transparent 55%),
		linear-gradient(160deg, #06172F 0%, #09285A 45%, #041124 100%);
}

/* 极光光晕：缓慢漂浮的蓝色光斑 */
.ns-aurora {
	position: fixed;
	border-radius: 50%;
	filter: blur(90px);
	opacity: 0.55;
	will-change: transform;
	z-index: 0;
	pointer-events: none;
}
.ns-aurora-1 {
	width: 46vw; height: 46vw;
	left: -12vw; top: -10vw;
	background: radial-gradient(circle, rgba(47, 128, 255, 0.58) 0%, transparent 70%);
	animation: auroraDrift1 22s var(--ease-ios) infinite alternate;
}
.ns-aurora-2 {
	width: 38vw; height: 38vw;
	right: -10vw; top: 22vh;
	background: radial-gradient(circle, rgba(85, 184, 255, 0.52) 0%, transparent 70%);
	animation: auroraDrift2 26s var(--ease-ios) infinite alternate;
}
.ns-aurora-3 {
	width: 42vw; height: 42vw;
	left: 24vw; bottom: -18vw;
	background: radial-gradient(circle, rgba(31, 100, 226, 0.46) 0%, transparent 70%);
	animation: auroraDrift3 30s var(--ease-ios) infinite alternate;
}

@keyframes auroraDrift1 {
	0%   { transform: translate(0, 0) scale(1); }
	100% { transform: translate(9vw, 6vh) scale(1.18); }
}
@keyframes auroraDrift2 {
	0%   { transform: translate(0, 0) scale(1.1); }
	100% { transform: translate(-7vw, 9vh) scale(0.92); }
}
@keyframes auroraDrift3 {
	0%   { transform: translate(0, 0) scale(0.95); }
	100% { transform: translate(5vw, -7vh) scale(1.15); }
}

/* 粒子网络 canvas */
#ns-particles {
	position: fixed;
	inset: 0;
	z-index: 1;
	pointer-events: none;
}

/* 细网格科技光效（低透明度） */
.ns-grid-overlay {
	position: fixed;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background-image:
		linear-gradient(rgba(131, 184, 255, 0.055) 1px, transparent 1px),
		linear-gradient(90deg, rgba(131, 184, 255, 0.055) 1px, transparent 1px);
	background-size: 56px 56px;
	-webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 45%, #000 20%, transparent 75%);
	mask-image: radial-gradient(ellipse 70% 55% at 50% 45%, #000 20%, transparent 75%);
}

/* ============ 页面布局容器 ============ */
.layui-container {
	position: relative;
	z-index: 2;
	width: 100%;
	height: 100%;
	min-width: 380px;
	padding: 0;
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ============ 磨砂玻璃登录卡片 ============ */
.login-form {
	position: relative;
	width: 430px;
	padding: 52px 46px 38px;
	box-sizing: border-box;
	text-align: center;
	background: var(--glass-bg);
	-webkit-backdrop-filter: blur(28px) saturate(170%);
	backdrop-filter: blur(28px) saturate(170%);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius-lg);
	box-shadow:
		0 30px 80px rgba(0, 0, 0, 0.45),
		inset 0 1px 0 var(--glass-highlight);
	animation: cardEntrance 0.9s var(--ease-spring) both;
}

/* 卡片顶部：品牌蓝渐变光条 */
.login-form::before {
	content: "";
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 3px;
	border-radius: var(--radius-lg) var(--radius-lg) 0 0;
	background: linear-gradient(90deg,
		transparent 4%,
		var(--ios-blue-light) 30%,
		var(--ios-blue) 55%,
		var(--ios-cyan) 78%,
		transparent 96%);
	opacity: 0.85;
	pointer-events: none;
}

@keyframes cardEntrance {
	0%   { opacity: 0; transform: translateY(36px) scale(0.96); filter: blur(6px); }
	100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* ============ Logo ============ */
.ns-login-logo {
	position: relative;
	top: auto; left: auto; transform: none;
	margin: 0 auto 22px;
	width: 84px; height: 84px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 22px;
	background: linear-gradient(145deg, rgba(255,255,255,0.20), rgba(255,255,255,0.06));
	border: 1px solid var(--glass-border);
	box-shadow:
		0 12px 30px rgba(0, 0, 0, 0.30),
		inset 0 1px 0 rgba(255,255,255,0.30);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	animation: logoFloat 5s var(--ease-ios) infinite;
}
.ns-login-logo img {
	width: 56px;
	height: 56px;
	object-fit: contain;
	display: block;
}
@keyframes logoFloat {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(-6px); }
}

/* ============ 标题 ============ */
.layui-form-title {
	margin-bottom: 34px;
}
.layui-form-title h1 {
	color: var(--text-primary);
	font-size: 26px;
	font-weight: 700;
	letter-spacing: 0.5px;
	padding: 0;
	margin: 0 0 8px;
	text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}
.ns-login-subtitle {
	margin: 0;
	color: var(--text-secondary);
	font-size: 14px;
	font-weight: 400;
	letter-spacing: 0.3px;
}

/* ============ 表单条目 ============ */
.layui-form-item {
	position: relative;
	display: block;
	width: 100%;
	height: 54px;
	margin: 0 0 18px;
	padding: 0;
	text-align: left;
	border: none;
	border-radius: 0;
	background: transparent;
}

/* 输入框 - iOS 风格 */
.layui-form-item > input {
	width: 100%;
	height: 54px;
	box-sizing: border-box;
	padding: 0 48px 0 50px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: var(--radius-md);
	background: rgba(255, 255, 255, 0.09);
	color: var(--text-primary);
	font-size: 15px;
	caret-color: var(--ios-blue);
	outline: none;
	transition: border-color 0.25s var(--ease-ios),
		background 0.25s var(--ease-ios),
		box-shadow 0.25s var(--ease-ios);
}
.layui-form-item > input:hover {
	background: rgba(255, 255, 255, 0.13);
}
.layui-form-item > input:focus {
	border-color: var(--ios-blue);
	background: rgba(255, 255, 255, 0.14);
	box-shadow:
		0 0 0 4px rgba(47, 128, 255, 0.18),
		0 0 22px rgba(47, 128, 255, 0.28);
}

/* 占位符 */
input::-webkit-input-placeholder { color: var(--text-placeholder); }
input:-moz-placeholder { color: var(--text-placeholder); }
input::-moz-placeholder { color: var(--text-placeholder); }
input:-ms-input-placeholder { color: var(--text-placeholder); }

/* 输入图标（内联 SVG） */
.ns-input-icon {
	position: absolute;
	top: 50%;
	left: 16px;
	transform: translateY(-50%);
	width: 20px;
	height: 20px;
	pointer-events: none;
	z-index: 1;
	opacity: 0.75;
	transition: opacity 0.25s var(--ease-ios);
}
.layui-form-item:hover .ns-input-icon {
	opacity: 1;
}

/* 自动填充处理 */
input:-webkit-autofill {
	-webkit-text-fill-color: var(--text-primary) !important;
	-webkit-box-shadow: 0 0 0 1000px rgba(12, 32, 34, 0.9) inset !important;
	transition: background-color 9999s ease-in-out 0s;
	-webkit-transition-delay: 9999s;
}

/* ============ 验证码 ============ */
.verify-code-box input {
	padding-right: 136px;
}
.verify-code-img {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	width: 120px;
	height: 40px;
	overflow: hidden;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(0, 0, 0, 0.18);
	cursor: pointer;
	transition: box-shadow 0.25s var(--ease-ios), transform 0.25s var(--ease-spring);
}
.verify-code-img:hover {
	box-shadow: 0 0 0 3px rgba(47, 128, 255, 0.22), 0 4px 14px rgba(0, 0, 0, 0.3);
	transform: translateY(-50%) rotate(1deg);
}
.verify-code-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 1;
	display: block;
}

/* ============ 登录按钮 ============ */
.ns-login-btn {
	margin-top: 30px;
	margin-bottom: 0;
}
.ns-login-btn .layui-btn {
	width: 100%;
	height: 54px;
	line-height: 54px;
	border-radius: var(--radius-md);
	border: none;
	background: linear-gradient(135deg, var(--ios-blue-light) 0%, var(--ios-blue) 55%, var(--ios-blue-deep) 100%);
	color: #fff;
	font-size: 17px;
	font-weight: 600;
	letter-spacing: 4px;
	box-shadow:
		0 10px 26px rgba(47, 128, 255, 0.38),
		inset 0 1px 0 rgba(255, 255, 255, 0.25);
	cursor: pointer;
	transition: transform 0.25s var(--ease-spring),
		box-shadow 0.25s var(--ease-ios),
		filter 0.25s var(--ease-ios);
}
.ns-login-btn .layui-btn:hover {
	transform: translateY(-2px);
	filter: brightness(1.08);
	box-shadow:
		0 16px 34px rgba(47, 128, 255, 0.48),
		inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.ns-login-btn .layui-btn:active {
	transform: translateY(0) scale(0.985);
	box-shadow: 0 6px 16px rgba(47, 128, 255, 0.3);
}

/* ============ 申请入驻 ============ */
.operation-register {
	margin: 18px 0 0;
	text-align: center;
	font-size: 14px;
	letter-spacing: 0.3px;
	color: var(--text-secondary);
}
.operation-register a {
	color: var(--ios-blue-light);
	text-decoration: none;
	font-weight: 500;
	transition: color 0.25s var(--ease-ios);
}
.operation-register a:hover {
	color: var(--ios-blue);
}

/* ============ 响应式 ============ */
@media only screen and (max-width: 520px) {
	.login-form {
		width: calc(100% - 40px);
		padding: 40px 28px 32px;
		border-radius: 22px;
	}
	.layui-form-title h1 { font-size: 22px; }
}

/* 减弱动画偏好 */
@media (prefers-reduced-motion: reduce) {
	.ns-aurora, .ns-login-logo { animation: none; }
	.login-form { animation-duration: 0.01s; }
}
