/**
 * CTDT - Leaderboard Page Styles
 * Prefix: .ctdt- (scoped, no conflict with theme)
 * Matches Figma Node 978:604
 *
 * @package BSC_CaoThuDauTu
 */
.ctdt-page {
    background: url('../images/homepage/bg-page.webp') lightgray 0px 0px / cover no-repeat;
    background-color: var(--ctdt-bg-primary);
    min-height: 100vh;
    position: relative;
}

/* Background overlay from Figma - image 103 */
.ctdt-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../images/homepage/bg-page.webp') var(--ctdt-bg-primary) center / cover no-repeat;
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   Layout & Container Inherited Settings
   ============================================ */
.ctdt-leaderboard-page .ctdt-page {
    background: url('../images/homepage/bg-page.webp') #011434 center top / cover no-repeat;
    min-height: 100vh;
    padding-top: 88px;
    /* Nav height offset */
    padding-bottom: 80px;
    overflow-x: hidden;
}

@media (max-width: 1023px) {
    .ctdt-leaderboard-page .ctdt-page {
        padding-top: 76px;
        padding-bottom: 60px;
    }
}

/* ============================================
   Section Style: ctdt-leaderboard
   ============================================ */
.ctdt-leaderboard {
    width: 100%;
    margin-top: 40px;
    position: relative;
    z-index: 10;
}

/* ============================================
   Stage Tabs component (Figma Node 1020:204)
   ============================================ */
.ctdt-leaderboard__stage-tabs {
    position: relative;
    display: flex;
    width: 100%;
    height: 38px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 40px;
    box-sizing: border-box;
}

.ctdt-leaderboard__stage-tab {
    width: 160px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--ctdt-font-family);
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    color: #FFFFFF;
    transition: color 0.25s ease;
    padding: 0;
    box-sizing: border-box;
}

.ctdt-leaderboard__stage-tab:hover {
    background: var(--New-2, linear-gradient(188deg, #EED2A9 29.75%, #DDBF93 114.95%));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ctdt-leaderboard__stage-tab--active {
    background: var(--New-2, linear-gradient(188deg, #EED2A9 29.75%, #DDBF93 114.95%));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Gold active indicator bar */
.ctdt-leaderboard__stage-indicator {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 160px;
    height: 2px;
    background: linear-gradient(188deg, #EED2A9 29.75%, #DDBF93 114.95%);
    transition: left 0.3s ease;
}

/* 1. Header decor decoration: BẢNG XẾP HẠNG */
.ctdt-leaderboard__title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 28px;
}

.ctdt-leaderboard__title {
    position: relative;
    font-family: var(--ctdt-font-family);
    font-size: 48px;
    font-weight: 900;
    line-height: 68px;
    text-transform: uppercase;
    background: linear-gradient(180deg, #FBE29F 0%, #C68C2E 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 22px;
}

.ctdt-leaderboard__title::before {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 418px;
    height: 2px;
    background: linear-gradient(90deg, rgba(217, 210, 183, 0.00) 0.07%, #E6C073 50%, rgba(217, 210, 183, 0.00) 100%);
    z-index: 1;
}

.ctdt-leaderboard__title-line {
    display: inline-block;
    flex: 0 0 40px;
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.00) 0%, #E6C073 100%);
}

.ctdt-leaderboard__title-line--right {
    width: 100%;
    max-width: 40px;
    background: linear-gradient(90deg, #E6C073 0%, rgba(255, 255, 255, 0.00) 100%);
}

/* 2. Filters bar styling — Figma node 978:615 (1440×48) */
.ctdt-leaderboard__filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    border-radius: 8px;
    margin-bottom: 32px;
    padding: 0;
    overflow: hidden;
}

/* Tabs group — style copy từ .ctdt-prizes__tabs trên homepage */
.ctdt-leaderboard__tabs {
    display: flex;
    gap: 8px;
    align-items: center;
    height: 100%;
    padding: 6px 0 6px 6px;
}

/* Individual tab — copy từ .ctdt-prizes__tab trên homepage */
.ctdt-leaderboard__tab {
    position: relative;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
    font-family: var(--ctdt-font-family);
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    line-height: 24px;
    height: auto;
    margin-right: 0;
}


.ctdt-leaderboard__tab:last-child {
    margin-right: 0;
}

.ctdt-leaderboard__tab:not(.ctdt-leaderboard__tab--active):hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Active tab — copy từ .ctdt-prizes__tab.active trên homepage */
.ctdt-leaderboard__tab.ctdt-leaderboard__tab--active {
    background: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
    color: #011434;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}

/* Right-side filter group — Figma x=1170, width=270 out of 1440 */
.ctdt-leaderboard__sub-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    /* Figma: "Lọc theo" text (63px) + 12px gap + dropdown (195px) = 270px */
    height: 100%;
    padding-right: 16px;
    /* small right edge inset inside the bar */
    flex-shrink: 0;
}

.ctdt-leaderboard__filter-label {
    color: var(--White, #FFF);

    font-family: var(--ctdt-font-family);
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 24px;
    /* 150% */
}

/* Dropdown wrapper — Figma frame 978:631: 195×48 */
.ctdt-leaderboard__select-wrapper {
    position: relative;
    display: inline-block;
    width: 195px;
    height: 48px;
    flex-shrink: 0;
}

.ctdt-leaderboard__select {
    font-family: var(--ctdt-font-family);
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    color: #ffffff;

    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(40px);
    width: 100%;
    height: 48px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.ctdt-leaderboard__select option {
    color: #ffffff;
    background-color: #011434;
}

.ctdt-leaderboard__select option:checked,
.ctdt-leaderboard__select option:hover {
    color: #ffffff;
    background-color: #011434;
}

select:not([size]).ctdt-leaderboard__select {
    background-image: none;
}

.ctdt-leaderboard__select:hover {
    border-color: rgba(255, 255, 255, 0.4);
}

.ctdt-leaderboard__select:focus {
    border-color: rgba(255, 255, 255, 0.5);
}

/* Arrow icon positioned at Figma x=167 inside 195px frame → right: 12px */
.ctdt-leaderboard__select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    pointer-events: none;
    display: flex;
    align-items: center;
}

/* 3. Status Info Row */
.ctdt-leaderboard__status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    font-family: var(--ctdt-font-family);
    font-size: 15px;
}

.ctdt-leaderboard__user-rank {
    font-family: var(--ctdt-font-family);
    font-size: 18px;
    font-style: normal;
    font-weight: 500;
    line-height: 28px;
    color: #ffffff;
}

.ctdt-leaderboard__user-rank strong {
    color: #ffb81c;
    font-weight: 700;
}

.ctdt-leaderboard__user-rank a {
    color: #ffb81c;
    text-decoration: none;
    font-weight: 600;
}

.ctdt-leaderboard__update-time {
    color: var(--White, #FFF);
    font-family: var(--ctdt-font-family);
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 24px;
    opacity: 0.5;
    /* 150% */
}


/* podium */
.ctdt-leaderboard__podium {
    /* D:\laragon\www\bsc-game\wp-content\plugins\bsc-caothudautu\assets\images\bxh\bg-podium.webp */
    background: url('../images/bxh/bg-podium.webp') center / cover no-repeat;
    width: 100%;
    height: 556px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    display: flex;
    justify-content: center;
    align-items: self-end;
    gap: 40px;
}

.ctdt-leaderboard__podium-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.ctdt-leaderboard__podium-item .content {
    display: flex;
    flex-direction: column;
    align-items: center;

    .ctdt-leaderboard__podium-name {
        white-space: nowrap;
    }
}

.ctdt-leaderboard__podium-item--first {
    background: url('../images/bxh/giai_1.svg') center / contain no-repeat;
    width: 514px;
    height: 514px;

    .ctdt-leaderboard__podium-avatar {
        width: 170px;
        height: 170px;
        border-radius: 50%;
        border: 5px solid #FFB81C;
        background: rgba(255, 255, 255, 0.20);
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;

        img {
            width: 100%;
            height: 100%;
            border-radius: 0;
            object-fit: contain;
            position: relative;
            z-index: 1;
            transform: scale(1.6);
        }

    }

    .ctdt-leaderboard__podium-avatar::after {
        content: '';
        position: absolute;
        background: url('../images/bxh/ic_1.svg') center / cover no-repeat;
        width: 110px;
        height: 110px;
        top: -38%;
        z-index: 2;
    }

    .content {
        position: absolute;
        top: 35%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}

.ctdt-leaderboard__podium-item--second {
    background: url('../images/bxh/giai_2.svg') center / contain no-repeat;
    width: 371px;
    height: 371px;

    .ctdt-leaderboard__podium-avatar {
        width: 120px;
        height: 120px;
        border-radius: 50%;
        border: 5px solid #C0C0C0;
        background: rgba(255, 255, 255, 0.20);
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;

        img {
            width: 100%;
            height: 100%;
            border-radius: 0;
            object-fit: contain;
            position: relative;
            z-index: 1;
        }

    }

    .ctdt-leaderboard__podium-avatar::after {
        content: '';
        position: absolute;
        background: url('../images/bxh/ic_2.svg') center / cover no-repeat;
        width: 87px;
        height: 87px;
        top: -50%;
        z-index: 2;
    }

    .content {
        position: absolute;
        top: 25%;
        left: 50%;
        transform: translate(-50%, -50%);
        display: flex;
        flex-direction: column;
        align-items: center;

    }
}

.ctdt-leaderboard__podium-item--third {
    background: url('../images/bxh/giai_3.svg') center / contain no-repeat;
    width: 371px;
    height: 371px;
    margin-bottom: -20px;

    .ctdt-leaderboard__podium-avatar {
        width: 120px;
        height: 120px;
        border-radius: 50%;
        border: 5px solid #CD7F32;
        background: rgba(255, 255, 255, 0.20);
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;

        img {
            width: 100%;
            height: 100%;
            border-radius: 0;
            object-fit: contain;
            position: relative;
            left: 5%;
            transform: scale(1.6);
            z-index: 1;
        }

    }

    .ctdt-leaderboard__podium-avatar::after {
        content: '';
        position: absolute;
        background: url('../images/bxh/ic_3.svg') center / cover no-repeat;
        width: 87px;
        height: 87px;
        top: -38%;
        z-index: 2;
    }

    .content {
        position: absolute;
        top: 20%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}



.ctdt-leaderboard__podium-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.ctdt-leaderboard__podium-name {
    font-family: var(--ctdt-font-family);
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: 36px;
    color: #ffffff;
}

.ctdt-leaderboard__podium-account {
    color: #ffffff;
    text-align: center;
    font-family: var(--ctdt-font-family);
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: 36px;
    opacity: 0.5;
    /* 150% */
}

.ctdt-leaderboard__podium-yield {
    color: #22FF59;
    text-align: center;
    font-family: var(--ctdt-font-family);
    font-size: 40px;
    font-style: normal;
    font-weight: 700;
    line-height: 54px;
    /* 135% */
}

/* ============================================
   Section Style: ctdt-leaderboard-detail (Section 2)
   ============================================ */
.ctdt-leaderboard-detail {
    width: 100%;
    margin-top: 40px;
    position: relative;
    z-index: 10;
}

/* ============================================
   Leaderboard Detailed Table (Figma Node 978:685)
   ============================================ */
.ctdt-leaderboard__table-wrapper {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    margin-bottom: 24px;
    overflow: hidden;
}

.ctdt-leaderboard__table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
    background-color: #1B2D4F;
}

/* Header styling */
.ctdt-leaderboard__table thead {
    background-color: #1D3568;
}

.ctdt-leaderboard__table thead tr {
    background: #1D3568;
}

.ctdt-leaderboard__table th {
    font-family: var(--ctdt-font-family);
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    color: #FFFFFF;
    padding: 16px 35px;
    text-transform: none;
    text-align: center;
    background: #1D3568;
}

/* Body rows styling */
.ctdt-leaderboard__table tbody {
    background-color: #1B2D4F;
}

.ctdt-leaderboard__table tbody tr {
    background: #1B2D4F;
}

.ctdt-leaderboard__table tbody tr:last-child {
    border-bottom: none;
}

.ctdt-leaderboard__table tbody tr:hover td {
    background-color: #253759;
}

.ctdt-leaderboard__table td {
    padding: 16px 35px;
    vertical-align: middle;
    height: 56px;
    box-sizing: border-box;
    text-align: center;
    background: #1B2D4F;
    transition: background-color 0.25s ease;
}

/* Column sizes & Alignments */
.ctdt-col-stt {
    width: 126px;
    text-align: center;
    font-family: var(--ctdt-font-family);
    font-size: 16px;
    font-weight: 700;
    color: #FFFFFF;
}

.ctdt-col-name {
    width: 328px;
    font-family: var(--ctdt-font-family);
    font-size: 16px;
    font-weight: 700;
    color: #FFFFFF;
}

.ctdt-col-acc {
    width: 328px;
    font-family: var(--ctdt-font-family);
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
}

.ctdt-col-yield {
    width: 328px;
    text-align: center;
    font-family: var(--ctdt-font-family);
    font-size: 16px;
    font-weight: 700;
    color: #22FF59;
}

.ctdt-col-wheel {
    width: 328px;
    text-align: center;
    font-family: var(--ctdt-font-family);
    font-size: 16px;
    font-weight: 700;
    color: #22FF59;
}

/* 4. Disclaimer block (Figma Node 1025:220) */
.ctdt-leaderboard__disclaimer {
    font-family: var(--ctdt-font-family);
    font-size: 18px;
    font-weight: 500;
    line-height: 28px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 16px;
    margin-bottom: 32px;
    text-align: left;
    max-width: 100%;
}

/* 5. Pagination controls (Figma Node 1025:222) */
.ctdt-leaderboard__pagination-wrapper {
    display: none !important;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 16px;
}

.ctdt-leaderboard__pagination {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 24px;
}

/* Pagination arrows */
.ctdt-pagination-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #FFFFFF;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: opacity 0.25s ease, transform 0.2s ease;
    opacity: 0.8;
    padding: 0;
}

.ctdt-pagination-arrow:hover:not(:disabled) {
    opacity: 1;
    transform: scale(1.1);
}

.ctdt-pagination-arrow:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.ctdt-pagination-arrow svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Dots container */
.ctdt-pagination-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ctdt-pagination-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FFFFFF;
    opacity: 0.3;
    cursor: pointer;
    transition: opacity 0.25s ease, transform 0.25s ease;
    border: none;
    padding: 0;
}

.ctdt-pagination-dot:hover {
    opacity: 0.6;
}

.ctdt-pagination-dot.ctdt-pagination-dot--active {
    opacity: 1;
    transform: scale(1.2);
}

/* ============================================
   Responsive Design Breakpoints
   ============================================ */

/* 1. Laptop Screen (1600px breakpoint) */
@media (max-width: 1700px) {
    .ctdt-leaderboard__title {
        font-size: 40px;
        line-height: 56px;
    }

    .ctdt-leaderboard__podium {
        height: 480px;
        gap: 24px;
    }

    .ctdt-leaderboard__podium-item--first {
        width: 440px;
        height: 440px;
    }

    .ctdt-leaderboard__podium-item--first .ctdt-leaderboard__podium-avatar {
        width: 140px;
        height: 140px;
    }

    .ctdt-leaderboard__podium-item--first .ctdt-leaderboard__podium-avatar::after {
        width: 90px;
        height: 90px;
        top: -25%;
    }

    .ctdt-leaderboard__podium-item--first .content {
        top: 35%;
    }

    .ctdt-leaderboard__podium-item--second,
    .ctdt-leaderboard__podium-item--third {
        width: 320px;
        height: 320px;
    }

    .ctdt-leaderboard__podium-item--second .ctdt-leaderboard__podium-avatar,
    .ctdt-leaderboard__podium-item--third .ctdt-leaderboard__podium-avatar {
        width: 100px;
        height: 100px;
    }

    .ctdt-leaderboard__podium-item--second .ctdt-leaderboard__podium-avatar::after,
    .ctdt-leaderboard__podium-item--third .ctdt-leaderboard__podium-avatar::after {
        width: 70px;
        height: 70px;
        top: -25%;
    }

    .ctdt-leaderboard__podium-item--second .content {
        top: 25%;
    }

    .ctdt-leaderboard__podium-item--third .content {
        top: 20%;
    }

    .ctdt-leaderboard__podium-name,
    .ctdt-leaderboard__podium-account {
        font-size: 20px;
        line-height: 30px;
    }

    .ctdt-leaderboard__podium-yield {
        font-size: 32px;
        line-height: 44px;
    }
}

/* 2. HD Laptop Screen (1366px breakpoint) */
@media (max-width: 1439px) {
    .ctdt-leaderboard__title {
        font-size: 36px;
        line-height: 48px;
        margin-bottom: 16px;
    }

    .ctdt-leaderboard__title-wrapper {
        margin-bottom: 20px;
    }

    .ctdt-leaderboard__tab {
        padding: 10px 18px;
        font-size: 15px;
    }

    .ctdt-leaderboard__podium {
        height: 420px;
        gap: 16px;
    }

    .ctdt-leaderboard__podium-item--first {
        width: 380px;
        height: 380px;
    }

    .ctdt-leaderboard__podium-item--first .ctdt-leaderboard__podium-avatar {
        width: 120px;
        height: 120px;
    }

    .ctdt-leaderboard__podium-item--first .ctdt-leaderboard__podium-avatar::after {
        width: 80px;
        height: 80px;
    }

    .ctdt-leaderboard__podium-item--second,
    .ctdt-leaderboard__podium-item--third {
        width: 280px;
        height: 280px;
    }

    .ctdt-leaderboard__podium-item--second .ctdt-leaderboard__podium-avatar,
    .ctdt-leaderboard__podium-item--third .ctdt-leaderboard__podium-avatar {
        width: 90px;
        height: 90px;
    }

    .ctdt-leaderboard__podium-item--second .ctdt-leaderboard__podium-avatar::after,
    .ctdt-leaderboard__podium-item--third .ctdt-leaderboard__podium-avatar::after {
        width: 60px;
        height: 60px;
    }

    .ctdt-leaderboard__podium-name,
    .ctdt-leaderboard__podium-account {
        font-size: 18px;
        line-height: 26px;
    }

    .ctdt-leaderboard__podium-yield {
        font-size: 28px;
        line-height: 38px;
    }
}

/* 3. Small Laptop Screen (1280px breakpoint) */
@media (max-width: 1279px) {
    .ctdt-leaderboard__title {
        font-size: 32px;
        line-height: 42px;
    }

    .ctdt-leaderboard__tab {
        padding: 8px 14px;
        font-size: 14px;
    }

    .ctdt-leaderboard__podium {
        height: 370px;
        gap: 10px;
    }

    .ctdt-leaderboard__podium-item--first {
        width: 330px;
        height: 330px;
    }

    .ctdt-leaderboard__podium-item--first .ctdt-leaderboard__podium-avatar {
        width: 100px;
        height: 100px;
    }

    .ctdt-leaderboard__podium-item--first .ctdt-leaderboard__podium-avatar::after {
        width: 70px;
        height: 70px;
    }

    .ctdt-leaderboard__podium-item--second,
    .ctdt-leaderboard__podium-item--third {
        width: 240px;
        height: 240px;
    }

    .ctdt-leaderboard__podium-item--second .ctdt-leaderboard__podium-avatar,
    .ctdt-leaderboard__podium-item--third .ctdt-leaderboard__podium-avatar {
        width: 75px;
        height: 75px;
    }

    .ctdt-leaderboard__podium-item--second .ctdt-leaderboard__podium-avatar::after,
    .ctdt-leaderboard__podium-item--third .ctdt-leaderboard__podium-avatar::after {
        width: 50px;
        height: 50px;
    }

    .ctdt-leaderboard__podium-name,
    .ctdt-leaderboard__podium-account {
        font-size: 15px;
        line-height: 22px;
    }

    .ctdt-leaderboard__podium-yield {
        font-size: 24px;
        line-height: 32px;
    }
}

/* 4. Tablet Screens (max-width: 1023px) */
@media (max-width: 1023px) {

    .ctdt-leaderboard,
    .ctdt-leaderboard-detail {
        margin-top: 24px;
    }

    .ctdt-leaderboard__filters-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        background: transparent;
        margin-bottom: 24px;
    }

    .ctdt-leaderboard__tabs {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        white-space: nowrap;
        width: 100%;
        padding-top: 4px;
        padding-bottom: 8px;
        margin-top: -4px;
        margin-bottom: -8px;
        -webkit-overflow-scrolling: touch;
    }

    .ctdt-leaderboard__tabs::-webkit-scrollbar {
        height: 4px;
    }

    .ctdt-leaderboard__tabs::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 2px;
    }

    .ctdt-leaderboard__tabs::-webkit-scrollbar-thumb {
        background: rgba(128, 170, 229, 0.4);
        border-radius: 2px;
    }

    .ctdt-leaderboard__tabs::-webkit-scrollbar-thumb:hover {
        background: rgba(128, 170, 229, 0.6);
    }

    .ctdt-leaderboard__tab {
        /* flex: 0 0 auto; */
        padding: 6px 13px 8px 12px;
        font-size: 14px;
    }

    .ctdt-leaderboard__sub-filters {
        width: 100%;
        justify-content: space-between;
        padding-right: 0;
    }

    .ctdt-leaderboard__podium {
        height: 310px;
        gap: 8px;
    }

    .ctdt-leaderboard__podium-item--first {
        width: 260px;
        height: 260px;
    }

    .ctdt-leaderboard__podium-item--first .ctdt-leaderboard__podium-avatar {
        width: 80px;
        height: 80px;
        border-width: 3px;
    }

    .ctdt-leaderboard__podium-item--first .ctdt-leaderboard__podium-avatar::after {
        width: 55px;
        height: 55px;
    }

    .ctdt-leaderboard__podium-item--second,
    .ctdt-leaderboard__podium-item--third {
        width: 190px;
        height: 190px;
    }

    .ctdt-leaderboard__podium-item--second .ctdt-leaderboard__podium-avatar,
    .ctdt-leaderboard__podium-item--third .ctdt-leaderboard__podium-avatar {
        width: 60px;
        height: 60px;
        border-width: 3px;
    }

    .ctdt-leaderboard__podium-item--second .ctdt-leaderboard__podium-avatar::after,
    .ctdt-leaderboard__podium-item--third .ctdt-leaderboard__podium-avatar::after {
        width: 40px;
        height: 40px;
    }

    .ctdt-leaderboard__podium-name,
    .ctdt-leaderboard__podium-account {
        font-size: 13px;
        line-height: 18px;
    }

    .ctdt-leaderboard__podium-yield {
        font-size: 20px;
        line-height: 28px;
    }

    /* Swipeable table container */
    .ctdt-leaderboard__table-wrapper {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        margin-bottom: 20px;
    }

    .ctdt-leaderboard__table {
        min-width: 720px;
        /* Force minimum width to prevent squeezed text */
    }

    .ctdt-leaderboard__table th,
    .ctdt-leaderboard__table td {
        padding: 12px 16px;
    }

    .ctdt-leaderboard__disclaimer {
        font-size: 16px;
        line-height: 28px;
        margin-top: 12px;
        margin-bottom: 24px;
    }

    .ctdt-leaderboard__pagination {
        gap: 12px;
    }
}

/* 5. Mobile Screens (max-width: 767px) */
@media (max-width: 767px) {
    .ctdt-leaderboard__title {
        font-size: 28px;
        line-height: 38px;
    }

    .ctdt-leaderboard__title::before {
        width: 80%;
    }

    /* Custom grid wrap for podium on mobile (First Place on top row, Second/Third side-by-side below) */
    .ctdt-leaderboard__podium {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: flex-start;
        height: auto;
        padding: 24px 12px;
        gap: 16px;
        background: rgba(255, 255, 255, 0.03);
    }

    /* Rank 1 takes full width of row 1 */
    .ctdt-leaderboard__podium-item--first {
        order: 1;
        width: 100%;
        /* Force full-width so it occupies row 1 */
        height: 230px;
        margin-bottom: 0;
    }

    .ctdt-leaderboard__podium-item--first .ctdt-leaderboard__podium-avatar {
        width: 80px;
        height: 80px;
        border-width: 3px;
    }

    .ctdt-leaderboard__podium-item--first .ctdt-leaderboard__podium-avatar::after {
        width: 55px;
        height: 55px;
        top: -30%;
    }

    .ctdt-leaderboard__podium-item--first .content {
        top: 35%;
    }

    /* Ranks 2 and 3 sit side-by-side on row 2 */
    .ctdt-leaderboard__podium-item--second {
        order: 2;
        width: calc(50% - 10px);
        /* Fit 2 items side-by-side */
        max-width: 160px;
        height: 160px;
        margin-bottom: 0;


    }

    .ctdt-leaderboard__podium-item--second .ctdt-leaderboard__podium-avatar {
        width: 52px;
        height: 52px;
        border-width: 2px;
    }

    .ctdt-leaderboard__podium-item--second .ctdt-leaderboard__podium-avatar::after {
        width: 36px;
        height: 36px;
        top: -25%;
    }

    .ctdt-leaderboard__podium-item--second .content {
        top: 26%;
        /* Pull content up to fit exactly on silver pedestal */

    }

    .ctdt-leaderboard__podium-item--third {
        order: 3;
        width: calc(50% - 10px);
        /* Fit 2 items side-by-side */
        max-width: 160px;
        height: 177px;
        margin-bottom: 0;
    }

    .ctdt-leaderboard__podium-item--third .ctdt-leaderboard__podium-avatar {
        width: 52px;
        height: 52px;
        border-width: 2px;
    }

    .ctdt-leaderboard__podium-item--third .ctdt-leaderboard__podium-avatar::after {
        width: 36px;
        height: 36px;
        top: -25%;
    }

    .ctdt-leaderboard__podium-item--third .content {
        top: 23%;
        /* Bronze pedestal sits lower on the canvas, push content lower to match */
        gap: 4px;
        /* Tighter spacing on mobile to prevent overlaps */
    }

    .ctdt-leaderboard__podium-item--second .content {
        top: 24%;
        gap: 5px;
    }

    /* Scale podium typography and tighten spacing for mobile to completely prevent overlaps */
    /* .ctdt-leaderboard__podium-info {
        gap: 2px !important;
    } */

    .ctdt-leaderboard__podium-name {
        font-size: 13px !important;
        line-height: 16px !important;
    }

    .ctdt-leaderboard__podium-account {
        font-size: 11px !important;
        line-height: 14px !important;
    }

    .ctdt-leaderboard__podium-yield {
        font-size: 16px !important;
        line-height: 20px !important;
    }

    .ctdt-leaderboard__status-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .ctdt-leaderboard__user-rank {
        font-size: 15px;
        line-height: 22px;
    }

    .ctdt-leaderboard__update-time {
        font-size: 13px;
        line-height: 18px;
    }

    /* Mobile overrides for table cell contents */
    .ctdt-leaderboard__table th,
    .ctdt-leaderboard__table td {
        padding: 10px 12px;
        font-size: 14px;
    }

    .ctdt-leaderboard__tabs {
        padding-top: 10px;
    }

    .ctdt-leaderboard__tab {
        padding: 6px 13px 6px 12px;
        font-size: 12px;
    }

    .ctdt-leaderboard__disclaimer {
        font-size: 14px;
        line-height: 20px;
        margin-top: 10px;
        margin-bottom: 20px;
        text-align: justify;
    }

    .ctdt-leaderboard__pagination {
        gap: 8px;
    }

    .ctdt-pagination-dots {
        gap: 6px;
    }

    .ctdt-pagination-dot {
        width: 6px;
        height: 6px;
    }

    .ctdt-pagination-dot.ctdt-pagination-dot--active {
        transform: scale(1.1);
    }

    /* Enforce leaderboard table fit inside screen without scroll on mobile */
    .ctdt-leaderboard__table-wrapper {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .ctdt-leaderboard__table {
        min-width: 100%;
        width: 100%;
        table-layout: fixed;
    }

    .ctdt-leaderboard__table th,
    .ctdt-leaderboard__table td {
        padding: 12px 4px;
        font-size: 12.5px;
        line-height: 1.3;
        word-break: break-word;
        white-space: normal;
        height: auto;
    }

    .ctdt-leaderboard__table th {
        font-size: 13px;
    }

    .ctdt-col-stt {
        width: 45px;
        min-width: 45px;
    }

    .ctdt-col-name {
        width: auto;
        text-align: left;
        padding-left: 16px;
    }

    .ctdt-col-acc {
        width: 86px;
        min-width: 86px;
        font-size: 11px;
        letter-spacing: -0.3px;
    }

    .ctdt-col-yield {
        width: 62px;
        min-width: 62px;
    }

    .ctdt-col-wheel {
        width: 65px;
        min-width: 65px;
    }
}

/* Fluid responsive setting on mobile viewport for stage tabs */
@media (max-width: 479px) {
    .ctdt-leaderboard__stage-tabs {
        max-width: 100%;
        margin-bottom: 24px;
    }

    .ctdt-leaderboard__stage-tab {
        width: calc(100% / 3);
        font-size: 14px;
    }

    .ctdt-leaderboard__stage-indicator {
        width: calc(100% / 3);
    }
}

/* Premium Skeleton Loading Animation */
@keyframes ctdt-skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.ctdt-skeleton {
    display: inline-block;
    height: 16px;
    width: 80%;
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.12) 37%, rgba(255, 255, 255, 0.04) 63%);
    background-size: 200% 100%;
    animation: ctdt-skeleton-shimmer 1.4s infinite linear;
    vertical-align: middle;
}

.ctdt-skeleton--circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.ctdt-skeleton--short {
    width: 45%;
}

.ctdt-skeleton--medium {
    width: 65%;
}

.ctdt-skeleton--long {
    width: 85%;
}

/* ============================================
   Color Helpers
   ============================================ */
.ctdt-green-text {
    color: #22ff59 !important;
}

.ctdt-red-text {
    color: #ff3737 !important;
}

.ctdt-yellow-text {
    color: #ffb81c !important;
}