/* 提取自 AuthModal.vue */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 4500;
  background: rgba(6, 20, 27, 0.55);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  position: relative;
  width: min(460px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 40px 36px 34px;
  box-shadow: 0 40px 90px rgba(6, 20, 27, 0.4);
}

.auth-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.25s;
}

.auth-close:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(90deg);
}

.auth-eyebrow {
  margin-bottom: 10px;
}

.auth-title {
  font-size: 30px;
  margin-bottom: 26px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 26px;
}

.auth-tab {
  padding: 12px;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-size: 14px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.3s;
}

.auth-tab.active {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.auth-label {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  font-weight: 600;
}

.auth-optional {
  color: var(--ink-faint);
  font-style: normal;
  font-weight: 400;
}

.auth-field input {
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.auth-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.auth-row-code .auth-field {
  flex: 1;
}

.auth-send-code {
  align-self: flex-end;
  margin-bottom: 1px;
  padding: 12px 16px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.25s;
}

.auth-send-code:hover:not(:disabled) {
  background: var(--accent);
  color: var(--accent-ink);
}

.auth-send-code:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.auth-error {
  padding: 11px 14px;
  border: 1px solid var(--accent2);
  border-radius: 10px;
  background: var(--accent2-soft);
  color: var(--accent2);
  font-size: 13px;
  line-height: 1.6;
}

/* 法律条款同意勾选 */
.auth-agree {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.auth-agree input[type='checkbox'] {
  margin-top: 3px;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.auth-agree-text {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.auth-law-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.auth-law-link:hover {
  border-bottom-color: var(--accent);
}

.auth-submit {
  margin-top: 4px;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.3s;
}

.auth-submit:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-2px);
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.auth-hint {
  text-align: center;
  font-size: 13px;
  color: var(--ink-faint);
  line-height: 1.7;
}

.auth-hint a {
  color: var(--accent);
}

/* 过渡 */
.modal-enter-active,
.modal-leave-active {
  transition: opacity 0.35s ease;
}

.modal-enter-active .auth-card,
.modal-leave-active .auth-card {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s;
}

.modal-enter-from,
.modal-leave-to {
  opacity: 0;
}

.modal-enter-from .auth-card {
  transform: translateY(40px) scale(0.96);
}

.modal-leave-to .auth-card {
  transform: translateY(20px) scale(0.97);
}

@media (max-width: 520px) {
  .auth-row {
    grid-template-columns: 1fr;
  }

  .auth-row-code {
    grid-template-columns: 1fr auto;
  }

  .auth-card {
    padding: 32px 22px 28px;
  }
}