.rank-change-modal {
    position: fixed;
    inset: 0;

    z-index: 10050;

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        rgba(0, 0, 0, 0.86);

    backdrop-filter:
        blur(8px);
}

.rank-change-modal.hidden {
    display: none;
}

.rank-change-panel {
    width:
        min(
            760px,
            calc(100vw - 40px)
        );

    padding:
        30px 34px 28px;

    text-align: center;

    border:
        1px solid
        var(--rank-change-border);

    border-top:
        3px solid
        var(--rank-change-accent);

    background:
        linear-gradient(
            145deg,
            rgba(16, 19, 27, 0.99),
            rgba(4, 6, 10, 0.99)
        );

    box-shadow:
        0 0 45px
        rgba(0, 0, 0, 0.8),
        0 0 28px
        var(--rank-change-glow);
}

.rank-change-kicker {
    margin-bottom: 7px;

    color:
        var(--rank-change-accent);

    font-size: 0.7rem;

    letter-spacing: 0.24em;

    font-weight: 700;
}

.rank-change-title {
    margin:
        0 0 8px;

    color:
        #ffffff;

    font-size: 2rem;

    letter-spacing: 0.14em;
}

.rank-change-subtitle {
    color:
        rgba(255, 255, 255, 0.72);

    font-size: 0.9rem;

    letter-spacing: 0.08em;
}

.rank-change-display {
    display: grid;

    grid-template-columns:
        1fr auto 1fr;

    align-items: center;

    gap: 26px;

    margin:
        30px 0 22px;
}

.rank-change-rank {
    min-width: 0;
}

.rank-change-emblem {
    width:
        min(
            210px,
            28vw
        );

    height: 210px;

    object-fit: contain;

    filter:
        drop-shadow(
            0 0 8px
            rgba(0, 0, 0, 0.75)
        );
}

.rank-change-modal.promotion
.rank-change-rank:last-child
.rank-change-emblem,
.rank-change-modal.demotion
.rank-change-rank:first-child
.rank-change-emblem {
    filter:
        drop-shadow(
            0 0 18px
            var(--rank-change-accent)
        );

    animation:
        rankChangeGlow
        1.4s
        ease-in-out
        infinite alternate;
}

.rank-change-name {
    margin-top: 8px;

    color:
        rgba(255, 255, 255, 0.9);

    font-weight: 700;

    letter-spacing: 0.12em;

    text-transform: uppercase;
}

.rank-change-arrow {
    color:
        var(--rank-change-accent);

    font-size: 4rem;

    font-weight: 700;

    text-shadow:
        0 0 16px
        var(--rank-change-glow);
}

.rank-change-rating {
    margin-bottom: 22px;

    color:
        rgba(255, 255, 255, 0.62);

    font-size: 0.82rem;

    letter-spacing: 0.1em;
}

#rank-change-continue-btn {
    width: 100%;

    padding: 12px;

    border:
        1px solid
        var(--rank-change-border);

    background:
        var(--rank-change-soft);

    color: #ffffff;

    font-weight: 700;

    letter-spacing: 0.14em;

    cursor: pointer;
}

#rank-change-continue-btn:hover {
    border-color:
        var(--rank-change-accent);

    box-shadow:
        0 0 15px
        var(--rank-change-glow);
}

.rank-change-theme-chess {
    --rank-change-accent:
        #00ffee;

    --rank-change-border:
        rgba(0, 255, 238, 0.4);

    --rank-change-glow:
        rgba(0, 255, 238, 0.35);

    --rank-change-soft:
        rgba(0, 255, 238, 0.08);
}

.rank-change-theme-checkers {
    --rank-change-accent:
        #ff00aa;

    --rank-change-border:
        rgba(255, 0, 170, 0.42);

    --rank-change-glow:
        rgba(255, 0, 170, 0.35);

    --rank-change-soft:
        rgba(255, 0, 170, 0.08);
}

.rank-change-theme-k3pesh {
    --rank-change-accent:
        #d94a4a;

    --rank-change-border:
        rgba(220, 70, 70, 0.42);

    --rank-change-glow:
        rgba(220, 60, 60, 0.3);

    --rank-change-soft:
        rgba(180, 30, 30, 0.08);
}

@keyframes rankChangeGlow {
    from {
        transform:
            scale(1);
    }

    to {
        transform:
            scale(1.035);
    }
}

@media (
    max-width: 620px
) {

    .rank-change-panel {
        padding:
            22px 18px;
    }

    .rank-change-display {
        gap: 8px;
    }

    .rank-change-emblem {
        height: 145px;
    }

    .rank-change-arrow {
        font-size: 2.4rem;
    }
}