/* 全体のスタイル */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Hiragino Sans', 'Noto Sans CJK JP', 'Yu Gothic', Meiryo, sans-serif;
    margin: 0;
    background-color: #f0f2f5;
    color: #333;
}

/* ヘッダー */
header {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    position: relative; /* この行を追加 */
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
}

/* メインコンテンツ */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* ゲームリスト（カードを並べるコンテナ） */
.game-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* ゲームカード */
.game-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

/* カードにマウスを乗せた時のアニメーション */
.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

/* カード全体のリンクスタイル */
.game-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* ゲーム画像 */
.game-card img {
    width: 100%;
    height: 180px;
    object-fit: cover; /* 画像の比率を保ったままエリアを埋める */
    display: block;
}

/* カードのテキスト部分 */
.card-content {
    padding: 1rem 1.5rem;
}

.card-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.card-content p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #666;
}

/* フッター */
footer {
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #888;
}




/* ホームボタンのスタイル */
.home-button {
    position: absolute; /* headerを基準に絶対配置 */
    top: 20px;
    right: 20px;
    
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: background-color 0.2s ease-in-out;
}

/* ボタンにマウスを乗せた時のスタイル */
.home-button:hover {
    background-color: #2980b9;
}

@media (max-width: 900px) {
    /* ホームボタン自体のスタイル */
    .home-button {
        padding: 10px;      /* アイコンが中央に来るように調整 */
        font-size: 1.2rem;  /* アイコンのサイズを調整 */
        right: 15px;
    }
    
    /* ボタン内のテキストを非表示に */
    .home-button .button-text {
        display: none;
    }
}