/* Content/popularLeaderboard.css */
/* 首頁公開人氣排行榜專屬樣式 - 僅本區塊使用，不重定義 layout.css 的 .glass-card / .card-title 等全域 class */

.popular-leaderboard-card {
    margin-bottom: 40px;
}

.popular-leaderboard-header {
    margin-bottom: 20px;
}

.popular-leaderboard-header .card-title i {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.popular-leaderboard-subtitle {
    color: #718096;
    font-size: 1rem;
    margin: 0;
}

/* Tabs */
.popular-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.popular-tab {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 10px 18px;
    font-size: 1rem;
    font-weight: 600;
    color: #718096;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-bottom: -2px;
}

.popular-tab:hover {
    color: #667eea;
}

.popular-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

/* Panels */
.popular-panel[hidden] {
    display: none;
}

.popular-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.popular-item {
    display: flex;
    align-items: center;
}

.popular-item-link {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(102, 126, 234, 0.04);
    transition: background 0.25s ease, transform 0.25s ease;
    min-width: 0;
}

.popular-item-link:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(4px);
}

/* 名次圈 */
.popular-rank {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1rem;
    background: #edf2f7;
    color: #4a5568;
    margin-right: 4px;
}

.popular-rank-gold {
    background: linear-gradient(135deg, #FFD700 0%, #f5a623 100%);
    color: #7a4a00;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.5);
}

.popular-rank-silver {
    background: linear-gradient(135deg, #E8E8E8 0%, #C0C0C0 100%);
    color: #4a5568;
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.5);
}

.popular-rank-bronze {
    background: linear-gradient(135deg, #D8A06A 0%, #CD7F32 100%);
    color: #4a2c00;
    box-shadow: 0 2px 8px rgba(205, 127, 50, 0.5);
}

.popular-item-icon {
    flex-shrink: 0;
    font-size: 1.2rem;
    width: 26px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.popular-item-name {
    font-weight: 600;
    color: #2d3748;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.popular-new-badge {
    flex-shrink: 0;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}

/* 相對熱度條（無數字，寬度=HeatRatio） */
.popular-heat-track {
    flex: 1;
    min-width: 60px;
    height: 8px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.06);
    overflow: hidden;
    margin-left: auto;
}

.popular-heat-fill {
    display: block;
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

/* Mobile: 單欄，名字換行改省略、熱度條縮短 */
@media (max-width: 768px) {
    .popular-tab {
        padding: 8px 14px;
        font-size: 0.95rem;
    }

    .popular-item-link {
        gap: 10px;
        padding: 8px 10px;
    }

    .popular-item-name {
        max-width: 130px;
    }

    .popular-heat-track {
        min-width: 40px;
    }
}
