/* ══════════════════════════════════════════════════════════════
   IMC MediaBrain — 导航栏公共样式
   所有页面共享的顶部导航栏 CSS
   ══════════════════════════════════════════════════════════════ */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 19, 29, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.site-nav.nav-hidden { display: none; }
.site-nav.nav-hidden.visible { display: block; }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1240px;
  margin: 0 auto;
  height: 56px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-brand:hover { text-decoration: none; }
.nav-brand img { width: 28px; height: 28px; border-radius: 6px; }

.nav-links {
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 7px 14px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}
.nav-link.active {
  color: var(--accent);
  background: rgba(78, 217, 200, 0.1);
  border: 1px solid rgba(78, 217, 200, 0.2);
}
.nav-link.disabled {
  color: rgba(155, 176, 191, 0.4);
  pointer-events: none;
  cursor: default;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
  cursor: pointer;
  border: none;
  background: none;
  font-size: 0;
}
.nav-icon-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}
.nav-icon-btn svg { width: 18px; height: 18px; }
.nav-icon-btn[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(10, 24, 37, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #eef6fb;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
  z-index: 200;
}
.nav-icon-btn:hover[data-tip]::after { opacity: 1; }

/* ── 会员中心下拉菜单 ── */
.nav-user-dropdown {
  position: relative;
}
.nav-user-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 140px;
  padding: 4px 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 24, 37, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  z-index: 300;
}
.nav-user-menu.open { display: block; }
.nav-user-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 14px;
  border: none;
  background: none;
  color: var(--text);
  font-size: 13px;
  font-family: var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.nav-user-menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent);
  text-decoration: none;
}
.nav-user-menu-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .nav-inner {
    flex-direction: column;
    height: auto;
    padding: 10px 0;
    gap: 8px;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}
