html, body {
    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    margin: 0;
    padding: 0;

    width: 100vw;
    height: 100vh;
}

#container {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.leaderboard {
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: #fcefe8;

    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: absolute;
}

.header {
    position: relative;
    background: #fcefe8;
    height: 100px;
    min-height: 100px;
    max-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header .title {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-weight: 700;
    font-size: 22px;
    color: #A67362;
    text-align: center;
}

.header .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.list {
    flex-grow: 1;
    
    overflow-y: auto;

    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.footer {
    background: #ffcf5f;
    padding: 0 16px;
    display: none;
    align-items: center;
    position: relative;
    flex-shrink: 0;

    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;

    transition: max-height 0.35s ease, opacity 0.35s ease, padding 0.35s ease;
}

.footer.visible {
    max-height: 60px;
    height: 46px;
    padding: 10px 16px;
    opacity: 1;
    pointer-events: auto;
}

.footer .avatar {
    background: #ccc;
}

.footer .info {
    flex-grow: 1;
}

.footer .badge {
    background: #52C1FC;
    border: 2.5px solid #459BEB;
    color: white;
    font-size: 16px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;
    position: relative;

    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-weight: 700;

    padding-top: 2px;
    /* сдвигает текст вниз */
}

.footer .badge-top {
    background-color: #3CCF78;
    border: 2px solid #2AA75D;

    padding: 6px;

    border-radius: 10px;

    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-weight: 700;

    color: white;
}

.tooltip {
    position: absolute;
    bottom: 55px;
    right: 16px;
    background: #fff3eb;
    border: 2px solid #BA987D;
    color: #903F21;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    z-index: 9999;

    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-weight: 500;

    align-items: center;
    justify-content: center;
    text-align: center;

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tooltip.visible {
    opacity: 1;
    visibility: visible;
}

.tooltip::after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;

    border-left: 10px solid transparent;
    border-right: 0 solid transparent;
    border-top: 10px solid #BA987D;

    bottom: -10px;
    right: 10px;

    filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.05));
}

.badge-icon {
    display: flex;
    align-items: center;
    margin-left: 8px;
    font-size: 18px;
    color: #A67362;

    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-weight: 700;
}

.badge-icon img {
    width: 24px;
    height: 35px;
    align-self: center;
    margin-top: 5px;

    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}
