/* 登录弹窗 — 账号密码 / 注册 / 微信绑定 */
.login-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s;
}
.login-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.login-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.login-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 32px 80px rgba(0, 0, 0, 0.65);
  padding: 28px 28px 24px;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.22s ease;
}
.login-modal.is-open .login-modal__dialog {
  transform: translateY(0) scale(1);
}
.login-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.55);
  transition: background 0.15s, color 0.15s;
}
.login-modal__close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.login-modal__head {
  margin-bottom: 22px;
  padding-right: 32px;
}
.login-modal__title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.login-modal__sub {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.5;
}
.login-modal__tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 22px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.login-modal__tabs[hidden] {
  display: none;
}
.login-modal__tab {
  flex: 1;
  padding: 9px 10px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.55);
  transition: background 0.15s, color 0.15s;
}
.login-modal__tab.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.login-modal__panel {
  display: none;
}
.login-modal__panel.is-active {
  display: block;
}
.login-field {
  margin-bottom: 14px;
}
.login-field__label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
}
.login-field__row {
  display: flex;
  gap: 10px;
}
.login-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.login-input::placeholder {
  color: rgba(255, 255, 255, 0.32);
}
.login-input:focus {
  border-color: rgba(255, 107, 53, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}
.login-input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
/* 浏览器「自动填充」时 Chrome 会强制白底黑字，这里盖回深色，保持暗色风格 */
.login-input:-webkit-autofill,
.login-input:-webkit-autofill:hover,
.login-input:-webkit-autofill:focus,
.login-input:-webkit-autofill:active {
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px #1c1c1c inset;
  box-shadow: 0 0 0 1000px #1c1c1c inset;
  transition: background-color 9999s ease-in-out 0s;
}
.login-field__row .login-input {
  flex: 1;
  min-width: 0;
}
.login-btn-code {
  flex-shrink: 0;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  transition: background 0.15s, opacity 0.15s;
}
.login-btn-code:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
}
.login-btn-code:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.login-submit {
  width: 100%;
  margin-top: 6px;
  padding: 13px 18px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 999px;
  background: #fff;
  color: #0a0a0a;
  border: none;
  transition: background 0.15s, opacity 0.15s;
}
.login-submit:hover:not(:disabled) {
  background: #f0f0f0;
}
.login-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.login-hint {
  margin: 20px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.42);
  text-align: center;
}
.login-hint a {
  color: rgba(255, 107, 53, 0.9);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.login-switch {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  text-align: center;
}
.login-switch button {
  color: rgba(255, 107, 53, 0.95);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.login-switch__sep {
  display: inline-block;
  margin: 0 8px;
  color: rgba(255, 255, 255, 0.28);
}
.login-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 0 0 18px;
}
.login-step {
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
  text-align: center;
}
.login-step.is-active {
  border-color: rgba(255, 107, 53, 0.34);
  background: rgba(255, 107, 53, 0.1);
  color: rgba(255, 194, 164, 0.95);
}
.login-forgot-step {
  display: none;
}
.login-forgot-step.is-active {
  display: block;
}
.login-msg {
  min-height: 20px;
  margin-top: 12px;
  font-size: 13px;
  text-align: center;
  color: #ff8a65;
}
.login-msg.is-ok {
  color: #7dcea0;
}
/* 微信扫码 */
.login-wechat {
  text-align: center;
}
.login-wechat__qr {
  width: 200px;
  height: 200px;
  margin: 0 auto 16px;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}
.login-wechat__qr img,
.login-wechat__qr canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.login-wechat__qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  background: #f5f5f5;
  border-radius: 6px;
  color: #666;
  font-size: 12px;
}
.login-wechat__qr-placeholder svg {
  width: 48px;
  height: 48px;
  color: #07c160;
}
.login-wechat__status {
  margin: 0 0 14px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
}
.login-wechat__status:empty {
  display: none;
}
.login-btn-wechat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 999px;
  background: #07c160;
  color: #fff;
  border: none;
  cursor: default;
  pointer-events: none;
  transition: background 0.15s, opacity 0.15s;
}
.login-btn-wechat svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.login-wechat__refresh {
  margin-top: 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.login-wechat__refresh:hover {
  color: rgba(255, 255, 255, 0.8);
}
.wechat-bind {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
}
.wechat-bind-actions {
  display: grid;
  gap: 10px;
}
.wechat-bind-option {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 14px;
  font-weight: 650;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.wechat-bind-option:hover {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}
.wechat-bind-option--primary {
  border-color: rgba(7, 193, 96, 0.55);
  background: rgba(7, 193, 96, 0.16);
  color: #30e284;
}
.wechat-bind-pane {
  margin-top: 12px;
}
.login-bind-title {
  margin-bottom: 6px;
  color: #fff;
  font-size: 15px;
  font-weight: 650;
}
.login-bind-desc {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 12px;
  line-height: 1.55;
}
.wechat-bind .login-field {
  margin-bottom: 10px;
}

body.login-modal-open {
  overflow: hidden;
}

@media (max-width: 480px) {
  .login-modal__dialog {
    padding: 24px 20px 20px;
  }
  .login-modal__tab {
    font-size: 13px;
    padding-inline: 8px;
  }
  .login-wechat__qr {
    width: 180px;
    height: 180px;
  }
}
