/* 设计参考: Figma MultiSpace 注销页 node 8775:106616 */

:root {
  --text-1: #292c31;
  --text-2: #4e5765;
  --text-3: #929dac;
  --bg-white-100: #ffffff;
  --btn-blue: #5b8cff;
  --btn-blue-disabled: #96b7ff;
  --btn-main: #296cff;
  --text1-google: #262628;
  --font: "PingFang SC", "PingFang TC", -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100vh;
}

body {
  font-family: var(--font);
  color: var(--text-1);
  -webkit-font-smoothing: antialiased;
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-transition-delay: 111111s;
  -webkit-transition:
    color 11111s ease-out,
    background-color 111111s ease-out;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lang-switch {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 200;
  display: flex;
  align-items: center;
}

.lang-switch__shell {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  cursor: pointer;
}

.lang-switch__icon-globe,
.lang-switch__icon-down {
  flex-shrink: 0;
  display: block;
}

.lang-switch__select {
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  appearance: none;
}

.lang-switch__select:focus {
  outline: none;
}

.page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow: hidden;
}

.page__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("image/bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.card {
  position: relative;
  width: min(444px, 100%);
  padding: 32px;
  border-radius: 28.458px;
  border: 1px solid var(--bg-white-100);
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  box-shadow: 0 24px 80px rgba(80, 120, 200, 0.12);
}

/* 保证与 .card 的 display 不冲突，只展示登录或注销其一 */
.card[hidden] {
  display: none !important;
}

.card__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.brand {
  position: relative;
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand__logo {
  display: block;
  width: 68px;
  height: 68px;
}

.card__title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-1);
  text-align: center;
}

.form {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.form__fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.field__label {
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  color: var(--text-2);
}

.input {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 11px 13px;
  border-radius: 6px;
  border: 1px solid var(--bg-white-100);
  background: rgba(255, 255, 255, 0.3);
}

.input__icon {
  flex-shrink: 0;
  display: block;
}

.input__control {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  color: var(--text-1);
}

.input__control::placeholder {
  color: var(--text-3);
}

.input__toggle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: -4px -6px -4px 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 4px;
}

.input__toggle:hover {
  background: rgba(255, 255, 255, 0.35);
}

.input__toggle:focus-visible {
  outline: 2px solid var(--btn-blue);
  outline-offset: 2px;
}

.input__toggle-img {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* Toast — Figma Message 5193:29499 + check / warning 图标 */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  z-index: var(--toast-z, 320);
  max-width: min(420px, calc(100vw - 32px));
  padding: 8px 16px;
  border-radius: 6px;
  background: var(--bg-white-100);
  color: var(--text-1);
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
}

.toast__icon {
  flex-shrink: 0;
  display: block;
  width: 16px;
  height: 16px;
  object-fit: contain;
  margin-top: 3px;
}

.toast__text {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.toast.toast--in {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.toast--out {
  opacity: 0;
  transform: translate(-50%, -8px);
}

/* 登录后账户卡片 — Figma 8782:106441 */
.card--account {
  gap: 32px;
}

.account-card__profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.account-card__avatar-wrap {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  overflow: hidden;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.account-card__avatar {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-card__meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.account-card__name {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-1);
  text-align: center;
}

.account-card__id {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  color: var(--text-2);
}

.account-card__actions {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.btn--deactivate {
  background: var(--btn-main);
  color: var(--bg-white-100);
}

.btn--deactivate:not(:disabled):hover {
  filter: brightness(1.06);
}

.btn--deactivate:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  filter: none;
}

.account-card__signout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 20px;
  padding: 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  color: var(--text-2);
  cursor: pointer;
}

.account-card__signout:hover {
  color: var(--text-1);
}

.account-card__signout:focus-visible {
  outline: 2px solid var(--btn-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.account-card__signout-icon {
  display: block;
  flex-shrink: 0;
}

.form__actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 40px;
  padding: 16px 24px;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.btn--primary {
  background: var(--btn-blue-disabled);
  color: var(--bg-white-100);
}

.btn--primary:not(:disabled) {
  background: var(--btn-blue);
}

.btn--primary:not(:disabled):hover {
  filter: brightness(1.05);
}

.btn--primary:disabled {
  cursor: not-allowed;
  opacity: 0.95;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 40px;
  padding: 16px 24px;
  border: none;
  border-radius: 6px;
  background: transparent;
  font-family: inherit;
  text-decoration: none;
  color: var(--text1-google);
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.btn-google:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.btn-google:hover {
  background: rgba(255, 255, 255, 0.35);
}

.btn-google:focus-visible {
  outline: 2px solid var(--btn-blue);
  outline-offset: 2px;
}

.btn-google__icon {
  display: block;
  flex-shrink: 0;
}

.btn-google__arrow {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(6.667px);
  -webkit-backdrop-filter: blur(6.667px);
  line-height: 0;
}

.btn-google__arrow-img {
  display: block;
  width: 16px;
  height: 16px;
}

/* 确认弹窗 — Figma Container 6878:50807 + 遮罩 6878:50806 */
.modal-root {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.modal-root__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(400px, 100%);
  padding: 32px 32px 12px;
  border-radius: 18px;
  border: 1px solid var(--bg-white-100);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 0 30px rgba(91, 91, 91, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: var(--text1-google);
}

.modal-dialog__close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}

.modal-dialog__close:not(:disabled):hover {
  color: var(--text-1);
  background: rgba(0, 0, 0, 0.04);
}

.modal-dialog__close:disabled {
  cursor: not-allowed;
  opacity: 0.35;
  color: var(--text-3);
}

.modal-dialog__close:focus-visible {
  outline: 2px solid var(--btn-blue);
  outline-offset: 2px;
}

.modal-dialog__close-icon {
  display: block;
}

.modal-dialog__title {
  margin: 0;
  padding: 0 28px 0 12px;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  text-align: center;
  color: var(--text-1);
}

.modal-dialog__body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  text-align: center;
  color: var(--text-2);
}

/* 与「注销账号」共用 .btn .btn--deactivate */
.modal-dialog__primary {
  width: 100%;
  margin-top: 4px;
}

.modal-dialog__cancel {
  margin: 0;
  padding: 6px 12px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  color: var(--text-2);
  cursor: pointer;
  text-decoration: none;
}

.modal-dialog__cancel:not(:disabled):hover {
  color: var(--text-1);
}

.modal-dialog__cancel:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  color: var(--text-2);
}

.modal-dialog__cancel:focus-visible {
  outline: 2px solid var(--btn-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (max-width: 400px) {
  .card {
    padding: 24px 20px;
    border-radius: 22px;
  }

  .modal-dialog {
    width: min(400px, 100%);
    padding: 20px 16px 16px;
    border-radius: 10px;
  }

  .modal-dialog__title {
    font-size: 16px;
    line-height: 22px;
    padding: 0 24px 0 8px;
  }

  .modal-dialog__body {
    font-size: 12px;
    line-height: 18px;
  }
}
