@charset "UTF-8";

body{
    background-color: #3cad7e;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN",
                    "Hiragino Sans", "Noto Sans", Meiryo, sans-serif;
    color: #fefefe;
    
    justify-content: center; /* 水平方向に中央揃え */
    align-items: center; /* 垂直方向に中央揃え */
    text-align: center;
}

#userAnswer{
    position: relative;
    width: 250px;
    margin-top: 10px;
    padding: 15px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    color: #333333;
    outline: none;
}

/* セレクトボックス */
.unitSelect select {
    width: 250px; /* 他の入力フィールドと統一 */
    padding: 15px;
    border: none;
    border-radius: 20px;
    font-size: 16px;
    background-color: #ffffff;
    color: #333333;
    appearance: none; /* デフォルトの矢印を非表示 */
    -webkit-appearance: none; /* Safari用 */
    -moz-appearance: none; /* Firefox用 */
    outline: none; /* フォーカス時の青い枠を削除 */
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1); /* 軽い影を追加 */
    transition: all 0.2s ease-in-out;
}

.unitSelect {
    position: relative;
    display: inline-block;
}

.unitSelect::after {
    content: '▼'; /* 矢印の文字 */
    position: absolute;
    top: 50%;
    right: 15px; /* 矢印の位置を調整 */
    transform: translateY(-50%);
    color: #333333;
    font-size: 14px;
    pointer-events: none; /* 矢印はクリックできないように */
}

.unitSelect select:hover {
    background-color: #f0f0f0; /* ホバー時の背景色 */
}

.unitSelect select:focus {
    box-shadow: 0 0 6px rgba(60, 173, 126, 0.8); /* フォーカス時に強調 */
}

/* セレクトボックスのモバイル対応（タッチ時のエフェクト） */
.unitSelect select:active {
    background-color: #e6e6e6;
}

button {
    position: relative;
    width: 100%;
    max-width: 300px;
    text-decoration: none;
    color: #1d1d1d;
    padding: 12px 20px;
    border-radius: 20px;
    border: none;
    background-color: #ffffff;
    font-weight: bold;
    font-size: 16px;
    color: #1d1d1d;
    cursor: pointer;
    transition: transform .2s;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    margin-top: 10px; /* 上の要素との間隔を確保 */
    &:active{
        transform: scale(.95);
    }
}

/* デフォルト: デスクトップ向けスタイル（既存のスタイル） */

/* タブレット対応（横幅768px以下） */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    h1 {
        font-size: 24px;
        text-align: center;
    }

    button {
        width: 100%; /* ボタンを画面幅に合わせる */
        font-size: 14px; /* フォントサイズを少し小さく */
    }

    #practiceContainer {
        text-align: center;
    }

    #userAnswer {
        width: 100%; /* 入力ボックスも全幅に合わせる */
        max-width: 300px;
    }
}

/* スマートフォン対応（横幅480px以下） */
@media (max-width: 480px) {
    h1 {
        font-size: 20px;
    }

    button {
        font-size: 12px;
        padding: 10px; /* ボタンの高さを少し調整 */
    }

    #userAnswer {
        padding: 10px; /* 入力ボックスの高さを調整 */
        width: 100%;
        max-width: 300px;
        font-size: 14px;
    }

    #question {
        font-size: 16px;
    }
}

