/* ============================================================
   Quantum UI Upgrade — 源自「量子对讲机」设计语言
   三色量子渐变 / HUD 光环 / 流光边框 / 粒子 / 网格
   仅做视觉增强，不改动任何布局尺寸与业务逻辑
   ============================================================ */
:root {
  --qz-blue: #3b82f6;
  --qz-violet: #8b5cf6;
  --qz-pink: #ec4899;
  --qz-cyan: #22d3ee;
  --qz-grad: linear-gradient(120deg, var(--qz-blue), var(--qz-violet) 50%, var(--qz-pink));
  --qz-grad-hud: linear-gradient(120deg, var(--qz-cyan), var(--qz-blue) 55%, var(--qz-violet));
}

/* ---- 核心动画（沿用量子对讲机 quantum-effects） ---- */
@keyframes qz-pulse {
  0%, 100% { opacity: .35; transform: scale(1); }
  50%      { opacity: 1;  transform: scale(1.06); }
}
@keyframes qz-wave {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
@keyframes qz-interference {
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
@keyframes qz-spin     { to { transform: rotate(360deg); } }
@keyframes qz-spin-rev { to { transform: rotate(-360deg); } }
@keyframes qz-glow {
  0%, 100% { box-shadow: 0 0 18px rgba(59,130,246,.30), 0 0 42px rgba(139,92,246,.14); }
  50%      { box-shadow: 0 0 26px rgba(236,72,153,.35), 0 0 60px rgba(59,130,246,.18); }
}
@keyframes qz-rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- 量子渐变文字（品牌名 / 大标题） ---- */
.qz-text,
.brand-name,
.hero h1,
.sec-head .t {
  background: var(--qz-grad);
  background-size: 220% 220%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: qz-interference 6s ease-in-out infinite;
}

/* ---- 主按钮：量子渐变 + 流光扫过 ---- */
.btn-primary,
a.btn-primary,
button.btn-primary {
  position: relative;
  overflow: hidden;
  border: none !important;
  background: var(--qz-grad) !important;
  background-size: 180% 180% !important;
  color: #fff !important;
  animation: qz-interference 7s ease-in-out infinite;
  transition: transform .2s ease, box-shadow .25s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(139, 92, 246, .35), 0 4px 12px rgba(59, 130, 246, .28);
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%);
  animation: qz-wave 3.2s ease-in-out infinite;
}
.btn-ghost {
  position: relative;
  border: 1px solid transparent !important;
  background:
    linear-gradient(#141420, #141420) padding-box,
    var(--qz-grad) border-box;
}

/* ---- 卡片：量子流光边框（gradient mask 边框，呼应设备金属环） ---- */
.card,
.pcard {
  position: relative;
  border: 1px solid rgba(59, 130, 246, .22) !important;
  transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease;
}
.card:hover,
.pcard:hover {
  border-color: rgba(139, 92, 246, .55) !important;
  box-shadow: 0 10px 34px rgba(59, 130, 246, .16), 0 4px 14px rgba(236, 72, 153, .12);
  transform: translateY(-3px);
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--qz-cyan), transparent);
  animation: qz-wave 4.5s linear infinite;
  pointer-events: none;
  opacity: .7;
}

/* ---- kicker 小标：HUD 青 ---- */
.kicker {
  color: var(--qz-cyan) !important;
  letter-spacing: .18em;
}
.kicker::before,
.kicker::after {
  content: '';
  display: inline-block;
  width: 22px; height: 1px;
  background: var(--qz-grad-hud);
  vertical-align: middle;
  margin: 0 10px;
}

/* ---- 统计数字渐变 ---- */
.stat .n {
  background: var(--qz-grad-hud);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---- hero HUD 光环（呼应圆形量子对讲机） ---- */
.hero { position: relative; overflow: hidden; }
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: .5;
}
.hero::before {
  width: 520px; height: 520px;
  right: -140px; top: -120px;
  border: 1px solid rgba(34, 211, 238, .28);
  box-shadow:
    inset 0 0 60px rgba(34, 211, 238, .10),
    0 0 40px rgba(34, 211, 238, .10);
  animation: qz-spin 46s linear infinite;
}
.hero::before { border-style: dashed; }
.hero::after {
  width: 360px; height: 360px;
  right: -60px; top: -40px;
  border: 1px solid rgba(139, 92, 246, .22);
  box-shadow: inset 0 0 46px rgba(139, 92, 246, .10);
  animation: qz-spin-rev 32s linear infinite;
}

/* ---- 量子网格微背景（叠加在 hero 上，来自 quantum-grid） ---- */
.qz-grid {
  background-image:
    linear-gradient(rgba(59, 130, 246, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, .06) 1px, transparent 1px);
  background-size: 22px 22px;
  animation: qz-interference 14s linear infinite;
}

/* ---- 量子滚动条 ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,.08); border-radius: 10px; }
::-webkit-scrollbar-thumb {
  background: var(--qz-grad);
  background-size: 200% 200%;
  border-radius: 10px;
  animation: qz-interference 6s linear infinite;
}

/* ---- 链接渐变 hover ---- */
.nav-links a, .f-cols a {
  position: relative;
  transition: color .25s ease;
}
.nav-links a:hover { color: var(--qz-cyan); }

/* ---- 入场动画（quantum.js 用 IntersectionObserver 加 .qz-in） ---- */
.qz-anim { opacity: 0; }
.qz-anim.qz-in {
  animation: qz-rise .7s ease both;
}
.qz-anim.qz-in:nth-child(2) { animation-delay: .08s; }
.qz-anim.qz-in:nth-child(3) { animation-delay: .16s; }

/* ---- 表单输入聚焦量子光 ---- */
input:focus, textarea:focus, select:focus {
  border-color: var(--qz-blue) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .18), 0 0 14px rgba(139, 92, 246, .12) !important;
  outline: none !important;
}

/* ---- 后台登录页适配（.login_bd 卡片发光） ---- */
body .login_bd,
body .bd_center {
  position: relative;
}
body .login_bd {
  border: 1px solid rgba(59, 130, 246, .35) !important;
  border-radius: 14px;
  animation: qz-glow 5s ease-in-out infinite;
}
body h1.text-center {
  background: var(--qz-grad) !important;
  background-size: 200% 200% !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  animation: qz-interference 5s ease-in-out infinite;
}

/* ---- 性能与可访问性 ---- */
.qz-optimized, .hero::before, .hero::after {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}
@media (max-width: 768px) {
  .hero::before { width: 320px; height: 320px; right: -110px; }
  .hero::after  { width: 220px; height: 220px; right: -50px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero::before, .hero::after, .card::before,
  .btn-primary, .btn-primary::after,
  .qz-text, .brand-name, .hero h1, .sec-head .t {
    animation: none !important;
  }
}

/* ============================================================
   后台登录页：维罗纳月夜高清背景（admin-login-bg.jpg）
   作用域：仅当页面存在 .login_bd 时生效，不影响其他页面
   ============================================================ */
body.qz-login,
body:has(.login_bd) {
  background: #0b0b13 url("/brand/admin-login-bg.jpg") center / cover no-repeat fixed !important;
  min-height: 100vh;
}
body.qz-login .login_bd,
body:has(.login_bd) .login_bd {
  background: rgba(15, 17, 30, .80) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #e5e7eb !important;
  box-shadow: 0 26px 80px rgba(0, 0, 0, .55) !important;
}
body.qz-login .bd_top img,
body:has(.login_bd) .bd_top img {
  filter: brightness(1.15) drop-shadow(0 0 14px rgba(59, 130, 246, .45));
}
body.qz-login .login_bd .bd_center,
body:has(.login_bd) .login_bd .bd_center {
  color: #cbd5e1;
}
body.qz-login .login_bd ::placeholder,
body:has(.login_bd) .login_bd ::placeholder {
  color: #64748b;
}
/* 深色卡片上的输入框：微透玻璃质感 */
body.qz-login .login_bd .form-control,
body:has(.login_bd) .login_bd .form-control {
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(148, 163, 184, .5);
  color: #0f172a;
}
/* 验证码图片圆角 */
body.qz-login .yzm img,
body:has(.login_bd) .yzm img {
  border-radius: 6px;
}
