.pill-nav-container {
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99;
}

@media (max-width: 768px) {
    .pill-nav-container {
        width: calc(100% - 2rem);
        left: 1rem;
        transform: none;
    }
}

.pill-nav {
    --nav-h: 42px;
    --logo: 36px;
    --pill-pad-x: 18px;
    --pill-gap: 3px;
    width: max-content;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    gap: 0.5rem;
}

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

.pill-nav-items {
    position: relative;
    display: flex;
    align-items: center;
    height: var(--nav-h);
    background: var(--base, #000);
    border-radius: 9999px;
}

.pill-logo {
    width: var(--nav-h);
    height: var(--nav-h);
    border-radius: 50%;
    background: var(--base, #000);
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.pill-logo:hover {
    transform: rotate(360deg);
}

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

.pill-list {
    list-style: none;
    display: flex;
    align-items: stretch;
    gap: var(--pill-gap);
    margin: 0;
    padding: 3px;
    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, #fff);
    color: var(--pill-text, #000);
    text-decoration: none;
    border-radius: 9999px;
    box-sizing: border-box;
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.pill .hover-circle {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--base, #000);
    z-index: 1;
    display: block;
    pointer-events: none;
    will-change: transform;
    transform: translateX(-50%) scale(0);
    transform-origin: 50% 100%;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.pill:hover .hover-circle {
    transform: translateX(-50%) scale(1.5);
}

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

.pill .pill-label {
    position: relative;
    z-index: 2;
    display: inline-block;
    line-height: 1;
    will-change: transform;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.pill:hover .pill-label {
    transform: translateY(-150%);
}

.pill .pill-label-hover {
    position: absolute;
    left: 0;
    top: 150%;
    color: var(--hover-text, #fff);
    z-index: 3;
    display: inline-block;
    line-height: 1;
    will-change: transform, opacity;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
}

.pill:hover .pill-label-hover {
    opacity: 1;
    transform: translateY(-150%);
}

.pill.is-active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--base, #000);
    border-radius: 50%;
    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, #000);
    border: none;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    padding: 0;
    position: relative;
}

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

.hamburger-line {
    width: 16px;
    height: 2px;
    background: var(--pill-bg, #fff);
    border-radius: 1px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center;
}

.mobile-menu-button.active .hamburger-line:first-child {
    transform: rotate(45deg) translateY(3px);
}

.mobile-menu-button.active .hamburger-line:last-child {
    transform: rotate(-45deg) translateY(-3px);
}

.mobile-menu-popover {
    position: absolute;
    top: calc(var(--nav-h) + 1rem);
    left: 0;
    right: 0;
    background: var(--base, #000);
    border-radius: 27px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 998;
    opacity: 0;
    transform: translateY(-10px) scaleY(0.95);
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: top center;
}

.mobile-menu-popover.active {
    opacity: 1;
    transform: translateY(0) scaleY(1);
    visibility: visible;
}

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

.mobile-menu-link {
    display: block;
    padding: 12px 16px;
    color: var(--pill-text, #000);
    background-color: var(--pill-bg, #fff);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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