/* ========== auth.css ==========
   Mizu Phone — Authentication Screen
   灰白简约风格，与主应用一致
   ================================ */

/* ═══════ 全屏容器 ═══════ */
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;                      /* 默认隐藏，由 auth.js 控制 */
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    ellipse at 50% 40%,
    #fcfcfc 0%, #f5f5f5 50%, #ebebeb 100%
  );
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter',
               'Helvetica Neue', system-ui, sans-serif;
  animation: authFadeIn .6s ease forwards;
}

@keyframes authFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ═══════ 内容容器 ═══════ */
.auth-container {
  width: 100%;
  max-width: 340px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ═══════ Logo ═══════ */
.auth-logo {
  width: 48px;
  height: 68px;
  margin-bottom: 12px;
  opacity: .35;
}
.auth-logo svg {
  width: 100%;
  height: 100%;
}

/* ═══════ 品牌名 ═══════ */
.auth-brand {
  font-size: 13px;
  font-weight: 200;
  color: #a0a0a0;
  letter-spacing: 4px;
  text-indent: 4px;
  text-transform: uppercase;
  margin-bottom: 36px;
}

/* ═══════ 标题（登录 / 注册） ═══════ */
.auth-title {
  font-size: 22px;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 28px;
  letter-spacing: .5px;
}

/* ═══════ 错误信息 ═══════ */
.auth-error {
  display: none;
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #c0392b;
  background: rgba(192, 57, 43, .06);
  border: 1px solid rgba(192, 57, 43, .12);
  border-radius: 8px;
  text-align: center;
  line-height: 1.4;
}

/* ═══════ 表单容器 ═══════ */
.auth-form {
  width: 100%;
}

/* ═══════ 字段组 ═══════ */
.auth-field {
  margin-bottom: 22px;
}
.auth-field label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #8e8e93;
  letter-spacing: .4px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* ── 输入框（底部边框线，无盒子边框）── */
.auth-field input {
  width: 100%;
  padding: 10px 0;
  font-size: 15px;
  color: #333;
  background: none;
  border: none;
  border-bottom: 1px solid #d8d8d8;
  outline: none;
  transition: border-color .25s;
  font-family: inherit;
}
.auth-field input::placeholder {
  color: #c0c0c0;
  font-weight: 300;
}
.auth-field input:focus {
  border-bottom-color: #1d1d1f;
}

/* ── 密码字段包裹层 ── */
.auth-pwd-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-pwd-wrap input {
  padding-right: 36px;
}

/* ── 密码可见性切换 ── */
.auth-pwd-toggle {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: #b0b0b0;
  transition: color .2s;
}
.auth-pwd-toggle:hover { color: #666; }
.auth-pwd-toggle svg { width: 18px; height: 18px; }
.auth-pwd-toggle .pwd-icon-hide { display: none; }

/* ═══════ 提交按钮 ═══════ */
.auth-submit-btn {
  width: 100%;
  height: 46px;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 500;
  color: #1d1d1f;
  background: none;
  border: 1px solid #ccc;
  border-radius: 23px;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  letter-spacing: .3px;
}
.auth-submit-btn:hover {
  background: rgba(0,0,0,.03);
  border-color: #999;
}
.auth-submit-btn:active {
  transform: scale(.97);
}
.auth-submit-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* ═══════ 加载动画 ═══════ */
.auth-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid #e5e5ea;
  border-top-color: #1d1d1f;
  border-radius: 50%;
  animation: authSpin .7s linear infinite;
}
@keyframes authSpin {
  to { transform: rotate(360deg); }
}

/* ═══════ 模式切换链接 ═══════ */
.auth-switch {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: #8e8e93;
}
.auth-switch a {
  color: #1d1d1f;
  text-decoration: none;
  font-weight: 500;
  margin-left: 4px;
  transition: opacity .2s;
}
.auth-switch a:hover {
  opacity: .6;
}

/* ═══════════════════════════════════════════
   设置页 — 退出登录区块
   ═══════════════════════════════════════════ */
.auth-settings-card {
  margin: 16px;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
}
.auth-settings-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.auth-settings-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.auth-settings-avatar svg { width: 20px; height: 20px; }
.auth-settings-info { min-width: 0; }
.auth-settings-name {
  font-size: 15px;
  font-weight: 600;
  color: #1d1d1f;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auth-settings-qq {
  font-size: 12px;
  color: #8e8e93;
  margin-top: 2px;
}
.auth-logout-btn {
  width: 100%;
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: none;
  color: #ff3b30;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background .2s;
}
.auth-logout-btn:hover { background: rgba(255,59,48,.04); }
.auth-logout-btn:active { background: rgba(255,59,48,.08); }
.auth-logout-btn svg { width: 16px; height: 16px; }
