/* ========= PREMIUM NAVBAR ========= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(10, 14, 26, 0.6);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.06);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.navbar.scrolled {
  background: rgba(10, 14, 26, 0.92);
  border-bottom-color: rgba(139, 92, 246, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3), 0 0 40px rgba(139, 92, 246, 0.03);
}
.navbar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(139, 92, 246, 0.2) 20%,
    rgba(59, 130, 246, 0.15) 50%,
    rgba(6, 182, 212, 0.2) 80%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}
.navbar.scrolled::after {
  opacity: 1;
}

.navbar-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-decoration: none;
  transition: transform 0.2s ease;
}
.logo:hover {
  transform: scale(1.02);
}
.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #8b5cf6, #6366f1, #3b82f6);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(139, 92, 246, 0.3);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.logo-icon svg {
  width: 22px;
  height: 22px;
}
.logo:hover .logo-icon {
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.5);
}
.logo-text {
  background: linear-gradient(135deg, #c4b5fd, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.25s ease;
  position: relative;
  padding: 8px 16px;
  border-radius: var(--radius-md);
}
.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}
.nav-link.active {
  color: var(--text-primary);
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
}

/* Sync button */
.sync-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  padding: 7px 14px;
  cursor: pointer;
  background: rgba(139, 92, 246, 0.08);
  color: var(--accent-primary-light);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: var(--radius-full);
  margin-right: 4px;
  transition: all 0.25s ease;
  font-weight: 500;
}
.sync-btn:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-1px);
}
.sync-btn svg {
  transition: transform 0.4s ease;
}
.sync-btn:hover svg {
  transform: rotate(180deg);
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all 0.25s ease;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.mobile-menu-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}
.mobile-menu-btn.active svg line:nth-child(1) {
  transform: rotate(45deg) translate(5px, -3px);
  transform-origin: center;
}
.mobile-menu-btn.active svg line:nth-child(2) {
  opacity: 0;
}
.mobile-menu-btn.active svg line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, 3px);
  transform-origin: center;
}
.mobile-menu-btn svg line {
  transition: all 0.3s ease;
}

/* ========= RESPONSIVE ========= */

/* Tablet */
@media (max-width: 1024px) {
  .navbar {
    padding: 0 1.25rem;
  }
  .nav-link {
    padding: 7px 12px;
    font-size: 0.85rem;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .navbar {
    padding: 0 1rem;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 14, 26, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
    padding: 1rem;
    gap: 0.25rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: mobileMenuSlide 0.25s ease;
  }

  .nav-links.mobile-open {
    display: flex;
  }

  @keyframes mobileMenuSlide {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .nav-link {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
  }
  .nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
  }
  .nav-link.active::after {
    display: none;
  }

  .sync-btn {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
    font-size: 0.9rem;
    margin-right: 0;
  }

  .logo-text {
    font-size: 1.15rem;
  }
  .logo-icon {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }
}

/* Small phones */
@media (max-width: 380px) {
  .navbar {
    padding: 0 0.75rem;
  }
}
