/* ===== 导航栏 · 半透明毛玻璃 ===== */
.navbar {
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 4px 24px rgba(100, 149, 237, 0.06);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  transition:
    background 0.3s ease,
    border-color 0.3s ease;
}

[data-theme="dark"] .navbar {
  background: rgba(18, 22, 36, 0.52);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--primary-deep);
  text-decoration: none;
}

.logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

.dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
  line-height: 1.5;
  padding: 0.5rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Beta 角标（导航 / 侧栏 / 标题共用） */
.beta-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0.1rem 0.42rem;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--primary-deep);
  background: rgba(100, 149, 237, 0.14);
  border: 1px solid rgba(100, 149, 237, 0.38);
  border-radius: var(--radius-full);
  pointer-events: none;
  user-select: none;
}

.nav-links a .beta-badge {
  font-size: 0.52rem;
  padding: 0.08rem 0.38rem;
}

.nav-links a:hover .beta-badge,
.nav-links a.active .beta-badge {
  color: var(--primary-deep);
  border-color: rgba(100, 149, 237, 0.55);
  background: rgba(100, 149, 237, 0.2);
}

[data-theme="dark"] .beta-badge {
  color: var(--primary-light);
  background: rgba(122, 163, 240, 0.15);
  border-color: rgba(122, 163, 240, 0.4);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.theme-toggle {
  background: var(--social-bg);
  border: 1px solid var(--border-light);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  transform: rotate(15deg);
  background: var(--primary);
  color: white;
}

.theme-toggle .fa-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .fa-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .fa-sun {
  display: block;
  color: white;
}

[data-theme="dark"] .theme-toggle:hover {
  background: var(--primary-light);
}

@media (max-width: 768px) {
  .nav-container {
    padding: 0.8rem 1.2rem;
  }

  .nav-links {
    gap: 1.2rem;
  }

  .logo span:last-child {
    font-size: 1rem;
  }
}
