/* ═══ 登录/注册模态框 · 深色 AI 玻璃风 ═══ */
#auth-modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(4,10,26,.62); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; transition: opacity .22s ease;
}
#auth-modal.open { opacity: 1; }
.auth-card {
  position: relative;
  width: 100%; max-width: 420px;
  background: linear-gradient(165deg, #0d1b3e 0%, #0a1428 60%, #0a1428 100%);
  border: 1px solid rgba(96,165,250,.28); border-radius: 20px;
  box-shadow: 0 32px 80px rgba(2,8,23,.72), 0 0 0 1px rgba(56,189,248,.08);
  padding: 34px 32px 30px; color: #e2e8f0;
  transform: translateY(18px) scale(.985); transition: transform .22s ease;
}
#auth-modal.open .auth-card { transform: none; }
.auth-card::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 180px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, transparent, #38bdf8, transparent);
}
.auth-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.06); border: 1px solid rgba(148,163,184,.2);
  color: #94a3b8; font-size: 16px; line-height: 1; cursor: pointer; transition: all .15s;
}
.auth-close:hover { background: rgba(56,189,248,.16); color: #7dd3fc; border-color: rgba(56,189,248,.4); }

.auth-brand {
  text-align: center; font-size: 13px; font-weight: 700; letter-spacing: 2px;
  color: #7dd3fc; margin-bottom: 4px;
}
.auth-sub { text-align: center; font-size: 13px; color: #94a3b8; margin: 0 0 22px; }

.auth-tabs { display: flex; background: rgba(255,255,255,.05); border-radius: 11px; padding: 4px; margin-bottom: 22px; }
.auth-tabs button {
  flex: 1; background: none; border: none; color: #94a3b8; font-size: 14px; font-weight: 600;
  padding: 9px 0; border-radius: 8px; cursor: pointer; transition: all .18s;
}
.auth-tabs button.active {
  background: linear-gradient(135deg, #1d4ed8, #2563eb); color: #fff;
  box-shadow: 0 4px 14px rgba(37,99,235,.5);
}

.auth-form label { display: block; font-size: 12.5px; font-weight: 600; color: #94a3b8; margin: 0 0 6px; letter-spacing: .5px; }
.auth-form .fld { margin-bottom: 14px; }
.auth-form input {
  width: 100%; padding: 12px 14px; border-radius: 11px;
  border: 1px solid rgba(148,163,184,.25); background: rgba(255,255,255,.05);
  color: #e2e8f0; font-size: 14px; outline: none; transition: all .15s;
}
.auth-form input::placeholder { color: #5b6b85; }
.auth-form input:focus { border-color: #38bdf8; background: rgba(56,189,248,.08); box-shadow: 0 0 0 3px rgba(56,189,248,.14); }
.pw-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* 图形验证码 */
.cap-row { display: flex; gap: 10px; align-items: center; }
.cap-row input { flex: 1; letter-spacing: 4px; font-weight: 700; text-transform: uppercase; }
.cap-img-wrap {
  position: relative; width: 120px; height: 44px; flex-shrink: 0;
  border-radius: 9px; overflow: hidden; cursor: pointer;
  border: 1px solid rgba(56,189,248,.3); background: #0f172a;
}
.cap-img-wrap img { width: 100%; height: 100%; display: block; }
.cap-refresh {
  position: absolute; right: 3px; bottom: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(15,23,42,.85); border: 1px solid rgba(56,189,248,.4);
  color: #7dd3fc; font-size: 11px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.cap-refresh:hover { background: rgba(56,189,248,.3); }
#cap-warn { font-size: 11.5px; color: var(--warn, #d97706); margin: 4px 0 0; display: none; }

.form-msg { font-size: 12.5px; margin: 12px 0 0; display: none; line-height: 1.5; }
.auth-form .btn-auth {
  width: 100%; margin-top: 18px; padding: 13px;
  background: linear-gradient(135deg, #38bdf8, #60a5fa);
  color: #061426; font-weight: 700; font-size: 14.5px;
  border: none; border-radius: 12px; cursor: pointer; transition: all .18s;
  box-shadow: 0 6px 20px rgba(56,189,248,.38);
}
.auth-form .btn-auth:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(56,189,248,.5); }
.auth-form .btn-auth:disabled { opacity: .6; cursor: wait; transform: none; }
.auth-alt { text-align: center; font-size: 12px; color: #64748b; margin: 16px 0 0; }
.auth-alt a { color: #7dd3fc; text-decoration: none; font-weight: 600; cursor: pointer; }
.auth-alt a:hover { text-decoration: underline; }

/* 导航认证区 */
.nav-auth { display: flex; align-items: center; gap: 10px; }
.nav-auth .btn-light { font-size: 12.5px; padding: 8px 16px; }
.auth-user-chip {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: #cbd5e1;
  background: rgba(56,189,248,.08); border: 1px solid rgba(56,189,248,.25);
  padding: 6px 12px; border-radius: 20px; max-width: 220px;
}
.auth-user-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 8px #34d399; flex-shrink: 0; }
.auth-user-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-logout {
  background: none; border: none; color: #94a3b8; font-size: 12.5px; cursor: pointer;
  padding: 8px 6px; transition: color .15s;
}
.btn-logout:hover { color: #7dd3fc; }
.btn-console {
  display: inline-block; background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.4);
  color: #34d399; font-weight: 700; font-size: 12.5px; border-radius: 10px;
  padding: 8px 16px; cursor: pointer; text-decoration: none; transition: all .18s;
}
.btn-console:hover { background: rgba(52,211,153,.24); box-shadow: 0 0 16px rgba(52,211,153,.3); }

/* 页脚登录入口 */
.f-col a[data-open-auth] { color: var(--brand); font-weight: 600; }

/* 首屏 AI 动效升级 */
/* 动态网格底纹（hero 内） */
.hero-grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(56,189,248,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,189,248,.06) 1px, transparent 1px);
  background-size: 44px 44px;
  animation: gridDrift 14s linear infinite;
  mask-image: radial-gradient(ellipse 900px 520px at 50% 40%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 900px 520px at 50% 40%, #000 30%, transparent 78%);
}
@keyframes gridDrift { to { background-position: 44px 44px, 44px 44px; } }

/* 第三光斑：品红呼吸 */
.hero-orb-3 {
  width: 320px; height: 320px; top: 40%; left: 46%;
  background: rgba(217,70,239,.22); mix-blend-mode: screen;
  animation: orbBreathe 7s ease-in-out infinite;
}
@keyframes orbBreathe {
  0%,100% { transform: scale(1); opacity: .7; }
  50% { transform: scale(1.18); opacity: 1; }
}

/* H1 关键词扫光 */
.hero-copy h1 .grad-text {
  background: linear-gradient(90deg, #60a5fa 0%, #38bdf8 30%, #67e8f9 50%, #38bdf8 70%, #60a5fa 100%);
  background-size: 220% 100%;
  animation: gradSweep 4.5s linear infinite;
}
@keyframes gradSweep { to { background-position: 220% 0; } }

/* Hero 按钮磁吸微光 */
.btn-hero { position: relative; overflow: hidden; }
.btn-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  transform: translateX(-110%); transition: transform .55s ease;
}
.btn-hero:hover::after { transform: translateX(110%); }

/* 数据卡发光描边 + 计数脉冲 */
.metric-card { transition: all .2s; }
.metric-card:hover { border-color: rgba(56,189,248,.55); box-shadow: 0 0 24px rgba(56,189,248,.22); }
.metric-card b.pulse { text-shadow: 0 0 18px rgba(103,232,249,.8); }

/* 区块 reveal：加 blur 过渡 */
html.js-enabled .reveal { opacity: 0; transform: translateY(24px); filter: blur(4px); transition: all .65s cubic-bezier(.2,.7,.3,1); }
html.js-enabled .reveal.in { opacity: 1; transform: none; filter: blur(0); }

/* 导航滚动后加深 */
#nav.scrolled {
  background: rgba(6,13,32,.92);
  box-shadow: 0 8px 32px rgba(2,8,23,.5);
  border-bottom-color: rgba(56,189,248,.28);
}

/* 排版提级 */
body { font-size: 15.5px; }
.container { max-width: 1200px; }
.section { padding: 88px 0; }
.sec-head h2 { font-size: 34px; }

@media (max-width: 640px) {
  .auth-card { padding: 26px 20px; }
  .pw-pair { grid-template-columns: 1fr; }
  .cap-img-wrap { width: 100px; height: 38px; }
  .auth-user-chip { max-width: 150px; }
}

/* 尊重系统减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .hero-grid, .hero-band, .mock-chat, .hero-orb-3 { animation: none !important; }
  .hero-copy h1 .grad-text { animation: none !important; background-size: 100% 100%; }
  html.js-enabled .reveal { filter: none; transition: opacity .3s; }
}
