/* 全体のフォントと背景 */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f0f0;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: auto;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1,
h2 {
    color: #333;
}

/* ジャンル選択セクション */
.genre-selection {
    margin-bottom: 20px;
}

#genre {
    margin-right: 10px;
}

#start {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    max-width: min(80vw, 300px);
}

#start:hover {
    background-color: #0056b3;
}

/* 問題と回答オプション */
#question-container {
    margin-bottom: 20px;
}

#question {
    background-color: #eee;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.answer-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 5px 0;
    cursor: pointer;
    border-radius: 5px;
    display: block;
    width: 100%;
}

.answer-btn:hover {
    background-color: #0056b3;
}

/* 履歴セクション */
#history {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
}

/* モーダルのスタイリング */
.modal {
    position: fixed;
    /* 画面中央に表示 */
    z-index: 1;
    /* コンテンツの上に表示 */
    left: 0;
    top: 0;
    width: 100%;
    /* Full width */
    height: 100%;
    /* Full height */
    overflow: auto;
    /* Enable scroll if needed */
    background-color: rgb(0, 0, 0);
    /* Fallback color */
    background-color: rgba(0, 0, 0, 0.4);
    /* Black w/ opacity */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hidden {
    display: none;
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    height: fit-content;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* ベーススタイルはそのままにして、レスポンシブ対応のスタイルを追加 */

/* スマートフォンや小さな画面用のスタイル */
@media (max-width: 768px) {
    #history {
        display: none;
    }
    .container {
        padding: 10px;
    }

    h1 {
        font-size: 24px;
    }

    #question {
        font-size: 16px;
    }

    .answer-btn {
        padding: 10px 15px;
        font-size: 16px;
    }

    #start {
        padding: 8px 16px;
        left: 50%;
        transform: translateX(-50%);
        bottom: 10px;
    }

    #genre,
    #start {
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 10px;
    }

    #history p {
        font-size: 14px;
    }

}

#start {
    background-color: #28a745; /* 色を変更 */
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    position: fixed; /* 位置を固定する */
    bottom: 20px; /* 画面下から20pxの位置 */
    right: 20px; /* 画面右から20pxの位置 */
    left: 50%; /* 親要素の中央に配置 */
    transform: translateX(-50%); /* ボタン自体の幅の半分だけ左にずらして完全に中央に配置 */
    bottom: 20px; /* 画面下からの距離 */
}

#start:hover {
    background-color: #218838; /* ホバー時の色を少し暗く */
}
