/* ===== 全体設定 ===== */
body {
    /* 余白リセット */
    margin: 0;
    padding: 0;

    /* 明るい背景色 */
    background-color: #f8fafc;

    /* 標準的で読みやすいフォント */
    font-family: "Segoe UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;

    /* 基本文字色 */
    color: #0f172a;

    /* 画面中央寄せ */
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ===== メインコンテナ ===== */
.container {
    /* 横幅制限 */
    width: 90%;
    max-width: 800px;

    /* 白カード */
    background-color: #ffffff;

    /* 余白 */
    padding: 32px;

    /* 角丸 */
    border-radius: 14px;

    /* ふわっとした影 */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* ===== 見出し ===== */
h1, h2 {
    text-align: center;
    letter-spacing: 0.05em;

    /* 爽やかな青 */
    color: #2563eb;
}

/* ===== 問題文 ===== */
#question {
    /* 主役なので大きく */
    font-size: 1.6rem;
    line-height: 1.7;

    /* 余白 */
    margin-top: 30px;
    min-height: 3em;

    /* タイプライター感 */
    font-family: "Consolas", "Courier New", monospace;
}

/* ===== 解答 ===== */
#answer {
    font-size: 1.2rem;
    margin-top: 20px;

    /* 正解感のある緑 */
    color: #16a34a;
}

/* ===== フォーム ===== */
form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

/* ===== 入力欄共通 ===== */
input, textarea, select {
    width: 90%;
    max-width: 400px;

    padding: 10px 12px;

    font-size: 1rem;

    /* 明るい枠線 */
    border: 1px solid #cbd5f5;
    border-radius: 8px;

    /* 背景 */
    background-color: #f8fafc;
    color: #0f172a;
}

/* フォーカス時 */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #2563eb;
    background-color: #ffffff;
}

/* ===== ボタン ===== */
button {
    padding: 10px 26px;

    background-color: #2563eb;
    color: #ffffff;

    border: none;
    border-radius: 8px;

    font-size: 1rem;
    font-weight: bold;

    cursor: pointer;

    transition: background-color 0.15s ease, transform 0.1s ease;
}

a {
    padding: 10px 26px;

    background-color: #2563eb;
    color: #ffffff;

    border: none;
    border-radius: 8px;

    font-size: 1rem;
    font-weight: bold;

    cursor: pointer;

    transition: background-color 0.15s ease, transform 0.1s ease;
}

/* ホバー */
button:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
}

/* 押下 */
button:active {
    transform: translateY(0);
}

/* ===== テーブル ===== */
table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 20px;
}

/* 表ヘッダ */
th {
    background-color: #e0e7ff;
    color: #1e3a8a;
    padding: 10px;
}

/* 表セル */
td {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
}

/* 偶数行を少し色分け */
tr:nth-child(even) td {
    background-color: #f8fafc;
}

/* ===== 区切り線 ===== */
hr {
    border: none;
    border-top: 1px solid #e5e7eb;
}

/* ===== スマホ対応 ===== */
@media (max-width: 600px) {
    #question {
        font-size: 1.3rem;
    }

    #answer {
        font-size: 1.1rem;
    }
}