body {
    font-family: 'Hiragino Maru Gothic ProN', 'Rounded Mplus 1c', 'Quicksand', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #e0f7fa;
    color: #333;
    margin: 0;
    padding: 0;
}

header {
    background-color: #ff9800;
    color: white;
    width: 100%;
    text-align: center;
    padding: 10px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

h1 {
    margin: 0;
    font-size: 1.5em;
}

h2 {
    color: #00796b;
    font-size: 1.3em;
}

.container {
    background: #fff;
    padding: 20px 20px 30px;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    width: 90%;
    max-width: 450px;
    text-align: center;
    margin-bottom: 20px;
}

/* メニューボタン群 */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.menu-grid-bottom {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu-btn {
    font-size: 1.1em;
    font-weight: bold;
    padding: 15px 5px;
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 0 rgba(0,0,0,0.2);
    transition: transform 0.1s, box-shadow 0.1s;
}

.menu-btn:active {
    transform: translateY(4px);
    box-shadow: none;
}

.dan-btn { background-color: #4caf50; }
.dan-btn:hover { background-color: #43a047; }
.random-btn { background-color: #9c27b0; font-size: 1.2em; }
.random-btn:hover { background-color: #7b1fa2; }
.weak-btn { background-color: #e91e63; font-size: 1.2em; }
.weak-btn:hover { background-color: #d81b60; }
.history-btn { background-color: #2196f3; font-size: 1.2em; }
.history-btn:hover { background-color: #1e88e5; }

/* クイズエリア */
#question-area {
    font-size: 3em;
    font-weight: bold;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #424242;
}

#question-area span {
    margin: 0 5px;
}

#answer-input {
    font-size: 2em;
    width: 100px;
    text-align: center;
    padding: 10px;
    border: 3px solid #ff9800;
    border-radius: 10px;
    outline: none;
}

#answer-input:focus {
    border-color: #e65100;
}

.action-btn {
    font-size: 1.2em;
    font-weight: bold;
    padding: 12px 20px;
    margin-top: 15px;
    border: none;
    border-radius: 10px;
    background-color: #ff9800;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 0 #e65100;
}

.action-btn:active {
    transform: translateY(4px);
    box-shadow: none;
}

.back-btn {
    background-color: #9e9e9e;
    box-shadow: 0 4px 0 #757575;
    margin-left: 10px;
}

#feedback {
    font-size: 1.5em;
    min-height: 2em;
    margin-top: 15px;
}

#feedback.correct {
    color: #f44336; /* 花丸をイメージした赤 */
    font-weight: bold;
}

#feedback.incorrect {
    color: #3f51b5;
    font-weight: bold;
}

/* 成績グラフ表示 */
.history-item {
    margin-bottom: 15px;
    text-align: left;
    background: #f5f5f5;
    padding: 10px;
    border-radius: 8px;
}

.history-date {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.history-stats {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.bar-container {
    width: 100%;
    background-color: #ddd;
    border-radius: 5px;
    overflow: hidden;
    height: 20px;
    display: flex;
}

.bar-correct {
    background-color: #4caf50;
    height: 100%;
}

.bar-incorrect {
    background-color: #f44336;
    height: 100%;
}

.result-message {
    font-size: 1.5em;
    font-weight: bold;
    color: #ff5722;
    margin: 15px 0;
}