/* ============================================
   ITI PATHSHALA - QUIZ STYLES
   Complete CSS for Quiz System
   ============================================ */

/* Quiz Wrapper */
.iti-quiz-wrapper {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 40px 20px;
}

.iti-quiz-container {
    max-width: 800px;
    margin: 0 auto;
}

/* ============================================
   QUIZ HEADER
   ============================================ */

.iti-quiz-header {
    text-align: center;
    margin-bottom: 40px;
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.iti-quiz-header h1 {
    font-size: 2.5em;
    color: #004E89;
    margin-bottom: 15px;
    font-weight: 800;
    line-height: 1.2;
}

.iti-quiz-header p {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.quiz-info {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.quiz-info span {
    background: #FFF3E0;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    color: #FF6B35;
    font-weight: 600;
}

/* ============================================
   PROGRESS BAR
   ============================================ */

.quiz-progress,
.iti-quiz-progress {
    margin-bottom: 30px;
}

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

.progress-fill,
.iti-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    transition: width 0.5s ease;
    width: 20%;
}

.progress-text,
.iti-progress-text {
    text-align: center;
    color: #666;
    font-weight: 600;
    font-size: 1em;
    margin: 0;
}

/* ============================================
   QUESTION CARD
   ============================================ */

.quiz-question,
.iti-quiz-question {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    animation: slideIn 0.3s ease;
}

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

.question-header {
    margin-bottom: 20px;
}

.question-number {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
}

.question-text,
.iti-question-title {
    font-size: 1.8em;
    color: #004E89;
    margin-bottom: 30px;
    line-height: 1.4;
    font-weight: 700;
}

.highlight-word {
    color: #FF6B35;
    position: relative;
}

.word-hindi {
    font-size: 0.7em;
    color: #666;
    font-weight: 500;
    display: block;
    margin-top: 10px;
}

/* ============================================
   QUIZ OPTIONS
   ============================================ */

.quiz-options,
.iti-quiz-options {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.quiz-option,
.iti-quiz-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: white;
    border: 3px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 1.1em;
    font-family: inherit;
    width: 100%;
    
}

.quiz-option:hover:not(:disabled),
.iti-quiz-option:hover:not(:disabled) {
    border-color: #FF6B35;
    transform: translateX(10px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
}

.quiz-option:focus,
.iti-quiz-option:focus {
    outline: 3px solid #FF6B35;
    outline-offset: 2px;
}

.option-letter {
    flex-shrink: 0;
    width: 35px;
    height: 35px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #004E89;
    transition: all 0.3s ease;
}

.option-text {
    flex: 1;
    line-height: 1.5;
}

/* Fix invisible quiz options */
.quiz-option,
.option-text {
    color: #333 !important;
}

/* ============================================
   ANSWER STATES
   ============================================ */

.quiz-option.correct-answer,
.iti-quiz-option.correct,
.quiz-option.correct {
    border-color: #06A77D;
    background: #ECFDF5;
}

.quiz-option.correct-answer .option-letter,
.iti-quiz-option.correct .option-letter,
.quiz-option.correct .option-letter {
    background: #06A77D;
    color: white;
}

.quiz-option.wrong-answer,
.iti-quiz-option.incorrect,
.quiz-option.incorrect {
    border-color: #DC2626;
    background: #FEE2E2;
}

.quiz-option.wrong-answer .option-letter,
.iti-quiz-option.incorrect .option-letter,
.quiz-option.incorrect .option-letter {
    background: #DC2626;
    color: white;
}

.quiz-option.selected,
.iti-quiz-option.selected {
    transform: scale(0.98);
}

.quiz-option:disabled,
.iti-quiz-option:disabled {
    cursor: not-allowed;
    opacity: 0.9;
}

/* ============================================
   FEEDBACK SECTION
   ============================================ */

.question-feedback,
.iti-question-feedback {
    margin-top: 25px;
    padding: 20px;
    border-radius: 12px;
    background: #f9fafb;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.feedback-content {
    margin-bottom: 20px;
}

.feedback-text {
    font-size: 1.1em;
    margin-bottom: 15px;
    line-height: 1.6;
}

.learn-more-btn,
.iti-learn-more {
    display: inline-block;
    color: #004E89;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    border: 2px solid #004E89;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.learn-more-btn:hover,
.iti-learn-more:hover {
    background: #004E89;
    color: white;
}

.next-question-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.next-question-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 107, 53, 0.4);
}

.next-question-btn:focus {
    outline: 3px solid #FF6B35;
    outline-offset: 2px;
}

/* ============================================
   RESULTS SCREEN
   ============================================ */

.results-container,
.iti-results-card {
    background: white;
    padding: 60px 40px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    animation: slideIn 0.5s ease;
}

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

.results-icon {
    font-size: 5em;
    margin-bottom: 10px;
    animation: bounce 1s ease infinite;
}

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

.results-header h2 {
    font-size: 2.5em;
    color: #004E89;
    font-weight: 800;
    margin: 0;
}

/* ============================================
   SCORE DISPLAY
   ============================================ */

.score-display,
.iti-score-display {
    margin: 40px 0;
}

.score-circle,
.iti-score-circle {
    font-size: 5em;
    font-weight: 800;
    color: #FF6B35;
    line-height: 1;
}

.score-number {
    color: #FF6B35;
}

.score-divider {
    font-size: 0.5em;
    color: #999;
    margin: 0 10px;
}

.score-total {
    font-size: 0.6em;
    color: #666;
}

.score-percentage {
    font-size: 2em;
    color: #004E89;
    font-weight: 700;
    margin-top: 15px;
}

.score-message {
    font-size: 1.5em;
    color: #666;
    margin: 30px 0;
    line-height: 1.6;
}

/* ============================================
   RESULT ACTIONS
   ============================================ */

.results-actions,
.iti-quiz-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

.btn-primary,
.btn-secondary,
.iti-btn-primary,
.iti-btn-secondary {
    padding: 15px 35px;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    display: inline-block;
    font-family: inherit;
}

.btn-primary,
.iti-btn-primary {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
}

.btn-secondary,
.iti-btn-secondary {
    background: white;
    color: #004E89;
    border: 2px solid #004E89;
}

.btn-primary:hover,
.btn-secondary:hover,
.iti-btn-primary:hover,
.iti-btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.btn-primary:focus,
.btn-secondary:focus,
.iti-btn-primary:focus,
.iti-btn-secondary:focus {
    outline: 3px solid #FF6B35;
    outline-offset: 2px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .iti-quiz-wrapper {
        padding: 20px 15px;
    }
    
    .iti-quiz-header {
        padding: 30px 20px;
    }
    
    .iti-quiz-header h1 {
        font-size: 2em;
    }
    
    .iti-quiz-header p {
        font-size: 1em;
    }
    
    .quiz-info {
        gap: 10px;
    }
    
    .quiz-info span {
        font-size: 0.8em;
        padding: 6px 12px;
    }
    
    .question-text {
        font-size: 1.4em;
    }
    
    .quiz-option {
        padding: 15px;
        font-size: 1em;
    }
    
    .option-letter {
        width: 30px;
        height: 30px;
        font-size: 0.9em;
    }
    
    .quiz-question,
    .iti-quiz-question {
        padding: 25px;
    }
    
    .results-container,
    .iti-results-card {
        padding: 40px 20px;
    }
    
    .results-icon {
        font-size: 4em;
    }
    
    .results-header h2 {
        font-size: 2em;
    }
    
    .score-circle,
    .iti-score-circle {
        font-size: 3.5em;
    }
    
    .score-message {
        font-size: 1.2em;
    }
    
    .results-actions,
    .iti-quiz-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-primary,
    .btn-secondary,
    .iti-btn-primary,
    .iti-btn-secondary {
        width: 100%;
        text-align: center;
    }
    
    .feedback-text {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .iti-quiz-header h1 {
        font-size: 1.6em;
    }
    
    .question-text {
        font-size: 1.2em;
    }
    
    .quiz-option {
        padding: 12px;
        font-size: 0.95em;
        gap: 10px;
    }
    
    .quiz-question,
    .iti-quiz-question {
        padding: 20px;
    }
    
    .results-container,
    .iti-results-card {
        padding: 30px 15px;
    }
    
    .score-circle,
    .iti-score-circle {
        font-size: 3em;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Focus styles for keyboard navigation */
.quiz-option:focus-visible {
    outline: 3px solid #FF6B35;
    outline-offset: 2px;
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.next-question-btn:focus-visible {
    outline: 3px solid #FF6B35;
    outline-offset: 2px;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .iti-quiz-wrapper {
        background: white;
    }
    
    .quiz-option:hover {
        transform: none;
        box-shadow: none;
    }
    
    .btn-primary,
    .btn-secondary {
        display: none;
    }
    
    .results-icon {
        animation: none;
    }
}

/* ============================================
   LOADING STATE (Optional)
   ============================================ */

.quiz-loading {
    text-align: center;
    padding: 60px 20px;
}

.quiz-loading::after {
    content: "Loading quiz...";
    font-size: 1.5em;
    color: #666;
}

/* ============================================
   ERROR STATE (Optional)
   ============================================ */

.quiz-error {
    background: #FEE2E2;
    border: 2px solid #DC2626;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
}

.quiz-error h3 {
    color: #DC2626;
    margin-bottom: 10px;
}

.quiz-error p {
    color: #666;
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */

.quiz-question::-webkit-scrollbar {
    width: 8px;
}

.quiz-question::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.quiz-question::-webkit-scrollbar-thumb {
    background: #FF6B35;
    border-radius: 10px;
}

.quiz-question::-webkit-scrollbar-thumb:hover {
    background: #F7931E;
}



/* ============================================
   SHARE SECTION
   ============================================ */

.iti-share-section {
    margin-top: 30px;
    text-align: center;
}

.iti-share-label {
    font-size: 0.95em;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 14px;
}

.iti-share-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.iti-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.95em;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    color: #fff;
}

.iti-share-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.iti-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
    opacity: 0.93;
    color: #fff;
}

.iti-share-whatsapp  { background: #25D366; }
.iti-share-telegram  { background: #0088cc; }
.iti-share-facebook  { background: #1877F2; }
.iti-share-twitter   { background: #000000; }
.iti-share-copy      { background: #6B7280; }

@media (max-width: 480px) {
    .iti-share-btn {
        padding: 9px 13px;
        font-size: 0.88em;
    }
    .iti-share-btn svg {
        width: 16px;
        height: 16px;
    }
}



/* FORCE override theme colors - CRITICAL FIX */
body .iti-quiz-wrapper .iti-quiz-option,
body .iti-quiz-wrapper .iti-quiz-option *,
body .iti-quiz-wrapper .iti-quiz-option span {
    color: #333 !important;
    opacity: 1 !important;
}

body .iti-quiz-wrapper .iti-quiz-option:hover {
    color: #333 !important;
}

/* Disable any theme button styles */
body .iti-quiz-wrapper button,
body .iti-quiz-wrapper button * {
    color: #333 !important;
}