/* ============================================================
   site-nav.css — 全站统一导航栏（玻璃质感 · 明暗双主题）
   所有类名以 site- 前缀，避免与页面原有 sec-nav/rb-nav 样式冲突。
   ============================================================ */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 80;
  height: 60px;
  background: var(--glass-bg-strong, rgba(16, 30, 32, .30));
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--glass-border, rgba(45, 212, 191, .18));
  box-shadow: 0 6px 26px rgba(0, 0, 0, .18);
  transition: background .3s ease, border-color .3s ease, height .3s ease, box-shadow .3s ease;
}

/* 滚动收缩：页面向下滚动后导航更紧凑、玻璃更强 */
.site-nav.scrolled {
  height: 52px;
  background: var(--glass-bg-strong, rgba(16, 30, 32, .42));
  box-shadow: 0 8px 30px rgba(0, 0, 0, .26);
}

.site-nav-inner {
  max-width: var(--maxw, 1200px);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-serif, Georgia, "Songti SC", serif);
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary, #E7F1EF);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary, #14B8A6), var(--primary-deep, #0F766E));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 2px 10px rgba(20, 184, 166, .35);
}
.site-brand b { color: var(--primary, #14B8A6); }

.site-links {
  display: flex;
  gap: 2px;
  align-items: center;
  flex: 1;
  margin-left: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-links::-webkit-scrollbar { display: none; }
.site-links a {
  color: var(--text-secondary, rgba(231, 241, 239, .72));
  font-size: 14px;
  font-weight: 500;
  padding: 8px 13px;
  border-radius: 9px;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease, background .2s ease;
}
.site-links a:hover {
  color: var(--text-primary, #E7F1EF);
  background: var(--tint, rgba(45, 212, 191, .12));
}
.site-links a.active {
  color: var(--primary, #14B8A6);
  background: var(--tint, rgba(45, 212, 191, .14));
  font-weight: 600;
}

.site-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.site-theme-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--glass-border, rgba(45, 212, 191, .18));
  background: var(--glass-bg, rgba(16, 30, 32, .20));
  color: var(--text-primary, #E7F1EF);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.site-theme-btn:hover {
  border-color: var(--primary, #14B8A6);
  transform: scale(1.06);
  background: var(--tint, rgba(45, 212, 191, .16));
}
.site-theme-btn:active { transform: scale(.92); }

.site-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--glass-border, rgba(45, 212, 191, .18));
  border-radius: 10px;
  background: var(--glass-bg, rgba(16, 30, 32, .20));
  cursor: pointer;
  padding: 0 9px;
}
.site-menu-btn span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text-primary, #E7F1EF);
  transition: transform .25s ease, opacity .25s ease;
}
.site-nav.open .site-menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-nav.open .site-menu-btn span:nth-child(2) { opacity: 0; }
.site-nav.open .site-menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 移动端：链接折叠为下拉面板 */
@media (max-width: 860px) {
  .site-links {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin-left: 0;
    padding: 10px 16px 16px;
    background: var(--glass-bg-strong, rgba(16, 30, 32, .42));
    backdrop-filter: blur(22px) saturate(1.5);
    -webkit-backdrop-filter: blur(22px) saturate(1.5);
    border-bottom: 1px solid var(--glass-border, rgba(45, 212, 191, .18));
    box-shadow: 0 14px 30px rgba(0, 0, 0, .25);
    display: none;
  }
  .site-nav.open .site-links { display: flex; }
  .site-menu-btn { display: flex; }
}
