/* Reinforcing styles with ID specificity to override Dimension template */
#pill-nav-root {
    position: absolute !important;
    top: 20px !important;
    /* Aligned with music control */
    left: 20px !important;
    z-index: 99;
}

@media (max-width: 768px) {
    #pill-nav-root {
        width: 100%;
        left: 0 !important;
        padding: 0 1rem;
        box-sizing: border-box;
    }
}

#pill-nav-root .pill-nav {
    --nav-h: 42px;
    --logo: 36px;
    --pill-pad-x: 18px;
    --pill-gap: 3px;
    /* Defaults */
    --base: #000000;
    --pill-bg: #ffffff;
    --hover-text: #ffffff;
    --pill-text: #000000;

    width: max-content;
    display: flex !important;
    align-items: center;
    box-sizing: border-box;
    gap: 10px;
}

@media (max-width: 768px) {
    #pill-nav-root .pill-nav {
        width: 100%;
        justify-content: space-between;
        padding: 0;
        background: transparent;
    }
}

#pill-nav-root .pill-nav-items {
    position: relative;
    display: flex !important;
    align-items: center;
    height: var(--nav-h) !important;
    background: var(--base, #000) !important;
    border-radius: 9999px !important;
    padding: 0 !important;
    /* Reverted to original */
}

#pill-nav-root .pill-logo {
    width: var(--nav-h) !important;
    height: var(--nav-h) !important;
    border-radius: 50% !important;
    background: var(--base, #000) !important;
    padding: 8px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: none !important;
}

#pill-nav-root .pill-logo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

#pill-nav-root .pill-list {
    list-style: none !important;
    display: flex !important;
    align-items: stretch !important;
    gap: var(--pill-gap);
    margin: 0 !important;
    padding: 3px !important;
    height: 100% !important;
}

#pill-nav-root .pill-list>li {
    display: flex !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

#pill-nav-root .pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
    padding: 0 var(--pill-pad-x) !important;
    background: var(--pill-bg, #fff) !important;
    color: var(--pill-text, var(--base, #000)) !important;
    text-decoration: none !important;
    border-radius: 9999px !important;
    box-sizing: border-box !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    line-height: normal !important;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    white-space: nowrap !important;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: none !important;
}

#pill-nav-root .pill:hover {
    border: none !important;
    color: var(--pill-text, var(--base, #000)) !important;
}

#pill-nav-root .pill .hover-circle {
    position: absolute;
    left: 50%;
    bottom: 0;
    border-radius: 50%;
    background: var(--base, #000) !important;
    z-index: 1;
    display: block;
    pointer-events: none;
    will-change: transform;
}

#pill-nav-root .pill .label-stack {
    position: relative;
    display: inline-block;
    line-height: 1;
    z-index: 2;
}

#pill-nav-root .pill .pill-label {
    position: relative;
    z-index: 2;
    display: inline-block;
    line-height: 1;
    will-change: transform;
}

#pill-nav-root .pill .pill-label-hover {
    position: absolute;
    left: 0;
    top: 0;
    color: var(--hover-text, #fff) !important;
    z-index: 3;
    display: inline-block;
    will-change: transform, opacity;
}

#pill-nav-root .pill.is-active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: var(--base, #000) !important;
    border-radius: 50px;
    z-index: 4;
}

#pill-nav-root .desktop-only {
    display: block !important;
}

#pill-nav-root .mobile-only {
    display: none !important;
}

@media (max-width: 768px) {
    #pill-nav-root .desktop-only {
        display: none !important;
    }

    #pill-nav-root .mobile-only {
        display: block !important;
    }
}

/* Sidebar Styles */
#pill-nav-root .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

#pill-nav-root .sidebar-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    height: 100vh;
    background: rgba(15, 15, 15, 0.7) !important;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 999;
    padding: 3rem 2rem;
    box-shadow: 20px 0 40px rgba(0, 0, 0, 0.6);
    transform: translateX(-100%);
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

#pill-nav-root .sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 1.5rem;
}

#pill-nav-root .sidebar-title {
    font-size: 1.2rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 5px;
}

#pill-nav-root .sidebar-close {
    background: none !important;
    border: none !important;
    /* Forces no border */
    outline: none !important;
    /* Removes focus outline */
    box-shadow: none !important;
    /* Removes shadow if any */
    color: var(--pill-bg, #fff);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease;
}

#pill-nav-root .sidebar-close:hover {
    transform: rotate(90deg);
    color: var(--hover-text, #fff);
}

#pill-nav-root .sidebar-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#pill-nav-root .mobile-menu-link {
    display: flex !important;
    align-items: center;
    padding: 16px 20px !important;
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none !important;
    font-size: 1.15rem;
    font-weight: 400;
    border-radius: 12px !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid transparent !important;
    background: transparent !important;
    text-align: left;
    position: relative;
    overflow: hidden;
}

#pill-nav-root .mobile-menu-link:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    padding-left: 28px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#pill-nav-root .mobile-menu-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0%;
    background: #fff;
    border-radius: 0 4px 4px 0;
    transition: height 0.3s ease;
}

#pill-nav-root .mobile-menu-link:hover::before {
    height: 60%;
}

/* Hide original mobile button */
#pill-nav-root .mobile-menu-button {
    display: none !important;
}

/* Sidebar Footer (Socials & Copyright) */
#pill-nav-root .sidebar-footer {
    margin-top: auto;
    /* Pushes to the bottom of the flex container */
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

#pill-nav-root .sidebar-socials {
    display: flex;
    justify-content: center;
    gap: 1rem;
    width: 100%;
}

#pill-nav-root .sidebar-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#pill-nav-root .sidebar-socials a:hover {
    background: #fff;
    color: #000;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
    border-color: #fff;
}

#pill-nav-root .sidebar-socials a .label {
    display: none;
    /* Hide FontAwesome text labels */
}

#pill-nav-root .sidebar-copyright {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 300;
}