.lobbynite-avatar-wrap {
    position: relative;
    display: inline-block;
}

.lobbynite-avatar-wrap.is-vip > img {
    filter: saturate(1.08) sepia(.08);
}

/* Keep the decorative style reusable without forcing every VIP label to be
   absolutely positioned (for example, the badge in the admin users table). */
.lobbynite-vip-badge {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 4px 8px;
    border: 2px solid #111827;
    border-radius: 999px;
    background: linear-gradient(110deg, #ff3d81, #ff9f43, #ffe66d, #35e0a1, #39b8ff, #9b5cff, #ff3d81);
    background-size: 320% 100%;
    color: #fff;
    font: 900 10px/1.1 Arial, sans-serif;
    letter-spacing: .08em;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .55);
    box-shadow: 0 3px 10px rgba(0, 0, 0, .45), 0 0 12px rgba(155, 92, 255, .5);
    animation: lobbynite-vip-rainbow 4s linear infinite;
}

/* Compact avatar contexts keep their badge on the image. */
.lobbynite-avatar-wrap > .lobbynite-vip-badge {
    position: absolute;
    top: 8px;
    right: -6px;
    z-index: 2;
}

/* The profile page has a dedicated badge rail below the avatar. */
.profile-header-avatar-badges .lobbynite-vip-badge {
    position: static;
    font-size: 11px;
    padding: 5px 9px;
}

/* Keep VIP and level on separate corners in the dashboard hero. */
.dash-hero-avatar-wrap > .lobbynite-vip-badge {
    top: 4px;
    right: -8px;
    bottom: auto;
    font-size: 10px;
    padding: 4px 7px;
}

.lobbynite-vip-badge i {
    margin-right: 2px;
}

.profile-header-avatar .profile-header-xp-badge {
    border-color: rgba(0, 212, 255, .38);
    background: linear-gradient(180deg, rgba(11, 19, 31, .94), rgba(4, 9, 16, .96));
    box-shadow: 0 8px 18px rgba(0, 0, 0, .26);
}

.lobbynite-og-badge {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 0;
    overflow: visible;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .55));
}

.lobbynite-og-badge img,
.profile-header-avatar .lobbynite-og-badge img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: contain;
}

/* OG badges outside the profile rail remain anchored to their avatar. */
.lobbynite-avatar-wrap > .lobbynite-og-badge {
    position: absolute;
    right: -8px;
    bottom: 8px;
    z-index: 3;
}

.profile-header-avatar-badges .lobbynite-og-badge {
    position: static;
}

.lobbynite-quiz-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .48));
}

.lobbynite-quiz-badge img,
.profile-header-avatar .profile-header-avatar-badges .lobbynite-quiz-badge > img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lobbynite-quiz-badge strong {
    position: absolute;
    right: -2px;
    bottom: -1px;
    display: grid;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    place-items: center;
    border: 2px solid #071235;
    border-radius: 999px;
    color: #071235;
    background: #32dcff;
    font: 900 8px/1 Arial, sans-serif;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .45);
}

@media (max-width: 768px) {
    .profile-header-avatar-badges .lobbynite-vip-badge {
        font-size: 10px;
        padding: 4px 7px;
    }

    .profile-header-avatar-badges .lobbynite-og-badge {
        width: 44px;
        height: 44px;
    }

    .profile-header-avatar-badges .lobbynite-quiz-badge {
        width: 36px;
        height: 36px;
    }
}

@keyframes lobbynite-vip-rainbow {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}
