.sparkle-text {
    position: relative;
    display: inline-block;
    color: #fff;
    font-weight: bold;
    cursor: context-menu;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 20px;
    margin: 4px;
    background: #333;
    overflow: visible;
    z-index: 1;
    font-size: 12px;
}

.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    animation: sparkleAnimation 1.5s infinite;
    z-index: 999;
    will-change: transform, opacity;
}

.sparkle:nth-child(odd) {
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    animation-delay: 0.1s;
}

.sparkle:nth-child(even) {
    background: linear-gradient(45deg, #48cae4, #7209b7);
    animation-delay: 0.3s;
}

.sparkle:nth-child(3n) {
    background: linear-gradient(45deg, #06ffa5, #ffffff);
    animation-delay: 0.5s;
    width: 6px;
    height: 6px;
}

.sparkle-text.gold {
    text-shadow: 
        0 0 10px #ffd700,
        0 0 20px #ffd700,
        0 0 30px #ffd700,
        2px 2px 4px rgba(0,0,0,0.5);
    color: #ffd700;
    border: 2px solid rgba(255, 215, 0, 0.6);
    box-shadow: 
        0 0 15px rgba(255, 215, 0, 0.4),
        inset 0 0 15px rgba(255, 215, 0, 0.1);
}

.sparkle-text.rainbow {
    background: linear-gradient(45deg, #ff6b6b, #feca57, #48cae4, #7209b7, #06ffa5, #ff6b6b);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: rainbowText 3s ease-in-out infinite;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    text-shadow: none;
}

@keyframes rainbowText {
    0% { 
        background-position: 0% 50%;
    }
    50% { 
        background-position: 100% 50%;
    }
    100% { 
        background-position: 0% 50%;
    }
}

.sparkle-text.rainbow-alt {
    animation: rainbowTextSolid 2s ease-in-out infinite;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

@keyframes rainbowTextSolid {
    0% { color: #ff6b6b; }
    16.66% { color: #feca57; }
    33.33% { color: #48cae4; }
    50% { color: #7209b7; }
    66.66% { color: #06ffa5; }
    83.33% { color: #ff9ff3; }
    100% { color: #ff6b6b; }
}

.sparkle-text.neon {
    color: #00ffff;
    text-shadow: 
        0 0 5px #00ffff,
        0 0 10px #00ffff,
        0 0 15px #00ffff,
        0 0 20px #00ffff,
        0 0 35px #00ffff;
    border: 2px solid rgba(0, 255, 255, 0.6);
    box-shadow: 
        0 0 15px rgba(0, 255, 255, 0.4),
        inset 0 0 15px rgba(0, 255, 255, 0.1);
}

.sparkle-text:not(.gold):not(.rainbow):not(.neon) {
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.sparkle-text.gold:hover {
    box-shadow: 
        0 0 25px rgba(255, 215, 0, 0.6),
        inset 0 0 25px rgba(255, 215, 0, 0.2);
}

.sparkle-text.neon:hover {
    box-shadow: 
        0 0 25px rgba(0, 255, 255, 0.6),
        inset 0 0 25px rgba(0, 255, 255, 0.2);
}

/* Animations */
@keyframes rainbowTextShadow {
    0% { 
        text-shadow: 
            0 0 10px #ff6b6b,
            0 0 20px #ff6b6b,
            2px 2px 4px rgba(0,0,0,0.5);
    }
    25% { 
        text-shadow: 
            0 0 10px #feca57,
            0 0 20px #feca57,
            2px 2px 4px rgba(0,0,0,0.5);
    }
    50% { 
        text-shadow: 
            0 0 10px #48cae4,
            0 0 20px #48cae4,
            2px 2px 4px rgba(0,0,0,0.5);
    }
    75% { 
        text-shadow: 
            0 0 10px #7209b7,
            0 0 20px #7209b7,
            2px 2px 4px rgba(0,0,0,0.5);
    }
    100% { 
        text-shadow: 
            0 0 10px #06ffa5,
            0 0 20px #06ffa5,
            2px 2px 4px rgba(0,0,0,0.5);
    }
}

@keyframes sparkleAnimation {
    0% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: scale(0) rotate(360deg);
    }
}

.rank {
    position: relative;
    display: inline-block;
    color: #fff;
    font-weight: bold;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 20px;
    margin: 4px;
    background: #333;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    font-size: 12px;
    letter-spacing: 0.5px;
    cursor: default;
}