.navbar {
    background-color: rgba(15, 15, 15, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 1.6rem;
    border-radius: 50px;
    margin: 0 auto;
    max-width: 1050px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
    position: fixed;
    top: 18px;
    left: 0;
    right: 0;
    z-index: 1000;
}

.logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

.nav-links {
    list-style: none;
    display: flex;
    gap: 0;
    align-items: center;
}

.nav-links li a {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0.75rem;
    border-radius: 50px;
    border: 1px solid transparent;
    background: transparent;
    position: relative;
    z-index: 1;
    transition: color 0.18s ease;
    display: block;
    line-height: 1.4;
}

.nav-links li a:hover,
.nav-links li a.nav-active {
    color: #007bff;
}

/* Sliding pill */
.nav-pill {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: calc(100% - 8px);
    border-radius: 7px;
    border: 1px solid rgba(0, 123, 255, 0.35);
    background: rgba(0, 123, 255, 0.12);
    pointer-events: none;
    transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.18s ease;
    opacity: 0;
    z-index: 0;
}

.center-nav {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    padding: 4px 2px;
}

.center-nav li {
    margin: 0 -4px;
}

.center-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.login-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.discord-icon {
    text-decoration: none;
    line-height: 1;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #5865F2;
    border: 1px solid #8892fa;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    color: white;
    box-shadow: 0 0 8px rgba(136, 146, 250, 0.5);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.discord-icon i {
    text-decoration: none;
    display: block;
    line-height: 1;
}

.discord-login {
    background: linear-gradient(145deg, #003e8c, #007bff);
    border: 1px solid #3399ff;
    color: white;
    font-weight: 500;
    border-radius: 999px;
    padding: 0.65rem 1.4rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    box-shadow: 0 0 8px rgba(51, 153, 255, 0.5);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.discord-login:hover {
    box-shadow: 0 0 14px rgba(51, 153, 255, 0.8);
    transform: scale(1.02);
}

.discord-icon:hover {
    box-shadow: 0 0 14px rgba(136, 146, 250, 0.8);
    transform: scale(1.02);
}

/* Burger menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
    margin-left: 16px;
}

.bar {
    width: 30px;
    height: 4px;
    background-color: white;
    margin: 4px 0;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.menu-toggle.active .bar {
    background-color: transparent;
}

.mobile-only {
    display: none;
}

.close-menu {
    display: none;
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 35px;
    color: white;
    cursor: pointer;
    z-index: 1002;
    transition: transform 0.2s ease;
}

.close-menu:hover {
    transform: scale(1.1);
}

@media screen and (max-width: 768px) {
    .close-menu {
        display: none;
    }

    .navbar {
        padding: 0.55rem 1rem;
        max-width: calc(100% - 24px);
        top: 10px;
        border-radius: 50px;
    }

    .logo {
        width: 38px;
        height: 38px;
    }

    .menu-toggle {
        display: flex;
        background: rgba(255,255,255,0.06);
        border: 1px solid rgba(255,255,255,0.1);
        border-radius: 50%;
        width: 38px;
        height: 38px;
        padding: 0;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 0;
        margin-left: 0;
    }

    .bar {
        width: 18px;
        height: 2px;
        margin: 2.5px 0;
    }

    .nav-links {
        display: flex;
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100dvh;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 10px;
        padding: 80px 24px 48px;
        background: #0b0c12;
        z-index: 999;
        transform: translateY(-8px);
        opacity: 0;
        transition: transform 0.3s ease, opacity 0.25s ease;
        pointer-events: none;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .navbar { z-index: 1000; }
    .navbar.menu-open {
        background: #0b0c12 !important;
        border-color: rgba(255,255,255,0.06) !important;
        backdrop-filter: none !important;
        box-shadow: none !important;
    }

    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
        background: #fff;
    }
    .menu-toggle.active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
        background: #fff;
    }
    .menu-toggle .bar { transition: transform 0.25s ease, opacity 0.2s ease; }

    .close-menu { display: none !important; }

    .nav-links li,
    .mobile-buttons-row {
        opacity: 0;
        transform: translateY(12px);
        transition: opacity 0.28s ease, transform 0.28s ease;
    }
    .nav-links.active li { opacity: 1; transform: translateY(0); }
    .nav-links.active li:nth-child(1) { transition-delay: 0.04s; }
    .nav-links.active li:nth-child(2) { transition-delay: 0.08s; }
    .nav-links.active li:nth-child(3) { transition-delay: 0.12s; }
    .nav-links.active li:nth-child(4) { transition-delay: 0.16s; }
    .nav-links.active li:nth-child(5) { transition-delay: 0.20s; }
    .nav-links.active .mobile-buttons-row {
        opacity: 1; transform: translateY(0); transition-delay: 0.26s;
    }

    .nav-links li {
        margin: 0; padding: 0;
        width: 100%;
    }

    .nav-links li a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        font-size: 1.05rem;
        font-weight: 600;
        padding: 15px 24px;
        border-radius: 999px;
        color: rgba(255,255,255,0.65);
        background: rgba(255,255,255,0.05);
        border: 1px solid rgba(255,255,255,0.08);
        text-align: center;
        transition: color 0.18s, background 0.18s, border-color 0.18s;
    }

    .nav-links li a:hover {
        color: #fff;
        background: rgba(255,255,255,0.09);
        border-color: rgba(255,255,255,0.14);
    }

    .nav-links li a.nav-active {
        color: #4A9EFF;
        background: rgba(74,158,255,0.1);
        border-color: rgba(74,158,255,0.35);
    }

    .mobile-only { display: flex !important; }

    .mobile-buttons-row {
        display: flex;
        gap: 10px;
        width: 100%;
        margin-top: 10px;
    }

    .discord-icon.mobile-only {
        width: 54px; height: 54px;
        font-size: 20px;
        border-radius: 999px;
        background: #5865F2;
        border: 1px solid rgba(136,146,250,0.5);
        flex-shrink: 0;
        align-items: center; justify-content: center;
        color: #fff;
        text-decoration: none;
    }

    .discord-login.mobile-only {
        flex: 1;
        height: 54px;
        background: linear-gradient(145deg, #003e8c, #007bff);
        border: 1px solid rgba(51,153,255,0.4);
        color: white;
        font-size: 1rem;
        font-weight: 600;
        border-radius: 999px;
        align-items: center;
        justify-content: center;
        gap: 8px;
        text-decoration: none;
    }

    .login-buttons { display: none; }

    .nav-pill { display: none !important; }
    .center-nav { display: contents; }
}

@media screen and (max-width: 768px) {
    .center-nav {
        position: static;
        transform: none;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        width: 100%;
    }
}
