/* =====================================================================
   navbar.css — Floating pill navbar + mobile drawer
   Single source of truth for navigation styles across all pages.
   ===================================================================== */

/* ── Navbar shell ──────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 95%;
  max-width: 1400px;
  padding: 0 32px;
  height: 56px;
  background: rgba(15, 15, 25, 0.4);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
}

/* ── Brand ─────────────────────────────────────────────────────────── */
.nav-brand {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.5px;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-brand:hover { text-decoration: none; }

/* ── Center links ──────────────────────────────────────────────────── */
.nav-center {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-item {
  position: relative;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.2s;
  background: none;
  border: none;
  font-family: var(--font, 'Inter', sans-serif);
  letter-spacing: 0.3px;
  text-decoration: none;
}
.nav-item:hover { color: #fff; background: rgba(255, 255, 255, 0.05); text-decoration: none; }

/* Chevron icon */
.nav-item .chevron {
  width: 10px;
  height: 6px;
  margin-left: 4px;
  opacity: 0.5;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-dropdown:hover .nav-item .chevron {
  transform: rotate(180deg);
  opacity: 1;
}

/* Active state */
.nav-item.active {
  color: var(--neon-cyan, #00d4ff);
  font-weight: 600;
  text-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
}
.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--neon-cyan, #00d4ff);
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.6), 0 0 20px rgba(0, 212, 255, 0.3);
  border-radius: 2px;
}

/* ── Dropdown ──────────────────────────────────────────────────────── */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-menu {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding-top: 8px;
  z-index: 200;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.nav-dropdown:hover .nav-dropdown-menu {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown-menu-inner {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top-color: rgba(255, 255, 255, 0.25);
  border-left-color: rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 6px;
  min-width: 190px;
  overflow: hidden;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.5),
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
}
/* Glass background as pseudo — sits behind links */
.nav-dropdown-menu-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08) 0%, rgba(15, 15, 25, 0.5) 40%, rgba(15, 15, 25, 0.45) 100%);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border-radius: inherit;
  z-index: 0;
}
.nav-dropdown-menu-inner a {
  display: block;
  padding: 9px 14px;
  font-size: 13px;
  color: #94a3b8;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.2s;
  text-decoration: none;
  position: relative;
  z-index: 1;
}
.nav-dropdown-menu-inner a:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 100%);
  color: #fff;
  text-decoration: none;
}

/* ── Right section ─────────────────────────────────────────────────── */
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.nav-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  color: #94a3b8;
}
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6), 0 0 16px rgba(16, 185, 129, 0.3);
  animation: pulse-dot 2s ease-in-out infinite;
}
.status-dot.disconnected {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6), 0 0 16px rgba(239, 68, 68, 0.3);
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 8px rgba(16, 185, 129, 0.6), 0 0 16px rgba(16, 185, 129, 0.3); }
  50% { box-shadow: 0 0 12px rgba(16, 185, 129, 0.8), 0 0 24px rgba(16, 185, 129, 0.5); }
}
.status-label {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 10px;
  opacity: 0.7;
}
.nav-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.1);
}
.nav-time {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--mono, 'JetBrains Mono', monospace);
}
.nav-time-label {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.5;
  color: #94a3b8;
}
.nav-time-value {
  font-size: 13px;
  color: var(--text, #e2e8f0);
  line-height: 1;
}

/* ── Burger button (hidden on desktop) ─────────────────────────────── */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 0;
}
.nav-burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #e2e8f0;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile overlay + drawer ───────────────────────────────────────── */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 150;
}
.mobile-nav-overlay.open { display: block; }

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100vh;
  background: rgba(10, 10, 20, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
  overflow-y: auto;
}
.mobile-nav-drawer.open { right: 0; }

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.mobile-nav-brand {
  font-weight: 700;
  font-size: 16px;
  color: #fff;
}
.mobile-nav-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
.mobile-nav-close:hover { color: #fff; }

.mobile-nav-links {
  flex: 1;
  padding: 16px 0;
}
.mobile-nav-category {
  padding: 12px 24px 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #64748b;
}
.mobile-nav-link {
  display: block;
  padding: 12px 24px;
  font-size: 14px;
  color: #94a3b8;
  text-decoration: none;
  transition: all 0.15s;
  border-left: 2px solid transparent;
}
.mobile-nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}
.mobile-nav-link.active {
  color: #00d4ff;
  border-left-color: #00d4ff;
  background: rgba(0, 212, 255, 0.06);
}
.mobile-nav-link.sub {
  padding-left: 40px;
  font-size: 13px;
}

.mobile-nav-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .nav-center { gap: 4px; }
  .nav-item { padding: 6px 12px; font-size: 12px; }
}

@media (max-width: 768px) {
  .navbar { width: 98%; padding: 0 16px; }
  .nav-center { display: none; }
  .nav-right { display: none; }
  .nav-burger { display: flex; }
}
