/* ============================================================
   即梦 AI · 登录页专属样式
   依赖：global.css（设计令牌变量）
   ============================================================ */

/* 重置：登录页不需要全局最小宽度约束 */
body {
  min-width: 0;
  overflow: hidden;
}

/* ---------- 全屏背景视频 ---------- */
.login-bg-video {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.login-bg-video video {
  width: 100%;
  height: calc(100% + 80px);
  object-fit: cover;
  transform: translateY(-80px);
}

/* 视频上方半透明遮罩 */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    135deg,
    rgba(10, 10, 11, 0.72) 0%,
    rgba(20, 20, 24, 0.55) 40%,
    rgba(10, 10, 11, 0.78) 100%
  );
}

/* 品牌渐变光晕（左上 & 右下各一个，增加氛围） */
.login-glow-top {
  position: fixed;
  top: -120px;
  left: -80px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.18) 0%, transparent 70%);
  z-index: 2;
  pointer-events: none;
}

.login-glow-bottom {
  position: fixed;
  bottom: -140px;
  right: -60px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.14) 0%, transparent 70%);
  z-index: 2;
  pointer-events: none;
}

/* ---------- 登录卡片整体容器 ---------- */
.login-wrapper {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

/* 登录卡片（毛玻璃效果） */
.login-card {
  width: 420px;
  max-width: 94vw;
  background: rgba(20, 20, 24, 0.72);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(124, 92, 255, 0.16);
  border-radius: var(--radius-lg);
  padding: 48px 40px 40px;
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(124, 92, 255, 0.06) inset;
  animation: cardSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ---------- 品牌 Logo + 标语 ---------- */
.login-brand {
  text-align: center;
  margin-bottom: 40px;
}

.login-logo {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.login-logo-accent {
  color: var(--accent);
}

.login-tagline {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  letter-spacing: 1px;
}

/* ---------- 表单输入组 ---------- */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-field {
  position: relative;
}

.login-field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
  pointer-events: none;
  transition: color 0.2s ease;
}

.login-input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 44px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: var(--font-base);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.login-input::placeholder {
  color: var(--text-tertiary);
}

.login-input:focus {
  border-color: var(--accent);
  background: rgba(124, 92, 255, 0.06);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.login-input:focus ~ .login-field-icon,
.login-field:focus-within .login-field-icon {
  color: var(--accent);
}

/* 密码可见切换 */
.login-toggle-pwd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s ease;
}

.login-toggle-pwd:hover {
  color: var(--text-secondary);
}

/* ---------- 记住我 + 忘记密码 ---------- */
.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--font-xs);
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.login-remember input[type="checkbox"] {
  accent-color: var(--accent);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.login-forgot {
  color: var(--text-secondary);
  transition: color 0.15s ease;
  cursor: pointer;
}

.login-forgot:hover {
  color: var(--accent);
}

/* ---------- 登录按钮 ---------- */
.login-submit {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: var(--font-lg);
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 16px rgba(124, 92, 255, 0.35);
}

.login-submit:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(124, 92, 255, 0.45);
}

.login-submit:active {
  transform: translateY(0);
  opacity: 0.85;
}

/* ---------- 用户角色切换（纯文字） ---------- */
.login-role-switch {
  text-align: center;
  margin-top: 24px;
  font-size: var(--font-sm);
  color: var(--text-tertiary);
}

.login-role-switch a {
  color: var(--text-tertiary);
  cursor: pointer;
  transition: color 0.15s ease;
  text-decoration: none;
}

.login-role-switch a:hover {
  color: var(--text-secondary);
}

.login-role-switch a.active {
  color: var(--accent);
  font-weight: 600;
}

/* 登录错误提示 */
.login-error {
  display: none;
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 107, 129, 0.12);
  color: var(--danger);
  font-size: var(--font-sm);
  line-height: 1.5;
  text-align: center;
}

/* 顶部导航条：返回首页 */
.login-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 40px;
  background: rgba(10, 10, 11, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.login-topbar-home {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.login-topbar-home:hover {
  color: var(--accent);
}

.login-back-icon {
  width: 16px;
  height: 16px;
  filter: brightness(0) saturate(100%) invert(55%) sepia(9%) saturate(346%) hue-rotate(210deg) brightness(93%) contrast(88%);
}

.login-topbar-home:hover .login-back-icon {
  filter: brightness(0) saturate(100%) invert(31%) sepia(73%) saturate(6566%) hue-rotate(247deg) brightness(102%) contrast(103%);
}

.login-topbar-brand {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
