/* コンテナ設定 */
.rank-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    color: #eee;
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-left: 4px solid #4a90e2;
    padding-left: 15px;
}

/* フィルターボタン */
.controls {
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    gap: 10px;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.filter-btn.active {
    background: #4a90e2;
    border-color: #4a90e2;
}

/* テーブルスタイル */
.table-wrapper {
    background: rgba(30, 30, 30, 0.6);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.rank-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.rank-table th, 
.rank-table td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.rank-table th {
    background: rgba(0, 0, 0, 0.3);
    font-weight: 600;
    font-size: 0.9rem;
    color: #aaa;
}

/* ソート可能ヘッダー */
.sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

.sortable:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.sort-icon::after {
    content: ' ↕';
    font-size: 0.8rem;
    opacity: 0.3;
}

.sortable.desc .sort-icon::after {
    content: ' ↓';
    opacity: 1;
    color: #4a90e2;
}

.sortable.asc .sort-icon::after {
    content: ' ↑';
    opacity: 1;
    color: #4a90e2;
}

.sort-hint {
    margin-top: 10px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6); /* 少し薄めの色にして馴染ませる */
}

/* キャラクターセル */
.char-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.char-cell img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,0.2);
    object-fit: cover;
}

.rank-cell {
    font-weight: bold;
    color: #888;
    width: 50px;
}

/* 順位の色付け */
tbody tr:nth-child(1) .rank-cell { color: #ffd700; font-size: 1.2rem; }
tbody tr:nth-child(2) .rank-cell { color: #c0c0c0; }
tbody tr:nth-child(3) .rank-cell { color: #cd7f32; }

tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.loading {
    text-align: center;
    padding: 50px;
    color: #888;
}