/* MCQ (Multiple Choice Questions) Styles for Language Exercises */

/* MCQ Container */
.mcq-container {
    margin: 20px 0;
    padding: 0;
}

/* MCQ Question */
.mcq-question {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.mcq-question:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.mcq-question h5 {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
}

/* MCQ Options */
.mcq-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mcq-option {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mcq-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.mcq-option:hover {
    background: #e3f2fd;
    border-color: var(--accent-color);
    transform: translateX(5px);
}

.mcq-option:hover::before {
    left: 100%;
}

.mcq-option input[type="radio"] {
    margin-right: 15px;
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.mcq-option input[type="radio"]:checked + .option-text {
    color: var(--primary-color);
    font-weight: 600;
}

.option-text {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-color);
    flex: 1;
    transition: all 0.3s ease;
}

/* Answer States */
.mcq-option.correct {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.mcq-option.correct .option-text {
    color: #155724;
    font-weight: 600;
}

.mcq-option.incorrect {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.mcq-option.incorrect .option-text {
    color: #721c24;
    font-weight: 600;
}

.mcq-option.correct-answer {
    background: #cce5ff;
    border-color: #007bff;
    color: #004085;
}

.mcq-option.correct-answer .option-text {
    color: #004085;
    font-weight: 600;
}

/* Check Button Styling */
.check-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(92, 64, 51, 0.3);
    position: relative;
    overflow: hidden;
    min-width: 160px;
    justify-content: center;
}

.check-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.check-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(92, 64, 51, 0.4);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

.check-btn:hover::before {
    left: 100%;
}

.check-btn:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 4px 15px rgba(92, 64, 51, 0.3);
}

.check-btn:focus {
    outline: 3px solid rgba(247, 178, 95, 0.5);
    outline-offset: 2px;
}

.btn-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.check-btn:hover .btn-icon {
    transform: scale(1.1);
}

.btn-text {
    font-family: 'Noto Sans Devanagari', 'Arial', sans-serif;
    font-weight: 600;
}

/* Exercise Results */
.exercise-result {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 5px solid var(--accent-color);
}

.result-summary h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.result-summary p {
    margin: 8px 0;
    font-size: 1.1rem;
    color: var(--text-color);
}

.result-message {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .mcq-question {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .mcq-question h5 {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .mcq-option {
        padding: 12px 15px;
        gap: 10px;
    }
    
    .mcq-option input[type="radio"] {
        width: 18px;
        height: 18px;
        margin-right: 12px;
    }
    
    .option-text {
        font-size: 0.95rem;
    }
    
    .check-btn {
        padding: 14px 28px;
        font-size: 1rem;
        min-width: 140px;
    }
    
    .btn-icon {
        font-size: 1.1rem;
    }
    
    .exercise-result {
        padding: 15px;
        margin-top: 20px;
    }
    
    .result-summary h3 {
        font-size: 1.2rem;
    }
    
    .result-summary p {
        font-size: 1rem;
    }
    
    .result-message {
        font-size: 1rem;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .mcq-question {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .mcq-question h5 {
        font-size: 0.95rem;
        margin-bottom: 10px;
    }
    
    .mcq-option {
        padding: 10px 12px;
        gap: 8px;
    }
    
    .mcq-option input[type="radio"] {
        width: 16px;
        height: 16px;
        margin-right: 10px;
    }
    
    .option-text {
        font-size: 0.9rem;
    }
    
    .check-btn {
        padding: 12px 24px;
        font-size: 0.95rem;
        min-width: 120px;
    }
    
    .btn-icon {
        font-size: 1rem;
    }
    
    .exercise-result {
        padding: 12px;
        margin-top: 15px;
    }
    
    .result-summary h3 {
        font-size: 1.1rem;
    }
    
    .result-summary p {
        font-size: 0.95rem;
    }
    
    .result-message {
        font-size: 0.95rem;
        padding: 10px;
    }
}

/* Animation for correct/incorrect answers */
@keyframes correctAnswer {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes incorrectAnswer {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
    100% { transform: translateX(0); }
}

.mcq-option.correct {
    animation: correctAnswer 0.6s ease;
}

.mcq-option.incorrect {
    animation: incorrectAnswer 0.6s ease;
}

/* Focus styles for accessibility */
.mcq-option:focus-within {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .mcq-option {
        border-width: 3px;
    }
    
    .mcq-option.correct {
        background: #000;
        color: #fff;
        border-color: #fff;
    }
    
    .mcq-option.incorrect {
        background: #fff;
        color: #000;
        border-color: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .mcq-option,
    .check-btn,
    .mcq-question {
        transition: none;
    }
    
    .mcq-option::before,
    .check-btn::before {
        display: none;
    }
    
    .mcq-option.correct,
    .mcq-option.incorrect {
        animation: none;
    }
}
