/* ====== TOP NAVIGATION BAR ====== */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(246, 250, 246, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #dbe8dd;
  padding: 0 16px;
}
.top-nav-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}
.top-nav-brand {
  font-weight: 800;
  font-size: 16px;
  color: #4d6a53;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: -0.02em;
}
.top-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
}
.top-nav-links a {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #6a786f;
  text-decoration: none;
  border-radius: 10px;
  transition: color .16s ease, background .16s ease;
  white-space: nowrap;
}
.top-nav-links a:hover {
  color: #4d6a53;
  background: rgba(77, 106, 83, 0.08);
}
.top-nav-links a.nav-active {
  color: #4d6a53;
  background: rgba(77, 106, 83, 0.08);
}

/* 移动端隐藏顶部导航，使用底部导航 */
@media (max-width: 600px) {
  .top-nav {
    display: none;
  }
  .top-nav-inner { height: 46px; }
  .top-nav-links a { padding: 6px 10px; font-size: 13px; }
  .top-nav-brand { font-size: 14px; }
}

/* ====== MOBILE BOTTOM NAVIGATION ====== */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid #dbe8dd;
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 60px;
  padding: 8px 4px;
  color: #6a786f;
  text-decoration: none;
  transition: color 0.16s ease;
}

.mobile-nav-icon {
  font-size: 20px;
  line-height: 1;
  margin-bottom: 4px;
}

.mobile-nav-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.mobile-nav-item:hover,
.mobile-nav-item.nav-active {
  color: #4d6a53;
}

.mobile-nav-item.nav-active {
  background: rgba(77, 106, 83, 0.06);
  border-radius: 12px;
}

/* 桌面端隐藏底部导航 */
@media (min-width: 601px) {
  .mobile-bottom-nav {
    display: none;
  }
}

/* 为body添加底部padding以避免内容被遮挡 */
body.has-nav {
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}

@media (min-width: 601px) {
  body.has-nav {
    padding-bottom: 0;
  }
}