/* Free Exercise Quiz Styles */

/* Base Quiz Container */
.quiz-section {
    min-height: 100vh;
    padding: 2rem 0;
    background-color: #f8f9fa;
}

.quiz-wrapper {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 2rem;
}

/* Quiz Header */
.quiz-header {
    background: linear-gradient(135deg, var(--primary) 0%, #145558 100%);
    color: #ffffff;
    padding: 2rem;
    text-align: center;
}

.quiz-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.quiz-description {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

/* Progress Bar */
.progress-wrapper {
    max-width: 500px;
    margin: 0 auto;
}

.progress {
    height: 8px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    background-color: #ffffff;
    transition: width 0.3s ease;
}

.progress-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Quiz Content Areas */
.quiz-content {
    padding: 3rem 2rem;
}

/* Start Screen */
.start-screen {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.quiz-icon {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.start-quiz-btn {
    background-color: var(--primary);
    border-color: var(--primary);
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.start-quiz-btn:hover {
    background-color: #145558;
    border-color: #145558;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 114, 116, 0.3);
}

/* Question Container */
.question-container {
    max-width: 700px;
    margin: 0 auto;
}

.question-text {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--heading-color);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Single Choice Answers */
.answers-grid {
    display: grid;
    gap: 1rem;
}

.answer-option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
    color: var(--text-color);
    text-align: left;
    width: 100%;
    position: relative;
    overflow: hidden;
    margin-bottom: 8px;
}

.answer-option:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateX(4px);
}

.answer-option.selected-correct {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
    pointer-events: none;
}

.answer-option.selected-incorrect {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
    pointer-events: none;
}

.answer-option.disabled {
    pointer-events: none;
    opacity: 0.6;
}

/* Gap Fill Input */
.gap-fill-container {
    text-align: center;
}

.gap-fill-input {
    font-size: 1.25rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
    transition: border-color 0.3s ease;
}

.gap-fill-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(25, 114, 116, 0.25);
}

.gap-fill-input.correct {
    border-color: #28a745;
    background-color: #d4edda;
}

.gap-fill-input.incorrect {
    border-color: #dc3545;
    background-color: #f8d7da;
}

/* Answer Feedback */
.answer-feedback {
    text-align: center;
    margin-top: 2rem;
    animation: fadeIn 0.3s ease;
}

.feedback-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.feedback-icon.correct::before {
    content: "✓";
    color: #28a745;
}

.feedback-icon.incorrect::before {
    content: "✗";
    color: #dc3545;
}

.feedback-text {
    font-size: 1.1rem;
    color: #6c757d;
}

/* Results Screen */
.results-container {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.results-header {
    margin-bottom: 2rem;
}

.result-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.result-icon.perfect::before {
    content: "🎉";
}

.result-icon.excellent::before {
    content: "😄";
}

.result-icon.great::before {
    content: "😊";
}

.result-icon.good::before {
    content: "🙂";
}

.result-icon.poor::before {
    content: "😕";
}

.results-title {
    font-size: 2rem;
    color: var(--heading-color);
    margin-bottom: 1rem;
}

.score-display {
    font-size: 3rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.score-number {
    color: var(--primary);
}

.score-total {
    color: #6c757d;
    font-size: 2rem;
}

.score-percentage {
    font-size: 1.5rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.result-message {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 2rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.action-buttons .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
}

/* Answer Review */
.answer-review {
    margin-top: 3rem;
    text-align: left;
}

.review-title {
    font-size: 1.5rem;
    color: var(--heading-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.review-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.review-item.correct {
    border-left: 4px solid #28a745;
}

.review-item.incorrect {
    border-left: 4px solid #dc3545;
}

.review-question {
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--heading-color);
}

.review-answer {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.review-answer-label {
    font-weight: 500;
    margin-right: 0.5rem;
    min-width: 120px;
}

.review-answer-text {
    flex: 1;
}

.review-correct {
    color: #28a745;
}

.review-incorrect {
    color: #dc3545;
}

.review-explanation {
    background: #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.review-explanation-label {
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

/* CTA Section */
.cta-section {
    margin-top: 3rem;
}

.cta-card {
    background: linear-gradient(135deg, var(--primary) 0%, #145558 100%);
    border-radius: 16px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    color: #ffffff;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.cta-description {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.btn-cta {
    background: #ffffff;
    color: var(--primary);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-cta:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: var(--primary);
}

.cta-decoration {
    position: absolute;
    right: -50px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 200px;
    opacity: 0.1;
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.question-container {
    animation: slideIn 0.3s ease;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .quiz-header {
        padding: 1.5rem;
    }
    
    .quiz-title {
        font-size: 1.5rem;
    }
    
    .quiz-content {
        padding: 2rem 1rem;
    }
    
    .question-text {
        font-size: 1.25rem;
    }
    
    .answer-option {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .score-display {
        font-size: 2.5rem;
    }
    
    .cta-card {
        padding: 2rem;
    }
    
    .cta-title {
        font-size: 1.5rem;
    }
    
    .cta-decoration {
        display: none;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
}

/* Touch-friendly adjustments */
@media (hover: none) {
    .answer-option:hover {
        background: #f8f9fa;
        transform: none;
    }
    
    .answer-option:active {
        background: #e9ecef;
        transform: scale(0.98);
    }
}