/* ============================================================
   贤才积分宠物养成系统 · 明亮科技主题（登录页）
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #2563eb;
  --blue-light: #3b82f6;
  --purple: #7c3aed;
  --pink: #ec4899;
  --cyan: #06b6d4;
  --ink: #0f172a;
  --ink-2: #334155;
  --ink-3: #64748b;
  --line: #e2e8f0;
}

html, body { height: 100%; }

body {
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ========== 明亮背景 ========== */
.starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 12% 8%, rgba(59,130,246,.18) 0%, transparent 45%),
    radial-gradient(ellipse at 88% 92%, rgba(124,58,237,.15) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 50%, rgba(236,72,153,.07) 0%, transparent 55%),
    linear-gradient(180deg, #f8faff 0%, #eef2ff 50%, #fdf4ff 100%);
  overflow: hidden;
}

/* 柔和的漂浮光斑 */
.starfield::before {
  content: "";
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,.25), transparent 70%);
  top: -120px; left: -120px;
  filter: blur(20px);
  animation: floatBlob 18s ease-in-out infinite;
}

.starfield::after {
  content: "";
  position: absolute;
  width: 440px; height: 440px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,.22), transparent 70%);
  bottom: -140px; right: -100px;
  filter: blur(20px);
  animation: floatBlob 22s ease-in-out infinite reverse;
}

@keyframes floatBlob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, 40px) scale(1.1); }
  66% { transform: translate(-40px, 60px) scale(.95); }
}

/* ========== 登录页 ========== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.login-wrap {
  width: 100%;
  max-width: 1080px;
  position: relative;
  z-index: 2;
}

.login-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: #ffffff;
  border-radius: 28px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(37, 99, 235, .08),
    0 30px 80px rgba(37, 99, 235, .18),
    0 10px 30px rgba(15, 23, 42, .06);
  min-height: 620px;
  position: relative;
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--purple), var(--pink), var(--cyan));
  background-size: 300% 100%;
  animation: gradientMove 6s linear infinite;
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

/* ---------- 左侧全息面板 ---------- */
.login-left {
  background:
    linear-gradient(150deg, #1e40af 0%, #2563eb 35%, #7c3aed 75%, #a855f7 100%);
  color: #fff;
  padding: 60px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* 网格纹理 */
.login-left::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at 50% 50%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 30%, transparent 80%);
  animation: gridShift 20s linear infinite;
}

@keyframes gridShift {
  0% { background-position: 0 0; }
  100% { background-position: 40px 40px; }
}

/* 光晕 */
.login-left::after {
  content: "";
  position: absolute;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.35) 0%, transparent 65%);
  right: -160px;
  bottom: -160px;
  animation: pulseGlow 6s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: .5; }
  50% { transform: scale(1.15); opacity: .9; }
}

.login-logo {
  width: 92px;
  height: 92px;
  border-radius: 26px;
  background: rgba(255,255,255,.22);
  border: 2px solid rgba(255,255,255,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 46px;
  margin-bottom: 32px;
  position: relative;
  z-index: 2;
  box-shadow:
    0 0 40px rgba(255,255,255,.4),
    inset 0 0 24px rgba(255,255,255,.2);
  animation: logoFloat 4s ease-in-out infinite;
  backdrop-filter: blur(10px);
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(4deg); }
}

.login-left h1 {
  font-size: 36px;
  line-height: 1.35;
  font-weight: 900;
  position: relative;
  z-index: 2;
  letter-spacing: 1.5px;
  color: #ffffff;
  text-shadow: 0 2px 20px rgba(0,0,0,.15);
}

.login-left p {
  margin-top: 20px;
  font-size: 15px;
  position: relative;
  z-index: 2;
  line-height: 1.9;
  color: rgba(255,255,255,.92);
  letter-spacing: .5px;
}

.login-left .tech-tags {
  margin-top: 36px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.tech-tag {
  padding: 7px 16px;
  border-radius: 22px;
  font-size: 12px;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.5);
  background: rgba(255,255,255,.15);
  letter-spacing: .5px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  animation: tagFloat 3s ease-in-out infinite;
}

.tech-tag:nth-child(2) { animation-delay: .6s; }
.tech-tag:nth-child(3) { animation-delay: 1.2s; }

@keyframes tagFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* ---------- 右侧登录表单 ---------- */
.login-right {
  padding: 68px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  background: #ffffff;
}

/* 淡淡的装饰网格 */
.login-right::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(37,99,235,.08) 1px, transparent 0);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse at 100% 0%, #000 10%, transparent 60%);
  -webkit-mask-image: radial-gradient(ellipse at 100% 0%, #000 10%, transparent 60%);
  pointer-events: none;
}

.login-right h2 {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 10px;
  color: var(--ink);
  letter-spacing: .5px;
  position: relative;
  z-index: 1;
}

.login-right h2::after {
  content: "";
  display: block;
  width: 44px;
  height: 4px;
  border-radius: 4px;
  margin-top: 12px;
  background: linear-gradient(90deg, var(--blue), var(--purple));
}

.login-sub {
  color: var(--ink-3);
  font-size: 14px;
  margin: 16px 0 36px;
  letter-spacing: .3px;
  position: relative;
  z-index: 1;
}

.alert {
  background: #fef2f2;
  color: #dc2626;
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 22px;
  border: 1px solid #fecaca;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.field {
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  margin-bottom: 9px;
  letter-spacing: .5px;
}

.field input {
  width: 100%;
  height: 54px;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 0 18px;
  font-size: 15px;
  background: #f8fafc;
  color: var(--ink);
  transition: all .25s;
  outline: none;
  letter-spacing: .3px;
  font-weight: 500;
}

.field input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.field input:focus {
  border-color: var(--blue);
  background: #ffffff;
  box-shadow:
    0 0 0 4px rgba(37, 99, 235, .12),
    0 8px 20px rgba(37, 99, 235, .12);
}

.btn-login {
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #ec4899 100%);
  background-size: 200% 200%;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 6px;
  cursor: pointer;
  transition: all .3s;
  margin-top: 10px;
  box-shadow:
    0 12px 28px rgba(37, 99, 235, .35),
    0 4px 12px rgba(124, 58, 237, .25),
    inset 0 1px 0 rgba(255,255,255,.3);
  position: relative;
  overflow: hidden;
  animation: gradientMove2 5s ease infinite;
  z-index: 1;
}

@keyframes gradientMove2 {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.btn-login::before {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
  transition: left .6s;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow:
    0 18px 40px rgba(37, 99, 235, .45),
    0 6px 18px rgba(124, 58, 237, .35),
    inset 0 1px 0 rgba(255,255,255,.4);
}

.btn-login:hover::before {
  left: 100%;
}

.btn-login:active {
  transform: translateY(0);
}

.login-tip {
  margin-top: 26px;
  font-size: 13px;
  color: var(--ink-3);
  text-align: center;
  letter-spacing: .3px;
  position: relative;
  z-index: 1;
}

.login-tip span {
  color: var(--blue);
  font-weight: 700;
  padding: 2px 8px;
  background: rgba(37, 99, 235, .08);
  border-radius: 6px;
  margin: 0 2px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .login-card { grid-template-columns: 1fr; min-height: auto; }
  .login-left { padding: 44px 32px; }
  .login-left h1 { font-size: 26px; }
  .login-logo { width: 70px; height: 70px; font-size: 34px; margin-bottom: 22px; }
  .login-right { padding: 44px 28px; }
  .login-right h2 { font-size: 24px; }
}

/* --------- 登录页 Logo 图片适配 --------- */
.login-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}