/* ===========================================================
   黑客终端风格登录页样式
   作用域：html.hx-login（仅登录页生效，不影响后台界面）
   =========================================================== */

html.hx-login body {
  background: #030605 !important;
}

/* 登录页根容器：压暗原背景 + 等宽字体 */
html.hx-login .hx-login-root {
  background-image:
    linear-gradient(rgba(1, 6, 4, 0.9), rgba(1, 6, 4, 0.95)),
    url('/assets/png/login-background-CIXeAMgm.png') !important;
  background-size: cover !important;
  background-position: center !important;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
  overflow: hidden !important;
}

/* 网格层 */
html.hx-login .hx-login-root::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 255, 156, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 156, 0.06) 1px, transparent 1px);
  background-size: 38px 38px;
  z-index: 0;
}

/* 扫描线 */
html.hx-login .hx-login-root::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 130px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(0, 255, 156, 0.07), transparent);
  animation: hx-scan 6s linear infinite;
  z-index: 1;
}

@keyframes hx-scan {
  0% { top: -130px; }
  100% { top: 100%; }
}

/* ===== 登录卡片 ===== */
html.hx-login .hx-login-root .ant-card {
  position: relative;
  z-index: 2;
  width: 400px !important;
  border-radius: 4px !important;
  border: 1px solid rgba(0, 255, 156, 0.55) !important;
  background: rgba(3, 12, 8, 0.92) !important;
  box-shadow: 0 0 24px rgba(0, 255, 156, 0.28), inset 0 0 40px rgba(0, 255, 156, 0.06) !important;
  backdrop-filter: blur(3px);
  animation: hx-card-in 0.6s ease-out;
}

@keyframes hx-card-in {
  from { opacity: 0; transform: translateY(14px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

/* 标题 */
html.hx-login .hx-login-root .ant-card h3 {
  color: #00ff9c !important;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  letter-spacing: 3px !important;
  text-shadow: 0 0 8px rgba(0, 255, 156, 0.8), 0 0 18px rgba(0, 255, 156, 0.5) !important;
  animation: hx-flicker 4s infinite;
}

@keyframes hx-flicker {
  0%, 91%, 100% { opacity: 1; }
  92% { opacity: 0.35; }
  93% { opacity: 1; }
  95% { opacity: 0.55; }
  96% { opacity: 1; }
}

/* ===== 输入框：终端面板质感 ===== */
html.hx-login .hx-login-root .ant-input-affix-wrapper,
html.hx-login .hx-login-root .ant-input {
  position: relative !important;
  height: 46px !important;
  padding: 0 12px !important;
  background: linear-gradient(180deg, rgba(0, 36, 22, 0.96), rgba(0, 12, 8, 0.96)) !important;
  border: 1px solid rgba(0, 255, 156, 0.38) !important;
  border-left: 3px solid rgba(0, 255, 156, 0.85) !important;
  border-radius: 3px !important;
  color: #00ff9c !important;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
  box-shadow: inset 0 0 16px rgba(0, 255, 156, 0.07) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}

/* 四角科技角标 */
html.hx-login .hx-login-root .ant-input-affix-wrapper::before,
html.hx-login .hx-login-root .ant-input-affix-wrapper::after {
  content: '' !important;
  position: absolute !important;
  width: 10px !important;
  height: 10px !important;
  border: 0 solid #00ff9c !important;
  pointer-events: none !important;
  opacity: 0.9 !important;
}

html.hx-login .hx-login-root .ant-input-affix-wrapper::before {
  top: -1px !important;
  left: -1px !important;
  border-top-width: 2px !important;
  border-left-width: 2px !important;
}

html.hx-login .hx-login-root .ant-input-affix-wrapper::after {
  bottom: -1px !important;
  right: -1px !important;
  border-bottom-width: 2px !important;
  border-right-width: 2px !important;
}

/* 内层输入 */
html.hx-login .hx-login-root input.ant-input,
html.hx-login .hx-login-root .ant-input-affix-wrapper > input.ant-input {
  background: transparent !important;
  height: 100% !important;
  color: #00ff9c !important;
  caret-color: #00ff9c !important;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
  font-size: 15px !important;
  letter-spacing: 1.5px !important;
  text-shadow: 0 0 6px rgba(0, 255, 156, 0.6) !important;
}

html.hx-login .hx-login-root input::placeholder {
  color: rgba(0, 255, 156, 0.38) !important;
  letter-spacing: 1.5px !important;
}

/* 悬停 */
html.hx-login .hx-login-root .ant-input-affix-wrapper:hover,
html.hx-login .hx-login-root .ant-input:hover {
  border-color: rgba(0, 255, 156, 0.85) !important;
  border-left-color: #00ff9c !important;
  box-shadow: inset 0 0 18px rgba(0, 255, 156, 0.12), 0 0 12px rgba(0, 255, 156, 0.22) !important;
}

/* 聚焦：整框点亮 + 呼吸脉冲 */
html.hx-login .hx-login-root .ant-input-affix-wrapper-focused,
html.hx-login .hx-login-root .ant-input-affix-wrapper:focus-within,
html.hx-login .hx-login-root .ant-input:focus {
  border-color: #00ff9c !important;
  border-left-color: #00ff9c !important;
  background: linear-gradient(180deg, rgba(0, 50, 31, 0.98), rgba(0, 18, 11, 0.98)) !important;
  animation: hx-input-pulse 2.2s ease-in-out infinite !important;
}

@keyframes hx-input-pulse {
  0%, 100% {
    box-shadow: 0 0 0 1px rgba(0, 255, 156, 0.5), 0 0 16px rgba(0, 255, 156, 0.35), inset 0 0 20px rgba(0, 255, 156, 0.16);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(0, 255, 156, 0.85), 0 0 28px rgba(0, 255, 156, 0.6), inset 0 0 26px rgba(0, 255, 156, 0.28);
  }
}

/* 输入框图标 */
html.hx-login .hx-login-root .ant-input-prefix {
  margin-inline-end: 10px !important;
  color: #00ff9c !important;
}

html.hx-login .hx-login-root .ant-input-prefix svg {
  color: #00ff9c !important;
  font-size: 16px !important;
  filter: drop-shadow(0 0 6px rgba(0, 255, 156, 0.75));
}

html.hx-login .hx-login-root .ant-input-suffix svg,
html.hx-login .hx-login-root .ant-input-password-icon {
  color: rgba(0, 255, 156, 0.7) !important;
}

html.hx-login .hx-login-root .ant-input-password-icon:hover {
  color: #00ff9c !important;
}

/* 记住密码 */
html.hx-login .hx-login-root .ant-checkbox-wrapper {
  color: rgba(0, 255, 156, 0.8) !important;
}

html.hx-login .hx-login-root .ant-checkbox-inner {
  background: rgba(0, 20, 12, 0.8) !important;
  border-color: rgba(0, 255, 156, 0.5) !important;
}

html.hx-login .hx-login-root .ant-checkbox-checked .ant-checkbox-inner {
  background: #00ff9c !important;
  border-color: #00ff9c !important;
}

html.hx-login .hx-login-root .ant-checkbox-checked .ant-checkbox-inner::after {
  border-color: #032018 !important;
}

/* 登录按钮 */
html.hx-login .hx-login-root .ant-btn-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(0, 255, 156, 0.14), rgba(0, 255, 156, 0.28), rgba(0, 255, 156, 0.14)) !important;
  border: 1px solid #00ff9c !important;
  color: #00ff9c !important;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
  letter-spacing: 4px !important;
  text-shadow: 0 0 8px rgba(0, 255, 156, 0.8) !important;
  box-shadow: 0 0 14px rgba(0, 255, 156, 0.25), inset 0 0 14px rgba(0, 255, 156, 0.12) !important;
  transition: all 0.25s ease;
}

html.hx-login .hx-login-root .ant-btn-primary:hover {
  background: #00ff9c !important;
  color: #032018 !important;
  text-shadow: none !important;
  box-shadow: 0 0 26px rgba(0, 255, 156, 0.7) !important;
}

html.hx-login .hx-login-root .ant-btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  animation: hx-btn-sheen 3.2s infinite;
}

@keyframes hx-btn-sheen {
  0% { left: -60%; }
  55%, 100% { left: 130%; }
}

/* 错误提示 */
html.hx-login .hx-login-root .ant-alert-error {
  background: rgba(255, 42, 42, 0.12) !important;
  border: 1px solid rgba(255, 42, 42, 0.5) !important;
}

html.hx-login .hx-login-root .ant-alert-error .ant-alert-message {
  color: #ff5c5c !important;
}

/* 表单校验提示 */
html.hx-login .hx-login-root .ant-form-item-explain-error {
  color: #ff5c5c !important;
  font-family: 'Consolas', 'Monaco', monospace !important;
}

/* 底部版权文字 */
html.hx-login .hx-login-root div[style*='position: fixed'] {
  color: rgba(0, 255, 156, 0.55) !important;
  font-family: 'Consolas', 'Monaco', monospace !important;
  letter-spacing: 3px !important;
  text-shadow: 0 0 8px rgba(0, 255, 156, 0.5) !important;
}

/* 顶部状态栏 */
html.hx-login .hx-hud {
  position: absolute;
  top: 16px;
  left: 20px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(0, 255, 156, 0.75);
  text-shadow: 0 0 8px rgba(0, 255, 156, 0.5);
}

html.hx-login .hx-hud .hx-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00ff9c;
  box-shadow: 0 0 10px #00ff9c;
  animation: hx-blink 1.4s infinite;
}

@keyframes hx-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* 卡片下方命令行提示 */
html.hx-login .hx-tagline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 58px;
  z-index: 3;
  text-align: center;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12px;
  letter-spacing: 2px;
  color: rgba(0, 255, 156, 0.55);
  text-shadow: 0 0 8px rgba(0, 255, 156, 0.35);
}

html.hx-login .hx-tagline .hx-cursor {
  display: inline-block;
  width: 8px;
  height: 13px;
  margin-left: 6px;
  vertical-align: -2px;
  background: rgba(0, 255, 156, 0.8);
  animation: hx-blink 1s steps(1) infinite;
}

/* 移动端适配 */
@media (max-width: 480px) {
  html.hx-login .hx-login-root .ant-card {
    width: 100% !important;
  }
  html.hx-login .hx-hud {
    font-size: 10px;
    letter-spacing: 1px;
  }
}
