:root {
  color-scheme: light;
  font-family: "Aptos", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #173b55;
  background: #dff5ff;
}

* { box-sizing: border-box; }

body {
  position: relative;
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background: #dff5ff;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  content: "";
  pointer-events: none;
}

body::before {
  background: url("/yima-login-sky.webp") 46% center / cover no-repeat;
  transform: scale(1.025);
}

body::after {
  background:
    linear-gradient(90deg, rgba(239, 251, 255, .08) 0%, rgba(239, 251, 255, 0) 46%, rgba(224, 247, 255, .28) 72%, rgba(214, 241, 250, .5) 100%),
    linear-gradient(0deg, rgba(225, 246, 253, .8) 0%, rgba(231, 249, 255, .12) 38%, rgba(255, 255, 255, 0) 70%);
}

button, input { font: inherit; }

.shell {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  align-items: center;
  gap: clamp(2rem, 5vw, 6rem);
  max-width: 1600px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 5rem) clamp(1.5rem, 6vw, 6rem);
}

.brand {
  min-height: calc(100dvh - clamp(4rem, 10vw, 10rem));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: .25rem 0;
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: .65rem;
  width: max-content;
  color: #103b56;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-shadow: 0 1px 14px rgba(255, 255, 255, .8);
}

.wordmark .mark { color: #087fa9; font-size: 1.45rem; }
.brand-copy { max-width: 700px; padding: 2rem 0 .5rem; }
.eyebrow, .kicker { color: #087fa9; font-size: .72rem; font-weight: 900; letter-spacing: .19em; }
.brand h1 {
  max-width: 11em;
  margin: .75rem 0 1rem;
  color: #0b3550;
  font-size: clamp(3.2rem, 5.5vw, 5.9rem);
  line-height: 1.02;
  letter-spacing: -.055em;
  text-wrap: balance;
  text-shadow: 0 2px 22px rgba(241, 253, 255, .96);
}
.promise {
  margin: 0;
  color: #265e78;
  font-size: clamp(.9rem, 1.2vw, 1.05rem);
  font-weight: 650;
  letter-spacing: .1em;
  text-shadow: 0 1px 12px rgba(247, 254, 255, .95);
}

.auth-card {
  width: min(100%, 470px);
  justify-self: end;
  padding: clamp(1.7rem, 3.4vw, 2.8rem);
  border: 1px solid rgba(255, 255, 255, .76);
  border-radius: 28px;
  background: rgba(248, 253, 255, .84);
  box-shadow:
    0 36px 90px rgba(18, 102, 143, .2),
    inset 0 1px 0 rgba(255, 255, 255, .95);
  backdrop-filter: blur(28px) saturate(145%);
  -webkit-backdrop-filter: blur(28px) saturate(145%);
}

.auth-heading h2 { margin: .35rem 0 .4rem; color: #123c56; font-size: 2.15rem; letter-spacing: -.04em; }
.auth-heading p:last-child { margin-top: 0; color: #648496; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin: 1.8rem 0; padding: .35rem; border-radius: 15px; background: #e9f7fb; }
.tab { border: 0; border-radius: 11px; padding: .75rem; color: #526f80; background: transparent; cursor: pointer; transition: color .18s, background .18s, transform .18s, box-shadow .18s; }
.tab:hover { color: #126f91; }
.tab:active { transform: translateY(1px); }
.tab.active { color: #147c9f; background: #fff; box-shadow: 0 6px 18px rgba(57, 133, 160, .12); font-weight: 700; }
label { display: block; margin: 1rem 0 .45rem; color: #315b72; font-size: .88rem; font-weight: 700; }
input { width: 100%; border: 1px solid #b9dbe5; border-radius: 12px; padding: .92rem 1rem; outline: none; color: #173b55; background: rgba(252, 254, 255, .92); transition: border-color .18s, box-shadow .18s, background .18s; }
input:hover { background: #fff; }
input:focus { border-color: #37a9ca; box-shadow: 0 0 0 4px rgba(55, 169, 202, .12); }
.hidden { display: none; }
.form-error { min-height: 1.4rem; margin: .85rem 0 .3rem; color: #b4434f; font-size: .86rem; }
.submit { width: 100%; border: 0; border-radius: 12px; padding: .95rem; color: #fff; background: linear-gradient(135deg, #18a7cd, #0b759e); box-shadow: 0 14px 30px rgba(18, 126, 164, .28); cursor: pointer; font-weight: 850; transition: transform .18s, box-shadow .18s, filter .18s; }
.submit:hover { filter: brightness(1.04); box-shadow: 0 17px 36px rgba(18, 126, 164, .34); }
.submit:active { transform: translateY(1px); }
.submit:disabled { cursor: wait; opacity: .62; }
.privacy { margin: 1.4rem 0 0; color: #6e8c9d; font-size: .78rem; line-height: 1.6; text-align: center; }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .auth-card { background: rgba(248, 253, 255, .97); }
}

@media (prefers-reduced-motion: no-preference) {
  body::before { animation: scene-in 1.2s cubic-bezier(.16, 1, .3, 1) both; }
  .brand-copy { animation: rise-in .7s .12s cubic-bezier(.16, 1, .3, 1) both; }
  .auth-card { animation: rise-in .72s .2s cubic-bezier(.16, 1, .3, 1) both; }
}

@keyframes scene-in {
  from { opacity: .55; transform: scale(1.065); }
  to { opacity: 1; transform: scale(1.025); }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 821px) and (max-height: 800px) {
  .shell { padding-block: 2rem; }
  .brand { min-height: calc(100dvh - 4rem); }
  .auth-card { padding-block: 2rem; }
  .tabs { margin-block: 1.35rem; }
  label { margin-top: .8rem; }
  .privacy { margin-top: 1rem; }
}

@media (max-width: 820px) {
  body::before { background-image: url("/yima-login-sky-mobile.webp"); background-position: center top; }
  body::after {
    background:
      linear-gradient(0deg, rgba(224, 246, 253, .96) 0%, rgba(228, 247, 253, .72) 45%, rgba(246, 253, 255, .08) 78%),
      linear-gradient(90deg, rgba(235, 250, 255, .12), rgba(224, 245, 252, .28));
  }
  .shell { grid-template-columns: 1fr; align-items: start; gap: 1rem; padding: 1rem; }
  .brand { min-height: 34dvh; padding: .35rem .35rem 0; text-align: left; }
  .brand-copy { margin-top: auto; padding-bottom: .35rem; }
  .brand h1 { max-width: 10em; margin: .45rem 0 .55rem; font-size: clamp(2rem, 9vw, 3.25rem); }
  .promise { font-size: .78rem; letter-spacing: .06em; }
  .auth-card { width: 100%; justify-self: center; padding: 1.5rem; border-radius: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
