* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    text-align: center;
    padding: 20px;
    max-width: 100%;
    margin: 0 auto;
}

#game-container {
    max-width: 90%;  /* 親コンテナの幅をスマートフォンサイズに合わせる */
    margin: 0 auto;
}

#game-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 10px;
    margin-top: 20px;
}

button {
    width: 100%;
    height: 100px;
    background-color: black;
    color: white;
    border: none;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.3s;
}

button.matched {
    background-color: white; /* 正解時に白色に変わる */
}

button:disabled {
    pointer-events: none;
}

/* スマートフォン向けのメディアクエリ */
@media (max-width: 600px) {
    #game-board {
        grid-template-columns: repeat(4, 1fr); /* 画面が小さくても4列に表示 */
    }

    button {
        height: 70px;  /* ボタンの高さをスマホ向けに調整 */
        font-size: 14px; /* ボタンのフォントサイズを小さく */
    }

    #game-container {
        padding: 10px;  /* 親コンテナのパディング調整 */
    }

    h1 {
        font-size: 20px; /* 見出しのフォントサイズ調整 */
    }

    #click-count {
        font-size: 14px; /* クリックカウントのフォントサイズ調整 */
    }

    #next-page-button {
        font-size: 16px;
        width: 100%;  /* ボタンを幅いっぱいに */
    }
}
