/* ========================================
   PillNav CSS — React Bits Style
   ======================================== */
.pill-nav-container {
    position: fixed;
    top: 1em;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
}

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

.pill-nav {
    --nav-h: 42px;
    --logo: 42px;
    --pill-pad-x: 18px;
    --pill-gap: 3px;
    --base: #0a0000;
    --pill-bg: #F5F0F0;
    --hover-text: #F5F0F0;
    --pill-text: #1a0505;
    width: max-content;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    gap: 8px;
}

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

.pill-nav-items {
    position: relative;
    display: flex;
    align-items: center;
    height: var(--nav-h);
    background: var(--base);
    border-radius: 9999px;
    border: 1px solid rgba(139, 0, 0, 0.3);
}

.pill-logo {
    width: var(--logo);
    height: var(--logo);
    border-radius: 50%;
    background: var(--base);
    border: 1px solid rgba(139, 0, 0, 0.3);
    padding: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s ease;
}
.pill-logo:hover { transform: scale(1.05); }
.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: 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);
    color: var(--pill-text);
    text-decoration: none;
    border-radius: 9999px;
    box-sizing: border-box;
    font-weight: 600;
    font-size: 14px;
    font-family: 'Inter', 'Noto Sans SC', -apple-system, sans-serif;
    line-height: 0;
    text-transform: none;
    letter-spacing: 0.2px;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.pill .hover-circle {
    position: absolute;
    left: 50%;
    bottom: 0;
    border-radius: 50%;
    background: var(--base);
    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);
    z-index: 3;
    display: inline-block;
    will-change: transform, opacity;
}

.pill.is-active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: #DC143C;
    border-radius: 50px;
    z-index: 4;
}

/* Nav extras (lang toggle + download) */
.nav-extras {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--nav-h);
    height: var(--nav-h);
    border-radius: 50%;
    border: 1px solid rgba(139, 0, 0, 0.3);
    background: var(--base);
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 1rem;
}
.lang-toggle:hover { background: rgba(139, 0, 0, 0.2); }

.nav-download-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    height: var(--nav-h);
    padding: 0 16px;
    background: #8B0000;
    color: #F5F0F0;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', 'Noto Sans SC', -apple-system, sans-serif;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
    border: 1px solid rgba(139, 0, 0, 0.3);
    white-space: nowrap;
}
.nav-download-btn:hover { background: #A31621; transform: translateY(-1px); }

/* Desktop / Mobile */
.desktop-only { display: block; }
.mobile-only { display: none; }

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

/* Mobile Menu Button */
.mobile-menu-button {
    width: var(--nav-h);
    height: var(--nav-h);
    border-radius: 50%;
    background: var(--base);
    border: 1px solid rgba(139, 0, 0, 0.3);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    padding: 0;
}
@media (max-width: 768px) { .mobile-menu-button { display: flex; } }

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

/* Mobile Menu Popover */
.mobile-menu-popover {
    position: absolute;
    top: 3.5em;
    left: 1rem;
    right: 1rem;
    background: #0a0000;
    border: 1px solid rgba(139, 0, 0, 0.3);
    border-radius: 27px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transform-origin: top center;
}

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

.mobile-menu-popover .mobile-menu-link {
    display: block;
    padding: 12px 16px;
    color: #1a0505;
    background-color: #F5F0F0;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Inter', 'Noto Sans SC', -apple-system, sans-serif;
    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: #8B0000;
    color: #F5F0F0;
}
