/* ── Login Page · 登录页 ────────────────────── */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.login-body {
  min-height: 100vh;
  background: #0a0e1a;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* ── 背景装饰 ── */
.login-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.login-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(13, 148, 136, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 148, 136, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 0%, transparent 75%);
}

.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
}

.login-orb-1 {
  width: 600px;
  height: 600px;
  background: rgba(13, 148, 136, 0.18);
  top: -200px;
  left: -150px;
  animation: loginFloat1 18s ease-in-out infinite alternate;
}

.login-orb-2 {
  width: 500px;
  height: 500px;
  background: rgba(124, 58, 237, 0.15);
  bottom: -150px;
  right: -100px;
  animation: loginFloat2 20s ease-in-out infinite alternate;
}

.login-orb-3 {
  width: 400px;
  height: 400px;
  background: rgba(245, 158, 11, 0.08);
  top: 40%;
  left: 35%;
  animation: loginFloat3 22s ease-in-out infinite alternate;
}

@keyframes loginFloat1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(120px, 80px) scale(1.2); }
}

@keyframes loginFloat2 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-80px, -60px) scale(1.15); }
}

@keyframes loginFloat3 {
  0%   { transform: translate(0, 0) scale(0.9); opacity: 0.6; }
  100% { transform: translate(60px, -40px) scale(1.1); opacity: 1; }
}

/* ── 顶部 Header ── */
.login-header {
  position: relative;
  z-index: 10;
  padding: 24px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.login-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: opacity 0.25s ease;
}

.login-logo:hover { opacity: 0.85; }

.login-logo img {
  border-radius: 8px;
}

.login-logo-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #2dd4bf, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-logo-divider {
  width: 1px;
  height: 18px;
  background: linear-gradient(to bottom, transparent, rgba(148, 163, 184, 0.4), transparent);
  margin: 0 4px;
}

.login-logo-slogan {
  font-size: 13px;
  font-weight: 600;
  color: rgba(203, 213, 225, 0.7);
  letter-spacing: 0.02em;
}

.login-back-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(203, 213, 225, 0.85);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.25s ease;
}

.login-back-home:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(13, 148, 136, 0.4);
  color: #2dd4bf;
}

/* ── Main 主体 ── */
.login-main {
  flex: 1;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 48px;
}

.login-container {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  width: 100%;
  max-width: 1200px;
  align-items: center;
}

/* ── 左侧品牌区 ── */
.login-brand {
  position: relative;
  padding: 20px 0;
}

.login-brand-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 100px;
  background: rgba(13, 148, 136, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.25);
  color: #2dd4bf;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 28px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.login-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2dd4bf;
  box-shadow: 0 0 8px rgba(45, 212, 191, 0.7);
  animation: loginPulse 1.6s ease-in-out infinite;
}

@keyframes loginPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.3); }
}

.login-brand-title {
  font-size: 44px;
  font-weight: 900;
  color: #f8fafc;
  letter-spacing: -1.5px;
  line-height: 1.2;
  margin-bottom: 20px;
}

.login-grad {
  background: linear-gradient(135deg, #2dd4bf 0%, #a78bfa 50%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-brand-desc {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(203, 213, 225, 0.7);
  margin-bottom: 36px;
  max-width: 500px;
}

/* 数据卡片 */
.login-stats {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 24px 28px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: 32px;
  max-width: 500px;
}

.login-stat {
  flex: 1;
  text-align: center;
}

.login-stat-num {
  font-size: 28px;
  font-weight: 900;
  background: linear-gradient(135deg, #2dd4bf, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}

.login-stat-num span {
  font-size: 16px;
  font-weight: 700;
  margin-left: 1px;
}

.login-stat-label {
  font-size: 12px;
  color: rgba(148, 163, 184, 0.7);
  margin-top: 4px;
  font-weight: 500;
}

.login-stat-divider {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, transparent, rgba(148, 163, 184, 0.25), transparent);
}

/* 信任标签列表 */
.login-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 500px;
}

.login-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: rgba(203, 213, 225, 0.85);
  font-weight: 500;
}

.login-features svg {
  width: 16px;
  height: 16px;
  color: #2dd4bf;
  flex-shrink: 0;
  background: rgba(45, 212, 191, 0.12);
  border-radius: 50%;
  padding: 2px;
}

/* 装饰光线 */
.login-deco-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.login-line {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(45, 212, 191, 0.4), transparent);
}

.login-line-1 { top: 15%; left: -20%; width: 60%; transform: rotate(-3deg); animation: loginLineSlide1 8s ease-in-out infinite alternate; }
.login-line-2 { top: 55%; right: -20%; width: 50%; transform: rotate(2deg); animation: loginLineSlide2 10s ease-in-out infinite alternate; }
.login-line-3 { bottom: 10%; left: 10%; width: 40%; transform: rotate(-1deg); animation: loginLineSlide3 12s ease-in-out infinite alternate; }

@keyframes loginLineSlide1 { 0% { left: -20%; } 100% { left: 30%; } }
@keyframes loginLineSlide2 { 0% { right: -20%; } 100% { right: 20%; } }
@keyframes loginLineSlide3 { 0% { left: 10%; opacity: 0.4; } 100% { left: 40%; opacity: 1; } }

.login-spark {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #2dd4bf;
  box-shadow: 0 0 8px rgba(45, 212, 191, 0.8);
  animation: loginSpark 3s ease-in-out infinite;
}

.login-spark-1 { top: 20%; left: 30%; animation-delay: 0s; }
.login-spark-2 { top: 60%; left: 50%; background: #a78bfa; box-shadow: 0 0 8px rgba(167, 139, 250, 0.8); animation-delay: 1s; }
.login-spark-3 { bottom: 25%; left: 20%; background: #fbbf24; box-shadow: 0 0 8px rgba(251, 191, 36, 0.8); animation-delay: 2s; }

@keyframes loginSpark {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.8); }
}

/* ── 右侧表单区 ── */
.login-form-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.3),
    0 8px 20px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.login-card-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-card-header h2 {
  font-size: 26px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.login-card-header p {
  font-size: 13.5px;
  color: rgba(148, 163, 184, 0.8);
}

/* Tabs */
.login-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  margin-bottom: 24px;
}

.login-tab {
  flex: 1;
  padding: 9px 12px;
  border: none;
  background: transparent;
  color: rgba(148, 163, 184, 0.85);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.25s ease;
  font-family: inherit;
}

.login-tab:hover {
  color: #e2e8f0;
}

.login-tab.is-active {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.6), rgba(124, 58, 237, 0.5));
  color: #fff;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.25);
}

/* 表单面板 */
.login-pane {
  display: none;
  animation: loginFadeIn 0.35s ease;
}

.login-pane.is-active {
  display: block;
}

@keyframes loginFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-field {
  margin-bottom: 16px;
}

.login-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(203, 213, 225, 0.85);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.login-input-wrap:focus-within {
  border-color: rgba(45, 212, 191, 0.5);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.1);
}

.login-input-icon {
  width: 18px;
  height: 18px;
  margin-left: 14px;
  color: rgba(148, 163, 184, 0.6);
  flex-shrink: 0;
  pointer-events: none;
}

.login-input-prefix {
  margin-left: 14px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(148, 163, 184, 0.8);
  flex-shrink: 0;
}

.login-input-wrap input {
  flex: 1;
  height: 44px;
  padding: 0 14px;
  background: transparent;
  border: none;
  outline: none;
  color: #f1f5f9;
  font-size: 14px;
  font-family: inherit;
  letter-spacing: 0.02em;
}

.login-input-wrap input::placeholder {
  color: rgba(148, 163, 184, 0.5);
  font-weight: 400;
}

.login-input-wrap input:-webkit-autofill,
.login-input-wrap input:-webkit-autofill:hover,
.login-input-wrap input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 30px rgba(15, 23, 42, 0.95) inset !important;
  -webkit-text-fill-color: #f1f5f9 !important;
  caret-color: #f1f5f9;
}

.login-eye {
  width: 36px;
  height: 36px;
  margin-right: 6px;
  background: transparent;
  border: none;
  color: rgba(148, 163, 184, 0.6);
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.login-eye:hover {
  color: #2dd4bf;
  background: rgba(45, 212, 191, 0.08);
}

.login-eye svg {
  width: 18px;
  height: 18px;
}

.login-code-btn {
  margin-right: 6px;
  height: 32px;
  padding: 0 14px;
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.25);
  color: #2dd4bf;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
  font-family: inherit;
}

.login-code-btn:hover:not(:disabled) {
  background: rgba(45, 212, 191, 0.2);
  border-color: rgba(45, 212, 191, 0.4);
}

.login-code-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 行内字段（记住我 / 忘记密码） */
.login-field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 0 24px;
}

.login-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: rgba(203, 213, 225, 0.8);
  user-select: none;
}

.login-checkbox input {
  display: none;
}

.login-checkbox-box {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid rgba(148, 163, 184, 0.4);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.login-checkbox input:checked + .login-checkbox-box {
  background: linear-gradient(135deg, #0d9488, #7c3aed);
  border-color: transparent;
}

.login-checkbox input:checked + .login-checkbox-box::after {
  content: '';
  width: 9px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.login-forgot {
  font-size: 13px;
  color: rgba(45, 212, 191, 0.85);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.login-forgot:hover {
  color: #2dd4bf;
}

/* 提交按钮 */
.login-submit {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #0d9488 0%, #7c3aed 100%);
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.25s ease;
  font-family: inherit;
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.3);
  position: relative;
  overflow: hidden;
}

.login-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #14b8a6 0%, #a78bfa 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.login-submit > * {
  position: relative;
  z-index: 1;
}

.login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(13, 148, 136, 0.4);
}

.login-submit:hover::before {
  opacity: 1;
}

.login-submit:active {
  transform: translateY(0);
}

/* 二维码区 */
.login-qrcode-pane {
  text-align: center;
  padding: 8px 0 0;
}

.login-qr-frame {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 20px;
  background: #fff;
  padding: 10px;
  border-radius: 14px;
  border: 2px solid rgba(45, 212, 191, 0.3);
  box-shadow: 0 0 24px rgba(45, 212, 191, 0.2);
  overflow: hidden;
}

.login-qr-img {
  width: 100%;
  height: 100%;
  display: block;
}

.login-qr-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  background: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.login-qr-scan {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #2dd4bf, transparent);
  top: 10px;
  box-shadow: 0 0 8px #2dd4bf;
  animation: loginQrScan 2.5s linear infinite;
}

@keyframes loginQrScan {
  0%   { top: 10px; opacity: 1; }
  50%  { opacity: 1; }
  100% { top: calc(100% - 12px); opacity: 0.3; }
}

.login-qr-tip {
  font-size: 14px;
  color: #e2e8f0;
  margin-bottom: 8px;
  font-weight: 500;
}

.login-qr-tip strong {
  color: #2dd4bf;
  font-weight: 700;
}

.login-qr-status {
  font-size: 12.5px;
  color: rgba(148, 163, 184, 0.8);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.login-qr-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fbbf24;
  animation: loginPulse 1.6s ease-in-out infinite;
}

/* 协议 */
.login-agreement {
  text-align: center;
  font-size: 12.5px;
  color: rgba(148, 163, 184, 0.7);
  margin-top: 18px;
  line-height: 1.7;
}

.login-agreement a {
  color: rgba(45, 212, 191, 0.9);
  text-decoration: none;
  transition: color 0.2s ease;
}

.login-agreement a:hover {
  color: #2dd4bf;
}

/* 分割线 */
.login-divider {
  position: relative;
  margin: 24px 0 18px;
  text-align: center;
}

.login-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.25), transparent);
}

.login-divider span {
  position: relative;
  display: inline-block;
  padding: 0 16px;
  background: rgba(15, 23, 42, 0.6);
  font-size: 12px;
  color: rgba(148, 163, 184, 0.7);
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* OAuth 按钮 */
.login-oauth {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 22px;
}

.login-oauth-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(203, 213, 225, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.login-oauth-btn svg {
  width: 20px;
  height: 20px;
}

.login-oauth-btn:hover {
  background: rgba(45, 212, 191, 0.1);
  border-color: rgba(45, 212, 191, 0.35);
  color: #2dd4bf;
  transform: translateY(-2px);
}

/* 注册提示 */
.login-register-tip {
  text-align: center;
  font-size: 13.5px;
  color: rgba(148, 163, 184, 0.85);
}

.login-register-tip a {
  color: #2dd4bf;
  text-decoration: none;
  font-weight: 600;
  margin-left: 4px;
  transition: color 0.2s ease;
}

.login-register-tip a:hover {
  color: #5eead4;
}

/* 帮助链接 */
.login-help {
  text-align: center;
}

.login-help a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: rgba(148, 163, 184, 0.7);
  text-decoration: none;
  transition: color 0.2s ease;
}

.login-help a:hover {
  color: #2dd4bf;
}

/* 底部 Footer */
.login-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 20px 48px;
  font-size: 12px;
  color: rgba(148, 163, 184, 0.5);
}

/* ── 响应式 ── */
@media (max-width: 1024px) {
  .login-container {
    grid-template-columns: 1fr;
    gap: 48px;
    max-width: 480px;
  }

  .login-brand {
    text-align: center;
    padding: 0;
  }

  .login-brand-title {
    font-size: 32px;
  }

  .login-stats,
  .login-features,
  .login-brand-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .login-features {
    align-items: flex-start;
    display: inline-flex;
    text-align: left;
  }

  .login-deco-lines {
    display: none;
  }
}

@media (max-width: 600px) {
  .login-header {
    padding: 16px 20px;
  }

  .login-logo-divider,
  .login-logo-slogan {
    display: none;
  }

  .login-main {
    padding: 16px 20px;
  }

  .login-card {
    padding: 28px 24px;
  }

  .login-brand-title {
    font-size: 26px;
  }

  .login-stats {
    padding: 18px 16px;
  }

  .login-stat-num {
    font-size: 22px;
  }
}
