/* ============================================================
   login.css - Talk2All 登录页样式（PC + 手机端适配）
   ============================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  font-family:
    -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ===== 页面背景：模糊自然风景 ===== */
.login-page {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: url("../assets/images/bg_pc.png") no-repeat center center / cover;
  overflow: hidden;
}

/* ===== 左上角 Logo ===== */
.login-logo {
  position: absolute;
  top: 2vh;
  left: 2.5vw;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 3;
}
.login-logo svg {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.18));
}
.login-logo .logo-name {
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
}

/* ===== 右侧登录卡片（毛玻璃） ===== */
.login-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8vw;
  z-index: 2;
}
.login-card {
  width: 400px;
  padding: 40px 36px 32px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 18px 48px rgba(30, 90, 160, 0.18);
}

/* 标题 + 注册引导 */
.login-card h1 {
  font-size: 30px;
  font-weight: 700;
  color: #333;
  text-align: left;
}
.login-reg {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 10px 0 22px;
  font-size: 14px;
  color: #666;
}
.login-reg .link {
  color: #4080ff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.login-reg .link:hover {
  text-decoration: underline;
}
.login-reg .link .arrow {
  font-size: 13px;
  line-height: 1;
}

/* ===== 登录方式标签栏 ===== */
.login-tabs {
  display: flex;
  height: 36px;
  padding: 3px;
  margin-bottom: 20px;
  border-radius: 8px;
  background: #f5f7fa;
}
.login-tabs .tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #666;
  border-radius: 6px;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s,
    box-shadow 0.2s;
  user-select: none;
}
.login-tabs .tab.active {
  background: #fff;
  color: #333;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* ===== 登录表单（form 仅作配对语义，不改变布局） ===== */
.login-form {
  display: block;
}

/* 视觉隐藏但可被屏幕阅读器识别的 label */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== 输入框 ===== */
.field {
  margin-bottom: 16px;
}
.field-input {
  position: relative;
  display: flex;
  align-items: center;
}
.field-input input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  padding-right: 40px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  color: #333;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.field-input input::placeholder {
  color: #999;
}
.field-input input:focus {
  border-color: #4080ff;
  box-shadow: 0 0 0 3px rgba(64, 128, 255, 0.12);
}
/* 密码可见切换图标 */
.field-input .eye-btn {
  position: absolute;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #999;
}
.field-input .eye-btn:hover {
  color: #666;
}
.field-input .eye-btn svg {
  width: 20px;
  height: 20px;
  pointer-events: none;
}

/* ===== 辅助选项行：记住账号 / 忘记密码 ===== */
.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0 20px;
  font-size: 14px;
}
.remember-me {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #666;
  cursor: pointer;
  user-select: none;
}
.remember-me input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #4080ff;
  cursor: pointer;
}
.forget-link {
  color: #4080ff;
  cursor: pointer;
}
.forget-link:hover {
  text-decoration: underline;
}

/* ===== 登录按钮 ===== */
.login-btn {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 8px;
  background: #4080ff;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 6px;
  text-indent: 6px; /* 抵消字距，保证视觉居中 */
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.15s,
    box-shadow 0.2s,
    opacity 0.2s;
  box-shadow: 0 6px 16px rgba(64, 128, 255, 0.3);
}
.login-btn:hover {
  background: #3573f0;
}
.login-btn:active {
  transform: scale(0.985);
}
.login-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.login-btn.loading {
  opacity: 0.75;
  cursor: wait;
}

/* ===== 第三方登录 ===== */
.third-login {
  margin-top: 26px;
}
.third-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #999;
  font-size: 12px;
}
.third-divider::before,
.third-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}
.third-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
}
.third-icons .icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.15s;
}
.third-icons .icon-btn:hover {
  background: rgba(64, 128, 255, 0.08);
  transform: translateY(-2px);
}
.third-icons .icon-btn svg {
  width: 26px;
  height: 26px;
  pointer-events: none;
}

/* ===== Toast 轻提示 ===== */
.toast {
  position: fixed;
  left: 50%;
  top: 18%;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  max-width: 80vw;
  z-index: 9999;
  opacity: 0;
  transition:
    opacity 0.25s,
    top 0.25s;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  top: 20%;
}
.toast.error {
  background: rgba(220, 60, 60, 0.88);
}
.toast.success {
  background: rgba(56, 168, 96, 0.9);
}

/* ============================================================
   手机端适配（≤768px）
   ============================================================ */
@media (max-width: 768px) {
  .login-slogan {
    display: none;
  } /* 手机端隐藏左侧 Slogan */
  .login-logo {
    top: 16px;
    left: 16px;
  }
  .login-logo svg {
    width: 24px;
    height: 24px;
  }
  .login-logo .logo-name {
    font-size: 20px;
  }
  .login-wrap {
    justify-content: center;
    padding-right: 0;
    padding: 0 16px;
  }
  .login-card {
    width: 100%;
    max-width: 400px;
    padding: 32px 24px 26px;
  }
  .login-card h1 {
    font-size: 26px;
  }
  .login-slogan .slogan-line1 {
    font-size: 34px;
  }
  .login-slogan .slogan-line2 {
    font-size: 24px;
  }
}
