.ranking-widget {
    background-image: url('../assets/ranking/background.png');
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.ranking-widget .widget-header {
    background: #1a2238;
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ranking-tabs {
    display: flex;
    gap: 8px;
    padding: 12px 14px 8px;
    background: rgba(10,14,26,0.6);
}

.ranking-tabs .btn-tab {
    flex: 1;
    justify-content: center;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
}

.ranking-tabs .btn-tab img {
    width: 15px;
    height: 15px;
    object-fit: contain;
}

.ranking-tabs .btn-tab.active {
    background: rgba(30, 58, 110, 0.8);
    border: 1px solid var(--color-accent-blue);
    color: #fff;
}

.ranking-tabs .btn-tab:not(.active) {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
}

.ranking-list {
    padding: 8px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ranking-list.hidden {
    display: none;
}

.ranking-entry {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: filter 0.15s;
}

.ranking-entry:hover {
    filter: brightness(1.15);
}

.ranking-entry-bg {
    position: absolute;
    inset: 0;
    background-image: url('../assets/ranking/background_each_ranking.png');
    background-size: cover;
    background-position: center;
    opacity: 0.25;
}

.ranking-entry:nth-child(odd)  { background-color: rgba(10, 15, 32, 0.9); }
.ranking-entry:nth-child(even) { background-color: rgba(22, 34, 62, 0.75); }

.ranking-entry-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
}

.ranking-rank {
    width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rank-crown {
    width: 22px;
    height: auto;
    object-fit: contain;
}

.rank-crown--gold   { filter: drop-shadow(0 0 3px rgba(240,160,32,0.6)); }
.rank-crown--silver { filter: drop-shadow(0 0 3px rgba(160,176,200,0.5)); }
.rank-crown--bronze { filter: drop-shadow(0 0 3px rgba(192,120,64,0.5)); }

.rank-number {
    font-size: 13px;
    color: var(--color-text-muted);
    font-weight: 600;
}

.ranking-name {
    flex: 1;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--color-text-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-level {
    font-size: 12px;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.ranking-empire {
    width: 28px;
    height: auto;
    object-fit: contain;
    border-radius: 3px;
    flex-shrink: 0;
}

.ranking-header-crown {
    width: 20px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(240, 160, 32, 0.5));
}

.ranking-footer {
    padding: 12px 14px 14px;
    display: flex;
    justify-content: center;
    background: rgba(10,14,26,0.4);
    border-top: 1px solid var(--color-border);
}

.ranking-load-more {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--color-text-light);
    font-weight: 500;
    transition: color 0.2s;
}

.ranking-load-more:hover {
    color: #fff;
}
