/* Quiz Modal Styles */
.quiz-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.quiz-content {
    background: #111;
    border: 2px solid #00ff41;
    border-radius: 15px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.quiz-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}

.quiz-header h3 {
    color: #00ff41;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.quiz-progress {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

.quiz-progress .progress-bar {
    width: 200px;
    height: 8px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
}

.quiz-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff41, #00cc33);
    transition: width 0.3s ease;
}

#question-counter {
    color: #ccc;
    font-size: 0.9rem;
    font-weight: bold;
}

.question-container {
    margin-bottom: 30px;
}

.question-text {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 20px;
    line-height: 1.4;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-label {
    display: flex;
    align-items: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.option-label:hover {
    border-color: #00ff41;
    background: rgba(0, 255, 65, 0.1);
}

.option-label input[type="radio"] {
    margin-right: 12px;
    accent-color: #00ff41;
}

.option-text {
    color: #ccc;
    font-size: 1rem;
    line-height: 1.3;
}

.quiz-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.quiz-actions button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

#prev-question {
    background: #666;
    color: #fff;
}

#prev-question:not(:disabled):hover {
    background: #777;
}

#prev-question:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#next-question, #submit-quiz {
    background: linear-gradient(45deg, #00ff41, #00cc33);
    color: #000;
}

#next-question:hover, #submit-quiz:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 65, 0.3);
}

.quiz-results {
    text-align: center;
}

.result-header {
    margin-bottom: 30px;
}

.result-header i {
    font-size: 4rem;
    margin-bottom: 15px;
}

.result-header h3 {
    color: #fff;
    font-size: 2rem;
    margin: 0;
}

.result-stats {
    display: flex;
    justify-content: space-around;
    margin: 30px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #00ff41;
    display: block;
    margin-bottom: 5px;
}

.stat-label {
    color: #ccc;
    font-size: 0.9rem;
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.result-actions button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.review-btn {
    background: #007bff;
    color: #fff;
}

.retry-btn {
    background: #ffc107;
    color: #000;
}

.close-btn {
    background: #dc3545;
    color: #fff;
}

.result-actions button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.detailed-results {
    max-height: 60vh;
    overflow-y: auto;
}

.detailed-results h3 {
    color: #00ff41;
    text-align: center;
    margin-bottom: 20px;
}

.result-item {
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid;
}

.result-item.correct {
    background: rgba(0, 255, 65, 0.1);
    border-left-color: #00ff41;
}

.result-item.incorrect {
    background: rgba(255, 107, 107, 0.1);
    border-left-color: #ff6b6b;
}

.result-item h4 {
    color: #fff;
    margin-bottom: 10px;
}

.result-item p {
    color: #ccc;
    margin: 8px 0;
    line-height: 1.4;
}

.no-quiz {
    text-align: center;
    padding: 40px 20px;
}

.no-quiz i {
    font-size: 4rem;
    color: #00ff41;
    margin-bottom: 20px;
}

.no-quiz h3 {
    color: #fff;
    margin-bottom: 15px;
}

.no-quiz p {
    color: #ccc;
    margin-bottom: 25px;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .quiz-content {
        padding: 20px;
        width: 95%;
    }
    
    .quiz-progress {
        flex-direction: column;
        gap: 10px;
    }
    
    .quiz-progress .progress-bar {
        width: 100%;
    }
    
    .quiz-actions {
        flex-direction: column;
    }
    
    .result-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .result-actions button {
        width: 100%;
    }
}