/* ───────── 登录页 ───────── */

html { background: var(--bg); }

body.login {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

.aurora {
  position: fixed;
  top: -30vh; left: -10vw;
  width: 80vw; height: 90vh;
  background: radial-gradient(closest-side, var(--glow), transparent 72%);
  filter: blur(20px);
  opacity: 0.95;
  pointer-events: none;
  z-index: 0;
  animation: drift 26s var(--ease-in-out) infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vw, 5vh, 0) scale(1.12); }
}

/* ── 顶栏 ── */
.topbar {
  position: relative;
  z-index: 2;
  height: 68px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 clamp(20px, 4vw, 44px);
  animation: fadeIn 520ms var(--ease-out) both;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--text);
  color: var(--bg);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-title { font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--text); }
.brand-sub { font-size: 10px; letter-spacing: 0.14em; color: var(--text-3); }

.topbar-meta { display: flex; align-items: center; gap: 14px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px 3px 8px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-2);
  white-space: nowrap;
}
.pill-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 16%, transparent);
}
.domain {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.01em;
}

/* ── 主舞台 ── */
.stage {
  position: relative;
  z-index: 2;
  flex: 1;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 44px);
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(320px, 0.78fr);
  align-items: center;
  gap: clamp(32px, 6vw, 84px);
  padding-top: 2vh;
  padding-bottom: 3vh;
}

.intro { padding-bottom: 6px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  animation: riseIn 540ms var(--ease-out) 40ms both;
}
.eyebrow .rule { width: 24px; height: 1px; background: currentColor; opacity: 0.55; }

.headline {
  margin: 0 0 22px;
  font-family: "PingFang SC", "Microsoft YaHei Light", "Microsoft YaHei UI Light", "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: clamp(50px, 6.9vw, 90px);
  line-height: 1.08;
  font-weight: 300;
  letter-spacing: 0;
  color: var(--text);
  animation: riseIn 620ms var(--ease-out) 80ms both;
}
.headline-line { display: block; }
.headline-dot {
  color: var(--primary);
  animation: dotPulse 3.6s var(--ease-in-out) 1.4s infinite;
}
@keyframes dotPulse {
  0%, 100% { opacity: 0.62; text-shadow: 0 0 0 rgba(10, 132, 255, 0); }
  50% { opacity: 1; text-shadow: 0 0 22px rgba(10, 132, 255, 0.55); }
}

.lede {
  margin: 0;
  max-width: 40ch;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--text-2);
  text-wrap: pretty;
  animation: riseIn 540ms var(--ease-out) 120ms both;
}

.facts {
  margin: 38px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
  max-width: 340px;
  animation: riseIn 540ms var(--ease-out) 160ms both;
}
.facts li {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}
.facts li:last-child { border-bottom: 0; padding-bottom: 0; }
.facts li span {
  width: 52px;
  flex-shrink: 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-3);
}

/* ── 密码面板 ── */
.panel {
  position: relative;
  padding: 26px 26px 22px;
  border: 1px solid color-mix(in srgb, var(--line-strong) 78%, transparent);
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: 0 40px 90px -28px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  animation: panelIn 540ms var(--ease-out) 100ms both;
}
[data-theme="dark"] .panel {
  box-shadow: 0 44px 100px -30px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  opacity: 0.7;
}
[data-theme="light"] .panel::before { opacity: 0.4; }
.panel.is-error { animation: shake 420ms var(--ease-in-out) both; }

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-3);
}

.form { display: block; }

.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.field-head label {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-2);
}
.field-hint {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
}

.field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}
.field::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 220ms var(--ease-out);
}
.field:focus-within::after { transform: scaleX(1); }
.field.is-error::after { background: var(--red); transform: scaleX(1); }

.field input {
  flex: 1;
  min-width: 0;
  height: 56px;
  padding: 0 46px 0 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  font-size: 17px;
  letter-spacing: 0.06em;
  color: var(--text);
  outline: none;
  transition: border-color 300ms var(--ease-out);
}
.field input::placeholder {
  color: var(--text-3);
  font-size: 14.5px;
  letter-spacing: 0;
}
.field.is-error input { border-bottom-color: var(--red); }

.reveal {
  position: absolute;
  right: -6px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 0; border-radius: 9px;
  background: transparent;
  color: var(--text-3);
  transition: color 180ms var(--ease-out), background 180ms var(--ease-out), transform 120ms var(--ease-out);
}
.reveal:hover { color: var(--text); background: var(--field); }
.reveal:active { transform: scale(0.92); }
.reveal .icon-eye-off { display: none; }
.reveal[aria-pressed="true"] .icon-eye { display: none; }
.reveal[aria-pressed="true"] .icon-eye-off { display: block; }

.error {
  min-height: 20px;
  margin: 9px 0 0;
  font-size: 12px;
  color: var(--red);
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out);
}
.error.is-visible { opacity: 1; transform: none; }

.submit {
  position: relative;
  width: 100%;
  height: 52px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 30px -14px rgba(0, 113, 227, 0.75);
  transition: transform 160ms var(--ease-out), box-shadow 320ms var(--ease-out),
              background 320ms var(--ease-out), opacity 240ms var(--ease-out);
}
.submit:hover:not(:disabled) {
  background: var(--primary-hover);
  box-shadow: 0 16px 38px -14px rgba(0, 113, 227, 0.9);
}
.submit:active:not(:disabled) { transform: scale(0.985); }
.submit:disabled { cursor: default; }
.submit.is-loading { opacity: 0.85; }
.submit.is-success {
  background: var(--green);
  color: #05230d;
  opacity: 1;
  box-shadow: 0 12px 30px -14px rgba(48, 209, 88, 0.7);
}
.submit.is-success .submit-spinner { display: none; }

.submit-arrow { display: flex; transition: transform 280ms var(--ease-out); }
.submit:hover:not(:disabled) .submit-arrow { transform: translateX(3px); }
.submit.is-loading .submit-label,
.submit.is-loading .submit-arrow,
.submit.is-success .submit-arrow { display: none; }
.submit.is-success .submit-label { display: inline; }

.submit-spinner {
  display: none;
  width: 15px; height: 15px;
  border: 1.75px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.submit.is-loading .submit-spinner { display: block; }

.form-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 16px 0 0;
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.01em;
}
.form-foot svg { flex-shrink: 0; opacity: 0.8; }

/* ── 页脚 ── */
.footer {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(20px, 4vw, 44px) calc(24px + env(safe-area-inset-bottom));
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-3);
}
.footer-mid { opacity: 0.72; }

/* ── 动效 ── */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(26px) scale(0.982); }
  to { opacity: 1; transform: none; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  18% { transform: translateX(-7px); }
  38% { transform: translateX(6px); }
  58% { transform: translateX(-4px); }
  78% { transform: translateX(2px); }
}
@keyframes pageOut {
  to { opacity: 0; transform: scale(1.008); }
}
body.is-leaving { animation: pageOut 260ms var(--ease-in-out) both; }

/* ── 响应式 ── */
@media (max-width: 940px) {
  .stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 38px;
    align-items: start;
    max-width: 520px;
    padding-top: 4vh;
    padding-bottom: 4vh;
  }
  .headline { font-size: clamp(50px, 13vw, 76px); margin-bottom: 20px; }
  .lede { font-size: 14px; }
  .facts { margin-top: 28px; max-width: none; }
  .domain { display: none; }
  .panel { padding: 24px 22px 20px; }
}

@media (max-width: 560px) {
  .topbar { height: 60px; }
  .stage { gap: 30px; padding-top: 2vh; }
  .eyebrow { margin-bottom: 18px; font-size: 9.5px; letter-spacing: 0.16em; }
  .headline { font-size: clamp(46px, 15vw, 64px); }
  .facts { display: none; }
  .footer-mid { display: none; }
  .footer { padding-bottom: 20px; }
}

@media (max-height: 720px) and (min-width: 941px) {
  .facts { margin-top: 26px; }
  .headline { font-size: clamp(48px, 6.6vw, 84px); }
  .stage { padding-top: 0; padding-bottom: 0; }
}
