/**
 * Dynadot 风格登录/注册弹窗样式
 */
body.auth-page {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  background: var(--bg, #f4f6f8);
}

.auth-page .auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.25rem 2.5rem;
  width: 100%;
}

.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
}

.auth-modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e2e6ea;
  box-shadow: 0 8px 40px rgba(15, 23, 42, 0.1);
  padding: 28px 28px 32px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .auth-page .auth-main {
    padding: 2.5rem 1.5rem 3.5rem;
  }

  .auth-modal {
    max-width: 480px;
    padding: 32px 36px 36px;
  }

  .auth-modal .terms-gate {
    max-height: min(48vh, 400px);
  }

  .auth-modal .terms-gate__body {
    max-height: min(28vh, 260px);
  }
}

@media (min-width: 1024px) {
  .auth-page .auth-main {
    padding: 3rem 1.5rem 4rem;
  }

  .auth-modal {
    max-width: 520px;
    box-shadow: 0 12px 48px rgba(15, 23, 42, 0.12);
  }
}

@media (max-width: 480px) {
  .auth-page .auth-main {
    align-items: flex-start;
    padding: 0;
  }

  .auth-modal {
    min-height: calc(100dvh - var(--header-h, 64px) - 2rem);
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
    padding: 24px 20px 32px;
  }
}

.auth-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 6px;
}

.auth-modal__close:hover {
    background: #f3f4f6;
    color: #111827;
}

.auth-modal__toplinks {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.8125rem;
}

.auth-modal__toplinks a {
    color: #2563eb;
    text-decoration: none;
}

.auth-modal__toplinks a:hover {
    text-decoration: underline;
}

.auth-modal__title {
    font-size: 1.65rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.25;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}

.auth-modal__switch {
    font-size: 0.9375rem;
    color: #374151;
    margin: 0 0 24px;
    line-height: 1.5;
}

.auth-modal__switch a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.auth-modal__switch a:hover {
    text-decoration: underline;
}

.auth-field {
    margin-bottom: 18px;
}

.auth-field label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #111827;
    margin-bottom: 8px;
}

.auth-field__row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.auth-field__row select {
    flex: 0 0 auto;
    max-width: 42%;
    min-width: 7.5rem;
    height: 48px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0 10px;
    font-size: 0.875rem;
    background: #fff;
    color: #111827;
}

.auth-field input[type="tel"],
.auth-field input[type="password"],
.auth-field input[type="email"],
.auth-field input[type="text"] {
    width: 100%;
    height: 48px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0 14px;
    font-size: 1rem;
    color: #111827;
    background: #fff;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-field input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.auth-field__pw-wrap {
    position: relative;
}

.auth-field__pw-wrap input {
    padding-right: 44px;
}

.auth-field__pw-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    font-size: 1rem;
    line-height: 1;
}

.auth-label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.auth-label-row label {
    margin-bottom: 0;
}

.auth-link {
    font-size: 0.875rem;
    color: #2563eb;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-login-extra {
    text-align: center;
    margin: 0.75rem 0 0;
}

.auth-modal__switch--forgot {
    margin-top: -0.35rem;
}

.auth-step-hint--muted {
    color: #6b7280;
    font-size: 0.8125rem;
}

.auth-btn-primary {
    display: block;
    width: 100%;
    height: 48px;
    margin-top: 8px;
    border: none;
    border-radius: 999px;
    background: #031835;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.auth-btn-primary:hover:not(:disabled) {
    background: #0a2540;
}

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

.auth-btn-secondary {
    display: block;
    width: 100%;
    height: 44px;
    margin-top: 10px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #fff;
    color: #374151;
    font-size: 0.9375rem;
    cursor: pointer;
}

.auth-msg {
    font-size: 0.875rem;
    margin: 8px 0 0;
    min-height: 1.25em;
}

.auth-msg--error {
    color: #b91c1c;
}

.auth-msg--ok {
    color: #059669;
}

.auth-step-hint {
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 0 0 14px;
    line-height: 1.45;
}

.auth-modal .slider {
    border-radius: 6px;
    margin-bottom: 16px;
}

@media (min-width: 769px) {
    .auth-modal .slider {
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
    }
}

.auth-modal .slider-block {
    border-radius: 6px;
}

.auth-view {
    display: none;
}

.auth-view.is-active {
    display: block;
}

.auth-login-step {
    display: none;
}

.auth-login-step.is-active {
    display: block;
}

.auth-modal .terms-gate {
    max-height: min(52vh, 360px);
    overflow-y: auto;
    margin-bottom: 12px;
}

.auth-modal .terms-gate__body {
    max-height: min(32vh, 220px);
}

.auth-modal .domain-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.auth-modal .domain-row input,
.auth-modal .domain-row select {
    height: 44px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

.auth-modal .error {
    color: #b91c1c;
    font-size: 0.8125rem;
    margin-top: 4px;
    min-height: 1em;
}
