/* ==========================================================================
   腾龙发科 AI 元宇宙 · V61 全站统一顶部导航样式  site-nav-v61.css
   统一 .top-header / .site-header 两套历史结构，修复导航换行、溢出、间距、
   激活态、移动端折叠、登录态按钮等样式问题。前缀 nv61- ，零第三方依赖。
   ========================================================================== */

:root {
  --nv61-h: 64px;
  --nv61-bg: rgba(8, 11, 26, .88);
  --nv61-bd: rgba(96, 150, 255, .20);
  --nv61-fg: #d7e3ff;
  --nv61-fg-dim: #93a4cc;
  --nv61-acc: #5b8cff;
  --nv61-acc2: #a06bff;
  --nv61-cy: #22d3ee;
  --nv61-ok: #34d399;
}

/* 统一两套 header 容器：顶部吸附玻璃态 */
body.nv61-scope .top-header,
body.nv61-scope .site-header,
.nv61-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  width: 100%;
  min-height: var(--nv61-h);
  background: var(--nv61-bg);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--nv61-bd);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .38);
}

body.nv61-scope .top-header .header-inner,
body.nv61-scope .site-header .header-inner,
body.nv61-scope .site-header .container.header-inner,
.nv61-header .nv61-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 22px;
  height: var(--nv61-h);
  box-sizing: border-box;
}

/* 品牌区 */
body.nv61-scope .top-header .logo-tl,
body.nv61-scope .site-header .logo,
.nv61-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  white-space: nowrap;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  letter-spacing: .5px;
}

body.nv61-scope .logo-tl span,
body.nv61-scope .site-header .logo-text {
  background: linear-gradient(92deg, var(--nv61-acc), var(--nv61-acc2) 60%, var(--nv61-cy));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 主导航：解决换行 / 溢出 / 对齐 */
body.nv61-scope .main-nav,
.nv61-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 2px;
  margin: 0;
  list-style: none;
}

body.nv61-scope .main-nav::-webkit-scrollbar,
.nv61-nav::-webkit-scrollbar { height: 0; display: none; }

body.nv61-scope .main-nav > a,
.nv61-nav > a {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  height: 38px;
  padding: 0 13px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1;
  color: var(--nv61-fg-dim);
  text-decoration: none;
  transition: color .18s, background .18s;
}

body.nv61-scope .main-nav > a:hover,
.nv61-nav > a:hover {
  color: #fff;
  background: rgba(91, 140, 255, .14);
}

body.nv61-scope .main-nav > a.active,
body.nv61-scope .main-nav > a.on,
.nv61-nav > a.nv61-on {
  color: #fff;
  background: linear-gradient(135deg, rgba(91, 140, 255, .30), rgba(160, 107, 255, .28));
  box-shadow: inset 0 0 0 1px rgba(140, 180, 255, .38);
}

/* 右侧操作区 */
body.nv61-scope .header-right,
body.nv61-scope .header-actions,
.nv61-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

body.nv61-scope .header-right .btn-ghost,
body.nv61-scope .header-actions .cart-btn,
body.nv61-scope .header-actions .theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 36px;
  min-width: 36px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--nv61-bd);
  background: rgba(148, 163, 184, .10);
  color: var(--nv61-fg);
  font-size: 14px;
  cursor: pointer;
  transition: .18s;
}

body.nv61-scope .header-right .btn-ghost:hover,
body.nv61-scope .header-actions .cart-btn:hover,
body.nv61-scope .header-actions .theme-toggle:hover {
  border-color: rgba(140, 180, 255, .5);
  background: rgba(91, 140, 255, .16);
}

.nv61-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 9px;
  background: #f5576c;
  color: #fff;
  font-size: 10px;
  line-height: 1;
  font-style: normal;
}

/* 登录态用户胶囊 */
.nv61-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: 19px;
  border: 1px solid var(--nv61-bd);
  background: rgba(148, 163, 184, .10);
  color: var(--nv61-fg);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}

.nv61-user b { color: #fff; font-weight: 600; }
.nv61-user .nv61-bal { color: var(--nv61-cy); }
.nv61-user .nv61-out {
  border: none;
  background: transparent;
  color: var(--nv61-fg-dim);
  font-size: 12px;
  cursor: pointer;
  padding: 0 2px;
}
.nv61-user .nv61-out:hover { color: #ff8080; }

/* 汉堡按钮（移动端） */
.nv61-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--nv61-bd);
  background: rgba(148, 163, 184, .10);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.nv61-mask { display: none; }

/* 响应式：平板与手机折叠为抽屉 */
@media (max-width: 1180px) {
  body.nv61-scope .main-nav > a,
  .nv61-nav > a { padding: 0 10px; font-size: 13px; }
}

@media (max-width: 1024px) {
  .nv61-burger { display: inline-flex; }
  body.nv61-scope .main-nav,
  .nv61-nav {
    position: fixed;
    top: var(--nv61-h);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 16px 18px 40px;
    background: rgba(8, 11, 26, .98);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: .22s;
    overflow-y: auto;
    z-index: 960;
  }
  body.nv61-scope.nv61-open .main-nav,
  body.nv61-scope.nv61-open .nv61-nav {
    transform: none;
    opacity: 1;
    visibility: visible;
  }
  body.nv61-scope .main-nav > a,
  .nv61-nav > a {
    height: 46px;
    font-size: 15px;
    padding: 0 14px;
  }
  body.nv61-scope.nv61-open .nv61-mask {
    display: block;
    position: fixed;
    inset: var(--nv61-h) 0 0 0;
    background: rgba(0, 0, 0, .4);
    z-index: 950;
  }
}

@media (max-width: 768px) {
  body.nv61-scope .top-header .header-inner,
  body.nv61-scope .site-header .header-inner,
  body.nv61-scope .site-header .container.header-inner {
    padding: 0 12px;
    gap: 10px;
  }
  body.nv61-scope .header-right .btn-ghost[data-action="toggle-theme"],
  body.nv61-scope .header-actions .theme-toggle { display: none; }
  .nv61-user .nv61-bal { display: none; }
}

@media (max-width: 480px) {
  body.nv61-scope .logo-tl span,
  body.nv61-scope .site-header .logo-sub,
  body.nv61-scope .site-header .logo-text { font-size: 15px; }
  body.nv61-scope .logo-tl span { display: inline; }
}
