/* ========== 登录页面美化样式 v2 ========== */

/* Google Fonts 引入 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;600;700;900&display=swap');

/* ===== 全局重置 ===== */
body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif !important;
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%) !important;
  height: 100vh;
  margin: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== 背景粒子层 ===== */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 15% 30%, rgba(72, 50, 150, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 20%, rgba(100, 50, 200, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(50, 100, 200, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 70%, rgba(150, 50, 100, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 60%, rgba(50, 150, 200, 0.1) 0%, transparent 50%);
  z-index: 0;
  animation: bgShift 20s ease-in-out infinite alternate;
}

@keyframes bgShift {
  0% { transform: scale(1) rotate(0deg); opacity: 0.8; }
  50% { transform: scale(1.05) rotate(1deg); opacity: 0.9; }
  100% { transform: scale(1.1) rotate(-1deg); opacity: 1; }
}

/* ===== 浮动装饰大圈 ===== */
body::after {
  content: '';
  position: fixed;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(100, 60, 200, 0.12) 0%, transparent 70%);
  top: -250px;
  right: -200px;
  z-index: 0;
  animation: floatCircle 25s ease-in-out infinite alternate;
}

@keyframes floatCircle {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-60px, 40px) scale(1.1); }
  100% { transform: translate(-120px, 80px) scale(1.2); }
}

/* ===== 浮动装饰小圈 ===== */
/* 左下小圈 */
.login-container-deco-1 {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(50, 150, 200, 0.1) 0%, transparent 70%);
  bottom: -100px;
  left: -80px;
  z-index: 0;
  animation: floatCircleSmall 18s ease-in-out infinite alternate;
}

@keyframes floatCircleSmall {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(80px, -60px) scale(1.3); }
}

/* 中间装饰光晕 */
.login-container-deco-2 {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(150, 50, 200, 0.06) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  animation: pulseGlow 8s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes pulseGlow {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  100% { transform: translate(-50%, -50%) scale(1.5); opacity: 1; }
}

/* ===== 浮动几何形状 ===== */
.floating-shape {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  opacity: 0.08;
}

.floating-shape-1 {
  width: 60px;
  height: 60px;
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-radius: 50%;
  top: 10%;
  left: 8%;
  animation: floatShape1 15s ease-in-out infinite;
}

.floating-shape-2 {
  width: 40px;
  height: 40px;
  border: 2px solid rgba(118, 75, 162, 0.3);
  border-radius: 8px;
  transform: rotate(45deg);
  top: 25%;
  right: 12%;
  animation: floatShape2 12s ease-in-out infinite;
}

.floating-shape-3 {
  width: 80px;
  height: 80px;
  border: 2px solid rgba(50, 150, 200, 0.2);
  border-radius: 50%;
  bottom: 20%;
  left: 5%;
  animation: floatShape3 18s ease-in-out infinite;
}

.floating-shape-4 {
  width: 30px;
  height: 30px;
  border: 2px solid rgba(200, 100, 150, 0.25);
  border-radius: 50%;
  bottom: 35%;
  right: 8%;
  animation: floatShape4 10s ease-in-out infinite;
}

.floating-shape-5 {
  width: 50px;
  height: 50px;
  border: 2px solid rgba(102, 126, 234, 0.2);
  border-radius: 50%;
  top: 60%;
  left: 15%;
  animation: floatShape1 20s ease-in-out infinite reverse;
}

@keyframes floatShape1 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -40px) rotate(120deg); }
  66% { transform: translate(-20px, 20px) rotate(240deg); }
}

@keyframes floatShape2 {
  0%, 100% { transform: translate(0, 0) rotate(45deg); }
  50% { transform: translate(-40px, -50px) rotate(225deg); }
}

@keyframes floatShape3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.2); }
}

@keyframes floatShape4 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-25px, -35px) scale(0.8); }
}

/* ===== 登录卡片入场动画 ===== */
@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===== 登录卡片 ===== */
.login {
  position: relative !important;
  width: 420px !important;
  height: auto !important;
  min-height: 480px;
  padding: 50px 40px 30px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  backdrop-filter: blur(30px) !important;
  -webkit-backdrop-filter: blur(30px);
  animation: cardFadeIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 24px !important;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset !important;
  transform: none !important;
  opacity: 1 !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  z-index: 1;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: visible;
}

/* 卡片顶部光晕装饰 */
.login::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.6), rgba(118, 75, 162, 0.6), transparent);
  border-radius: 2px;
  z-index: 2;
}

.login:hover {
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset !important;
  transform: translateY(-2px) !important;
}

/* ===== 卡片内发光角标 ===== */
.login::after {
  content: '';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border-top: 2px solid rgba(102, 126, 234, 0.15);
  border-right: 2px solid rgba(102, 126, 234, 0.15);
  border-radius: 0 4px 0 0;
  pointer-events: none;
}

/* 左下角标 */
.login .login-corner {
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 40px;
  height: 40px;
  border-bottom: 2px solid rgba(102, 126, 234, 0.15);
  border-left: 2px solid rgba(102, 126, 234, 0.15);
  border-radius: 0 0 0 4px;
  pointer-events: none;
}

/* ===== 系统标题区域 ===== */
.login-system-brand {
  text-align: center;
  margin-bottom: 10px;
}

.login-system-brand .brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
  margin-bottom: 12px;
  font-size: 28px;
  color: #fff;
  animation: brandPulse 3s ease-in-out infinite;
}

@keyframes brandPulse {
  0%, 100% { box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3); }
  50% { box-shadow: 0 8px 35px rgba(102, 126, 234, 0.5); }
}

.login-system-brand .brand-icon svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}

.login-system-brand .brand-title {
  color: #fff;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 4px;
  opacity: 0.5;
  margin-top: 4px;
}

.login-system-brand .brand-title span {
  display: inline-block;
  animation: titleFadeIn 1s ease-out forwards;
  opacity: 0;
}

/* ===== 标题 ===== */
.login_title {
  color: #fff !important;
  height: auto !important;
  font-size: 26px !important;
  text-align: center !important;
  margin-bottom: 8px;
  font-weight: 700;
  letter-spacing: 3px;
  position: relative;
}

.login_title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 3px;
  margin: 10px auto 0;
}

.login_title .title-sub {
  display: block;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 6px;
}

/* ===== 欢迎文本 ===== */
.login-welcome {
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 1px;
  margin-bottom: 25px;
  margin-top: 5px;
}

/* ===== 表单区域 ===== */
.login_fields {
  position: relative !important;
  left: auto !important;
  height: auto !important;
}

/* 输入框容器 */
.login_fields__user,
.login_fields__password {
  position: relative !important;
  margin-bottom: 18px;
}

/* 图标 */
.login_fields .icon {
  position: absolute !important;
  left: 16px !important;
  top: 50% !important;
  transform: translateY(-50%);
  z-index: 2;
  opacity: 0.5 !important;
  transition: opacity 0.3s;
}

.login_fields .icon img {
  width: 18px !important;
  filter: brightness(0) invert(1);
}

.login_fields__user:focus-within .icon,
.login_fields__password:focus-within .icon {
  opacity: 1 !important;
}

/* 输入框 */
.login_fields input[type='text'],
.login_fields input[type='password'] {
  width: 100% !important;
  height: 52px !important;
  padding: 0 20px 0 48px !important;
  margin: 0 !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 14px !important;
  color: #fff !important;
  font-size: 15px !important;
  outline: none !important;
  box-shadow: none !important;
  transition: all 0.35s ease;
  box-sizing: border-box !important;
  letter-spacing: 0.5px;
}

.login_fields input[type='text']:focus,
.login_fields input[type='password']:focus {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(102, 126, 234, 0.4) !important;
  box-shadow: 0 0 25px rgba(102, 126, 234, 0.1) !important;
  padding-left: 50px !important;
}

.login_fields input[type='text']::placeholder,
.login_fields input[type='password']::placeholder {
  color: rgba(255, 255, 255, 0.3) !important;
  font-weight: 300;
  font-size: 14px;
}

/* 验证图标 */
.login .validation {
  position: absolute !important;
  right: 14px !important;
  top: 50% !important;
  transform: translateY(-50%);
  z-index: 2;
  opacity: 0 !important;
}

/* ===== 提交按钮 ===== */
.login_fields__submit {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  width: 100% !important;
  margin-top: 25px !important;
}

.login_fields__submit input[type='button'],
.login_fields__submit button {
  width: 100% !important;
  height: 52px !important;
  padding: 0 !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border: none !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  letter-spacing: 3px;
  cursor: pointer !important;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1) !important;
  text-transform: none !important;
  position: relative;
  overflow: hidden;
}

.login_fields__submit input[type='button']::before,
.login_fields__submit button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.6s ease;
}

.login_fields__submit input[type='button']:hover::before,
.login_fields__submit button:hover::before {
  left: 100%;
}

.login_fields__submit input[type='button']:hover,
.login_fields__submit button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(102, 126, 234, 0.45) !important;
}

.login_fields__submit input[type='button']:active,
.login_fields__submit button:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
}

/* ===== 登录页面间跳转链接 ===== */
.login-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.login-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 22px;
  border-radius: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.login-link-btn:hover {
  color: #fff;
  background: rgba(102, 126, 234, 0.15);
  border-color: rgba(102, 126, 234, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.login-link-btn .icon-arrow {
  font-size: 14px;
  transition: transform 0.3s;
}

.login-link-btn:hover .icon-arrow {
  transform: translateX(4px);
}

/* ===== 底部版权信息 ===== */
.login-footer {
  position: fixed;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 1;
  color: rgba(255, 255, 255, 0.15);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 1px;
  pointer-events: none;
}

/* ===== 隐藏WebGL canvas ===== */
canvas {
  display: none !important;
}

/* ===== 登录按钮加载状态 ===== */
@keyframes btnLoading {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.login_fields__submit input[type='button'].loading,
.login_fields__submit button.loading {
  background: linear-gradient(135deg, #5a67d8, #6b46a0) !important;
  pointer-events: none;
  opacity: 0.8;
}

.login_fields__submit input[type='button'].loading::after,
.login_fields__submit button.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 20px;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btnLoading 0.6s linear infinite;
}

/* ===== 分离式验证码容器 ===== */
.login_fields .srk_nr input,
.login_fields .srk_nr2 input {
  width: 100% !important;
  height: 52px !important;
  padding: 0 20px 0 16px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 14px !important;
  color: #fff !important;
  font-size: 15px !important;
  outline: none !important;
  transition: all 0.35s ease;
}

/* ===== 响应式 ===== */
@media screen and (max-width: 480px) {
  .login {
    width: 92% !important;
    padding: 35px 20px 25px !important;
    min-height: auto;
  }

  .login_title {
    font-size: 22px !important;
  }

  .login-links {
    flex-direction: column;
    align-items: center;
  }

  .floating-shape {
    display: none;
  }
}
