/* ベーススタイル */
body {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    font-family: sans-serif;
    box-sizing: border-box;
}

/* メインのカード表示用コンテナ（グリッドレイアウト） */
#item-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    padding: 10px;
    box-sizing: border-box;
}

/* カード（.item）のスタイル */
.item {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.item img {
    width: 70px;
    height: auto;
    margin-bottom: 10px;
    border-radius: 5px;
}

.item p {
    margin: 0;
    text-align: center;
    font-size: 14px;
}

/* オーバーレイ全体のスタイル */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* オーバーレイ内のコンテンツボックス */
.overlay-content {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    position: relative;
    max-width: 800px;
    width: 90%;
}

/* 閉じるボタン（右上） */
#close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* 進化系統カードを横並びに表示するコンテナ（下部） */
#overlay-related-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

/* 関連カードの画像を大きくする */
#overlay-related-container img {
    width: 200px;
    height: auto;
}

/* 選択されたカード（強調表示） */
.selected {
    border: 3px solid red;
    padding: 5px;
    border-radius: 5px;
}

/* 非表示用クラス */
.hidden {
    display: none !important;
}
