/* 基本設定 */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

h1 {
    font-size: 1.5em;
    margin-top: 20px;
    text-align: center;
}

/* クイズコンテナ */
.quiz-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.word {
    text-align: center; /* テキストを中央揃え */
    font-size: 1.5em;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%; /* 幅を100%に */
}


/* 各画像＋番号のセットを横並びにするためのラッパー */
.images {
    display: flex;
    justify-content: center;
    gap: 20px; /* 各画像セットの間隔 */
    flex-wrap: wrap; /* 必要なら折り返す */
}

/* 画像と番号を縦に並べる */
.image-option-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}


/* 画像サイズ調整（スマートフォン向け） */
.image-option {
    width: 120px; /* スマホで適切なサイズに変更 */
    height: auto;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border 0.3s;
}

.image-option.selected {
    border: 2px solid #4CAF50; /* 選択時の枠線 */
}

/* 番号ラベル */
.image-label {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    margin-top: 5px;
}

/* 提出ボタン */
#submit {
    display: block;  /* ボタンをブロック要素として扱う */
    margin: 20px auto;
    text-align: center;
    padding: 15px;
    font-size: 1.2em;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#submit:hover {
    background-color: #45a049;
}

/* 結果表示 */
#result {
    margin-top: 20px;
    font-size: 1.2em;
    text-align: center;
}

#final-score p {
    font-size: 0.9em;
    color: #333;
    margin-top: 10px;
}

.print-button {
    display: block; /* ボタンを改行して表示 */
    margin: 15px auto 0; /* 上下の余白を調整 */
    padding: 10px 20px;
    font-size: 0.9em;
    color: white;
    background-color: #4CAF50;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.print-button:hover {
    background-color: #45a049;
}


#final-score {
    text-align: center;
    font-size: 1.2em; /* 文字サイズ */
    color: #333; /* ベースの文字色をダークグレー（黒に近い）に */
    line-height: 1.5; /* 行間設定 */
}

#final-score h1 {
    display: none; /* スコアページのタイトルを非表示 */
}

#final-score h2 {
    font-size: 1.5em; /* タイトルは他より少し大きめ */
    color: #4CAF50; /* タイトルに緑色を適用 */
}

#final-score p {
    margin: 5px 0; /* 段落の余白を調整 */
}

#final-score .highlight {
    color: #FF5722; /* 重要な箇所に明るいオレンジを適用 */
    font-weight: bold; /* 太字にして強調 */
}

#final-score img {
    width: 200px; /* イメージを小さく */
    margin-top: 0px;
}


/* 印刷時に表示される要素 */
@media print {
    body * {
        visibility: hidden; /* すべて非表示 */
    }
    #final-score, #final-score * {
        visibility: visible; /* スコアページのみ表示 */
    }
    #final-score {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
    }
}

#quiz-description {
    text-align: center;
    font-size: 1.2em;
    color: #555;
    margin-bottom: 20px;
}


/* 隠し要素 */
.hidden {
    display: none;
}

#final-score .inline-title {
    color: #4CAF50; /* 緑色 */
    font-size: 1.5em; /* 適度な大きさ */
    margin-bottom: 15px;
    text-align: center;
}

/* PC（通常）表示 → 横並び */
#user-info {
    text-align: center; /* 全体を中央揃え */
    margin-top: 20px;
}

#user-info label {
    display: inline-block;
    margin-right: 10px;
}

#user-info input {
    display: inline-block;
    width: 200px; /* 入力欄の幅 */
    padding: 10px;
    font-size: 16px;
}

/* 「ゲームを始める」ボタンのデフォルトデザイン */
#start-quiz {
    display: block;
    width: 80%;
    max-width: 300px;
    margin: 10px auto;
    padding: 10px 20px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    color: white; /* テキストの色を白に */
    background-color: #4CAF50; /* 緑色 */
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* ボタンを押したときのエフェクト */
#start-quiz:hover {
    background-color: #45a049; /* 少し濃い緑 */
}

/* ボタンが無効の時（もし無効にする場合） */
#start-quiz:disabled {
    background-color: gray;
    cursor: not-allowed;
}

/* スマホ (600px以下) の場合のみ縦並び */
@media (max-width: 600px) {
    #user-info label,
    #user-info input,
    #start-quiz {
        display: block; /* 縦並び */
        width: 80%; /* 横幅を広げる */
        max-width: 300px; /* 最大幅を設定 */
        margin: 10px auto; /* 中央揃え */
        text-align: center;
    }
}
