/* --- KATIPSENA HIGH-END RANK EFFECTS (TEXT-ONLY) --- */

/* 1. Neon Glow (Breathing) */
.rank-effect-glow {
    text-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 20px currentColor;
    animation: neon-breathe 2s ease-in-out infinite alternate;
    font-weight: 700;
}

@keyframes neon-breathe {
    from {
        opacity: 0.8;
        text-shadow: 0 0 4px currentColor, 0 0 8px currentColor;
    }

    to {
        opacity: 1;
        text-shadow: 0 0 8px currentColor, 0 0 16px currentColor, 0 0 24px currentColor;
    }
}

/* 2. Sparkle (Shimmering Stars) */
.rank-effect-sparkle {
    position: relative;
    background: linear-gradient(90deg, #fff, var(--primary), #fff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 2s linear infinite;
    font-weight: 800;
}

.rank-effect-sparkle::after {
    content: "✦";
    position: absolute;
    font-size: 0.8em;
    top: -8px;
    right: -8px;
    color: #fff;
    text-shadow: 0 0 5px #fff;
    animation: star-sparkle 1.5s infinite;
}

@keyframes shimmer {
    to {
        background-position: 200% center;
    }
}

@keyframes star-sparkle {

    0%,
    100% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }

    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 1;
    }
}

/* 3. Rainbow (Liquid Shift) */
.rank-effect-rainbow {
    background: linear-gradient(to right, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8b00ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 400% 100%;
    animation: rainbow-move 8s linear infinite;
    font-weight: 800;
}

@keyframes rainbow-move {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

/* 4. Glitch (RGB Drift) */
.rank-effect-glitch {
    position: relative;
    animation: glitch-vibrate 0.3s infinite;
    font-weight: 700;
}

.rank-effect-glitch::before,
.rank-effect-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.rank-effect-glitch::before {
    left: 2px;
    text-shadow: -2px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.rank-effect-glitch::after {
    left: -2px;
    text-shadow: -2px 0 #00fff9, 2px 2px #ff00c1;
    animation: glitch-anim2 1s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(31px, 9999px, 94px, 0);
    }

    100% {
        clip: rect(67px, 9999px, 62px, 0);
    }
}

@keyframes glitch-vibrate {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 1px);
    }

    40% {
        transform: translate(-2px, -1px);
    }

    60% {
        transform: translate(2px, 1px);
    }

    80% {
        transform: translate(2px, -1px);
    }

    100% {
        transform: translate(0);
    }
}

/* 5. Fire (Magma Flux) */
.rank-effect-fire {
    background: linear-gradient(0deg, #f00, #ff0, #fff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 5px #f60);
    animation: fire-flux 1s infinite alternate;
    font-weight: 900;
}

@keyframes fire-flux {
    from {
        transform: scale(1);
        filter: drop-shadow(0 0 5px #f60) brightness(1);
    }

    to {
        transform: scale(1.05);
        filter: drop-shadow(0 0 10px #f90) brightness(1.3);
    }
}

/* 6. Neon Flicker (Broken Sign) */
.rank-effect-neon-flicker {
    animation: flicker 4s linear infinite;
    font-weight: 700;
    text-shadow: 0 0 10px currentColor;
}

@keyframes flicker {

    0%,
    19.999%,
    22%,
    62.999%,
    64%,
    64.999%,
    70%,
    100% {
        opacity: 1;
        text-shadow: 0 0 10px currentColor;
    }

    20%,
    21.999%,
    63%,
    63.999%,
    65%,
    69.999% {
        opacity: 0.3;
        text-shadow: none;
    }
}

/* 7. Cosmic (Nebula Shift) */
.rank-effect-cosmic {
    background: linear-gradient(45deg, #000428, #004e92, #d4145a, #fbb03b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: cosmic-shift 10s ease infinite;
    font-weight: 800;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

@keyframes cosmic-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* 8. Gold (Liquid Shine) */
.rank-effect-gold {
    background: linear-gradient(110deg, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 100%;
    font-weight: 900;
    animation: gold-sweep 3s linear infinite;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.2));
}

@keyframes gold-sweep {
    to {
        background-position: 200% center;
    }
}

/* 9. Hacker (Matrix Stream) */
.rank-effect-hacker {
    color: #0f0;
    text-shadow: 0 0 8px #0f0;
    font-family: 'Consolas', 'Courier New', monospace;
    position: relative;
    overflow: hidden;
    font-weight: 700;
}

.rank-effect-hacker::after {
    content: "10101101";
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    font-size: 0.5em;
    opacity: 0.4;
    animation: matrix-fall 1.5s linear infinite;
}

@keyframes matrix-fall {
    to {
        top: 100%;
    }
}

/* 10. Phantom (Afterimage) */
.rank-effect-phantom {
    animation: phantom-fade 3s ease-in-out infinite;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    font-weight: 600;
    color: #94a3b8;
}

@keyframes phantom-fade {

    0%,
    100% {
        transform: translateX(0);
        opacity: 1;
        filter: blur(0);
    }

    50% {
        transform: translateX(8px);
        opacity: 0.4;
        filter: blur(3px);
    }
}

/* --- Rank Guide Card Modernization --- */
.rg-card {
    min-width: 160px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    cursor: grab;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    user-select: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.rg-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.rg-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.12);
    border-color: var(--primary-light);
}

.rg-card:hover::before {
    opacity: 1;
}

.rg-card:active {
    cursor: grabbing;
}

.rg-icon-wrapper {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 14px;
    margin-bottom: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s;
    z-index: 1;
}

.rg-card:hover .rg-icon-wrapper {
    transform: rotate(-5deg) scale(1.1);
}

.rg-icon {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.rg-name {
    margin-top: 10px;
    font-size: 1rem;
    font-weight: 800;
    white-space: nowrap;
    display: block;
    z-index: 1;
}

.rg-type {
    margin-top: 6px;
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 6px;
    z-index: 1;
}

/* Scroll Utility Classes */
.h-scroll-area {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 10px 5px 20px 5px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
}

.h-scroll-area::-webkit-scrollbar {
    display: none;
}

.h-scroll-area.grabbing {
    cursor: grabbing;
    user-select: none;
}