/* Header leaderboard drawer (desktop) */

.gvg-lb-drawer {
    position: fixed;
    inset: 0;
    z-index: 100050;
    pointer-events: none;
    visibility: hidden;
}

.gvg-lb-drawer.is-open {
    pointer-events: auto;
    visibility: visible;
}

.gvg-lb-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 6, 16, 0.62);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.gvg-lb-drawer.is-open .gvg-lb-drawer__backdrop {
    opacity: 1;
}

.gvg-lb-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(460px, 100vw);
    display: flex;
    flex-direction: column;
    background: rgba(15, 18, 32, 0.98);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: -16px 0 48px rgba(0, 0, 0, 0.45);
    transform: translateX(104%);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.gvg-lb-drawer.is-open .gvg-lb-drawer__panel {
    transform: translateX(0);
}

body.gvg-lb-drawer-open {
    overflow: hidden;
}

.gvg-lb-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 20px 12px;
    flex-shrink: 0;
}

.gvg-lb-drawer__title-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
}

.gvg-lb-drawer__trophy {
    color: #ffd700;
    font-size: 1.35rem;
}

.gvg-lb-drawer__title {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.gvg-lb-drawer__close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.gvg-lb-drawer__close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.22);
}

.gvg-lb-drawer__tabs {
    display: flex;
    gap: 8px;
    padding: 4px 16px 14px;
    overflow-x: auto;
    flex-shrink: 0;
    scrollbar-width: none;
}

.gvg-lb-drawer__tabs::-webkit-scrollbar {
    display: none;
}

.gvg-lb-drawer__tab {
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.gvg-lb-drawer__tab:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.gvg-lb-drawer__tab.is-active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.18);
}

.gvg-lb-drawer__cta {
    padding: 0 16px 12px;
    flex-shrink: 0;
}

.gvg-lb-drawer__cta-btn {
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, var(--accent, #ff0033), #c40028);
    box-shadow: 0 8px 24px rgba(255, 0, 51, 0.28);
}

.gvg-lb-drawer__cta-btn:hover {
    filter: brightness(1.06);
}

.gvg-lb-drawer__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0 10px 12px;
}

.gvg-lb-drawer__status {
    padding: 28px 12px;
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
}

.gvg-lb-drawer__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gvg-lb-drawer__row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    border-radius: 12px;
}

.gvg-lb-drawer__row.is-me,
.gvg-lb-drawer__list--me .gvg-lb-drawer__row {
    background: rgba(var(--accent-rgb, 255, 0, 51), 0.12);
    border: 1px solid rgba(var(--accent-rgb, 255, 0, 51), 0.28);
}

.gvg-lb-drawer__rank {
    font-weight: 800;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.gvg-lb-drawer__user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.gvg-lb-drawer__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.12);
}

.gvg-lb-drawer__meta {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gvg-lb-drawer__name {
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gvg-lb-drawer__name em {
    font-style: normal;
    font-weight: 600;
    color: var(--accent, #ff0033);
    font-size: 0.78rem;
}

.gvg-lb-drawer__level-line {
    display: grid;
    grid-template-columns: auto minmax(72px, 1fr) auto;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: 180px;
}

.gvg-lb-drawer__lvl {
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
}

.gvg-lb-drawer__bar {
    height: 4px;
    width: 100%;
    min-width: 72px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.gvg-lb-drawer__bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--accent, #ff0033);
}

.gvg-lb-drawer__score {
    font-size: 0.82rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.88);
    white-space: nowrap;
}

.gvg-lb-drawer__me {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.gvg-lb-drawer__footer {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 16px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.gvg-lb-drawer__load-more {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: transparent;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 11px 14px;
    cursor: pointer;
}

.gvg-lb-drawer__load-more:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.06);
}

.gvg-lb-drawer__load-more:disabled {
    opacity: 0.55;
    cursor: wait;
}

.gvg-lb-drawer__view-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
}

.gvg-lb-drawer__view-all:hover {
    color: #fff;
}

@media (max-width: 1024px) {
    .leaderboard-nav-btn {
        display: none !important;
    }

    .gvg-lb-drawer {
        display: none !important;
    }
}
