:root {
    --primary-color: #4f46e5;
    --secondary-color: #64748b;
    --text-color: #333;
    --bg-color: #f7f9fc;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.quiz-container {
    margin: 0 auto;
    background-color: var(--white);
    padding: 20px;
    box-shadow: 0 0 15px rgba(0,0,0,0.05);
}

/* PC表示でボタングループの最大幅を制限して読みやすくする */
@media (min-width: 640px) {
    .button-group {
        max-width: 560px;
        margin-left: auto;
        margin-right: auto;
    }
}

.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 20px;
    animation: fadeIn 0.3s ease;
}

.screen.active {
    display: flex;
}

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

.quiz-container h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.quiz-container h2 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.quiz-container p {
    margin-bottom: 20px;
    color: #555;
}

.button-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.btn {
    appearance: none;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 30px;
    padding: 15px 20px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.3);
    width: 100%;
}

.btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.3);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    box-shadow: none;
}

.btn-outline:active {
    background-color: #f1f5f9;
}

.btn-share {
    background-color: #000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.btn-share:active {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-share-fb {
    background-color: #1877F2;
    box-shadow: 0 4px 6px rgba(24, 119, 242, 0.3);
}

.btn-share-fb:active {
    box-shadow: 0 2px 4px rgba(24, 119, 242, 0.3);
}

.question-box {
    background-color: #f8fafc;
    border-radius: 15px;
    padding: 20px;
    width: 100%;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 20px;
    border-left: 5px solid var(--primary-color);
}

.progress {
    font-weight: bold;
    color: #888;
    margin-bottom: 15px;
}

.score-display {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 20px 0;
}

.wrong-answers-list {
    width: 100%;
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: left;
}

.wa-title {
    color: var(--text-color);
    font-size: 1.2rem;
    margin-bottom: 15px;
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
    text-align: center;
}

.wrong-answer-item {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.wa-q {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.wa-correct {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 5px;
}

.wa-user {
    color: #666;
    margin-bottom: 0;
}
