.rank-wrapper {
    position: relative;
    min-height: 500px;
    border: 1px solid transparent;
    height: calc(100% - 115px);
    border-radius: 14px;
    margin-bottom: 12px;
}

.rank-information {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    height: 100px;
}

.rank-information-left {
    border: var(--border-color) 1px solid;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(100% - 130px);
    text-align: center;
}

.rank-information-left-text {
    padding: 20px;
    font-size: 17px;
    color: var(--text-color);
}

.rank-information-right {
    position: relative;
    width: 130px;
    border: var(--border-color) 1px solid;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.rank-information-right-icon {
    height: 35px;
    width: 35px;
    image-rendering: pixelated;
    transform: scale(2);
    filter: drop-shadow(1px 1px 0 #fff) drop-shadow(-1px 0px 0 #fff) drop-shadow(0 -1px 0 #fff);
    animation: pulserank 2s infinite ease-in-out;
    cursor: pointer;

    &:hover {
        opacity: 0.7;
        animation: none;
    }

    &.gamer {
        background: url(/assets/img/prestige/menu/icon_gamers.png) no-repeat;
    }

    &.riches {
        background: url(/assets/img/prestige/menu/icon_riches.png) no-repeat;
    }

    &.forum {
        background: url(/assets/img/prestige/menu/icon_forum.png) no-repeat;
    }

    &.active {
        background: url(/assets/img/prestige/menu/icon_active.png) no-repeat;
    }
}

.rank-information-box {
    position: absolute;
    background-color: transparent;
    min-width: 250px;
    padding: 15px;
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    box-shadow: none;
    left: 50%;
    top: calc(100% + 15px);
    transform: translateX(-50%);
    transition: opacity 0.3s ease, visibility 0.3s ease;
    width: max-content;
    max-width: 300px;

    &::before {
        content: '';
        position: absolute;
        inset: 0;
        border: var(--border-color) 2px solid;
        border-radius: 8px;
        animation: none;
    }

    &::after {
        content: '';
        position: absolute;
        left: 50%;
        top: -8px;
        transform: translateX(-50%);
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-bottom: var(--border-color) 8px solid;
    }

    &.visible {
        opacity: 1;
        animation-delay: 1s;
        animation: showBackground 0.3s forwards;
        visibility: visible;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        transition: box-shadow 0.3s ease;
        transition-delay: 1s;

        &::before {
            animation: drawBorder 1s forwards;
        }

        &::after {
            border-bottom-color: var(--border-color);
            transition-delay: 1s;
        }

        .rank-information-content {
            animation: showContent 0.3s forwards;
            opacity: 1;
            transform: translateY(0);
            transition-delay: 1s;
        }
    }
}

.rank-information-content {
    width: 100%;
    padding: 10px;
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: center;
    background-color: var(--box-color);
}

.ranking-wrapper {
    overflow: auto;
    margin-top: 10px;
    gap: 20px;
    display: flex;
    transition: all;
    height: fit-content;
}

.module-rank {
    width: calc(33% - 12px);
    display: inline;
    background-color: var(--box-color);
    border-radius: 1rem;
    padding: 10px;
    border: 1px solid var(--border-color);
}

.module-rank-header {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.module-rank-header-titre {
    color: var(--text-color);
    font-size: 25px;
    text-transform: uppercase;
}

.module-rank-header-titre-icon {
    margin-right: 15px;
    height: 32px;
    width: 31px;
    background: url(/assets/img/icon/icon_horloge.png) no-repeat;
}

.module-rank-classement {
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.module-rank-classement-box {
    width: 90%;
}

.module-rank-players-wrapper {
    border-bottom: var(--border-color) 2px solid;
    height: 80px;
    display: flex;
    gap: 10px;

    &:hover {
        text-decoration: none;
        opacity: 0.7;
        cursor: pointer;
    }
}

.module-rank-players-wrapper:hover .module-rank-players-left .module-rank-players-left-avatar img {
    transform: translateY(-12px);
}

.module-rank-players-left {
    width: 50px;
    display: flex;
    justify-content: center;
}

.module-rank-players-left-avatar {
    height: 78px;
    position: relative;
    overflow: hidden;

    img {
        transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        -webkit-filter: drop-shadow(1px 1px 0 #fff) drop-shadow(-1px 0px 0 #fff) drop-shadow(0 -1px 0 #fff);
    }
}

.module-rank-players-center {
    width: calc(100% - 90px);
    display: inline;
    text-align: center;
}

.module-rank-players-center-username {
    margin-left: 5px;
    margin-top: 13px;
    font-size: 24px;
}

.module-rank-players-center-box {
    margin-left: 5px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.module-rank-players-center-icon {
    margin-right: 5px;
    height: 19px;
    width: 19px;
}

.icon-rank-gamers {
    background: url(/assets/img/prestige/icon_points.png) no-repeat;
    background-size: contain;
}

.icon-rank-riches {
    background: url(/assets/img/center/money/money_diamonds.png) no-repeat;
    background-size: contain;
}

.icon-rank-forum {
    background: url(/assets/img/icon/icon_topforum.png) no-repeat;
    background-size: contain;
}

.icon-rank-likes {
    background: url(/assets/img/icon/icon_toplike.png) no-repeat;
    background-size: contain;
}

.icon-rank-winwins {
    background: url(/assets/img/icon/icon_topwinwin.png) no-repeat;
    background-size: contain;
}

.icon-rank-citybox {
    background: url(/assets/img/icon/icon_time.png) no-repeat;
    background-size: contain;
}

.module-rank-players-center-count {
    color: var(--text-color);
    font-size: 15px;
}

.module-rank-players-right {
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.module-rank-players-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--box-color);
    display: inline-flex;
    position: relative;
    align-items: center;
    justify-content: center;
    font-size: 19px;
}

.module-rank .module-rank-classement-box > a:first-child .module-rank-players-badge::before {
    content: "";
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background-image: url(/assets/img/prestige/RVR29.gif);
    background-size: contain;
    background-repeat: no-repeat;
    animation: floatCrown 2s ease-in-out infinite;
}

@media (max-width: 768px) {
    .rank-information-right {
        display: none;
    }

    .rank-information-left {
        width: 100%;
    }

    .rank-information-left-text {
        padding: 12px 8px;
        font-size: 16px;
    }

    .rank-information {
        height: auto;
    }

    .ranking-wrapper {
        margin-top: 15px;
        flex-direction: column;
        margin-bottom: 0;
    }

    .module-rank {
        width: 100%;
    }
}