/* ============================================================
   Theme C - Night Voyage (登录/注册页)
   纯 CSS，无 @apply、无在线字体、无 emoji
   ============================================================ */

:root {
  --navy: #081220;
  --navy2: #0e2237;
  --bg: #eef2f7;
  --ink: #0d1b2c;
  --ink2: #52616f;
  --ink3: #8a97a7;
  --line: #dee5ef;
  --blue: #1668e3;
  --blue2: #2b7cf0;
  --blue3: #0d55c4;
  --amber: #e8963c;
}

/* ---------- base ---------- */

body.auth-page {
  margin: 0;
  color: var(--ink);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.auth-page *,
body.auth-page *::before,
body.auth-page *::after {
  box-sizing: border-box;
}

/* ---------- desktop >= 1024px ---------- */

body.auth-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 40px 7vw 40px 0;
}

.auth-brand {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 46%;
  overflow: hidden;
  color: #fff;
  padding: 34px 40px;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(90% 70% at 85% 0%, #1c3f66 0%, transparent 60%),
    linear-gradient(160deg, #06101d 0%, #081220 45%, #0e2237 100%);
}

.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
}

.auth-brand::after {
  content: "8331";
  position: absolute;
  right: -14px;
  bottom: -18px;
  font-family: "Bahnschrift", "Segoe UI", sans-serif;
  font-size: 150px;
  font-weight: 600;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .035);
  line-height: 1;
  overflow: hidden;
  pointer-events: none;
}

.auth-brand-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-logo {
  width: 48px;
  height: 48px;
  background: #fff;
  border-radius: 10px;
  display: grid;
  place-items: center;
  padding: 4px;
}

.auth-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-wordmark b {
  font-family: "Bahnschrift", "Segoe UI", sans-serif;
  font-size: 12px;
  letter-spacing: .18em;
  font-weight: 500;
  display: block;
}

.auth-wordmark small {
  display: block;
  margin-top: 5px;
  font-size: 8px;
  letter-spacing: .16em;
  color: rgba(255, 255, 255, .45);
}

.auth-brand-main {
  position: relative;
  margin-top: auto;
}

.auth-kicker {
  font-family: "Bahnschrift", "Segoe UI", sans-serif;
  font-size: 9px;
  letter-spacing: .3em;
  color: rgba(232, 150, 60, .9);
}

.auth-title {
  margin: 14px 0 0;
  font-size: 40px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: .1em;
}

.auth-sub {
  margin-top: 16px;
  font-size: 12.5px;
  line-height: 2;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .6);
}

.auth-route {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 34px;
}

.auth-route > div:first-child,
.auth-route-end {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-route b {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .12em;
}

.auth-route small {
  font-family: "Bahnschrift", "Segoe UI", sans-serif;
  font-size: 6.5px;
  letter-spacing: .18em;
  color: rgba(255, 255, 255, .35);
}

.auth-route-line {
  flex: 1;
  height: 1px;
  margin: 0 12px;
  background: repeating-linear-gradient(90deg, rgba(232, 150, 60, .55) 0 3px, transparent 3px 7px);
  position: relative;
}

.auth-route-line::before,
.auth-route-line::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  background: var(--amber);
  transform: rotate(45deg);
}

.auth-route-line::before {
  left: 0;
}

.auth-route-line::after {
  right: 0;
}

.auth-route-line span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid #fff;
}

.auth-stats {
  position: relative;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex;
}

.auth-stats > div {
  flex: 1;
  border-left: 1px solid rgba(255, 255, 255, .1);
  padding-left: 14px;
}

.auth-stats > div:first-child {
  border-left: 0;
  padding-left: 0;
}

.auth-stats b {
  display: block;
  font-family: "Bahnschrift", "Segoe UI", sans-serif;
  font-size: 18px;
  font-weight: 500;
}

.auth-stats span {
  display: block;
  margin-top: 4px;
  font-size: 8px;
  letter-spacing: .14em;
  color: rgba(255, 255, 255, .42);
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 34px 34px 28px;
  box-shadow: 0 34px 70px -34px rgba(6, 16, 28, .45);
}

/* ---------- card internals ---------- */

.auth-card-brand {
  display: none;
}

.auth-lang-row {
  position: absolute;
  top: 16px;
  right: 16px;
  margin: 0;
  display: flex;
  align-items: center;
}

.auth-lang-row > div {
  display: none;
}

#langToggleBtn {
  height: 28px;
  min-width: 38px;
  border: 1px solid #dbe4f0;
  background: #f6f8fc;
  color: #3e5f8a;
  border-radius: 6px;
  font-size: 9.5px;
  letter-spacing: .1em;
  cursor: pointer;
}

#formTitle {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--ink);
  text-align: left;
  margin: 0 0 18px;
  padding: 0;
}

#formTitle::before {
  content: "ACCOUNT";
  display: block;
  margin-bottom: 8px;
  font-family: "Bahnschrift", "Segoe UI", sans-serif;
  font-size: 8px;
  font-weight: 400;
  letter-spacing: .24em;
  color: var(--amber);
}

#registerTips {
  background: #f2f7ff;
  border: 1px solid #d9e6fa;
  border-left: 2px solid var(--amber);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 10.5px;
  line-height: 1.7;
  color: #3e5f8a;
}

.auth-card label {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--ink3);
  margin-bottom: 6px;
}

.auth-card input[type=text],
.auth-card input[type=password],
.auth-card input[type=email],
.auth-card input:not([type]) {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8fc;
  padding: 0 12px;
  font-size: 13.5px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}

.auth-card input[type=text]:focus,
.auth-card input[type=password]:focus,
.auth-card input[type=email]:focus,
.auth-card input:not([type]):focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(22, 104, 227, .1);
}

#submitBtn {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #2b7cf0, #1668e3 55%, #0d55c4);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .18em;
  box-shadow: 0 14px 26px -16px rgba(22, 104, 227, .9);
  cursor: pointer;
}

#regSendCodeBtn {
  height: 40px;
  padding: 0 12px;
  border: 1px solid #d5dfed;
  background: #fff;
  color: #3e5f8a;
  border-radius: 7px;
  font-size: 10.5px;
  letter-spacing: .04em;
  white-space: nowrap;
  cursor: pointer;
}

#toggleMode,
#forgotPasswordLink {
  color: var(--blue);
  font-size: 11.5px;
  letter-spacing: .04em;
  font-weight: 600;
}

#toggleMode:hover,
#forgotPasswordLink:hover {
  color: var(--blue3);
}

#message {
  margin-top: 12px;
  font-size: 11.5px;
  text-align: center;
}

#sliderTrack {
  height: 42px;
  background: #e9eff8;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
}

#sliderBg {
  background: linear-gradient(90deg, #9cc2ff, #1668e3);
}

#sliderHandle {
  width: 42px;
  height: 42px;
  border-radius: 7px;
  border: 1px solid #bcd0ee;
  background: #fff;
  box-shadow: 0 4px 10px -4px rgba(9, 22, 38, .35);
}

#sliderText {
  font-size: 10px;
  letter-spacing: .06em;
  color: #7b8fa9;
}

/* ---------- forgot password modal ---------- */

#forgotPasswordModal {
  background: rgba(6, 16, 28, .58) !important;
  backdrop-filter: blur(3px);
}

#forgotPasswordModal > div {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 70px -30px rgba(6, 16, 28, .65);
  padding: 26px;
}

#forgotPasswordModal input {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8fc;
  padding: 0 11px;
  font-size: 13px;
}

#forgotPasswordModal button {
  border-radius: 8px;
  font-size: 11.5px;
  letter-spacing: .08em;
}

#forgotSendCodeBtn,
#forgotResetBtn {
  background: linear-gradient(180deg, #2b7cf0, #1668e3);
  color: #fff;
  height: 42px;
}

#forgotBackBtn {
  background: transparent;
  color: var(--ink3);
}

#closeForgotModal {
  width: 30px;
  height: 30px;
  border: 1px solid #dbe4f0;
  background: #f6f8fc;
  color: #52616f;
  border-radius: 6px;
  font-size: 18px;
  line-height: 1;
}

#forgotMsg {
  margin-top: 10px;
  font-size: 11px;
  text-align: center;
}

/* ---------- mobile < 1024px ---------- */

@media (max-width: 1023px) {
  body.auth-page {
    display: block;
    padding: 0;
    background: var(--bg);
  }

  .auth-brand {
    position: relative;
    width: 100%;
    height: 250px;
    padding: 18px 18px 34px;
    display: flex;
    flex-direction: column;
  }

  .auth-brand-main {
    margin-top: 16px;
  }

  .auth-title {
    font-size: 26px;
    line-height: 1.35;
    margin-top: 10px;
  }

  .auth-sub {
    display: none;
  }

  .auth-route {
    margin-top: 10px;
  }

  .auth-stats {
    display: none;
  }

  .auth-logo {
    width: 36px;
    height: 36px;
  }

  .auth-card {
    width: auto;
    max-width: none;
    margin: -44px 14px 28px;
    padding: 24px 20px 22px;
    border-radius: 12px;
  }

  #formTitle {
    font-size: 18px;
    margin-bottom: 14px;
  }
}

@media (max-width: 360px) {
  .auth-brand {
    height: 236px;
  }

  .auth-title {
    font-size: 23px;
  }

  .auth-card {
    margin: -40px 10px 22px;
    padding: 22px 16px;
  }
}

/* ---------- short desktop screens ---------- */

@media (min-width: 1024px) and (max-height: 860px) {
  body.auth-page {
    align-items: flex-start;
    padding-top: 32px;
    padding-bottom: 32px;
  }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  body.auth-page * {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
