/* 全体のスタイル */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #eaeaea;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* コンテンツ全体を中央揃え */
.container {
    width: 95%;
    max-width: 800px;
    background-color: #ffffff;
    padding: 30px;
    margin-top: 50px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

/* ナビゲーションリンク */
.navigation {
    margin-bottom: 20px;
    text-align: center;
}

.navigation a {
    text-decoration: none;
    color: #0056b3;
    margin: 0 15px;
    font-size: 16px;
    font-weight: 500;
}

.navigation a:hover {
    text-decoration: underline;
    color: #003580;
}

/* タイトル */
h1 {
    font-size: 28px;
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-weight: 600;
}

/* 検索フォーム */
.search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

#search-box {
    flex: 1;
    min-width: 200px;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
}

select {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
}

#search-button {
    background-color: #0056b3;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#search-button:hover {
    background-color: #003580;
}


/* 検索結果のスタイル */
#results h2 {
    color: #333;
    font-size: 28px;
    margin-bottom: 15px;
    font-weight: 600;
    text-align: center;
}

h3 {
    color: #555;
    font-size: 22px;
    margin-top: 20px;
    margin-bottom: 15px;
    font-weight: 500;
}

/* テーブル全体をラップするコンテナ */
.table-container {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 20px;
}

/* テーブルのレイアウト */
.table {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1px;
    background-color: #ddd;
    margin-bottom: 20px;
}

.table-row {
    display: contents;
}

/* テーブルのセル */
.table-cell {
    background-color: white;
    padding: 15px;
    font-size: 16px;
    text-align: left;
}

.table-cell:nth-child(odd) {
    background-color: #f7f7f7;
}

.table-header .table-cell {
    background-color: #0056b3;
    color: white;
    font-weight: bold;
    text-align: center;
}

/* 小さな画面向けのレスポンシブデザイン */
@media (max-width: 600px) {
    .table {
        grid-template-columns: 1fr;
        /* 1列表示にする */
    }

    .search-bar {
        flex-direction: column;
        /* 縦並びにする */
    }

    #search-button {
        width: 100%;
        /* ボタンを全幅にする */
    }
}

候補リストのコンテナ
#candidates {
    display: grid;
    gap: 10px;
    margin: 10px 0;
    width: 100%;
    max-width: 800px;
}

/* 検索結果のサマリーメッセージ */
.summary-message {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 16px;
    color: #333;
}

/* デフォルトは1列 */
.candidate-item {
    padding: 15px;
    background-color: #f1f1f1;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    font-size: 18px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.candidate-item:hover {
    background-color: #e0e0e0;
    transform: scale(1.02);
}

.candidate-item p {
    margin: 0;
    color: #333;
    font-weight: 500;
}

/* 複数列レイアウトの調整 */
@media (min-width: 600px) {
    #candidates {
        grid-template-columns: repeat(2, 1fr);
        /* 2列 */
    }
}

@media (min-width: 900px) {
    #candidates {
        grid-template-columns: repeat(3, 1fr);
        /* 3列 */
    }
}

@media (min-width: 1200px) {
    #candidates {
        grid-template-columns: repeat(4, 1fr);
        /* 4列 */
    }
}

/* 候補リストのコンテナ */
.candidates-container {
    display: grid;
    gap: 10px;
    margin: 10px 0;
    width: 100%;
    max-width: 800px;
}

/* デフォルトは1列 */
.candidate-item {
    padding: 15px;
    background-color: #f1f1f1;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    font-size: 18px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.candidate-item:hover {
    background-color: #e0e0e0;
    transform: scale(1.02);
}

/* ページネーションのボタン */
.pagination-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.pagination-controls button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #0056b3;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

.pagination-controls button:hover {
    background-color: #003580;
}

.pagination-controls button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}