/* START QUIZ CSS CODE */	
 /* ===== Tab shell ===== */
    .tabs {
      display: flex;
      gap: 0.5rem;
      margin: 1.25rem auto 0;
      max-width: 880px;
      padding: 0 1rem;
      border-bottom: 2px solid rgba(100, 116, 139, 0.25);
      position: relative;
    }
    .tab-btn {
      flex: 1;
      font: inherit;
      font-weight: 600;
      font-size: 0.95rem;
      padding: 0.85rem 0.5rem;
      background: transparent;
      border: none;
      cursor: pointer;
      color: #64748b;
      border-bottom: 3px solid transparent;
      margin-bottom: -2px;
      transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
      border-radius: 8px 8px 0 0;
    }
    .tab-btn:hover { color: #1e3c72; background: rgba(42, 82, 152, 0.06); }
    .tab-btn:focus-visible { outline: 3px solid #2a5298; outline-offset: -3px; }
    .tab-btn.active { color: #1e3c72; border-bottom-color: #2a5298; }
    .tab-btn .lock-icon { font-size: 0.75rem; margin-left: 0.3rem; opacity: 0.6; }

    .tab-panel { display: none; }
    .tab-panel.active { display: block; animation: fadeIn 0.35s ease; }
    @keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

    /* ===== Article (Tab 1) ===== */
    .article-content {
      max-width: 880px;
      margin: 1.5rem auto 0;
      padding: 0 1.5rem 2rem;
      line-height: 1.8;
      font-size: 1.02rem;
      color: #334155;
    }
    .article-content h2 {
      font-size: 1.6rem;
      color: #0b1e3a;
      margin: 1.75rem 0 0.75rem;
      line-height: 1.3;
    }
    .article-content h2:first-of-type { margin-top: 0.5rem; }
    .article-content h3 {
      font-size: 1.2rem;
      color: #1e3c72;
      margin: 1.4rem 0 0.5rem;
    }
    .article-content p { margin-bottom: 1rem; }
    .article-content ul { margin: 0 0 1rem 1.4rem; }
    .article-content li { margin-bottom: 0.4rem; }
    .article-content .callout {
      background: rgba(42, 82, 152, 0.07);
      border-left: 4px solid #2a5298;
      padding: 0.9rem 1.1rem;
      border-radius: 0 10px 10px 0;
      margin: 1.25rem 0;
      font-size: 0.98rem;
    }
    .article-content strong { color: #0b1e3a; }
    .article-content code {
      background: rgba(100, 116, 139, 0.15);
      padding: 0.1rem 0.35rem;
      border-radius: 4px;
      font-size: 0.9em;
    }
    .article-cta {
      display: flex;
      justify-content: center;
      margin: 2rem auto 0;
    }
    .article-cta button {
      font: inherit;
      font-weight: 600;
      font-size: 1rem;
      padding: 0.85rem 1.75rem;
      border: none;
      border-radius: 999px;
      cursor: pointer;
      color: #fff;
      background: linear-gradient(135deg, #1e3c72, #2a5298);
      box-shadow: 0 10px 24px -8px rgba(42, 82, 152, 0.55);
      transition: transform 0.15s ease, box-shadow 0.2s ease;
    }
    .article-cta button:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -10px rgba(42, 82, 152, 0.6); }

    /* ===== Tab 3 placeholder & results ===== */
    .results-placeholder {
      max-width: 640px;
      margin: 3rem auto;
      padding: 0 1.5rem;
      text-align: center;
      color: #64748b;
    }
    .results-placeholder i { font-size: 3rem; color: #cbd5e1; display: block; margin-bottom: 1rem; }
    .results-placeholder p { font-size: 1rem; margin-bottom: 1.5rem; }
    .results-placeholder button {
      font: inherit;
      font-weight: 600;
      padding: 0.75rem 1.6rem;
      border: none;
      border-radius: 999px;
      cursor: pointer;
      color: #fff;
      background: linear-gradient(135deg, #1e3c72, #2a5298);
      transition: transform 0.15s ease;
    }
    .results-placeholder button:hover { transform: translateY(-2px); }

    /* ===== Question blocks (hidden source data) ===== */
    .question-block[hidden] { display: none; }

    @media (max-width: 640px) {
      .tab-btn { font-size: 0.82rem; padding: 0.7rem 0.3rem; }
      .article-content { padding: 0 1rem 1.5rem; font-size: 0.96rem; }
      .article-content h2 { font-size: 1.35rem; }
      .article-content h3 { font-size: 1.08rem; }
    }
	
	* Add these styles to your existing CSS */
.option.incorrect {
    background-color: red !important;
    color: white;
    border-color: #ff0000 !important;
}

.option.correct {
    background-color: #6bff6b !important;
    color: white;
    border-color: #00aa00 !important;
}

@keyframes wrongAnswer {
    0% { transform: scale(1); }
    25% { transform: scale(1.05); }
    50% { transform: scale(1); }
    75% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes correctAnswer {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Tab styles */
.question-tab {
    position: relative;
}		

/* START QUIZ STYLE AND CSS FILE */
		 /* ===== Tab shell ===== */
    .tabs {
      display: flex;
      gap: 0.2rem;
      max-width: 880px;
      border-bottom: 2px solid rgba(100, 116, 139, 0.25);
      position: relative;
    }
    .tab-btn {
      flex: 1;
      font: inherit;
      font-weight: 600;
      font-size: 0.95rem;
      padding: 0.85rem 0.5rem;
      background: transparent;
      border: none;
      cursor: pointer;
      color: #64748b;
      border-bottom: 3px solid transparent;
      margin-bottom: -2px;
      transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
      border-radius: 8px 8px 0 0;
    }
    .tab-btn:hover { color: #1e3c72; background: rgba(42, 82, 152, 0.06); }
    .tab-btn:focus-visible { outline: 3px solid #2a5298; outline-offset: -3px; }
    .tab-btn.active { color: #1e3c72; border-bottom-color: #2a5298; }
    .tab-btn .lock-icon { font-size: 0.75rem; margin-left: 0.3rem; opacity: 0.6; }

    .tab-panel { display: none; }
    .tab-panel.active { display: block; animation: fadeIn 0.35s ease; }
    @keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

    /* ===== Article (Tab 1) ===== */
    .article-content {
      max-width: 880px;
      margin: 1.5rem auto 0;
      padding: 0 1.5rem 2rem;
      line-height: 1.8;
      font-size: 1.02rem;
      color: #334155;
    }
    .article-content h2 {
      font-size: 1.6rem;
      color: #0b1e3a;
      margin: 1.75rem 0 0.75rem;
      line-height: 1.3;
    }
    .article-content h2:first-of-type { margin-top: 0.5rem; }
    .article-content h3 {
      font-size: 1.2rem;
      color: #1e3c72;
      margin: 1.4rem 0 0.5rem;
    }
    .article-content p { margin-bottom: 1rem; }
    .article-content ul { margin: 0 0 1rem 1.4rem; }
    .article-content li { margin-bottom: 0.4rem; }
    .article-content .callout {
      background: rgba(42, 82, 152, 0.07);
      border-left: 4px solid #2a5298;
      padding: 0.9rem 1.1rem;
      border-radius: 0 10px 10px 0;
      margin: 1.25rem 0;
      font-size: 0.98rem;
    }
    .article-content strong { color: #0b1e3a; }
    .article-content code {
      background: rgba(100, 116, 139, 0.15);
      padding: 0.1rem 0.35rem;
      border-radius: 4px;
      font-size: 0.9em;
    }
    .article-cta {
      display: flex;
      justify-content: center;
      margin: 2rem auto 0;
    }
    .article-cta button {
      font: inherit;
      font-weight: 600;
      font-size: 1rem;
      padding: 0.85rem 1.75rem;
      border: none;
      border-radius: 999px;
      cursor: pointer;
      color: #fff;
      background: linear-gradient(135deg, #1e3c72, #2a5298);
      box-shadow: 0 10px 24px -8px rgba(42, 82, 152, 0.55);
      transition: transform 0.15s ease, box-shadow 0.2s ease;
    }
    .article-cta button:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -10px rgba(42, 82, 152, 0.6); }

    /* ===== Tab 3 placeholder & results ===== */
    .results-placeholder {
      max-width: 640px;
      margin: 3rem auto;
      padding: 0 1.5rem;
      text-align: center;
      color: #64748b;
    }
    .results-placeholder i { font-size: 3rem; color: #cbd5e1; display: block; margin-bottom: 1rem; }
    .results-placeholder p { font-size: 1rem; margin-bottom: 1.5rem; }
    .results-placeholder button {
      font: inherit;
      font-weight: 600;
      padding: 0.75rem 1.6rem;
      border: none;
      border-radius: 999px;
      cursor: pointer;
      color: #fff;
      background: linear-gradient(135deg, #1e3c72, #2a5298);
      transition: transform 0.15s ease;
    }
    .results-placeholder button:hover { transform: translateY(-2px); }

    /* ===== Question blocks (hidden source data) ===== */
    .question-block[hidden] { display: none; }

    @media (max-width: 640px) {
      .tab-btn { font-size: 0.82rem; padding: 0.7rem 0.3rem; }
      .article-content { padding: 0 1rem 1.5rem; font-size: 0.96rem; }
      .article-content h2 { font-size: 1.35rem; }
      .article-content h3 { font-size: 1.08rem; }
    }
	
	* Add these styles to your existing CSS */
.option.incorrect {
    background-color: red !important;
    color: white;
    border-color: #ff0000 !important;
}

.option.correct {
    background-color: #6bff6b !important;
    color: white;
    border-color: #00aa00 !important;
}

@keyframes wrongAnswer {
    0% { transform: scale(1); }
    25% { transform: scale(1.05); }
    50% { transform: scale(1); }
    75% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes correctAnswer {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Tab styles */
.question-tab {
    position: relative;
}

.wrong-marker {
    color: #ff6b6b;
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 12px;
}

/* Option styles */
.option.correct {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.option.incorrect {
    background-color: red;
    border-color: #f5c6cb;
    color: #721c24;
}

.option.correct .correct-icon,
.option.incorrect .wrong-icon {
    float: right;
}

.option.correct .correct-icon {
    color: #28a745;
	font-size: 24px;
}

.option.incorrect .wrong-icon {
    color: #dc3545;
	font-size: 24px;
}

.explanation-box {
    background-color: #f8f9fa;
    border-left: 4px solid #6c757d;
    padding: 10px;
    margin: 15px 0;
    border-radius: 0 4px 4px 0;
}

/* ===== ADDED HEADER STYLES ===== */
    /* These styles match your main page's header */
    .app-header {
      background: #4361ee;
      color: white;
      padding: 10px;
      text-align: center;
      position: relative;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .app-header h1 {
      font-size: 1.5rem;
      font-weight: 600;
      margin-bottom: 5px;
    }
    
    .back-btn {
      position: absolute;
      left: 15px;
      top: 50%;
      transform: translateY(-50%);
      background: none;
      border: none;
      color: white;
      font-size: 1.2rem;
      cursor: pointer;
    }
    
    .quiz-container {
      max-width: 800px;
      margin: 0 auto;
      background: white;
      padding: 30px;
      border-radius: var(--border-radius);
      box-shadow: var(--shadow);
      position: relative;
      overflow: hidden;
    }

    .quiz-container::before {
      content: "";
      position: absolute;
      top: -50px;
      right: -50px;
      width: 200px;
      height: 200px;
      background: radial-gradient(circle, rgba(67,97,238,0.1) 0%, rgba(67,97,238,0) 70%);
      border-radius: 50%;
      z-index: 0;
    }

    .quiz-header {
      position: relative;
      z-index: 1;
    }

    .quiz-info {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 10px;
      flex-wrap: wrap;
      gap: 15px;
    }

    #time-left {
      background-color: var(--light);
      padding: 10px;
      border-radius: 20px;
      font-weight: 600;
      color: var(--dark);
      box-shadow: var(--shadow);
      transition: var(--transition);
    }

    #time-left.warning {
      color: var(--warning);
      animation: pulse 1s infinite;
    }

    #time-left.critical {
      color: var(--danger);
      animation: pulse 0.5s infinite;
    }

    @keyframes pulse {
      0% { transform: scale(1); }
      50% { transform: scale(1.05); }
      100% { transform: scale(1); }
    }

    #current-score {
      font-weight: 600;
      background-color: var(--primary);
      color: white;
      padding: 10px;
      border-radius: 20px;
      box-shadow: var(--shadow);
    }

    .progress-container {
      width: 100%;
      height: 10px;
      background-color: var(--light);
      border-radius: 5px;
      margin: 10px 0;
      overflow: hidden;
    }

    #progress-bar {
      height: 100%;
      background: linear-gradient(90deg, var(--primary), var(--primary-light));
      border-radius: 5px;
      transition: width 0.5s ease;
      position: relative;
    }

    #progress-bar::after {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(90deg, 
                      rgba(255,255,255,0.1) 0%, 
                      rgba(255,255,255,0.3) 50%, 
                      rgba(255,255,255,0.1) 100%);
      animation: shine 2s infinite;
    }

    @keyframes shine {
      0% { transform: translateX(-100%); }
      100% { transform: translateX(100%); }
    }

    #question-tabs {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 15px;
      justify-content: center;
    }

    .question-tab {
      width: 40px;
      height: 40px;
      display: flex;
      justify-content: center;
      align-items: center;
      background-color: #e9ecef;
      border-radius: 8px;
      cursor: pointer;
      font-weight: 600;
      transition: var(--transition);
      box-shadow: var(--shadow);
    }

    .question-tab:hover {
      transform: translateY(-2px);
    }

    .question-tab.current {
      background-color: var(--primary);
      color: white;
      transform: scale(1.1);
    }

    .question-tab.answered {
      background-color: var(--success);
      color: white;
    }

    .question-tab.unanswered {
      background-color: #e9ecef;
    }

    #question-container {
      margin-bottom: 10px;
    }

    #question-container h2 {
      margin-bottom: 20px;
      color: var(--dark);
      font-size: 1.5rem;
    }

    .options {
      display: grid;
      grid-template-columns: 1fr;
      gap: 12px;
      margin-bottom: 25px;
    }

    .option {
      padding: 15px;
      background-color: white;
      border: 2px solid #e9ecef;
      border-radius: var(--border-radius);
      cursor: pointer;
      transition: var(--transition);
      font-weight: 500;
      box-shadow: var(--shadow);
    }

    .option:hover {
      transform: translateY(-2px);
      border-color: var(--primary-light);
    }

    .option.selected {
      background-color: var(--primary-light);
      color: white;
      border-color: var(--primary);
      transform: translateY(-3px);
    }

    .button-group {
      display: flex;
      gap: 15px;
      margin-top: 30px;
    }

    .button-group button {
      flex: 1;
      padding: 12px;
      border: none;
      border-radius: var(--border-radius);
      font-weight: 600;
      cursor: pointer;
      transition: var(--transition);
      box-shadow: var(--shadow);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .button-group button:disabled {
      opacity: 0.6;
      cursor: not-allowed;
      transform: none !important;
    }

    .button-group button:hover:not(:disabled) {
      transform: translateY(-3px);
    }

    #prev-btn {
      background-color: #6c757d;
      color: white;
    }

    #prev-btn:hover:not(:disabled) {
      background-color: #5a6268;
    }

    #submit-btn {
      background-color: var(--primary);
      color: white;
    }

    #submit-btn:hover:not(:disabled) {
      background-color: var(--secondary);
    }

    /* Results Styles */
    .result-container {
      text-align: center;
      padding: 20px;
    }

    .result-container h2 {
      color: var(--primary);
      margin-bottom: 20px;
      font-size: 2rem;
    }

    .score-display {
      position: relative;
      width: 200px;
      height: 200px;
      background: white;
      border-radius: 50%;
      box-shadow: var(--shadow);
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      animation: pulse 2s infinite alternate;
    }

    .score-display::before {
      content: "";
      position: absolute;
      inset: -10px;
      border-radius: 50%;
      border: 5px dashed var(--primary);
      animation: rotate 20s linear infinite;
      z-index: -1;
    }

    @keyframes rotate {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

    .score-percentage {
      font-size: 3rem;
      font-weight: 700;
      color: var(--primary);
      line-height: 1;
    }

    .score-fraction {
      font-size: 1.2rem;
      color: #6c757d;
    }

    .stars {
      font-size: 2rem;
      color: #ffc107;
      margin: 15px 0;
      letter-spacing: 5px;
    }

    .score-message {
      font-size: 1.5rem;
      font-weight: 600;
      margin: 20px 0;
      padding: 10px 20px;
      border-radius: 50px;
      display: inline-block;
      box-shadow: var(--shadow);
    }

    .score-message.excellent {
      background-color: #28a745;
      color: white;
    }

    .score-message.good {
      background-color: var(--primary);
      color: white;
    }

    .score-message.average {
      background-color: var(--warning);
      color: white;
    }

    .score-message.poor {
      background-color: var(--danger);
      color: white;
    }

    .badges {
      display: flex;
      justify-content: center;
      gap: 15px;
      margin: 25px 0;
      flex-wrap: wrap;
    }

    .badge {
      width: 60px;
      height: 60px;
      background-color: white;
      border-radius: 50%;
      display: flex;
      justify-content: center;
      align-items: center;
      box-shadow: var(--shadow);
      font-size: 24px;
    }

    .result-buttons {
      display: flex;
      gap: 15px;
      justify-content: center;
      margin-top: 30px;
    }

    .restart-btn {
      background-color: var(--primary);
      color: white;
      border: none;
      padding: 12px 25px;
      border-radius: 50px;
      cursor: pointer;
      font-size: 1rem;
      font-weight: 600;
      transition: var(--transition);
      box-shadow: var(--shadow);
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .restart-btn:hover {
      background-color: var(--secondary);
      transform: translateY(-3px);
    }

    .restart-btn:active {
      transform: translateY(1px);
    }

    .save-results-btn {
      background-color: #6c757d !important;
    }

    .save-results-btn:hover {
      background-color: #5a6268 !important;
    }

    /* Question Review Styles */
    .question-review {
      background: white;
      padding: 20px;
      border-radius: var(--border-radius);
      margin-bottom: 20px;
      box-shadow: var(--shadow);
      text-align: left;
    }

    .question-review p {
      margin-bottom: 10px;
    }

    .question-review strong {
      color: var(--primary);
    }
	
	.current-status {
            background-color: var(--light);
            padding: 5px;
			border: 3px solid lightblue;
            border-radius: 20px;
            margin-bottom: 10px;
            text-align: center;
        }

        .current-status p {
            font-size: 16px;
			color: #0c0c0c;
        }

        .current-status .highlight {
            font-weight: bold;
            color: #4CAF50;
        }

    /* Responsive Styles */
    @media (max-width: 768px) {
      .quiz-container {
        padding: 20px;
      }

      #question-container h2 {
        font-size: 1.3rem;
      }

      .option {
        padding: 6px 13px;
      }

      .score-display {
        width: 150px;
        height: 150px;
      }

      .score-percentage {
        font-size: 2.5rem;
      }

      .result-buttons {
        flex-direction: column;
        align-items: center;
      }

      .restart-btn {
        width: 100%;
        justify-content: center;
      }
    }

    @media (max-width: 480px) {
	  
	  .button-group {
		  margin-top: 15px;
	  }  

      .quiz-container {
        padding: 10px;
      }
	  
	  .result-container {
		padding: 3px;
	  }

      #question-tabs {
        gap: 5px;
      }

      .question-tab {
        width: 28px;
        height: 35px;
        font-size: 0.9rem;
      }

      .score-display {
        width: 120px;
        height: 120px;
      }

      .score-percentage {
        font-size: 2rem;
      }

      .score-fraction {
        font-size: 1rem;
      }

      .stars {
        font-size: 1.5rem;
      }

      .score-message {
        font-size: 1.2rem;
      }
    }

    .dark-mode-toggle {
      position: fixed;
      top: 20px;
      right: 20px;
      background: var(--dark);
      color: var(--white);
      border: none;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      z-index: 100;
      box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }
	
	/* Dark Mode Styles */
    body.dark-mode {
      background: linear-gradient(135deg, #212529 0%, #343a40 100%);
      color: var(--light);
    }

    body.dark-mode .quiz-container {
      background-color: #343a40;
      color: var(--light);
    }

    body.dark-mode #question-container h2 {
      color: var(--light);
    }

    body.dark-mode .option {
      background-color: #495057;
      border-color: #6c757d;
      color: var(--light);
    }

    body.dark-mode .option:hover {
      border-color: var(--primary-light);
    }

    body.dark-mode .question-review {
      background-color: #495057;
      color: var(--light);
    }

    body.dark-mode .score-display {
      background-color: #495057;
    }

    /* Animation for correct/wrong answers */
    @keyframes correctAnswer {
      0% { transform: scale(1); }
      50% { transform: scale(1.05); }
      100% { transform: scale(1); }
    }

    @keyframes wrongAnswer {
      0% { transform: translateX(0); }
      20% { transform: translateX(-10px); }
      40% { transform: translateX(10px); }
      60% { transform: translateX(-10px); }
      80% { transform: translateX(10px); }
      100% { transform: translateX(0); }
    }
	
	body.dark-mode .option.selected {
      background-color: var(--primary-light);
      color: white;
      border-color: var(--primary);
    }
	
	body.dark-mode .question-tab.unanswered {
      background-color: #a6a7a7;
    }
	
	body.dark-mode .current-status {
      background-color: var(--dark);
      border-color: var(--primary);
    }

    body.dark-mode .current-status p {
			color: white;
        }

    body.dark-mode .current-status .highlight {
            color: #65e26a;
        }
	/* END QUIZ STYLE AND CSS FILE */
/* END QUIZ CSS CODE */