body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: #f0f2f5;
    padding: 20px 0;
}

.container {
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.card {
    width: 100%;
    min-height: 150px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 20px;
    box-sizing: border-box;
}

#question {
    font-size: 1.2em;
    line-height: 1.5;
}

#options-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.option-btn {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background-color: #fff;
    font-size: 0.9em;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
}

.option-btn:hover:not(:disabled) {
    background-color: #f5f5f5;
}

.option-btn.correct {
    background-color: #d4edda; /* 緑 */
    border-color: #c3e6cb;
    color: #155724;
}

.option-btn.incorrect {
    background-color: #f8d7da; /* 赤 */
    border-color: #f5c6cb;
    color: #721c24;
}

#result-container {
    margin-bottom: 20px;
    min-height: 50px;
}

#result-text {
    font-size: 1.5em;
    font-weight: bold;
}

#result-text.correct {
    color: #155724;
}

#result-text.incorrect {
    color: #721c24;
}

#explanation-text {
    margin-top: 10px;
    font-size: 0.9em;
    color: #6c757d;
    line-height: 1.6;
}

.navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px; /* ボタン間の隙間 */
    margin-top: 25px;
}

#prev-btn,
#next-btn {
    padding: 18px 20px;
    border: none;
    border-radius: 12px;
    background-color: #007bff;
    color: white;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#prev-btn:hover:not(:disabled),
#next-btn:hover:not(:disabled) {
    background-color: #0056b3;
}

#prev-btn:active:not(:disabled),
#next-btn:active:not(:disabled) {
    transform: translateY(2px);
    box-shadow: none;
}

#prev-btn:disabled,
#next-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}