/* ================================================================
   LOGIN PAGE — 沉浸式品牌首屏 → 左侧影像 / 右侧登录注册
   ================================================================ */
@font-face {
  font-family: "MindstormLoginTitle";
  src: url("/fonts/AlibabaPuHuiTi-Light.ttf") format("truetype");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "MindstormLoginSubtitle";
  src: url("/fonts/AlibabaPuHuiTi-Thin.ttf") format("truetype");
  font-style: normal;
  font-weight: 100;
  font-display: swap;
}

.login-body {
  --login-font: "AlibabaPuHuiTi", "Alibaba PuHuiTi", "PingFang SC", sans-serif;
  margin: 0;
  padding: 0;
  min-width: 320px;
  overflow: hidden;
  background: #0e1110;
  font-family: var(--login-font);
}

.login-split {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #fff;
}

/* ---- 品牌影像面板 ---- */
.login-brand-panel {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 2;
  width: 100%;
  overflow: hidden;
  background:
    linear-gradient(rgba(0, 0, 0, .04), rgba(0, 0, 0, .04)),
    #1a1a1a url("/login-bg-poster.jpg?v=20260727-poster-q45") center / cover no-repeat;
  cursor: pointer;
  transition: width 760ms cubic-bezier(.22, 1, .36, 1);
}

.login-bg-video {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  width: 100vw;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: translate3d(0, 0, 0);
  transition: transform 760ms cubic-bezier(.22, 1, .36, 1), opacity 420ms ease;
  will-change: transform;
  pointer-events: none;
  user-select: none;
}

.login-bg-video.is-ready {
  opacity: 1;
}

/* 隐藏 Safari / Chromium 在自动播放尚未成功时注入的原生大播放按钮。 */
.login-bg-video::-webkit-media-controls,
.login-bg-video::-webkit-media-controls-panel,
.login-bg-video::-webkit-media-controls-start-playback-button,
.login-bg-video::-webkit-media-controls-overlay-play-button {
  display: none !important;
  -webkit-appearance: none;
  opacity: 0;
}

.login-brand-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 52%, transparent 38%, rgba(0, 0, 0, .18) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, .06), rgba(0, 0, 0, .16));
  opacity: 1;
  transition: opacity 500ms ease;
}

.login-entry-logo {
  position: absolute;
  z-index: 3;
  top: clamp(20px, 2.7vw, 42px);
  right: clamp(22px, 3.8vw, 64px);
  display: flex;
  align-items: center;
  gap: clamp(8px, .75vw, 13px);
  color: #fff;
  transition:
    opacity 260ms ease,
    transform 480ms cubic-bezier(.22, 1, .36, 1);
}

.login-entry-logo img {
  width: clamp(24px, 2vw, 38px);
  height: auto;
  aspect-ratio: 42 / 34;
  object-fit: contain;
  filter: none;
  mix-blend-mode: normal;
}

.login-entry-logo span {
  font-family: var(--login-font);
  font-size: clamp(18px, 1.6vw, 30px);
  font-weight: 700;
  letter-spacing: .01em;
}

.login-entry-copy {
  --entry-subtitle-size: clamp(31px, calc(3vw + .6vh), 62px);
  --entry-subtitle-half: clamp(15.5px, calc(1.5vw + .3vh), 31px);
  --entry-title-gap: clamp(10px, 1.2vh, 16px);
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: min(1040px, 92vw);
  height: 0;
  color: #fff;
  text-align: center;
  transform: translateX(-50%);
  transition:
    opacity 240ms ease,
    transform 480ms cubic-bezier(.22, 1, .36, 1);
}

.login-entry-copy h1 {
  position: absolute;
  right: 0;
  bottom: calc(var(--entry-subtitle-half) + var(--entry-title-gap));
  left: 0;
  margin: 0;
  color: #fff;
  font-family: "MindstormLoginTitle", var(--login-font);
  font-size: clamp(60px, calc(7vw + 1vh), 138px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: .075em;
  text-indent: .075em;
  white-space: nowrap;
  text-shadow: 0 5px 28px rgba(0, 0, 0, .2);
}

.login-entry-copy p {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  margin: 0;
  color: #fff;
  font-family: "MindstormLoginSubtitle", var(--login-font);
  font-size: var(--entry-subtitle-size);
  font-weight: 100;
  line-height: 1;
  letter-spacing: -.035em;
  transform: translateY(-50%);
  text-shadow: 0 4px 20px rgba(0, 0, 0, .22);
}

.login-entry-cta {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: clamp(52px, 8.4vh, 84px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 136px;
  align-items: center;
  width: min(484px, calc(100vw - 48px));
  height: 54px;
  padding: 5px;
  overflow: hidden;
  border: 1px solid rgba(14, 17, 16, .75);
  border-radius: 11px;
  background: rgba(255, 255, 255, .94);
  color: #0e1110;
  font-family: var(--login-font);
  text-align: left;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .14);
  transform: translateX(-50%);
  transition:
    opacity 220ms ease,
    transform 480ms cubic-bezier(.22, 1, .36, 1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.login-entry-hint {
  min-width: 0;
  padding: 0 5px;
  overflow: hidden;
  color: #858585;
  font-size: 14px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-entry-action {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  border: 0;
  border-radius: 7px;
  background: #151515;
  color: #fff;
  cursor: pointer;
  font-family: var(--login-font);
  font-size: 17px;
  font-weight: 500;
  transition: color 180ms ease, background 180ms ease, transform 180ms cubic-bezier(.22, 1, .36, 1);
}

.login-entry-action:hover {
  background: #c7dfdc;
  color: #0e1110;
}

.login-entry-action:active {
  transform: scale(.99);
}

.login-entry-action:focus-visible {
  outline: 3px solid rgba(199, 223, 220, .9);
  outline-offset: 3px;
}

/* ---- 进入登录页后的布局 ---- */
.login-split.is-entered .login-brand-panel {
  width: 50%;
  cursor: pointer;
}

.login-split.is-entered .login-bg-video {
  /* 参考稿第二帧展示原背景的右半幅：面板收窄时同步左移半屏。 */
  transform: translate3d(-50vw, 0, 0);
}

.login-split.is-entered .login-brand-panel::after {
  opacity: .42;
}

.login-split.is-entered .login-entry-logo,
.login-split.is-entered .login-entry-copy {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -12px);
}

.login-split.is-entered .login-entry-logo {
  transform: translateY(-12px);
}

.login-split.is-entered .login-entry-cta {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
}

/* ---- 右侧表单面板 ---- */
.login-form-panel {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: 1;
  display: flex;
  width: 50%;
  overflow: hidden auto;
  align-items: center;
  justify-content: center;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(100%, 0, 0);
  transition:
    transform 760ms cubic-bezier(.22, 1, .36, 1),
    opacity 260ms ease 100ms;
}

.login-split.is-entered .login-form-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
}

.login-form-inner {
  width: min(366px, calc(100% - 64px));
  margin: auto;
  padding: 64px 0 72px;
  opacity: 0;
  transform: translateX(28px);
  transition:
    opacity 420ms ease 340ms,
    transform 620ms cubic-bezier(.22, 1, .36, 1) 300ms;
}

.login-split.is-entered .login-form-inner {
  opacity: 1;
  transform: translateX(0);
}

.login-form-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
  color: #0e1110;
}

.login-form-logo img {
  width: 46px;
  height: 38px;
  object-fit: contain;
  filter: none;
  mix-blend-mode: normal;
}

.login-form-intro {
  margin-bottom: 34px;
  text-align: center;
}

.login-form-heading {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin: 0;
  color: #1d1d1d;
  font-family: var(--login-font);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0;
}

/* ---- Tabs ---- */
.login-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.login-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 50px;
  padding: 0;
  border-radius: 12px;
  background: #f3f3f3;
  color: #0e1110;
  cursor: pointer;
  font-family: var(--login-font);
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  transition: color 200ms ease, background 200ms ease, transform 200ms ease;
}

.login-tab.active {
  background: #c7dfdc;
  color: #0e1110;
  font-weight: 700;
}

.login-tab:hover {
  background: #d6e8e5;
  color: #0e1110;
}

.login-tab:active {
  transform: scale(.99);
}

/* ---- Fields ---- */
.login-form-content {
  animation: login-form-in 260ms cubic-bezier(.22, 1, .36, 1);
}

.login-field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 17px;
}

.login-field span {
  color: #292929;
  font-family: var(--login-font);
  font-size: 12px;
  font-weight: 500;
}

.login-input {
  box-sizing: border-box;
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border: 1px solid #d8d8d8;
  border-radius: 12px;
  outline: none;
  background: #fff;
  color: #1d1d1d;
  font-family: var(--login-font);
  font-size: 15px;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.login-input:focus {
  border-color: #cfcfcf;
  background: #fff;
  box-shadow: 0 0 0 1px #cfcfcf;
}

.login-input::placeholder {
  color: #777;
}

.login-input:-webkit-autofill,
.login-input:-webkit-autofill:hover,
.login-input:-webkit-autofill:focus,
.login-input:-webkit-autofill:active {
  -webkit-text-fill-color: #1d1d1d;
  caret-color: #1d1d1d;
  box-shadow: 0 0 0 1000px #fff inset, 0 0 0 1px #cfcfcf;
  transition: background-color 9999s ease-out 0s;
}

.login-forgot {
  align-self: flex-end;
  margin-top: 2px;
  color: #aaa;
  font-family: var(--login-font);
  font-size: 12px;
  text-decoration: none;
}

.login-forgot:hover {
  color: #0e1110;
}

.login-field .login-forgot {
  position: absolute;
  top: 0;
  right: 0;
}

/* ---- Submit Button ---- */
.login-btn {
  width: 100%;
  height: 50px;
  margin-top: 0;
  border: 0;
  border-radius: 12px;
  background: #0e1110;
  color: #fff;
  cursor: pointer;
  font-family: var(--login-font);
  font-size: 15px;
  font-weight: 600;
  transition: all 200ms;
}

.login-btn:hover {
  background: #c7dfdc;
  color: #0e1110;
  transform: none;
  box-shadow: none;
}

.login-btn:active {
  transform: scale(.99);
}

.login-btn:focus-visible,
.login-sms-btn:focus-visible,
.login-tab:focus-visible {
  outline: 2px solid #0e1110;
  outline-offset: 2px;
}

.login-learn-more {
  margin-top: 58px;
  color: #b7b7b7;
  font-family: var(--login-font);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
}

/* ---- SMS ---- */
.login-sms-row {
  display: flex;
  gap: 10px;
}

.login-sms-input {
  min-width: 0;
  flex: 1;
}

.login-sms-btn {
  height: 52px;
  padding: 0 15px;
  flex-shrink: 0;
  border: 1px solid #dedede;
  border-radius: 12px;
  background: #fff;
  color: #0e1110;
  cursor: pointer;
  font-family: var(--login-font);
  font-size: 12px;
  font-weight: 500;
  transition: border-color 200ms, background 200ms;
}

.login-sms-btn:hover {
  border-color: #0e1110;
  background: #f6f6f6;
}

.login-sms-btn:disabled {
  border-color: #e7e7e7;
  background: #f4f4f4;
  color: #aaa;
  cursor: not-allowed;
}

.login-error {
  margin: 0 0 14px;
  padding: 9px 12px;
  border-radius: 9px;
  background: #fff0f0;
  color: #b42318;
  font-family: var(--login-font);
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}

@keyframes login-form-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 矮屏下压缩纵向留白，注册表单仍可完整滚动。 */
@media (max-height: 820px) and (min-width: 901px) {
  .login-form-inner {
    padding-top: 38px;
    padding-bottom: 38px;
  }

  .login-form-logo {
    margin-bottom: 18px;
  }

  .login-form-intro {
    margin-bottom: 18px;
  }

  .login-field {
    margin-bottom: 12px;
  }

  .login-input,
  .login-sms-btn {
    height: 38px;
  }

  .login-btn {
    height: 44px;
  }

  .login-learn-more {
    margin-top: 32px;
  }
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .login-split.is-entered .login-brand-panel {
    width: 100%;
    height: 30vh;
    height: 30dvh;
  }

  .login-split.is-entered .login-bg-video {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    transform: translate3d(0, -30%, 0);
  }

  .login-form-panel {
    inset: auto 0 0;
    width: 100%;
    height: 70vh;
    height: 70dvh;
    transform: translate3d(0, 100%, 0);
  }

  .login-form-inner {
    width: min(420px, calc(100% - 40px));
    padding: 34px 0 46px;
  }

  .login-learn-more {
    margin-top: 34px;
  }

  .login-form-logo {
    margin-bottom: 18px;
  }

  .login-entry-copy {
    top: 50%;
  }
}

@media (max-width: 560px) {
  .login-entry-logo {
    top: clamp(20px, 6vw, 24px);
    right: clamp(20px, 6vw, 24px);
  }

  .login-entry-copy h1 {
    font-size: clamp(42px, 14vw, 64px);
  }

  .login-entry-copy p {
    font-size: clamp(23px, 7.5vw, 32px);
  }

  .login-entry-cta {
    grid-template-columns: minmax(0, 1fr) 112px;
    bottom: 36px;
  }

  .login-entry-hint {
    font-size: 12px;
  }

  .login-entry-action {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-brand-panel,
  .login-bg-video,
  .login-entry-logo,
  .login-entry-copy,
  .login-entry-cta,
  .login-form-panel,
  .login-form-inner {
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
  }
}
