/* ==================== Shared Top Navigation (Apple-style) ==================== */
:root {
  --sn-bg: rgba(29, 29, 31, 0.8);
  --sn-fg: #ffffff;
  --sn-muted: rgba(255, 255, 255, 0.6);
  --sn-border: rgba(255, 255, 255, 0.08);
  --sn-accent: #0066cc;
}

.shared-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 52px;
  background: var(--sn-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--sn-border);
  display: flex;
  align-items: center;
}

.shared-nav-inner {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  gap: 12px;
}

.shared-nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--sn-fg);
  opacity: 0.95;
  transition: opacity 0.2s;
}

.shared-nav-brand:hover {
  opacity: 1;
  text-decoration: none;
}

.shared-nav-brand-icon {
  width: 18px;
  height: 18px;
  fill: var(--sn-fg);
  flex-shrink: 0;
}

.shared-nav-brand-text {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.12px;
  white-space: nowrap;
}

.shared-nav-current {
  flex: 1;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.12px;
  color: var(--sn-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shared-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Dropdown */
.sn-dropdown {
  position: relative;
}

.sn-dropdown-toggle {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--sn-fg);
  border-radius: 10px;
  padding: 6px 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s;
}

.sn-dropdown-toggle:hover {
  border-color: rgba(255, 255, 255, 0.45);
}

.sn-dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 180px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  z-index: 1001;
}

.sn-dropdown.open .sn-dropdown-menu {
  display: block;
}

.sn-dropdown-item {
  display: block;
  padding: 9px 14px;
  color: #111;
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  transition: background 0.15s;
}

.sn-dropdown-item:hover {
  background: #f3f4f6;
  text-decoration: none;
}

.sn-dropdown-item.active {
  color: #999;
  cursor: default;
  background: transparent;
}

.sn-dropdown-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 4px 0;
}

.sn-dropdown-home {
  font-weight: 600;
  color: var(--sn-accent);
}

/* 页面主体偏移 */
body.has-shared-nav {
  padding-top: 52px !important;
}
