﻿.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    border: 2px solid rgba(255,255,255,0.2);
    position: relative;
    margin: 5px;

    /* Neon variables (overridden per badge) */
    --neon1: #79ffe1; /* primary glow */
    --neon2: #00e5ff; /* secondary glow */

    /* Keep text crisp (move glow to container/background instead of text) */
    text-shadow: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: geometricPrecision;
    -webkit-text-stroke: 0.2px rgba(0,0,0,0.25);
    box-shadow:
        0 2px 4px rgba(0,0,0,0.4),
        0 0 6px color-mix(in srgb, var(--neon1) 80%, transparent),
        0 0 12px color-mix(in srgb, var(--neon2) 70%, transparent),
        0 0 20px color-mix(in srgb, var(--neon1) 30%, transparent),
        inset 0 1px 0 rgba(255,255,255,0.2),
        inset 0 -1px 0 rgba(0,0,0,0.2);
}

.badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px;
    border-radius: 50%;
    font-size: 0.85rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3) inset,
                0 0 10px color-mix(in srgb, var(--neon1) 45%, transparent);
}

/* Decorative sheen effect */
.badge::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(255,255,255,0.3), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    pointer-events: none;
}

/* Outer neon bloom */
.badge::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 24px;
    z-index: -1;
    filter: blur(10px);
    opacity: .6;
    background: radial-gradient(60% 60% at 50% 50%,
        color-mix(in srgb, var(--neon1) 55%, transparent) 0%,
        color-mix(in srgb, var(--neon2) 35%, transparent) 60%,
        transparent 100%);
    animation: neonPulseGlow 2.2s ease-in-out infinite;
}

.badge:hover {
    box-shadow:
        0 0 10px rgba(0,0,0,0.25),
        0 0 14px color-mix(in srgb, var(--neon1) 70%, transparent),
        0 0 28px color-mix(in srgb, var(--neon2) 60%, transparent),
        inset 0 0 12px rgba(255,255,255,0.12);
}

@keyframes neonPulseGlow {
    0%, 100% { opacity: .55; }
    50% { opacity: .85; }
}

/* === Individual Badge Styles === */

/* 1. New Joiner - Baby blue tones */
.new-joiner {
    background: linear-gradient(45deg, #4cafef, #0055aa);
    --neon1: #7fd8ff;
    --neon2: #2bb0ff;
}

/* 2. Fast Learner - Electric yellow/orange */
.fast-learner {
    background: linear-gradient(45deg, #ffd700, #ff9900);
    --neon1: #ffe680;
    --neon2: #ffb84d;
}

/* 3. Quiz Hero - Red & gold like a trophy */
.quiz-hero {
    background: linear-gradient(45deg, #ff4e50, #f9d423);
    --neon1: #ff9a3c;
    --neon2: #ff4e50;
}

/* 4. Rising Star - Pink to purple cosmic vibe */
.rising-star {
    background: linear-gradient(45deg, #ff7eb3, #8e54e9);
    --neon1: #ff8ef5;
    --neon2: #b388ff;
}

/* 5. Bronze Brainer - Bronze metallic tones */
.bronze-brainer {
    background: linear-gradient(45deg, #cd7f32, #8b5a2b);
    --neon1: #ffad60;
    --neon2: #cd7f32;
}

/* 6. Silver Star - Silver gradient */
.silver-star {
    background: linear-gradient(45deg, #c0c0c0, #a9a9a9);
    --neon1: #e6f3ff;
    --neon2: #9fd3ff;
}

/* 7. Gamer - Green gaming glow */
.gamer {
    background: linear-gradient(45deg, #00c853, #00695c);
    --neon1: #59ff9c;
    --neon2: #00ffb2;
}
