/* 呼吸健康 · 慢阻肺筛查 — 登录页科技感样式 */

.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

/* 动态背景层 */
.login-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: 
    radial-gradient(ellipse 90% 60% at 50% -5%, rgba(6, 182, 212, 0.35), transparent 55%),
    radial-gradient(ellipse 70% 50% at 95% 50%, rgba(16, 185, 129, 0.25), transparent 50%),
    radial-gradient(ellipse 60% 45% at 5% 70%, rgba(59, 130, 246, 0.2), transparent 45%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(6, 182, 212, 0.15), transparent 45%),
    #0b1220;
}

/* 背景渐变流动 - 更明显 */
.login-bg::before {
  content: "";
  position: absolute;
  inset: -80%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(6, 182, 212, 0.3) 0%, transparent 28%),
    radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.25) 0%, transparent 32%),
    radial-gradient(circle at 60% 70%, rgba(99, 102, 241, 0.2) 0%, transparent 30%);
  animation: loginBgShift 8s ease-in-out infinite alternate;
  pointer-events: none;
}

.login-bg::after {
  content: "";
  position: absolute;
  inset: -60%;
  background: 
    radial-gradient(circle at 70% 60%, rgba(6, 182, 212, 0.2) 0%, transparent 35%),
    radial-gradient(circle at 30% 80%, rgba(16, 185, 129, 0.18) 0%, transparent 30%);
  animation: loginBgShift2 10s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes loginBgShift {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 0.9; }
  100% { transform: translate(-5%, -4%) scale(1.12) rotate(1deg); opacity: 1; }
}

@keyframes loginBgShift2 {
  0% { transform: translate(0, 0) scale(1.05); opacity: 0.85; }
  100% { transform: translate(4%, 3%) scale(1); opacity: 1; }
}

/* 科技网格 - 更亮、带轻微动效 */
.login-grid {
  position: fixed;
  inset: 0;
  z-index: 1;
  background-image: 
    linear-gradient(rgba(6, 182, 212, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: 0 0;
  animation: loginGridMove 20s linear infinite;
  pointer-events: none;
}

@keyframes loginGridMove {
  0% { background-position: 0 0; }
  100% { background-position: 40px 40px; }
}

/* 扫描线光效 */
.login-scanline {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(6, 182, 212, 0.03) 50%,
    transparent 100%
  );
  background-size: 100% 120px;
  animation: loginScan 4s linear infinite;
  pointer-events: none;
}

@keyframes loginScan {
  0% { background-position: 0 -120px; }
  100% { background-position: 0 100vh; }
}

/* 浮动粒子容器 - 更亮更大 */
.login-particles {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.login-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.85);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.6), 0 0 24px rgba(6, 182, 212, 0.3);
  animation: loginFloat 6s ease-in-out infinite;
}
.login-particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; animation-duration: 8s; }
.login-particle:nth-child(2) { left: 25%; top: 60%; animation-delay: -2s; width: 5px; height: 5px; opacity: 0.9; background: rgba(16, 185, 129, 0.8); box-shadow: 0 0 10px rgba(16, 185, 129, 0.5); }
.login-particle:nth-child(3) { left: 45%; top: 15%; animation-delay: -4s; animation-duration: 10s; }
.login-particle:nth-child(4) { left: 70%; top: 40%; animation-delay: -1s; background: rgba(16, 185, 129, 0.75); box-shadow: 0 0 14px rgba(16, 185, 129, 0.4); }
.login-particle:nth-child(5) { left: 85%; top: 70%; animation-delay: -5s; animation-duration: 7s; width: 5px; height: 5px; }
.login-particle:nth-child(6) { left: 15%; top: 80%; animation-delay: -3s; width: 4px; height: 4px; }
.login-particle:nth-child(7) { left: 55%; top: 85%; animation-delay: -6s; background: rgba(59, 130, 246, 0.8); box-shadow: 0 0 12px rgba(59, 130, 246, 0.5); }
.login-particle:nth-child(8) { left: 90%; top: 25%; animation-delay: -2.5s; animation-duration: 9s; }
.login-particle:nth-child(9) { left: 35%; top: 45%; animation-delay: -7s; width: 5px; height: 5px; opacity: 0.9; }
.login-particle:nth-child(10) { left: 75%; top: 55%; animation-delay: -4.5s; }

@keyframes loginFloat {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.7; }
  25% { transform: translate(20px, -28px) scale(1.3); opacity: 1; }
  50% { transform: translate(-15px, 15px) scale(0.95); opacity: 0.85; }
  75% { transform: translate(25px, 12px) scale(1.2); opacity: 1; }
}

/* 鼠标跟随粒子 - 由 JS 创建 */
.login-cursor-particles {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.login-cursor-particle {
  position: absolute;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
  transition: opacity 0.15s ease-out;
}
.login-cursor-particle.core {
  width: 12px;
  height: 12px;
  background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(6, 182, 212, 0.6) 40%, transparent 70%);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.8), 0 0 40px rgba(6, 182, 212, 0.4);
}
.login-cursor-particle.trail {
  width: 8px;
  height: 8px;
  background: rgba(6, 182, 212, 0.7);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.6);
}
.login-cursor-particle.trail.green {
  background: rgba(16, 185, 129, 0.6);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}
.login-cursor-particle.trail.blue {
  background: rgba(59, 130, 246, 0.6);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* 主内容区 */
.login-main {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 420px;
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.35), rgba(16, 185, 129, 0.25));
  border: 1px solid rgba(6, 182, 212, 0.4);
  margin-bottom: 16px;
  font-size: 26px;
  animation: loginPulse 3s ease-in-out infinite;
}

@keyframes loginPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.25); }
  50% { box-shadow: 0 0 24px 4px rgba(6, 182, 212, 0.15); }
}

.login-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #eaf0ff;
  margin: 0 0 6px 0;
  background: linear-gradient(90deg, #a5f3fc, #a7f3d0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-subtitle {
  font-size: 13px;
  color: #94a3b8;
  margin: 0;
  letter-spacing: 0.3px;
}

/* 登录卡片 */
.login-card {
  background: rgba(15, 27, 51, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.login-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #cbd5e1;
  margin: 0 0 14px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.login-form .row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.login-form .row.mt { margin-top: 4px; }

.login-form .label {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}

.login-form .input {
  width: 100%;
  height: 24px;
  min-height: 24px;
  max-height: 24px;
  padding: 0 10px;
  flex: none; /* 覆盖 style.css 的 .input { flex: 1 1 380px }，避免在 column 布局里被拉高 */
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #eaf0ff;
  font-size: 14px;
  line-height: 24px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.login-form .input::placeholder {
  color: #64748b;
}

.login-form .input:focus {
  border-color: rgba(6, 182, 212, 0.6);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

#loginError {
  margin-top: 8px;
  margin-bottom: 4px;
  font-size: 13px;
  min-height: 20px;
}

.login-submit-wrap {
  margin-top: 14px;
}

.login-submit {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s, opacity 0.2s;
  background: linear-gradient(135deg, #06b6d4, #0d9488);
  color: #fff;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.35);
}

.login-submit:hover:not(:disabled) {
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.45);
  transform: translateY(-1px);
}

.login-submit:active:not(:disabled) {
  transform: translateY(0);
}

.login-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.login-footer {
  position: relative;
  z-index: 10;
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
  color: #64748b;
}

.login-footer a {
  color: #67e8f9;
  text-decoration: none;
}

.login-footer a:hover {
  text-decoration: underline;
}
