/* ==========================================================================
   登录页 v3 — 移动优先，按 390×844 精确规划垂直空间
   --------------------------------------------------------------------------
   v2 的问题：渐变文字 background-clip 失效、卡片顶部巨空、统计间距过散、
   浮标位置偏低、整页超一屏。这里逐条修掉，并把节奏压进一屏。
   ========================================================================== */

#login-panel.auth-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, .85fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  min-height: min(680px, calc(100dvh - 170px));
  padding: clamp(16px, 3.2vw, 48px) 0;
  isolation: isolate;
}

/* ── 背景光斑 ───────────────────────────────────────────────────────── */
#login-panel::before,
#login-panel::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  z-index: -1;
  pointer-events: none;
  will-change: transform;
}
#login-panel::before {
  width: 460px;
  height: 460px;
  left: -150px;
  top: -120px;
  opacity: .42;
  background: radial-gradient(circle, #6d5efc 0%, rgba(109, 94, 252, 0) 68%);
  animation: lpFloatA 16s ease-in-out infinite;
}
#login-panel::after {
  width: 400px;
  height: 400px;
  right: -110px;
  bottom: -110px;
  opacity: .34;
  background: radial-gradient(circle, #22d3ee 0%, rgba(34, 211, 238, 0) 68%);
  animation: lpFloatB 20s ease-in-out infinite;
}
@keyframes lpFloatA {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(30px, -24px, 0) scale(1.08); }
}
@keyframes lpFloatB {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(-26px, 20px, 0) scale(1.06); }
}

#login-panel .login-fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
  opacity: .7;
  mask-image: radial-gradient(ellipse 86% 78% at 50% 42%, #000 48%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 86% 78% at 50% 42%, #000 48%, transparent 100%);
}

/* ── 左侧文案 ───────────────────────────────────────────────────────── */
#login-panel .auth-intro {
  display: grid;
  gap: 14px;
  max-width: 540px;
  padding: 0;
}

#login-panel .lp-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #c3ceff;
  background: rgba(109, 94, 252, .13);
  border: 1px solid rgba(139, 124, 255, .32);
}
#login-panel .lp-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, .7);
  animation: lpPulse 2.4s cubic-bezier(.4, 0, .6, 1) infinite;
}
@keyframes lpPulse {
  0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, .65); }
  70%  { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

#login-panel .auth-intro h1 {
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.08;
  letter-spacing: -.038em;
  font-weight: 800;
  color: #f6f8ff;
  margin: 0;
}

/* 标题中的强调字：v2/v3 试过 background-clip: text，在 Chromium 上对中文
   会渲染成色块（裁剪失效）。改用纯色 + 光晕，视觉等价且零兼容风险。 */
#login-panel .auth-intro em {
  font-style: normal;
  display: inline;
  padding: 0;
  color: #8fa8ff;
  text-shadow:
    0 0 22px rgba(116, 180, 255, .42),
    0 0 46px rgba(116, 180, 255, .18);
}

#login-panel .auth-intro > p:not(.lp-badge):not(.eyebrow) {
  font-size: 14.5px;
  line-height: 1.7;
  color: #93a3bb;
  max-width: 420px;
  margin: 0;
}

#login-panel .intro-stats {
  display: flex;
  gap: clamp(22px, 3.6vw, 40px);
  margin-top: 2px;
}
#login-panel .intro-stats span {
  display: grid;
  gap: 1px;
  font-size: 11px;
  letter-spacing: .06em;
  color: #7f90a8;
}
#login-panel .intro-stats b {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #e9eeff;
  line-height: 1.1;
}

/* ── 登录卡 ─────────────────────────────────────────────────────────── */
#login-panel .auth-card {
  position: relative;
  padding: clamp(20px, 2.6vw, 32px);
  border-radius: 22px;
  border: 1px solid transparent;
  background:
    linear-gradient(158deg, rgba(22, 27, 50, .94), rgba(9, 11, 22, .97)) padding-box,
    linear-gradient(142deg, rgba(139, 124, 255, .62), rgba(56, 189, 248, .28) 48%, rgba(139, 124, 255, .1)) border-box;
  box-shadow:
    0 24px 60px rgba(3, 5, 18, .68),
    inset 0 1px 0 rgba(255, 255, 255, .08);
  display: grid;
  gap: 12px;
  overflow: hidden;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
#login-panel .auth-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(163, 148, 255, .8), rgba(56, 189, 248, .5), transparent);
}
#login-panel .auth-card .card-kicker {
  color: #9c8cf5;
  font-size: 9.5px;
  letter-spacing: .26em;
  text-transform: uppercase;
  font-weight: 650;
  line-height: 1;
}
/* 关键修复：v2 里 h2 被上边距顶出 40px 空白，这里把 margin 全清掉 */
#login-panel .auth-card h2 {
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -.02em;
  font-weight: 750;
  color: #f2f5ff;
  margin: 0 0 2px;
}

/* ── 浮动标签输入 ───────────────────────────────────────────────────── */
#login-panel .lp-field {
  position: relative;
  display: block;
  margin: 0;
}
#login-panel .lp-field input {
  width: 100%;
  box-sizing: border-box;
  height: 50px;
  padding: 19px 14px 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .04);
  color: #eef3fa;
  font-size: 15px;
  font-family: inherit;
  line-height: 1.2;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
#login-panel .lp-field input::placeholder { color: transparent; }
#login-panel .lp-field input:hover { border-color: rgba(255, 255, 255, .17); }
#login-panel .lp-field input:focus {
  outline: none;
  border-color: rgba(139, 124, 255, .75);
  background: rgba(139, 124, 255, .07);
  box-shadow: 0 0 0 3px rgba(139, 124, 255, .13);
}
/* 标签：空值时垂直居中当占位符，有值/聚焦时上浮变小 */
#login-panel .lp-field > span {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #7b8aa2;
  pointer-events: none;
  transition: transform .16s var(--ease), font-size .16s var(--ease), color .16s var(--ease);
  transform-origin: left center;
  line-height: 1;
}
#login-panel .lp-field input:focus + span,
#login-panel .lp-field input:not(:placeholder-shown) + span {
  top: 15px;
  transform: translateY(-50%) scale(.78);
  color: #a796ff;
  letter-spacing: .04em;
}

/* ── 按钮 ───────────────────────────────────────────────────────────── */
#login-panel .lp-submit {
  position: relative;
  width: 100%;
  height: 50px;
  margin-top: 2px;
  border: 0;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #0a0c17;
  cursor: pointer;
  background: linear-gradient(102deg, #b09bff 0%, #6aa9ff 52%, #35d6f0 100%);
  box-shadow: 0 10px 26px rgba(96, 165, 250, .28);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease);
  overflow: hidden;
}
#login-panel .lp-submit::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(102deg, transparent 22%, rgba(255, 255, 255, .45) 50%, transparent 78%);
  transform: translateX(-130%);
  transition: transform .55s var(--ease);
}
#login-panel .lp-submit:hover { transform: translateY(-1px); box-shadow: 0 14px 34px rgba(96, 165, 250, .4); }
#login-panel .lp-submit:hover::after { transform: translateX(130%); }
#login-panel .lp-submit:active { transform: translateY(0) scale(.994); }
#login-panel .lp-submit:disabled { opacity: .55; cursor: not-allowed; transform: none; }

#login-panel .lp-alt {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: transparent;
  color: #c2cdff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease);
}
#login-panel .lp-alt:hover {
  background: rgba(139, 124, 255, .1);
  border-color: rgba(139, 124, 255, .42);
  color: #ddd6ff;
}
#login-panel .lp-alt:active { transform: scale(.994); }

#login-panel .lp-guest {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, .17);
  background: rgba(255, 255, 255, .022);
  color: #93a0b6;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease);
}
#login-panel .lp-guest:hover {
  background: rgba(74, 222, 128, .07);
  border-color: rgba(74, 222, 128, .42);
  color: #a7f3c8;
}
#login-panel .lp-guest:active { transform: scale(.994); }

#login-panel .form-note {
  color: #64718a;
  font-size: 11px;
  line-height: 1.55;
  margin: 0;
}

#login-panel .auth-card .status {
  border-radius: 10px;
  font-size: 12.5px;
  padding: 10px 12px;
  margin: 0;
}

/* ══════════════════════════════════════════════════════════════════════
   移动端（≤980px）：单列 + 紧凑节奏，目标一屏装完
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 980px) {
  #login-panel.auth-layout {
    grid-template-columns: 1fr;
    gap: 18px;
    min-height: auto;
    padding: 14px 0 24px;
  }
  #login-panel .auth-intro { gap: 11px; max-width: none; }
  #login-panel .auth-intro h1 { font-size: clamp(30px, 8.4vw, 40px); }
  #login-panel .auth-intro > p:not(.lp-badge):not(.eyebrow) {
    font-size: 13.5px;
    line-height: 1.6;
  }
  #login-panel .intro-stats { gap: 26px; }
  #login-panel .intro-stats b { font-size: 20px; }
  #login-panel .intro-stats span { font-size: 10.5px; }

  #login-panel .auth-card {
    padding: 18px 16px 16px;
    border-radius: 18px;
    gap: 10px;
  }
  #login-panel .auth-card h2 { font-size: 19px; }
  #login-panel .lp-field input { height: 48px; font-size: 16px; }
  #login-panel .lp-submit { height: 48px; font-size: 15px; }
  #login-panel .lp-alt,
  #login-panel .lp-guest { height: 44px; font-size: 13.5px; }
  #login-panel .form-note { font-size: 10.5px; }

  /* 分隔线在手机上纯属浪费高度，直接隐藏 */
  #login-panel .lp-divider { display: none; }
}

/* 超窄屏进一步收敛 */
@media (max-width: 400px) {
  #login-panel .auth-intro h1 { font-size: 28px; }
  #login-panel .intro-stats { gap: 20px; }
  #login-panel .intro-stats b { font-size: 18px; }
  #login-panel .auth-card { padding: 16px 14px 14px; gap: 9px; }
  #login-panel .lp-field input,
  #login-panel .lp-submit { height: 46px; }
  #login-panel .lp-alt,
  #login-panel .lp-guest { height: 42px; }
}

/* 横屏手机：文案区直接隐藏，只留表单 */
@media (max-width: 980px) and (orientation: landscape) and (max-height: 520px) {
  #login-panel .auth-intro { display: none; }
  #login-panel.auth-layout { padding: 8px 0; }
}

@media (prefers-reduced-motion: reduce) {
  #login-panel::before,
  #login-panel::after,
  #login-panel .lp-badge i { animation: none; }
  #login-panel .lp-submit::after { display: none; }
}
