body.has-shared-shell nav {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.85) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border, #1e293b);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body.has-shared-shell .logo {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 22px;
  color: var(--accent, var(--cyan, #00d4aa));
  letter-spacing: -0.5px;
  text-decoration: none;
}

body.has-shared-shell .nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

body.has-shared-shell .nav-links a {
  color: var(--text-dim, #94a3b8);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

body.has-shared-shell .nav-links a:hover { color: var(--text, #e2e8f0); }

body.has-shared-shell .nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-bright, #2d3f5e);
  background: rgba(15, 23, 42, 0.7);
  color: var(--text, #e2e8f0);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

body.has-shared-shell .nav-toggle svg {
  width: 20px;
  height: 20px;
}

body.has-shared-shell .nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.5);
  backdrop-filter: blur(2px);
  z-index: 95;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

body.has-shared-shell .nav-login-btn {
  background: linear-gradient(135deg, #18f3c5, #00d4aa) !important;
  color: #041418 !important;
  padding: 8px 20px;
  border: 1px solid rgba(24, 243, 197, 0.9);
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 0 0 1px rgba(24, 243, 197, 0.25), 0 8px 18px rgba(0, 212, 170, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s;
}

body.has-shared-shell .nav-login-btn:hover {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(24, 243, 197, 0.4), 0 10px 24px rgba(0, 212, 170, 0.35);
  color: #041418 !important;
}

body.has-shared-shell .explorer-bar {
  position: fixed;
  top: 78px;
  right: 24px;
  z-index: 99;
}

body.has-shared-shell .explorer-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(17, 24, 39, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border, #1e293b);
  border-radius: 20px;
  padding: 6px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-dim, #94a3b8);
  cursor: default;
}

body.has-shared-shell .explorer-counter .ec-dot {
  width: 6px;
  height: 6px;
  background: var(--accent, var(--cyan, #00d4aa));
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent, var(--cyan, #00d4aa));
  animation: shell-pulse 2s ease-in-out infinite;
}

body.has-shared-shell .explorer-counter .ec-number {
  font-weight: 700;
  color: var(--accent, var(--cyan, #00d4aa));
  position: relative;
  overflow: hidden;
}

body.has-shared-shell .explorer-counter .ec-number::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -100%;
  width: 80%;
  height: 200%;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.25) 50%, transparent 70%);
  transform: skewX(-20deg);
  pointer-events: none;
  opacity: 0;
}

body.has-shared-shell .explorer-counter .ec-number.shimmer::after {
  opacity: 1;
  animation: shell-shimmer 0.8s ease-out forwards;
}

body.has-shared-shell footer {
  position: relative;
  z-index: 1;
  padding: 40px 24px;
  border-top: 1px solid var(--border, #1e293b);
  text-align: center;
  margin-top: 40px;
}

body.has-shared-shell .footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

body.has-shared-shell .footer-links a {
  color: var(--text-dim, #94a3b8);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

body.has-shared-shell .footer-links a:hover { color: var(--text, #e2e8f0); }

body.has-shared-shell .footer-copy {
  font-size: 12px;
  color: var(--text-muted, #64748b);
  font-family: 'JetBrains Mono', monospace;
}

html[data-theme="light"] body.has-shared-shell nav {
  background: rgba(248, 249, 251, 0.9) !important;
}

html[data-theme="light"] body.has-shared-shell .nav-backdrop {
  background: rgba(36, 46, 56, 0.2);
}

html[data-theme="light"] body.has-shared-shell .explorer-counter {
  background: rgba(255, 255, 255, 0.95);
}

html[data-theme="light"] body.has-shared-shell .nav-toggle {
  background: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
  body.has-shared-shell nav {
    padding: 12px 16px;
    align-items: center;
  }

  body.has-shared-shell .logo { font-size: 18px; }

  body.has-shared-shell .nav-toggle {
    display: inline-flex;
  }

  body.has-shared-shell .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 101;
    width: min(84vw, 320px);
    height: 100dvh;
    padding: 78px 16px 20px;
    background: rgba(10, 14, 23, 0.97);
    border-left: 1px solid var(--border-bright, #2d3f5e);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.24s ease, opacity 0.24s ease, visibility 0.24s ease;
    overflow-y: auto;
  }

  html[data-theme="light"] body.has-shared-shell .nav-links {
    background: rgba(248, 249, 251, 0.98);
  }

  html[data-theme="light"] body.has-shared-shell .nav-links a {
    background: rgba(255, 255, 255, 0.92);
  }

  body.has-shared-shell .nav-links a {
    font-size: 13px;
    border: 1px solid var(--border, #1e293b);
    border-radius: 10px;
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.45);
  }

  body.has-shared-shell .nav-login-btn {
    margin-top: 6px;
    padding: 10px 14px;
    font-size: 13px;
    text-align: center;
  }

  body.has-shared-shell.menu-open .nav-links {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
  }

  body.has-shared-shell.menu-open .nav-backdrop {
    opacity: 1;
    visibility: visible;
  }

  body.has-shared-shell.menu-open {
    overflow: hidden;
  }

  body.has-shared-shell .explorer-bar {
    top: 70px;
    right: 16px;
  }
}

@keyframes shell-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes shell-shimmer {
  0% { left: -75%; }
  100% { left: 125%; }
}
