/* Enhanced Quiz Experience Styles */

.quiz-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    z-index: 10000;
    overflow-y: auto;
    padding: 20px;
}

.quiz-modal-content {
    background: white;
    max-width: 800px;
    margin: 40px auto;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
}

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

.quiz-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.quiz-modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0.3) 100%);
}

.quiz-modal-header.correct {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.quiz-modal-header.incorrect {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
}

.quiz-modal-header.success {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
}

.quiz-modal-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quiz-modal-header h3 i {
    font-size: 24px;
}

.quiz-modal-close {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    max-width: 36px;
    max-height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: 300;
    line-height: 1;
    flex-shrink: 0;
    padding: 0;
}

.quiz-modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

.quiz-modal-close:active {
    transform: rotate(90deg) scale(0.95);
}

/* Quiz Selection */
.quiz-selection-body {
    padding: 30px;
}

.quiz-intro {
    text-align: center;
    margin-bottom: 30px;
}

.quiz-intro h4 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
}

.quiz-intro p {
    color: #666;
    font-size: 16px;
}

.quiz-card {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.quiz-card.current {
    border-color: #667eea;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0ff 100%);
}

.quiz-card.completed {
    background: #e8f5e9;
    border-color: #28a745;
}

.quiz-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.quiz-number {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

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

.quiz-status {
    text-align: center;
    padding: 10px;
    font-size: 16px;
    font-weight: 600;
}

.btn-start-quiz {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

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

/* Question Display */
.quiz-question-body {
    padding: 30px;
}

.progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s;
}

.question-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
}

.question-badges {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.type-badge, .diff-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.type-badge {
    background: #e3f2fd;
    color: #1976d2;
}

.diff-badge.diff-easy {
    background: #e8f5e9;
    color: #2e7d32;
}

.diff-badge.diff-medium {
    background: #fff3e0;
    color: #f57c00;
}

.diff-badge.diff-hard {
    background: #ffebee;
    color: #c62828;
}

.question-text {
    font-size: 18px;
    color: #333;
    line-height: 1.6;
    margin-bottom: 20px;
    font-weight: 500;
}

.question-input {
    margin-top: 20px;
}

.answer-option {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.answer-option:hover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateX(5px);
}

.answer-option input[type="radio"] {
    margin-right: 15px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.answer-option span {
    font-size: 16px;
    color: #333;
}

.btn-submit-answer {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-submit-answer:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.4);
}

/* Feedback */
.feedback-body {
    padding: 40px;
    text-align: center;
}

.celebration {
    font-size: 32px;
    color: #28a745;
    margin-bottom: 20px;
    animation: bounce 0.6s;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.correction {
    font-size: 18px;
    color: #dc3545;
    margin-bottom: 20px;
}

.explanation {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: left;
}

.score-display {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    margin: 20px 0;
}

.btn-next {
    padding: 15px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

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

/* Quiz Report */
.report-body {
    padding: 40px;
    text-align: center;
}

.score-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0 auto 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.score-number {
    font-size: 56px;
    font-weight: 700;
    color: white;
}

.score-label {
    font-size: 20px;
    color: white;
    margin-top: 10px;
}

.score-details {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 30px 0;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #333;
}

.report-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.btn-next-quiz, .btn-back {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-next-quiz {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.btn-back {
    background: #e0e0e0;
    color: #333;
}

.btn-next-quiz:hover, .btn-back:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Matching & Ordering */
.matching-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.match-col strong {
    display: block;
    margin-bottom: 10px;
    color: #667eea;
    font-size: 16px;
}

.match-item {
    padding: 10px 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 8px;
}

.match-selects {
    background: white;
    padding: 20px;
    border-radius: 10px;
}

.match-row {
    margin-bottom: 12px;
}

.match-row select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

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

.ordering-item {
    padding: 15px 20px;
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 10px;
    cursor: move;
    transition: all 0.2s;
    font-size: 16px;
}

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

.ordering-item.dragging {
    opacity: 0.5;
}

textarea {
    width: 100%;
    padding: 15px;
    border: 3px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

.instruction {
    color: #666;
    font-style: italic;
    margin-bottom: 15px;
}

/* Attempt Questions Button */
.attempt-questions-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.attempt-questions-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(102, 126, 234, 0.5);
}

.attempt-questions-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.attempt-questions-btn i {
    font-size: 20px;
}
