:root {
  --black: #050505;
  --ink: #111;
  --muted: #5b5b5b;
  --line: #242424;
  --line-light: #d8d8d8;
  --paper: #f7f7f3;
  --white: #fff;
  --blue: #12a8ff;
  --green: #2fd6b0;
  --violet: #7b65ff;
  --signal: #f2371d;
  --body: "Manrope", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --display: "Archivo Black", "Microsoft YaHei UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
}

a {
  color: inherit;
  text-decoration: none;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(640px, 1.34fr) minmax(420px, 1fr);
}

.auth-panel {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 80px auto auto 1fr;
  border-right: 0;
  background: var(--paper);
}

.auth-top {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(24px, 4vw, 56px);
  border-bottom: 1px solid var(--ink);
}

.brand-logo {
  display: block;
  width: clamp(132px, 11vw, 168px);
  height: auto;
}

.auth-switch {
  height: 42px;
  display: inline-grid;
  place-items: center;
  padding: 0 16px;
  border: 1px solid var(--ink);
  background: transparent;
  font-size: 13px;
  font-weight: 900;
  font-family: inherit;
  color: var(--ink);
  cursor: pointer;
}

.auth-switch:hover {
  background: var(--black);
  color: var(--white);
}

.auth-copy {
  width: min(600px, calc(100% - 64px));
  justify-self: center;
  padding: clamp(58px, 7vw, 98px) 0 16px;
}

.auth-view {
  display: contents;
}

.auth-view[hidden] {
  display: none;
}

.kicker {
  margin: 0 0 16px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.back-home {
  display: inline-flex;
  align-items: center;
  margin: 0 0 30px;
  color: #666;
  font-size: 14px;
  font-weight: 800;
}

.back-home:hover {
  color: var(--signal);
}

h1 {
  margin: 0;
  font-size: clamp(62px, 6vw, 96px);
  line-height: 0.96;
  letter-spacing: 0;
  font-weight: 900;
}

.lede {
  max-width: 520px;
  margin: 24px 0 0;
  color: #444;
  font-size: 16px;
  line-height: 1.72;
}

.auth-form {
  width: min(600px, calc(100% - 64px));
  max-width: 600px;
  justify-self: center;
  align-self: start;
  margin: 24px 0 clamp(42px, 6vw, 72px);
  background: transparent;
}

.login-methods {
  display: grid;
  gap: 12px;
}

.social-auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.social-auth button {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--ink);
  background: rgba(247,247,243,.78);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.method-button {
  min-height: 64px;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--ink);
  background: rgba(247,247,243,.72);
  color: var(--ink);
  padding: 0 22px;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease, border-color .2s ease;
}

.method-button::after {
  content: "->";
  font-weight: 900;
}

.method-button:hover,
.method-button[aria-expanded="true"] {
  background: var(--black);
  color: var(--white);
  transform: translateX(6px);
}

.mail-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  font-size: 15px;
  font-weight: 900;
}

.social-auth button:hover {
  background: var(--black);
  color: var(--white);
  transform: translateY(-2px);
}

.social-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
}

.social-icon svg {
  width: 17px;
  height: 17px;
  display: block;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 8px;
  color: #777;
  font-size: 12px;
  font-weight: 900;
}

.email-login-fields {
  margin-top: 18px;
  animation: revealEmail .24s ease both;
}

.email-login-fields[hidden] {
  display: none;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #cfcfca;
}

.field {
  display: grid;
  gap: 8px;
  padding: 14px 16px 13px;
  border: 1px solid #b9b9b2;
  border-radius: 8px;
  background: rgba(255,255,255,.38);
}

.field + .field {
  margin-top: 12px;
}

.field label {
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
}

.field input,
.field select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  font-weight: 800;
}

.password-input {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
}

.code-input {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
}

.code-send {
  border: 0;
  border-left: 1px solid #cfcfca;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  padding: 6px 0 6px 16px;
  white-space: nowrap;
}

.code-send:hover {
  color: var(--signal);
}

.code-send:disabled {
  color: #999;
  cursor: not-allowed;
}

.password-toggle {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  padding: 6px 0 6px 12px;
}

.password-toggle:hover,
.password-toggle[aria-pressed="true"] {
  color: var(--signal);
}

.field select option {
  background: var(--paper);
  color: var(--ink);
}

.field input::placeholder {
  color: #aaa;
}

.field:focus-within {
  border-color: var(--signal);
  background: rgba(255,255,255,.68);
}

.field:focus-within label {
  color: var(--signal);
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 24px;
  color: #555;
  font-size: 13px;
  font-weight: 800;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--signal);
}

.auth-row a:hover,
.auth-note a:hover {
  color: var(--signal);
}

.auth-submit {
  width: 100%;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  padding: 0 26px;
  background: var(--black);
  color: var(--white);
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.auth-submit:hover {
  background: var(--signal);
  color: var(--white);
}

.auth-note {
  padding: 18px 0 0;
  color: #646464;
  font-size: 13px;
  line-height: 1.65;
}

.auth-note a {
  font-weight: 900;
  color: var(--ink);
}

.auth-visual {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  background: #050505;
}

.auth-poster {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  aspect-ratio: auto;
  overflow: hidden;
  border: 0;
  background:
    radial-gradient(ellipse at 28% 18%, rgba(18,168,255,.18), transparent 30%),
    radial-gradient(ellipse at 86% 18%, rgba(242,55,29,.18), transparent 26%),
    radial-gradient(ellipse at 54% 58%, rgba(255,255,255,.05), transparent 34%),
    linear-gradient(180deg, #071014 0%, #050505 50%, #070707 100%);
  box-shadow: none;
  isolation: isolate;
}

.auth-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.48), transparent 58%);
  opacity: .45;
  z-index: 0;
}

.auth-poster::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 58%;
  background:
    radial-gradient(circle, rgba(255,255,255,.78) 1px, transparent 1.25px),
    radial-gradient(circle at 36% 100%, rgba(18,168,255,.66), transparent 45%),
    radial-gradient(circle at 72% 90%, rgba(242,55,29,.58), transparent 32%);
  background-size: 8px 8px, 100% 100%, 100% 100%;
  mask-image: linear-gradient(to top, rgba(0,0,0,1), rgba(0,0,0,.86) 52%, transparent 100%);
  opacity: .86;
  z-index: 2;
}

.poster-core {
  position: absolute;
  width: min(66%, 560px);
  height: min(42%, 390px);
  right: clamp(26px, 4vw, 58px);
  top: clamp(128px, 17vh, 184px);
  z-index: 3;
  border-radius: 48% 52% 46% 54% / 45% 46% 54% 55%;
  border: 0;
  background:
    radial-gradient(circle at 33% 25%, rgba(255,255,255,.7), transparent 13%),
    radial-gradient(circle at 74% 77%, rgba(255,255,255,.74), transparent 22%),
    linear-gradient(132deg, rgba(86, 20, 13, .92) 0%, rgba(8, 7, 8, .98) 42%, rgba(0, 105, 165, .96) 70%, rgba(232, 240, 238, .94) 100%);
  box-shadow:
    inset 34px 28px 54px rgba(255,255,255,.15),
    inset -48px -38px 96px rgba(0,0,0,.6),
    0 34px 120px rgba(18,168,255,.2);
  transform: rotate(-8deg);
}

.poster-core::after {
  content: "";
  position: absolute;
  inset: -12%;
  border-radius: inherit;
  background:
    linear-gradient(112deg, transparent 0 24%, rgba(255,255,255,.64) 25% 32%, rgba(242,55,29,.16) 33% 42%, transparent 43%),
    linear-gradient(110deg, transparent 0 55%, rgba(10,10,10,.86) 56% 66%, rgba(18,168,255,.46) 67% 83%, transparent 84%);
  mix-blend-mode: screen;
  opacity: .72;
}

.poster-orbit {
  position: absolute;
  z-index: 2;
  border-radius: 50%;
  pointer-events: none;
}

.orbit-a {
  width: min(78%, 640px);
  height: min(38%, 340px);
  right: clamp(-8px, 1vw, 18px);
  top: clamp(108px, 14vh, 154px);
  border: clamp(28px, 3vw, 48px) solid rgba(255,255,255,.18);
  border-left-color: rgba(18,168,255,.76);
  border-top-color: rgba(255,255,255,.52);
  border-right-color: rgba(242,55,29,.34);
  border-bottom-color: rgba(4, 12, 18, .72);
  transform: rotate(15deg);
  opacity: .86;
}

.orbit-b {
  width: min(64%, 520px);
  height: min(19%, 178px);
  right: clamp(82px, 10vw, 138px);
  top: clamp(438px, 52vh, 492px);
  border: clamp(18px, 2vw, 30px) solid rgba(255,255,255,.18);
  border-left-color: rgba(18,168,255,.58);
  border-right-color: rgba(242,55,29,.52);
  border-top-color: rgba(255,255,255,.48);
  border-bottom-color: rgba(0,0,0,.44);
  transform: rotate(10deg);
  opacity: .72;
}

.poster-kicker {
  position: absolute;
  left: clamp(28px, 5vw, 62px);
  top: clamp(32px, 5vh, 54px);
  z-index: 4;
  color: rgba(255,255,255,.76);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.poster-mark {
  position: absolute;
  right: clamp(28px, 4.8vw, 58px);
  top: clamp(30px, 4.8vh, 52px);
  z-index: 4;
  width: 34px;
  height: 34px;
  border: 7px solid var(--white);
  border-right-color: var(--signal);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.auth-photo-logo {
  position: absolute;
  left: clamp(32px, 5vw, 64px);
  bottom: clamp(54px, 8vh, 92px);
  z-index: 4;
  margin: 0;
  color: var(--white);
  font-family: var(--display);
  font-size: clamp(82px, 7.8vw, 138px);
  font-weight: 900;
  line-height: 0.78;
  letter-spacing: 0;
  text-shadow: 0 4px 26px rgba(0, 0, 0, .24);
  pointer-events: none;
}

.visual-header {
  display: none;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(47, 214, 176, .16);
}

.orbit-stage {
  display: none;
}

.auth-poster {
  background: url("./assets/auth-jimeng-poster.png") center / cover no-repeat;
}

.auth-poster::before {
  content: none;
}

.auth-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,.04), rgba(0,0,0,.18));
  pointer-events: none;
}

.poster-core,
.poster-core::after,
.poster-orbit,
.poster-kicker,
.poster-mark {
  display: none;
}

.auth-photo-logo {
  left: clamp(34px, 5vw, 72px);
  bottom: clamp(44px, 6vh, 72px);
  z-index: 3;
  font-size: clamp(78px, 7vw, 126px);
}

.poster-kicker {
  display: block;
  z-index: 3;
  color: rgba(255,255,255,.84);
  text-shadow: 0 2px 14px rgba(0,0,0,.45);
}

.auth-ring {
  position: absolute;
  border-radius: 50%;
  border: clamp(46px, 6vw, 88px) solid transparent;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.94), transparent 22%),
    linear-gradient(128deg, rgba(255,255,255,.98), rgba(242,55,29,.2) 22%, rgba(5,5,5,.92) 45%, rgba(18,168,255,.74) 68%, rgba(255,255,255,.98) 84%);
  background-clip: padding-box, border-box;
  box-shadow: inset 0 0 42px rgba(255,255,255,.7), 0 28px 80px rgba(18,168,255,.18);
  will-change: transform, filter;
}

.auth-ring::after {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: inherit;
  background-image: radial-gradient(rgba(255,255,255,.55) 1px, transparent 1px);
  background-size: 6px 6px;
  opacity: .5;
  mix-blend-mode: screen;
  animation: dotFlow 9s linear infinite;
}

.ring-main {
  width: 560px;
  height: 780px;
  right: 34%;
  top: 4%;
  animation: ringMain 11s ease-in-out infinite;
}

.ring-side {
  width: 660px;
  height: 260px;
  right: -10%;
  bottom: 12%;
  animation: ringSide 12s ease-in-out infinite;
}

.auth-card {
  position: absolute;
  right: clamp(28px, 5vw, 72px);
  bottom: clamp(32px, 6vw, 88px);
  width: min(360px, calc(100% - 56px));
  border: 1px solid var(--ink);
  background: rgba(247,247,243,.86);
  backdrop-filter: blur(12px);
  color: var(--ink);
}

.auth-card header,
.auth-card div {
  padding: 18px 20px;
  border-bottom: 1px solid var(--ink);
}

.auth-card div:last-child {
  border-bottom: 0;
}

.auth-card small {
  color: var(--muted);
  font-weight: 900;
}

.auth-card strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
}

@keyframes authDrift {
  0%, 100% { transform: translateX(0) translateY(0); }
  50% { transform: translateX(-18px) translateY(-10px); }
}

@keyframes ringMain {
  0%, 100% { transform: rotate(15deg) scale(1); filter: brightness(1); }
  50% { transform: rotate(19deg) translate(16px, -14px) scale(1.03); filter: brightness(1.16); }
}

@keyframes ringSide {
  0%, 100% { transform: rotate(-15deg) scale(1); filter: brightness(1); }
  50% { transform: rotate(-11deg) translate(-18px, -10px) scale(1.025); filter: brightness(1.14); }
}

@keyframes dotFlow {
  to { background-position: 36px -42px; }
}

@keyframes revealEmail {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .auth-visual {
    min-height: 420px;
    border-top: 1px solid var(--ink);
  }

  .visual-header {
    display: none;
  }

  .orbit-stage {
    inset: 0;
  }

  .auth-form {
    margin-top: 42px;
  }
}
