/* ===== 共享导航样式 - 小春科技 v2 ===== */
.shared-nav * { margin: 0; padding: 0; box-sizing: border-box; }

.shared-nav {
  --bg-primary: #121212;
  --bg-secondary: #1a1a2e;
  --bg-nav: rgba(18,18,18,0.92);
  --accent: #d33a31;
  --accent-light: #e74c3c;
  --text: #e0e0e0;
  --text-secondary: #9e9e9e;
  --text-muted: #666;
  --border: #2a2a3e;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

/* top bar */
.shared-nav .sh-topbar {
  background: #1a1a2e;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-size: 12px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}
.shared-nav .sh-topbar a { color: var(--text-secondary); text-decoration: none; margin-left: 16px; }
.shared-nav .sh-topbar a:hover { color: #fff; }
.shared-nav .sh-topbar .left, .shared-nav .sh-topbar .right { display: flex; align-items: center; }

/* main nav */
.shared-nav .sh-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}
.shared-nav .sh-nav-left { display: flex; align-items: center; gap: 32px; }
.shared-nav .sh-logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 1.3rem; font-weight: 800;
  color: #fff; text-decoration: none; letter-spacing: 0.5px;
}
.shared-nav .sh-logo .icon {
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 900; color: #fff;
}
.shared-nav .sh-nav-links { display: flex; gap: 24px; list-style: none; }
.shared-nav .sh-nav-links a {
  color: var(--text-secondary); text-decoration: none;
  font-size: 14px; transition: color 0.2s;
  padding: 4px 0; border-bottom: 2px solid transparent;
}
.shared-nav .sh-nav-links a:hover, .shared-nav .sh-nav-links a.active {
  color: #fff; border-bottom-color: var(--accent);
}
.shared-nav .sh-nav-right { display: flex; align-items: center; gap: 16px; }

/* login button */
.shared-nav .sh-btn-login {
  background: var(--accent); color: #fff; border: none;
  padding: 6px 18px; border-radius: 20px;
  font-size: 13px; cursor: pointer; transition: background 0.2s;
  text-decoration: none;
}
.shared-nav .sh-btn-login:hover { background: var(--accent-light); }

/* user dropdown */
.shared-nav .sh-user-menu { position: relative; }
.shared-nav .sh-user-trigger {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 20px;
  cursor: pointer; color: #fff; font-size: 13px;
  transition: background 0.2s;
  white-space: nowrap;
}
.shared-nav .sh-user-trigger:hover { background: rgba(255,255,255,0.08); }
.shared-nav .sh-user-trigger .avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
}
.shared-nav .sh-user-trigger .arrow {
  font-size: 10px; margin-left: 2px;
  transition: transform 0.2s;
}
.shared-nav .sh-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: #1e1e32;
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 140px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 200;
  overflow: hidden;
}
.shared-nav .sh-dropdown.show { display: block; }
.shared-nav .sh-dropdown a, .shared-nav .sh-dropdown button {
  display: block; width: 100%; text-align: left;
  padding: 10px 16px;
  font-size: 13px; color: var(--text-secondary);
  text-decoration: none; background: none; border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.shared-nav .sh-dropdown a:hover, .shared-nav .sh-dropdown button:hover {
  background: rgba(255,255,255,0.06); color: #fff;
}
.shared-nav .sh-dropdown .divider {
  height: 1px; background: var(--border); margin: 4px 0;
}

/* ===== Login Modal ===== */
#loginModalOverlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.sh-login-modal {
  background: #1e1e32;
  border-radius: 12px;
  width: 360px;
  max-width: 90vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  overflow: hidden;
}
.sh-login-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #2a2a3e;
}
.sh-login-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.sh-login-close {
  background: none;
  border: none;
  color: #666;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}
.sh-login-close:hover { color: #fff; }
.sh-login-body {
  padding: 24px;
}
.sh-login-error {
  background: rgba(211,58,49,0.15);
  color: #e74c3c;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 16px;
}
.sh-form-group {
  margin-bottom: 16px;
}
.sh-form-group label {
  display: block;
  font-size: 13px;
  color: #9e9e9e;
  margin-bottom: 6px;
}
.sh-form-group input {
  width: 100%;
  padding: 10px 14px;
  background: #2a2a3e;
  border: 1px solid #2a2a3e;
  border-radius: 8px;
  color: #e0e0e0;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.sh-form-group input:focus {
  border-color: #d33a31;
}
.sh-login-submit {
  width: 100%;
  padding: 10px;
  background: #d33a31;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 8px;
}
.sh-login-submit:hover { background: #e74c3c; }
.sh-login-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* responsive */
@media (max-width: 768px) {
  .shared-nav .sh-nav { padding: 0 12px; }
  .shared-nav .sh-nav-links { display: none; }
}
@media (max-width: 480px) {
  .shared-nav .sh-logo { font-size: 1.1rem; }
}
