#sct-home-login-layer {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(18,18,18, 0.42);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

#sct-home-login-layer.sct-is-open {
  display: flex;
}

#sct-home-login-layer * {
  box-sizing: border-box;
}

.sct-home-login-dialog {
  position: relative;
  width: min(420px, 100%);
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 16px;
  background: #fff;
  color: #171717;
  box-shadow: 0 28px 90px rgba(18,18,18, 0.25);
  animation: sct-login-enter 0.18s ease-out;
}

@keyframes sct-login-enter {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.sct-home-login-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #868686;
  font-size: 22px;
  line-height: 30px;
  cursor: pointer;
}

.sct-home-login-close:hover {
  color: #171717;
  background: #f2f2f2;
}

.sct-home-login-eyebrow {
  color: #959595;
  font-size: 11px;
  letter-spacing: 0.1em;
}

.sct-home-login-dialog h2 {
  margin: 8px 0 7px;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.04em;
}

.sct-home-login-subtitle {
  margin: 0 0 23px;
  color: #737373;
  font-size: 13px;
  line-height: 1.55;
}

.sct-home-login-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin: 0 0 18px;
  padding: 4px;
  border-radius: 9px;
  background: #f1f1f1;
}

.sct-home-login-switch-button {
  min-width: 0;
  height: 32px;
  padding: 0 5px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #7c7c7c;
  font-size: 12px;
  cursor: pointer;
}

.sct-home-login-switch-button.sct-active {
  background: #fff;
  color: #1b1b1b;
  box-shadow: 0 1px 4px rgba(18,18,18, 0.08);
}

.sct-home-login-panel {
  display: none;
}

.sct-home-login-panel.sct-active {
  display: block;
}

.sct-home-login-field {
  margin-top: 14px;
}

.sct-home-login-field label {
  display: block;
  margin-bottom: 7px;
  color: #535353;
  font-size: 12px;
}

.sct-home-login-field input {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid #d9d9d9;
  border-radius: 9px;
  outline: 0;
  background: #fff;
  color: #171717;
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.sct-home-login-field input:focus {
  border-color: #252525;
  box-shadow: 0 0 0 3px rgba(25, 25, 25, 0.08);
}

.sct-home-login-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 8px;
}

.sct-home-login-send-code {
  height: 44px;
  padding: 0 8px;
  border: 1px solid #d9d9d9;
  border-radius: 9px;
  background: #f5f5f5;
  color: #494949;
  font-size: 12px;
  cursor: pointer;
}

.sct-home-login-send-code:hover {
  border-color: #b6b6b6;
  background: #ededed;
}

.sct-home-login-send-code:disabled {
  color: #979797;
  cursor: wait;
}

.sct-home-login-message {
  min-height: 18px;
  margin-top: 11px;
  color: #656565;
  font-size: 12px;
  line-height: 18px;
}

.sct-home-login-message.sct-success {
  color: #707070;
}

.sct-home-login-submit {
  width: 100%;
  height: 44px;
  margin-top: 4px;
  border: 0;
  border-radius: 9px;
  background: #191919;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.sct-home-login-submit:hover {
  background: #000;
}

.sct-home-login-submit:disabled {
  opacity: 0.58;
  cursor: wait;
}

.sct-home-login-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  color: #868686;
  font-size: 12px;
}

.sct-home-login-register {
  padding: 0;
  border: 0;
  background: transparent;
  color: #3a3a3a;
  font-size: 12px;
  cursor: pointer;
}

.sct-home-login-footer-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: #3a3a3a;
  font-size: 12px;
  cursor: pointer;
}

/* 未登录时，把原“我的”入口直接变为唯一登录按钮。 */
.pc-nav-trigger--account.sct-login-account-trigger {
  min-width: 72px;
  height: 36px;
  justify-content: center;
  padding: 0 17px !important;
  border-radius: 9px !important;
  background: #191919 !important;
  color: #fff !important;
}

.pc-nav-trigger--account.sct-login-account-trigger .pc-nav-chev {
  display: none !important;
}

.pc-top-btn.sct-hide-original-login {
  display: none !important;
}

body.sct-login-modal-open {
  overflow: hidden !important;
}

@media (max-width: 640px) {
  #sct-home-login-layer { padding: 17px; }
  .sct-home-login-dialog { padding: 25px 21px; border-radius: 14px; }
  .sct-home-login-code-row { grid-template-columns: minmax(0, 1fr) 104px; }
  .pc-nav-trigger--account.sct-login-account-trigger { min-width: 62px; padding: 0 13px !important; }
}

/* The redesigned public homepage uses the same auth flow in its dark palette. */
html:has([data-sct-login-trigger]) #sct-home-login-layer { background:rgba(0,0,0,.7); }
html:has([data-sct-login-trigger]) .sct-home-login-dialog {
  border-color:rgba(236,236,236,.16);
  background:#161616;
  color:#f0f0f0;
  box-shadow:0 28px 90px rgba(0,0,0,.55);
}
html:has([data-sct-login-trigger]) .sct-home-login-close,
html:has([data-sct-login-trigger]) .sct-home-login-eyebrow,
html:has([data-sct-login-trigger]) .sct-home-login-subtitle,
html:has([data-sct-login-trigger]) .sct-home-login-footer { color:#a9a9a9; }
html:has([data-sct-login-trigger]) .sct-home-login-close:hover { color:#f0f0f0; background:#292929; }
html:has([data-sct-login-trigger]) .sct-home-login-switch { background:#232323; }
html:has([data-sct-login-trigger]) .sct-home-login-switch-button { color:#a9a9a9; }
html:has([data-sct-login-trigger]) .sct-home-login-switch-button.sct-active {
  background:#393939;
  color:#f2f2f2;
  box-shadow:none;
}
html:has([data-sct-login-trigger]) .sct-home-login-field label { color:#cfcfcf; }
html:has([data-sct-login-trigger]) .sct-home-login-field input {
  border-color:rgba(236,236,236,.18);
  background:#1d1d1d;
  color:#f0f0f0;
}
html:has([data-sct-login-trigger]) .sct-home-login-field input::placeholder { color:#8d8d8d; }
html:has([data-sct-login-trigger]) .sct-home-login-field input:focus {
  border-color:#f2f2f2;
  box-shadow:0 0 0 3px rgba(225,225,225,.12);
}
html:has([data-sct-login-trigger]) .sct-home-login-send-code {
  border-color:rgba(236,236,236,.18);
  background:#292929;
  color:#f0f0f0;
}
html:has([data-sct-login-trigger]) .sct-home-login-send-code:hover { border-color:#f2f2f2; background:#353535; }
html:has([data-sct-login-trigger]) .sct-home-login-submit { background:#f2f2f2; color:#111111; }
html:has([data-sct-login-trigger]) .sct-home-login-submit:hover { background:#ffffff; }
html:has([data-sct-login-trigger]) .sct-home-login-footer-action { color:#f2f2f2; }
