.pill-nav-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  transition: filter .3s ease;
}

.pill-nav-container.scrolled .pill-nav-items,
.pill-nav-container.scrolled .pill-logo,
.pill-nav-container.scrolled .mobile-menu-button {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
}

@media (max-width: 768px) {
  .pill-nav-container {
    width: 100%;
    left: 0;
    transform: none;
    top: 16px;
  }
}

.pill-nav {
  --nav-h: 56px;
  --logo: 48px;
  --pill-pad-x: 28px;
  --pill-gap: 4px;
  width: max-content;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .pill-nav {
    width: 100%;
    justify-content: space-between;
    padding: 0 16px;
    background: transparent;
  }
}

.pill-nav-items {
  position: relative;
  display: flex;
  align-items: center;
  height: var(--nav-h);
  background: var(--base, #0f0f0f);
  border-radius: 9999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow .3s ease;
}

.pill-logo {
  width: var(--nav-h);
  height: var(--nav-h);
  border-radius: 50%;
  background: var(--base, #0f0f0f);
  padding: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-right: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transition: box-shadow .3s ease;
}

.pill-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pill-list {
  list-style: none;
  display: flex;
  align-items: stretch;
  gap: var(--pill-gap);
  margin: 0;
  padding: 4px;
  height: 100%;
}

.pill-list > li {
  display: flex;
  height: 100%;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 var(--pill-pad-x);
  background: var(--pill-bg, #ffffff);
  color: var(--pill-text, var(--base));
  text-decoration: none;
  border-radius: 9999px;
  box-sizing: border-box;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 0;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.pill .hover-circle {
  position: absolute;
  left: 50%;
  bottom: 0;
  border-radius: 50%;
  background: var(--item-color, var(--base, #0f0f0f));
  z-index: 1;
  display: block;
  pointer-events: none;
  will-change: transform;
}

.pill .label-stack {
  position: relative;
  display: inline-block;
  line-height: 1;
  z-index: 2;
}

.pill .pill-label {
  position: relative;
  z-index: 2;
  display: inline-block;
  line-height: 1;
  will-change: transform;
}

.pill .pill-label-hover {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--hover-text, #ffffff);
  z-index: 3;
  display: inline-block;
  will-change: transform, opacity;
}

.pill.is-active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  background: var(--item-color, #34A853);
  border-radius: 50px;
  z-index: 4;
}

.desktop-only { display: block; }
.mobile-only { display: none; }

@media (max-width: 768px) {
  .desktop-only { display: none; }
  .mobile-only { display: block; }
}

.mobile-menu-button {
  width: var(--nav-h);
  height: var(--nav-h);
  border-radius: 50%;
  background: var(--base, #0f0f0f);
  border: none;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transition: box-shadow .3s ease;
}

@media (max-width: 768px) {
  .mobile-menu-button { display: flex; }
}

.hamburger-line {
  width: 20px;
  height: 2px;
  background: var(--pill-bg, #ffffff);
  border-radius: 1px;
  transition: all 0.01s ease;
  transform-origin: center;
}

.mobile-menu-popover {
  position: fixed;
  top: 80px;
  left: 16px;
  right: 16px;
  background: var(--base, #ffffff);
  border-radius: 28px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  z-index: 999;
  opacity: 0;
  transform-origin: top center;
  visibility: hidden;
  padding: 8px;
}

.mobile-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu-popover .mobile-menu-link {
  display: block;
  padding: 16px 24px;
  color: var(--pill-text, #ffffff);
  background-color: var(--pill-bg, #ffffff);
  text-decoration: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 18px;
  font-weight: 500;
  border-radius: 50px;
  transition: all 0.2s ease;
}

.mobile-menu-popover .mobile-menu-link:hover,
.mobile-menu-popover .mobile-menu-link.is-active {
  background-color: var(--item-color, var(--base));
  color: var(--hover-text, #ffffff);
}

