
/* ==========================================================================
   PERFECT WORLD: ABYSSAL WAR — Animated GRANDMASTER Crest Badge
   ========================================================================== */
.aw-gm-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.aw-grandmaster-badge,
.cb-role-pill[data-role="super-admin"] {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    padding: 3px 10px 3px 8px !important;
    font-family: 'Cinzel', Georgia, serif !important;
    font-size: 9.5px !important;
    font-weight: 800 !important;
    letter-spacing: 0.16em !important;
    text-transform: uppercase;
    color: #FFF4D4 !important;
    background: linear-gradient(125deg, #2B170A 0%, #5B3812 28%, #8F1830 58%, #1E2E52 84%, #2B170A 100%) !important;
    background-size: 260% 260% !important;
    border: 1px solid rgba(244, 218, 162, 0.78) !important;
    border-radius: 3px !important;
    overflow: hidden;
    vertical-align: middle;
    box-shadow:
        0 0 12px rgba(212, 175, 106, 0.38),
        0 0 22px rgba(46, 149, 255, 0.22),
        inset 0 1px 0 rgba(255, 248, 224, 0.45) !important;
    animation:
        awGmGradientFlow 4.5s ease-in-out infinite,
        awGmAuraPulse 2.8s ease-in-out infinite !important;
}

.aw-grandmaster-badge.aw-gm-size-md {
    padding: 5px 13px 5px 10px !important;
    font-size: 11px !important;
    gap: 7px;
}

.aw-grandmaster-badge .aw-gm-shine {
    position: absolute;
    top: -40%;
    left: -60%;
    width: 48%;
    height: 180%;
    background: linear-gradient(105deg, transparent 0%, rgba(255, 248, 220, 0.58) 50%, transparent 100%);
    transform: skewX(-22deg);
    animation: awGmShimmer 3.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    pointer-events: none;
}

.aw-grandmaster-badge .aw-gm-crown {
    width: 12px;
    height: 12px;
    color: #F8DF9C;
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(244, 218, 162, 0.85));
    animation: awGmCrownFloat 2.4s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

.aw-grandmaster-badge.aw-gm-size-md .aw-gm-crown {
    width: 14px;
    height: 14px;
}

.aw-grandmaster-badge .aw-gm-text {
    position: relative;
    z-index: 1;
    background: linear-gradient(180deg, #FFFDF2 0%, #F4DAA2 58%, #D4AF6A 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 1px 10px rgba(212, 175, 106, 0.35);
}

@keyframes awGmGradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes awGmAuraPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(212, 175, 106, 0.34), 0 0 18px rgba(46, 149, 255, 0.16), inset 0 1px 0 rgba(255, 248, 224, 0.45);
        border-color: rgba(244, 218, 162, 0.72);
    }
    50% {
        box-shadow: 0 0 18px rgba(244, 218, 162, 0.68), 0 0 28px rgba(46, 149, 255, 0.38), inset 0 1px 0 rgba(255, 248, 224, 0.75);
        border-color: rgba(255, 240, 198, 0.96);
    }
}

@keyframes awGmShimmer {
    0% { left: -70%; opacity: 0; }
    15% { opacity: 1; }
    55% { left: 135%; opacity: 1; }
    56%, 100% { left: 135%; opacity: 0; }
}

@keyframes awGmCrownFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-1.2px) scale(1.09); }
}

@media (prefers-reduced-motion: reduce) {
    .aw-grandmaster-badge,
    .cb-role-pill[data-role="super-admin"],
    .aw-grandmaster-badge .aw-gm-shine,
    .aw-grandmaster-badge .aw-gm-crown {
        animation: none !important;
    }
}
