/* style.css */

body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    color: #333;
}

#game-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 700px;
    text-align: center;
    box-sizing: border-box;
}

.screen {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

h1 {
    color: #007bff;
    margin-bottom: 20px;
    font-size: 2em;
    line-height: 1.3;
}

h2 {
    color: #555;
    margin-bottom: 15px;
    font-size: 1.5em;
}

p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.btn {
    background-color: #007bff;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 10px;
}

.btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

#name-input {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box;
}

#quiz-progress {
    font-size: 1.1em;
    margin-bottom: 20px;
    color: #007bff;
    font-weight: bold;
}

#options-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.option-btn {
    background-color: #e9ecef;
    color: #333;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    text-align: left;
}

.option-btn:hover {
    background-color: #d6e9ff;
    border-color: #007bff;
}

/* 結果一覧表示用の追加スタイル */
#results-summary {
    width: 90%;
    max-width: 650px;
    margin: 20px auto;
    text-align: left;
    border-top: 2px solid #eee;
    padding-top: 20px;
}
.result-item {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}
.result-item h3 {
    margin-top: 0;
    font-size: 1.1em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
}
.result-item .question-text {
    font-weight: bold;
    margin-bottom: 10px;
}
.result-item p {
    margin: 5px 0;
    font-size: 0.95em;
}
.result-item .user-answer {
    background-color: #e9f5ff;
    padding: 5px;
    border-radius: 4px;
}
.result-item .correct-answer {
    background-color: #fffbe2;
    padding: 5px;
    border-radius: 4px;
}
.correct-label {
    color: #28a745;
    font-weight: bold;
    font-size: 1.2em;
}
.incorrect-label {
    color: #dc3545;
    font-weight: bold;
    font-size: 1.2em;
}
#commentary-box {
    margin-top: 15px;
    padding: 10px;
    background-color: #fff;
    border: 1px dashed #ccc;
    border-radius: 5px;
}
#commentary-box h4 {
    margin: 0 0 5px 0;
    font-size: 1em;
    color: #333;
}

@media (max-width: 600px) {
    h1 {
        font-size: 1.5em;
    }

    h2 {
        font-size: 1.2em;
    }

    .btn {
        padding: 10px 20px;
        font-size: 1em;
    }

    .option-btn {
        font-size: 0.9em;
        padding: 10px;
    }
}