:root {
  --site-nav-height: 72px;
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  padding: 16px 18px 0;
  pointer-events: none;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

.site-nav__bar {
  width: min(1120px, 100%);
  height: 56px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(3, 3, 3, 0.58);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  pointer-events: auto;
}

.site-nav__brand,
.site-nav__link,
.site-nav__spark {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}

.site-nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.site-nav__mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(253, 224, 71, 0.32);
  border-radius: 999px;
  background: rgba(253, 224, 71, 0.1);
  box-shadow: 0 0 24px rgba(253, 224, 71, 0.22);
  font-size: 18px;
}

.site-nav__name {
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.22em;
  white-space: nowrap;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
  max-width: 62vw;
  overflow-x: auto;
  scrollbar-width: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px;
}

.site-nav__links::-webkit-scrollbar {
  display: none;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.18s ease, background 0.18s ease;
}

.site-nav__link:hover,
.site-nav__link.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.site-nav__spark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #fff;
  color: #030303;
  transition: transform 0.18s ease;
}

.site-nav__spark:hover {
  transform: scale(1.05);
}

/* 为引入 site-nav 的页面留出导航栏空间 */
body:has(.site-nav) {
  padding-top: var(--site-nav-height);
}

@media (max-width: 720px) {
  .site-nav {
    padding: 10px 10px 0;
  }

  .site-nav__bar {
    height: 52px;
    padding: 0 8px 0 10px;
  }

  .site-nav__name {
    display: none;
  }

  .site-nav__links {
    max-width: calc(100vw - 116px);
  }

  .site-nav__link {
    height: 32px;
    padding: 0 11px;
    font-size: 12px;
  }
}