/*
 * 全てのページ (ranking_viewer.html, weekly_stats.html, id_detail.html)
 * で使用される共通スタイル
 */

body {
    font-family: Arial, sans-serif;
    font-size: 1.2em;
    margin: 20px;
    background-color: #f4f4f4;
}
.container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
h1 {
    border-bottom: 2px solid #ccc;
    padding-bottom: 10px;
}
/* ID詳細ページで使用されるサブセクションのタイトル */
h2 { 
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
    margin-top: 20px;
}

/* ナビゲーションリンク */
.nav-links {
    margin-bottom: 10px;
}
.nav-links a {
    margin-right: 15px;
    text-decoration: none;
    color: #007bff;
    font-weight: bold;
}
.nav-links a:hover {
    text-decoration: underline;
}

/* データ基準日 (Global/Weekly Statsページ用) */
.date-info {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

/* アカウント検索コンテナ */
.search-container {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #e9ecef;
}
.search-container h2 {
    margin-top: 0;
    border-bottom: none;
}
.search-container input, .search-container button {
    font-size: 1.0em;
    padding: 8px;
    margin-right: 10px;
}

/* === ランキングページ用 (#ranking-table) === */
#ranking-select{
    font-size: 1.0em;
    padding: 8px;
    margin-right: 10px;
}

#ranking-select-container {
    margin-bottom: 20px;
}
#ranking-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}
#ranking-table th, #ranking-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: right; /* デフォルトは右寄せ */
}
/* 順位、Account、Fleetは左寄せ */
#ranking-table th:first-child, #ranking-table td:first-child,
#ranking-table th:nth-child(2), #ranking-table td:nth-child(2),
#ranking-table th:nth-child(3), #ranking-table td:nth-child(3) {
    text-align: left;
}
#ranking-table th {
    background-color: #007bff;
    color: white;
}
.loading {
    text-align: center;
    padding: 20px;
    font-size: 1.2em;
}
/* Account Nameをリンクとして表示 */
.clickable-id {
    color: #0056b3;
    text-decoration: underline;
    cursor: pointer;
}

/* === ID詳細ページ用 (.detail-table) === */
.detail-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}
.detail-table th, .detail-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: right;
}
/* 項目名 (th) は左寄せ、ヘッダーの背景色も統一 */
.detail-table th {
    background-color: #007bff; 
    color: white;
    text-align: left;
    width: 30%; /* ID詳細テーブルの項目列幅を確保 */
}
/* Global Statsの3列目（/ Battles Avg/Rate）のスタイル */
.detail-table td:nth-child(3) {
    font-weight: bold;
    background-color: #e9f5ff; 
}
/* Weekly StatsのAvg列の背景色を上書き */
.weekly-stats-table td:nth-child(3) {
    background-color: #e6ffe6; 
}

.search-container {
    position: relative; /* 候補リストを相対配置するため */
}

.suggestions-container {
    position: absolute;
    z-index: 10;
    width: 100%; /* 入力フィールドと同じ幅に設定 */
    max-height: 200px;
    overflow-y: auto;
    background-color: white; /* 背景色を設定 */
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-top: 5px; /* 入力フィールドと少し間隔を空ける */
}

.suggestions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.suggestions-list li {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.suggestions-list li:hover {
    background-color: #f0f0f0;
}