/* ============================================================
   账号：登录 / 注册
   与开场页同一套墨色，不做"网页表单"的样子
   ============================================================ */

.auth {
  width: min(360px, 100%);
  padding: 26px 26px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--ink-2), var(--ink-1));
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  animation: auth-in 0.24s var(--ease-out) both;
}

@keyframes auth-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
}

.auth__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.auth__title {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.34em;
  color: var(--t-0);
  text-indent: 0.34em;
}

.auth__x {
  width: 24px;
  height: 24px;
  line-height: 1;
  font-size: 17px;
  color: var(--t-3);
  border-radius: var(--r-sm);
  transition: all 0.16s var(--ease);
}

.auth__x:hover {
  color: var(--t-0);
  background: var(--ink-4);
}

/* ---------- 切换 ---------- */

.auth__tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 20px;
}

.auth__tab {
  position: relative;
  padding: 0 2px 9px;
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--t-3);
  transition: color 0.18s var(--ease);
}

.auth__tab:hover {
  color: var(--t-1);
}

.auth__tab.is-on {
  color: var(--qing);
}

.auth__tab.is-on::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--qing);
  box-shadow: 0 0 8px rgba(93, 202, 165, 0.5);
}

/* ---------- 字段 ---------- */

.auth__field {
  display: block;
  margin-bottom: 15px;
}

.auth__field > span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  /* 用 t-2 而不是 t-3：t-3 在 --ink-2 上对比度太低，字几乎看不见 */
  color: var(--t-2);
  margin-bottom: 6px;
}

.auth__field input,
.auth__field select {
  width: 100%;
  padding: 9px 10px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--t-0);
  background: var(--ink-0);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  outline: none;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.auth__field input::placeholder {
  color: var(--t-3);
}

.auth__field input:focus,
.auth__field select:focus {
  border-color: var(--qing-dim);
  box-shadow: inset 0 0 0 1px rgba(93, 202, 165, 0.14);
}

.auth__field select {
  appearance: none;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--t-2) 50%),
    linear-gradient(135deg, var(--t-2) 50%, transparent 50%);
  background-position: calc(100% - 14px) 15px, calc(100% - 9px) 15px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.auth__field select option {
  background: var(--ink-2);
  color: var(--t-0);
}

/* ---------- 错误 ---------- */

.auth__err {
  min-height: 18px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--zhu);
  opacity: 0;
  transition: opacity 0.16s var(--ease);
  margin-bottom: 8px;
}

.auth__err.is-on {
  opacity: 1;
}

/* ---------- 提交 ---------- */

.auth__go {
  width: 100%;
  padding: 10px;
  font-family: var(--serif);
  font-size: 13.5px;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  color: var(--t-0);
  border: 1px solid var(--line-bright);
  border-radius: var(--r-sm);
  transition: all 0.2s var(--ease);
}

.auth__go:hover:not(:disabled) {
  border-color: var(--qing);
  color: var(--qing);
  box-shadow: 0 0 22px rgba(93, 202, 165, 0.12);
}

.auth__go:disabled {
  opacity: 0.45;
  cursor: wait;
}

.auth__note {
  margin-top: 14px;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--t-3);
  text-align: center;
}

/* ---------- 开场页那一行入口 ---------- */

.intro__auth {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: var(--t-3);
}

.intro__auth button {
  color: var(--t-1);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  transition: all 0.18s var(--ease);
}

.intro__auth button:hover {
  color: var(--qing);
  border-bottom-color: var(--qing-dim);
}

/* ---------- 顶栏账号 ---------- */

.head__who {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 11.5px;
  color: var(--t-2);
  max-width: 190px;
  transition: all 0.18s var(--ease);
}

.head__who:hover {
  border-color: var(--line-bright);
  color: var(--t-1);
}

.head__who i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--t-3);
  flex: none;
}

.head__who.is-account {
  color: var(--qing);
  border-color: var(--qing-dim);
}

.head__who.is-account i {
  background: var(--qing);
  box-shadow: 0 0 6px var(--qing);
}

.head__who b {
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .auth {
    padding: 22px 20px 16px;
  }

  .head__who b {
    max-width: 74px;
  }
}
