.aw-badge-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 20% 20%, rgba(255,208,122,0.22), transparent 45%),
        radial-gradient(circle at 80% 30%, rgba(122,200,255,0.24), transparent 40%),
        rgba(12, 12, 18, 0.72);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 260ms ease;
}

.aw-badge-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.aw-badge-card {
    position: relative;
    width: min(92vw, 520px);
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(240,244,255,0.88));
    border-radius: 24px;
    padding: 28px 28px 24px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.35);
    text-align: center;
    font-family: 'Space Grotesk', 'Source Sans Pro', system-ui, sans-serif;
    transform: translateY(26px) scale(0.96);
    transition: transform 380ms cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}

.aw-badge-overlay.is-visible .aw-badge-card {
    transform: translateY(0) scale(1);
    animation: aw-card-in 520ms cubic-bezier(0.22, 1.15, 0.36, 1),
        aw-card-float 2.6s ease-in-out 520ms infinite;
}

.aw-badge-card::after {
    content: '';
    position: absolute;
    top: -60%;
    left: -40%;
    width: 120%;
    height: 120%;
    background: linear-gradient(120deg, transparent 35%, rgba(255,255,255,0.6) 50%, transparent 65%);
    transform: translateX(-120%) rotate(8deg);
    opacity: 0.8;
    pointer-events: none;
}

.aw-badge-overlay.is-visible .aw-badge-card::after {
    animation: aw-sheen 1200ms ease-out 200ms;
}

.aw-badge-ring {
    position: absolute;
    inset: -14px;
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
    pointer-events: none;
}

.aw-badge-glow {
    position: absolute;
    inset: -40px;
    border-radius: 30px;
    background: radial-gradient(circle, rgba(255,214,140,0.45), transparent 70%);
    filter: blur(6px);
    opacity: 0.8;
    animation: aw-glow 2.2s ease-in-out infinite;
    pointer-events: none;
}

.aw-badge-icon {
    width: 86px;
    height: 86px;
    border-radius: 24px;
    margin: 0 auto 16px;
    background: linear-gradient(140deg, rgba(255,255,255,0.9), rgba(230,236,255,0.9));
    display: grid;
    place-items: center;
    font-size: 36px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    position: relative;
    letter-spacing: 0.04em;
    animation: aw-icon-pop 520ms cubic-bezier(0.22, 1.25, 0.36, 1);
}

.aw-badge-icon::after {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 28px;
    border: 2px dashed rgba(255,172,84,0.45);
    animation: aw-spin 6s linear infinite;
}

.aw-badge-title {
    font-size: 28px;
    margin: 0 0 6px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #1b1e27;
}

.aw-badge-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #0e3c69;
}

.aw-badge-desc {
    font-size: 14px;
    color: #4c5a6a;
    margin: 0;
}

.aw-badge-tier {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255,172,84,0.2);
    color: #944800;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 14px;
}

.aw-badge-close {
    margin-top: 18px;
    background: #111827;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}

@keyframes aw-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes aw-card-in {
    0% {
        transform: translateY(30px) scale(0.92);
        opacity: 0;
    }
    60% {
        transform: translateY(-6px) scale(1.02);
        opacity: 1;
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

@keyframes aw-card-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-6px) scale(1); }
}

@keyframes aw-icon-pop {
    0% { transform: scale(0.6) rotate(-8deg); opacity: 0; }
    60% { transform: scale(1.08) rotate(3deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes aw-glow {
    0%, 100% { opacity: 0.65; }
    50% { opacity: 1; }
}

@keyframes aw-sheen {
    0% { transform: translateX(-120%) rotate(8deg); }
    100% { transform: translateX(140%) rotate(8deg); }
}

@media (prefers-reduced-motion: reduce) {
    .aw-badge-overlay,
    .aw-badge-card,
    .aw-badge-icon::after,
    .aw-badge-glow,
    .aw-badge-card::after,
    .aw-badge-icon {
        animation: none !important;
        transition: none !important;
    }
}
