/* ランキング専用スタイル */
.ranking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
    width: 100%;
}

.ranking-card {
    background: #252525;
    border: 1px solid #444;
    border-top: 3px solid #00e676;
    border-radius: 5px;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.ranking-title {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
    display: flex;
    align-items: center;
}

.ranking-title i {
    margin-right: 10px;
    color: #00e676;
}

.ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 5px;
}

/* カスタムスクロールバー */
.ranking-list::-webkit-scrollbar {
    width: 6px;
}
.ranking-list::-webkit-scrollbar-track {
    background: #252525;
}
.ranking-list::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
}
.ranking-list::-webkit-scrollbar-thumb:hover {
    background: #777;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #333;
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-rank {
    width: 30px;
    font-weight: bold;
    font-size: 16px;
    color: #888;
    text-align: center;
}

.ranking-rank.top1 {
    color: #FFD700;
    font-size: 20px;
}

.ranking-rank.top2 {
    color: #C0C0C0;
    font-size: 18px;
}

.ranking-rank.top3 {
    color: #CD7F32;
    font-size: 18px;
}

.ranking-name {
    flex: 1;
    font-size: 15px;
    color: #fff;
    margin-left: 10px;
}

.ranking-score {
    font-family: 'Roboto Mono', monospace;
    font-weight: bold;
    font-size: 16px;
    color: #00e676;
}

.ranking-sub {
    font-size: 12px;
    color: #aaa;
    display: block;
    margin-top: 4px;
}

/* チャートカードのラッパー */
.chart-card-wrapper {
    width: 100%;
    margin-top: 20px;
}

/* チャートのコンテナ（アスペクト比維持と高さ設定） */
.chart-container {
    position: relative;
    width: 100%;
    height: 380px;
}

@media (max-width: 768px) {
    .chart-container {
        height: 260px; /* モバイル端末では高さを低くして視認性を確保 */
    }
}
