.tournament-top-cards > [class*="col-"] {
    margin-bottom: 15px;
}

@media (min-width: 992px) {
    .tournament-top-cards > [class*="col-"]:nth-child(4n + 1) {
        clear: left;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .tournament-top-cards > [class*="col-"]:nth-child(2n + 1) {
        clear: left;
    }
}

.tournament-top-cards .weekly-leaders-card {
    height: 100%;
    border-radius: 5px;
    border: 1px solid #e6ecf5;
    background: #fff;
    overflow: hidden;
}

.tournament-top-cards .weekly-leaders-card__title {
    position: relative;
    padding: 10px 12px 10px 14px;
    border-bottom: none;
    color: #63768d;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: normal;
    text-transform: uppercase;
    background: #edf2f6;
    min-height: 38px;
    line-height: 1.25;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.tournament-top-cards .weekly-leaders-card__title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, #22a53a 0%, #1f5f9f 100%);
}

.tournament-top-cards > [class*="col-"]:nth-child(4n + 1) .weekly-leaders-card__title::before {
    background: linear-gradient(180deg, #22c55e 0%, #0d9488 100%);
}
.tournament-top-cards > [class*="col-"]:nth-child(4n + 2) .weekly-leaders-card__title::before {
    background: linear-gradient(180deg, #38bdf8 0%, #2563eb 100%);
}
.tournament-top-cards > [class*="col-"]:nth-child(4n + 3) .weekly-leaders-card__title::before {
    background: linear-gradient(180deg, #a78bfa 0%, #6366f1 100%);
}
.tournament-top-cards > [class*="col-"]:nth-child(4n + 4) .weekly-leaders-card__title::before {
    background: linear-gradient(180deg, #fbbf24 0%, #ea580c 100%);
}

.tournament-top-cards .weekly-leaders-card__winner {
    display: grid;
    grid-template-columns: auto 56px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    background: #fafbfd;
    border-top: 1px solid #e6ecf5;
}

.tournament-top-cards .weekly-leaders-card__rank {
    color: #8a9bb0;
    font-size: 12px;
    font-weight: 700;
    min-width: 1.35em;
    text-align: right;
    white-space: nowrap;
    line-height: 1.1;
}

.tournament-top-cards .weekly-leaders-card__rank--range {
    font-size: 10px;
    min-width: 2.2em;
}

.tournament-top-cards .weekly-leaders-card__avatar {
    width: 56px;
    height: 56px;
    overflow: hidden;
    border-radius: 4px;
    background: #fff;
    border: 1px solid #e6ecf5;
    display: block;
}

.tournament-top-cards .weekly-leaders-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tournament-top-cards .weekly-leaders-card__winner-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tournament-top-cards .weekly-leaders-card__team-logo,
.tournament-top-cards .weekly-leaders-card__team-logo-placeholder {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
}

.tournament-top-cards .weekly-leaders-card__team-logo {
    object-fit: contain;
}

.tournament-top-cards .weekly-leaders-card__team-logo-placeholder {
    display: inline-block;
    border: 1px solid #e6ecf5;
    background: #fff;
}

.tournament-top-cards .weekly-leaders-card__winner-tag {
    color: #0072bc;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tournament-top-cards .weekly-leaders-card__winner-tag:hover {
    text-decoration: none;
    color: #0072bc;
}

.tournament-top-cards .weekly-leaders-card__winner-value {
    color: #63768d;
    font-size: 22px;
    font-weight: 800;
    white-space: nowrap;
    text-align: right;
}

.tournament-top-cards .weekly-leaders-card--xp .weekly-leaders-card__winner {
    grid-template-columns: auto 56px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 2px;
}

.tournament-top-cards .weekly-leaders-card--xp .weekly-leaders-card__winner > .weekly-leaders-card__rank {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.tournament-top-cards .weekly-leaders-card--xp .weekly-leaders-card__avatar {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.tournament-top-cards .weekly-leaders-card--xp .weekly-leaders-card__winner-main {
    grid-column: 3;
    grid-row: 1;
    align-self: end;
}

.tournament-top-cards .weekly-leaders-card--xp .weekly-leaders-card__winner-value {
    grid-column: 3;
    grid-row: 2;
    align-self: start;
    text-align: left;
    font-size: 20px;
    line-height: 1.1;
}

.tournament-top-cards .weekly-leaders-card__rows {
    background: transparent;
}

.tournament-top-cards .weekly-leaders-card__row {
    display: grid;
    grid-template-columns: auto 22px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 8px 12px;
    border-top: 1px solid #e6ecf5;
}

.tournament-top-cards .weekly-leaders-card__row:nth-child(odd) {
    background: #fff;
}

.tournament-top-cards .weekly-leaders-card__row:nth-child(even) {
    background: #fafbfd;
}

.tournament-top-cards .weekly-leaders-card__row-tag {
    color: #0072bc;
    font-size: 13px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tournament-top-cards .weekly-leaders-card__row-tag:hover {
    text-decoration: none;
    color: #0072bc;
}

.tournament-top-cards .weekly-leaders-card__row-value {
    color: #63768d;
    font-size: 13px;
    font-weight: 400;
    white-space: nowrap;
}

.tournament-top-cards .weekly-leaders-card__empty {
    padding: 12px;
    color: #63768d;
    font-size: 13px;
    border-top: 1px solid #e6ecf5;
}

html[data-theme="dark"] .tournament-top-cards .weekly-leaders-card {
    border-color: rgba(148, 163, 184, 0.16);
    background: linear-gradient(158deg, rgba(51, 65, 85, 0.55) 0%, rgba(30, 41, 59, 0.92) 42%, rgba(15, 23, 42, 0.98) 100%);
}

html[data-theme="dark"] .tournament-top-cards .weekly-leaders-card__title {
    color: #e2e8f0;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.65) 0%, rgba(15, 23, 42, 0.35) 100%);
}

html[data-theme="dark"] .tournament-top-cards .weekly-leaders-card__winner {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 100%);
    border-top-color: rgba(148, 163, 184, 0.12);
}

html[data-theme="dark"] .tournament-top-cards .weekly-leaders-card__avatar {
    background: linear-gradient(145deg, #334155 0%, #1e293b 100%);
    border-color: rgba(148, 163, 184, 0.25);
}

html[data-theme="dark"] .tournament-top-cards .weekly-leaders-card__rank {
    color: #94a3b8;
}

html[data-theme="dark"] .tournament-top-cards .weekly-leaders-card__winner-tag,
html[data-theme="dark"] .tournament-top-cards .weekly-leaders-card__row-tag {
    color: #93c5fd;
}

html[data-theme="dark"] .tournament-top-cards .weekly-leaders-card__winner-value {
    color: #4ade80;
}

html[data-theme="dark"] .tournament-top-cards .weekly-leaders-card__row {
    border-top-color: rgba(51, 65, 85, 0.85);
}

html[data-theme="dark"] .tournament-top-cards .weekly-leaders-card__row:nth-child(odd),
html[data-theme="dark"] .tournament-top-cards .weekly-leaders-card__row:nth-child(even) {
    background: transparent;
}

html[data-theme="dark"] .tournament-top-cards .weekly-leaders-card__row-value,
html[data-theme="dark"] .tournament-top-cards .weekly-leaders-card__empty {
    color: #e2e8f0;
}

html[data-theme="dark"] .tournament-top-cards .weekly-leaders-card__empty {
    color: #94a3b8;
    border-top-color: rgba(148, 163, 184, 0.12);
}

@media (max-width: 991px) {
    .tournament-top-cards .weekly-leaders-card__winner {
        grid-template-columns: auto 48px minmax(0, 1fr);
    }
    .tournament-top-cards .weekly-leaders-card__avatar {
        width: 48px;
        height: 48px;
    }
    .tournament-top-cards .weekly-leaders-card__winner-value {
        grid-column: 1 / -1;
        text-align: left;
        font-size: 20px;
    }
    .tournament-top-cards .weekly-leaders-card--xp .weekly-leaders-card__winner {
        grid-template-columns: auto 48px minmax(0, 1fr);
    }
    .tournament-top-cards .weekly-leaders-card--xp .weekly-leaders-card__winner-value {
        grid-column: 3;
        font-size: 18px;
    }
}
