/* style.css */

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

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* 固定進捗バー */
.progress-bar-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 15px 20px;
}

.progress-header {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.progress-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
}

.progress-count {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.progress-bar {
    max-width: 800px;
    margin: 0 auto;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    width: 0%;
    transition: width 0.3s ease;
}

/* メインコンテンツ */
.main-content {
    margin-top: 100px;
    padding: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.question-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.question-card:hover {
    transform: translateY(-2px);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.question-number {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.result-icon {
    font-size: 1.5rem;
}

.correct {
    color: #4CAF50;
}

.incorrect {
    color: #f44336;
}

.question-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    margin-bottom: 20px;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fafafa;
}

.option:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.option.selected {
    border-color: #667eea;
    background: #e3f2fd;
}

.option.correct-answer {
    border-color: #4CAF50;
    background: #e8f5e8;
    color: #2e7d32;
}

.option.wrong-answer {
    border-color: #f44336;
    background: #ffebee;
    color: #c62828;
}

.option.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.option-letter {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.option-text {
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.answer-feedback {
    text-align: center;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
}

.answer-feedback.correct {
    background: #e8f5e8;
    color: #2e7d32;
    border: 2px solid #4CAF50;
}

.answer-feedback.incorrect {
    background: #ffebee;
    color: #c62828;
    border: 2px solid #f44336;
}

.correct-answer-info {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #555;
}

.explanation {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    border-radius: 5px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.explanation-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

/* 完了画面 */
.completion-screen {
    text-align: center;
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-top: 50px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.completion-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.completion-title {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
}

.score-display {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.score-current {
    color: #667eea;
}

.score-total {
    color: #999;
}

.score-message {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
}

.restart-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .progress-bar-container {
        padding: 12px 15px;
    }

    .progress-title {
        font-size: 1rem;
    }

    .progress-count {
        font-size: 0.8rem;
    }

    .main-content {
        margin-top: 90px;
        padding: 15px;
    }

    .question-card {
        padding: 20px;
        margin-bottom: 20px;
    }

    .question-text {
        font-size: 1rem;
    }

    .option {
        padding: 12px;
    }

    .option-text {
        font-size: 0.9rem;
    }

    .completion-screen {
        padding: 30px 20px;
        margin-top: 30px;
    }

    .completion-title {
