body {
    font-family:  "Noto Sans SC", sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #f0f0f0;
}


.container {
    text-align: center;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 95%;
    max-width: 480px;
}


.character {
    max-width: 80px;
    height: auto;
    margin-bottom: 5px; /* ← 15px から減らす */
}


/* イメージを大きくするスタイル */
.large-character {
    max-width: 120px;
    height: auto;
    margin-bottom: 15px;
}


.initial-message, .kanji {
    font-size: 18px;
    margin-bottom: 5px;
}

.kanji {
    font-size: 48px;
    font-weight: bold;
}

/* 文字色を赤系にし、シャドウ効果を追加するスタイル */
.success-message {
    color: #FF4DA6; /* 明るいピンク寄りの赤 */
    text-shadow: 1px 1px 3px rgba(255, 105, 180, 0.6); /* ピンク系の柔らかい影 */
    font-weight: bold;
}


.input-field {
    margin-bottom: 5px;
}

#pinyin-input {
    padding: 8px;
    font-size: 16px;
    width: 60%;
    max-width: 200px;
}

input:disabled {
    background-color: #d3d3d3; /* グレイに設定 */
    color: #a9a9a9; /* テキストの色もグレイに設定 */
}

button {
    padding: 8px 12px;
    font-size: 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 5px;
    pointer-events: auto;
}

button:hover {
    opacity: 0.8;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

#check-button {
    background-color: #FFD700;
    color: black;
}

#result {
    font-size: 16px;
    margin-bottom: 5px;
    min-height: 24px;
}

#score {
    font-size: 16px;
    margin-bottom: 5px;
}

.tone-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 15px;
    gap: 2px;
}

.tone-buttons button {
    font-size: 14px;
    padding: 0;
    border: none;
    cursor: pointer;
    width: calc(12.5% - 4px); /* 調整して全てのボタンが1行に収まるように */
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    color: black;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box; /* パディングやボーダーも幅に含める */
    margin: 1px; /* ボタン間の微調整を行う */
}

.tone-a { background-color: #FF6B6B; }
.tone-e { background-color: #4ECDC4; }
.tone-i { background-color: #FFD93D; }
.tone-o { background-color: #6BCB77; }
.tone-u { background-color: #FF8E00; }
.tone-v { background-color: #DDA0DD; }

@media (min-width: 481px) {
    .container {
        padding: 20px;
    }

    .tone-buttons button {
        font-size: 16px; /* より大きな画面ではフォントサイズを少し大きく */
        width: calc(12.5% - 3px); /* より大きな画面では間隔を少し広げる */
    }
}

@media (max-width: 360px) {
    .tone-buttons button {
        font-size: 12px; /* さらに小さな画面ではフォントサイズを更に縮小 */
        width: calc(12.5% - 1px); /* さらに小さな画面では間隔を更に縮める */
    }
}

@media (max-width: 375px) {
    .character {
        max-width: 60px;
        margin-bottom: 5px;
    }
}


@media (max-width: 375px) {
    .kanji {
        font-size: 32px;
    }
}


.horizontal-box {
    display: flex;
    align-items: center; /* 縦中央に揃える */
    justify-content: center;
    gap: 10px; /* 画像と漢字の間隔 */
    margin-bottom: 15px;
}

.horizontal-box .character {
    max-width: 60px;
    height: auto;
    margin-bottom: 0; /* 横並びにするので下マージンは不要 */
}


