/* Quiz Container */
.quiz-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Quiz Header */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 30px;
}

.quiz-timer {
    background: #dc3545;
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 16px;
}

.quiz-progress {
    color: #666;
    font-size: 14px;
}

/* Quiz Question Block */
.quiz-question-block {
    display: none;
    animation: fadeIn 0.3s ease;
}

.quiz-question-block:first-child {
    display: block;
}

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

/* Quiz Image */
.quiz-image {
    margin-bottom: 25px;
    text-align: center;
}

.quiz-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Question Text */
.quiz-question-text {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
    line-height: 1.6;
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    border-radius: 4px;
}

/* Quiz Options */
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.quiz-option {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    text-align: left;
}

.quiz-option:hover {
    border-color: #007bff;
    background: #f0f8ff;
    transform: translateX(5px);
}

.quiz-option.selected {
    background: #007bff;
    border-color: #007bff;
    color: #fff;
}

.option-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: #dc3545;
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    margin-right: 15px;
    flex-shrink: 0;
}

.quiz-option.selected .option-letter {
    background: #fff;
    color: #007bff;
}

.option-text {
    flex: 1;
}

/* Navigation */
.quiz-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
}

.quiz-nav-btn {
    padding: 12px 25px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-nav-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,123,255,0.3);
}

.quiz-prev {
    background: #6c757d;
}

.quiz-prev:hover {
    background: #545b62;
}

.quiz-list {
    flex: 1;
}

/* Finish Button */
.quiz-finish-btn-wrapper {
    margin-top: 30px;
    text-align: center;
}

.quiz-finish-btn {
    padding: 15px 50px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-finish-btn:hover {
    background: #218838;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(40,167,69,0.3);
}

/* Modal - Liste */
.quiz-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.quiz-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.quiz-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

.quiz-modal-close:hover {
    color: #333;
}

.quiz-modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
}

.quiz-list-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-list-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid transparent;
}

.quiz-list-item:hover {
    background: #e9ecef;
    border-color: #007bff;
}

.quiz-list-item.answered {
    background: #d4edda;
    color: #155724;
}

/* Result Screen */
.quiz-result {
    max-width: 800px;
    margin: 40px auto;
    padding: 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.quiz-result-content {
    animation: fadeIn 0.5s ease;
}

.result-emoji {
    font-size: 80px;
    margin-bottom: 20px;
}

.quiz-result h2 {
    font-size: 32px;
    color: #333;
    margin-bottom: 30px;
}

.result-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 30px;
    border-radius: 12px;
    min-width: 120px;
}

.stat-item.correct {
    background: #d4edda;
    color: #155724;
}

.stat-item.wrong {
    background: #f8d7da;
    color: #721c24;
}

.stat-item.percentage {
    background: #d1ecf1;
    color: #0c5460;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    display: block;
}

.stat-label {
    font-size: 14px;
    margin-top: 5px;
    font-weight: 600;
}

.wrong-answers {
    margin-top: 40px;
    text-align: left;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
}

.wrong-answers h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.wrong-answer-item {
    padding: 15px;
    background: #fff;
    border-left: 4px solid #dc3545;
    margin-bottom: 12px;
    border-radius: 4px;
}

.user-wrong {
    color: #dc3545;
    font-weight: 600;
}

.correct-answer {
    color: #28a745;
    font-weight: 600;
}

.quiz-restart-btn {
    margin-top: 30px;
    padding: 15px 40px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-restart-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,123,255,0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .quiz-container {
        padding: 15px;
        margin: 20px 10px;
    }
    
    .quiz-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .quiz-question-text {
        font-size: 18px;
    }
    
    .quiz-navigation {
        flex-direction: column;
    }
    
    .result-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .result-emoji {
        font-size: 60px;
    }
    
    .quiz-result h2 {
        font-size: 24px;
    }
}

/* Editor Styles */
.quiz-block-editor {
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #f8f9fa;
}

.quiz-editor-wrapper {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
}

.quiz-editor-section {
    margin-bottom: 20px;
}
