/* ── scroll progress line ── */
nav::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  height: 1.5px;
  width: var(--scroll-pct, 0%);
  background: linear-gradient(90deg,
    rgba(124,58,237,0) 0%,
    #a855f7 20%,
    #c084fc 50%,
    #a855f7 80%,
    rgba(168,85,247,0) 100%);
  box-shadow: 0 0 6px rgba(168,85,247,0.7), 0 0 18px rgba(168,85,247,0.3);
  transition: width 0.12s linear;
  z-index: 10;
}


/* ── Logo ── */
.nav-logo {
  display: flex; align-items: center; gap: 0;
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(0.48rem, 1.2vw, 0.62rem);
  color: #fff;
  white-space: nowrap;
  transition: all 0.25s;
  min-width: 0;
  flex-shrink: 0;
  text-decoration: none;
  position: relative;
}
.nav-logo:hover { opacity: 0.9; transform: translateY(-1px); transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.34,1.56,0.64,1); }

/* Logo image with animated ring */
.nav-logo-img-wrap {
  position: relative;
  flex-shrink: 0;
}
.nav-logo img {
  height: 36px; width: 36px;
  object-fit: cover;
  border-radius: 10px;
  border: 1.5px solid rgba(168,85,247,0.55);
  box-shadow: 0 0 14px rgba(168,85,247,0.35), 0 0 0 0 rgba(168,85,247,0.25);
  display: block;
  position: relative; z-index: 1;
  transition: box-shadow 0.3s, border-color 0.3s;
}
.nav-logo:hover img {
  box-shadow: 0 0 22px rgba(168,85,247,0.6), 0 0 0 3px rgba(168,85,247,0.15);
  border-color: rgba(168,85,247,0.9);
}
/* rotating ring removed */

/* ── Keyframe animations (previously orphaned) ── */
@keyframes heroLogoRing {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.nav-logo-text {
  display: flex; flex-direction: column; gap: 3px; line-height: 1;
}
.nav-logo-title {
  font-size: clamp(0.48rem, 1.2vw, 0.62rem);
  font-family: 'Press Start 2P', monospace;
  color: #fff;
  letter-spacing: 0.5px;
  text-shadow: 0 0 12px rgba(168,85,247,0.5);
}
.nav-logo-sub {
  font-size: clamp(0.38rem, 0.8vw, 0.46rem);
  font-family: 'Press Start 2P', monospace;
  color: var(--green);
  letter-spacing: 1px;
  opacity: 0.85;
}

/* ── Desktop links container ── */
.nav-links {
  display: flex; align-items: center;
  gap: 2px;
  list-style: none;
  position: relative;
}

/* Sliding pill indicator — smoother, glowier */
.nav-pill-indicator {
  position: absolute;
  height: calc(100% - 8px);
  top: 4px;
  border-radius: 8px;
  background: linear-gradient(135deg,
    rgba(168,85,247,0.18) 0%,
    rgba(124,58,237,0.12) 100%);
  border: 1px solid rgba(168,85,247,0.28);
  box-shadow:
    0 0 0 0 rgba(168,85,247,0),
    inset 0 1px 0 rgba(255,255,255,0.06);
  pointer-events: none;
  transition:
    left   0.45s cubic-bezier(0.34,1.56,0.64,1),
    width  0.45s cubic-bezier(0.34,1.56,0.64,1),
    opacity 0.25s ease,
    box-shadow 0.3s ease;
  opacity: 0;
  z-index: 0;
}
.nav-pill-indicator.visible {
  box-shadow:
    0 0 14px rgba(168,85,247,0.2),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

.nav-links li { position: relative; z-index: 1; }
.nav-links a {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(0.42rem, 0.85vw, 0.5rem);
  color: var(--text-muted);
  letter-spacing: 0.5px;
  padding: 7px 10px;
  border-radius: 8px;
  display: flex; align-items: center; gap: 5px;
  position: relative; z-index: 1;
  white-space: nowrap; line-height: 1;
  transition:
    color 0.3s cubic-bezier(0.16,1,0.3,1),
    text-shadow 0.3s ease,
    transform 0.15s ease;
}
.nav-links a:active { transform: scale(0.94); }
.nav-links a .nav-link-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--green);
  opacity: 0;
  transform: scale(0) translateY(2px);
  transition:
    opacity  0.35s cubic-bezier(0.34,1.56,0.64,1),
    transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.nav-links a:hover {
  color: rgba(255,255,255,0.88);
}
.nav-links a.active {
  color: #fff;
  text-shadow: 0 0 12px rgba(192,132,252,0.5);
}
.nav-links a.active .nav-link-dot {
  opacity: 1;
  transform: scale(1) translateY(0);
}


/* ── LIVE badge ── */
.nav-badge {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(0.38rem, 0.75vw, 0.44rem);
  background: linear-gradient(135deg, rgba(168,85,247,0.25), rgba(124,58,237,0.2));
  color: var(--green);
  padding: 5px 10px 5px 8px;
  border-radius: 6px;
  letter-spacing: 1px;
  border: 1px solid rgba(168,85,247,0.35);
  display: inline-flex; align-items: center; gap: 6px;
  box-shadow: 0 0 10px rgba(168,85,247,0.12);
  position: relative;
  overflow: hidden;
}
.nav-badge::before {
  content: '';
  position: absolute; top: 50%; left: -30%;
  width: 20%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  transform: translateY(-50%) skewX(-20deg);
  animation: navBadgeShine 3s ease-in-out infinite;
}
@keyframes navBadgeShine { 0%{left:-30%} 100%{left:130%} }

/* live dot in badge */
.nav-badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #a855f7;
  box-shadow: 0 0 6px #a855f7;
  animation: liveDotPulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes liveDotPulse {
  0%,100% { box-shadow: 0 0 4px #a855f7; transform: scale(1); }
  50%      { box-shadow: 0 0 10px #a855f7, 0 0 18px rgba(168,85,247,0.4); transform: scale(1.3); }
}

/* ── Hamburger button — pill style ── */
.nav-hamburger {
  display: none;
  flex-direction: column; gap: 4px;
  background: rgba(168,85,247,0.08);
  border: 1px solid rgba(168,85,247,0.22);
  cursor: pointer;
  padding: 0;
  width: 42px; height: 42px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.nav-hamburger:hover {
  background: rgba(168,85,247,0.15);
  border-color: rgba(168,85,247,0.4);
  box-shadow: 0 0 12px rgba(168,85,247,0.2);
}
.nav-hamburger span {
  display: block; height: 2px;
  background: var(--green);
  border-radius: 2px;
  transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.nav-hamburger span:nth-child(1) { width: 18px; }
.nav-hamburger span:nth-child(2) { width: 14px; }
.nav-hamburger span:nth-child(3) { width: 10px; }
.nav-hamburger.open span:nth-child(1) { width: 18px; transform: translateY(6px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { width: 18px; opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { width: 18px; transform: translateY(-6px) rotate(-45deg); }

/* ── Scroll lock ── */
body.no-scroll { overflow-y: hidden !important; }

/* ── Mobile nav overlay ── */
.nav-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 1001;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Mobile Drawer — redesigned ── */
.nav-drawer {
  display: none;
  position: fixed;
  top: 0; left: 0; right: auto;
  width: min(62vw, 220px);
  height: 100svh;
  box-sizing: border-box;
  background: linear-gradient(160deg, #0c0f19 0%, #0e1120 60%, #100a1a 100%);
  border-right: 1px solid rgba(168,85,247,0.2);
  box-shadow: 12px 0 60px rgba(0,0,0,0.7), 1px 0 0 rgba(168,85,247,0.08);
  z-index: 1002;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  visibility: hidden;
  transform: translateX(-100%);
  transition: transform 0.5s cubic-bezier(0.34,1.2,0.64,1), visibility 0s linear 0.5s;
  display: flex; flex-direction: column;
}
.nav-drawer::-webkit-scrollbar { display: none; }
.nav-drawer.open {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.5s cubic-bezier(0.34,1.2,0.64,1), visibility 0s linear 0s;
}

/* Drawer: ambient glow top-right corner */
.nav-drawer::before {
  content: '';
  position: absolute; top: -40px; left: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168,85,247,0.14) 0%, transparent 70%);
  pointer-events: none;
}

/* Drawer header */
.nav-drawer-header {
  display: flex; align-items: center; gap: 12px;
  padding: calc(var(--nav-h) + 0.75rem) 0.75rem 0.75rem;
  position: relative;
}
.nav-drawer-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0.75rem; right: 0.75rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(168,85,247,0.3) 0%, rgba(168,85,247,0.05) 100%);
}
.nav-drawer-header img {
  width: 32px; height: 32px;
  border-radius: 8px;
  object-fit: cover;
  border: 1.5px solid rgba(168,85,247,0.45);
  box-shadow: 0 0 12px rgba(168,85,247,0.3);
}
.nav-drawer-header-text { display: flex; flex-direction: column; gap: 3px; }
.nav-drawer-header-text .dh-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.5rem;
  color: #fff;
  letter-spacing: 0.5px;
}
.nav-drawer-header-text .dh-sub {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.38rem;
  color: var(--green);
  letter-spacing: 1px;
}

/* drawer nav list */
.nav-drawer ul {
  list-style: none;
  display: flex; flex-direction: column;
  padding: 0.4rem 0.4rem;
  gap: 1px;
  flex: 1;
}
.nav-drawer ul li a {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(0.54rem, 1.3vw, 0.6rem);
  color: var(--text-muted);
  padding: 0.5rem 0.5rem;
  border-radius: 8px;
  letter-spacing: 0.5px;
  transition: color 0.2s, background 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}
.nav-drawer ul li a::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(168,85,247,0.1), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}
.nav-drawer ul li a:hover {
  color: #fff;
  transform: translateX(3px);
}
.nav-drawer ul li a:hover::before { opacity: 1; }
.nav-drawer ul li a.active-link {
  color: var(--green);
  background: rgba(168,85,247,0.08);
  border: 1px solid rgba(168,85,247,0.15);
}
/* drawer icon wrapper */
.nav-drawer ul li a .d-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(168,85,247,0.1);
  border: 1px solid rgba(168,85,247,0.12);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}
.nav-drawer ul li a:hover .d-icon,
.nav-drawer ul li a.active-link .d-icon {
  background: rgba(168,85,247,0.18);
  border-color: rgba(168,85,247,0.3);
}

/* drawer divider */
.nav-drawer-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(168,85,247,0.12) 0%, rgba(168,85,247,0.03) 100%);
  margin: 0.25rem 0.75rem;
}

/* drawer footer (server status pill at bottom) */
.nav-drawer-footer {
  padding: 0.75rem 0.75rem 1.25rem;
  border-top: 1px solid rgba(168,85,247,0.1);
  display: flex; align-items: center; gap: 10px;
}
.nav-drawer-status-pill {
  display: flex; align-items: center; gap: 8px;
  background: rgba(168,85,247,0.07);
  border: 1px solid rgba(168,85,247,0.18);
  border-radius: 20px;
  padding: 6px 12px 6px 8px;
  flex: 1;
}
.nav-drawer-status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #a855f7;
  box-shadow: 0 0 6px #a855f7;
  animation: liveDotPulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}
.nav-drawer-status-text {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.44rem;
  color: var(--green);
  letter-spacing: 1px;
}

/* ── Navigation ── */
.nav-logo { font-size: var(--f-nav) !important; }
.nav-links a { font-size: clamp(0.45rem, 0.9vw, 0.52rem) !important; }
.nav-badge { font-size: var(--f-2xs) !important; }
.nav-drawer-header span { font-size: var(--f-xs) !important; }
.nav-drawer ul li a { font-size: var(--f-sm) !important; }
.nav-drawer .nav-badge { font-size: var(--f-2xs) !important; }
