* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #07091f;
  color: #e0e6f0;
  overflow: hidden;
}

body {
  background: radial-gradient(ellipse at top, #1a1f4e 0%, #0a0e2e 40%, #07091f 100%);
  position: relative;
}

/* 背景网格 */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(0,212,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  animation: gridShift 20s linear infinite;
}
@keyframes gridShift {
  0% { background-position: 0 0; }
  100% { background-position: 48px 48px; }
}

/* 背景光斑 */
.bg-glow {
  position: fixed; border-radius: 50%; filter: blur(80px); pointer-events: none;
  z-index: 0; opacity: 0.55;
}
.glow-1 { width: 520px; height: 520px; background: #00d4ff; top: -180px; left: -120px; animation: float1 14s ease-in-out infinite; }
.glow-2 { width: 480px; height: 480px; background: #7a3cff; bottom: -160px; right: -120px; animation: float2 16s ease-in-out infinite; }
.glow-3 { width: 360px; height: 360px; background: #ffd700; top: 50%; left: 50%; transform: translate(-50%, -50%); opacity: 0.18; animation: pulse 8s ease-in-out infinite; }
@keyframes float1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(80px, 60px); } }
@keyframes float2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-80px, -60px); } }
@keyframes pulse  { 0%,100% { opacity: 0.18; } 50% { opacity: 0.28; } }

/* 主容器 */
.login-shell {
  position: relative; z-index: 2;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%; max-width: 420px;
  background: linear-gradient(160deg, rgba(20,25,60,0.85) 0%, rgba(35,20,75,0.85) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0,212,255,0.25);
  border-radius: 20px;
  padding: 36px 32px 28px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 20px 60px rgba(0,0,0,0.5),
    0 0 80px rgba(0,212,255,0.15);
  position: relative;
  animation: cardIn .7s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* 顶边发光线 */
.login-card::before {
  content: '';
  position: absolute; left: 20%; right: 20%; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, #00d4ff, transparent);
  box-shadow: 0 0 12px #00d4ff;
}

/* 品牌区 */
.brand {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 22px;
}
.brand-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  background: linear-gradient(135deg, #00d4ff 0%, #7a3cff 100%);
  box-shadow: 0 8px 24px rgba(0,212,255,0.4);
}
.brand-text h1 {
  font-size: 20px; font-weight: 900; letter-spacing: 2px;
  background: linear-gradient(90deg, #00d4ff, #ffd700);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-text h1 span { color: #ffd700; -webkit-text-fill-color: #ffd700; }
.brand-text p { font-size: 12px; opacity: 0.6; margin-top: 2px; letter-spacing: 1px; }

.title {
  font-size: 22px; font-weight: 700; margin-top: 6px;
  letter-spacing: 1px;
}
.subtitle {
  font-size: 13px; opacity: 0.55; margin-top: 6px; margin-bottom: 22px;
}

/* 表单 */
.field { display: block; margin-bottom: 16px; }
.label-text {
  font-size: 12px; letter-spacing: 1.5px; opacity: 0.7;
  text-transform: uppercase; display: block; margin-bottom: 8px;
  color: #8fb8ff;
}
.input-wrap {
  position: relative;
  display: flex; align-items: center;
  background: rgba(8,12,40,0.7);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 12px;
  transition: all .25s ease;
}
.input-wrap:focus-within {
  border-color: rgba(0,212,255,0.7);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.15), 0 0 20px rgba(0,212,255,0.25);
  background: rgba(8,12,40,0.9);
}
.input-wrap .ico {
  width: 18px; height: 18px; margin-left: 14px;
  color: #00d4ff; opacity: 0.8; flex-shrink: 0;
}
.input-wrap input {
  flex: 1;
  background: transparent; border: 0; outline: 0;
  padding: 14px 14px 14px 12px;
  color: #e8efff; font-size: 15px;
  letter-spacing: 0.5px;
}
.input-wrap input::placeholder { color: rgba(232,239,255,0.35); }

.toggle-pwd {
  background: transparent; border: 0; cursor: pointer;
  color: #00d4ff; opacity: 0.6;
  padding: 0 14px; height: 100%;
  display: flex; align-items: center;
}
.toggle-pwd:hover { opacity: 1; }
.toggle-pwd svg { width: 18px; height: 18px; }
.toggle-pwd.active { color: #ffd700; opacity: 1; }

/* 错误信息 */
.msg {
  min-height: 20px; font-size: 13px; color: #ff5577;
  margin: -4px 0 12px; padding-left: 4px;
  opacity: 0; transform: translateY(-4px); transition: all .2s;
}
.msg.show { opacity: 1; transform: translateY(0); }

/* 登录按钮 */
.btn-login {
  width: 100%; height: 50px;
  border: 0; border-radius: 12px; cursor: pointer;
  background: linear-gradient(90deg, #00d4ff 0%, #7a3cff 50%, #ffd700 120%);
  background-size: 200% 100%; background-position: 0% 50%;
  color: #07091f; font-weight: 800; font-size: 15px; letter-spacing: 2px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  position: relative; overflow: hidden;
  transition: all .35s ease;
  box-shadow: 0 8px 24px rgba(0,212,255,0.35), 0 0 40px rgba(122,60,255,0.25);
  margin-top: 8px;
}
.btn-login:hover {
  background-position: 100% 50%;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,212,255,0.5), 0 0 60px rgba(255,215,0,0.3);
}
.btn-login:active { transform: translateY(0); }
.btn-login:disabled { cursor: not-allowed; opacity: 0.6; }
.btn-login .btn-arrow { width: 18px; height: 18px; transition: transform .3s; }
.btn-login:hover .btn-arrow { transform: translateX(4px); }
.btn-login .btn-loader {
  display: none;
  width: 18px; height: 18px;
  border: 2px solid rgba(7,9,31,0.3);
  border-top-color: #07091f;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn-login.loading .btn-text,
.btn-login.loading .btn-arrow { display: none; }
.btn-login.loading .btn-loader { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* shake 错误抖动 */
.shake { animation: shake .45s cubic-bezier(.36,.07,.19,.97); }
@keyframes shake {
  10%,90% { transform: translateX(-1px); }
  20%,80% { transform: translateX(2px); }
  30%,50%,70% { transform: translateX(-4px); }
  40%,60% { transform: translateX(4px); }
}

/* 切换链接 */
.switch-link {
  text-align: center; margin-top: 16px;
  font-size: 13px; opacity: 0.6;
}
.switch-link a {
  color: #00d4ff; text-decoration: none; font-weight: 600;
}
.switch-link a:hover {
  color: #ffd700; text-decoration: underline;
}

/* 底部 */
.footer {
  margin-top: 22px; padding-top: 18px;
  border-top: 1px dashed rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 11px; letter-spacing: 2px; opacity: 0.45;
}
.footer .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #00ff88; box-shadow: 0 0 8px #00ff88;
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* 移动端 */
@media (max-width: 480px) {
  .login-card { padding: 28px 22px 22px; }
  .brand-text h1 { font-size: 18px; }
  .title { font-size: 20px; }
}
