/* =============================================
   MODERN MCQ STYLES - NEON REDESIGN
   ============================================= */

/* ==========================
   COLOR VARIABLES - NEON THEME
   ========================== */
:root {
  --quiz-primary: #00ffff;
  --quiz-primary-light: #66ffff;
  --quiz-primary-dark: #00cccc;
  --quiz-secondary: #ff00ff;
  --quiz-accent: #ffff00;
  --quiz-success: #00ff88;
  --quiz-error: #ff0055;
  --quiz-bg: #0a0a0f;
  --quiz-card-bg: #12121a;
  --quiz-border: #2a2a3e;
  --quiz-text: #ffffff;
  --quiz-text-muted: #a0a0b8;
  --quiz-hover: rgba(0, 255, 255, 0.08);
  --quiz-glow: rgba(0, 255, 255, 0.5);
  --quiz-neon-pink: #ff10f0;
  --quiz-neon-blue: #0099ff;
}

/* ==========================
   MCQ SECTION CONTAINER
   ========================== */
#mcqSection {
  background: radial-gradient(ellipse at top, #12121a 0%, #0a0a0f 100%);
  padding: 60px 30px;
  border-radius: 24px;
  margin: 40px auto;
  max-width: 1200px;
  width: 95%;
  box-shadow: 0 0 40px rgba(0, 255, 255, 0.08);
  border: 1px solid rgba(0, 255, 255, 0.1);
  position: relative;
}

#mcqSection h2 {
  text-align: center;
  color: var(--quiz-text);
  margin-bottom: 50px;
  font-size: 2.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 3px;
  background: linear-gradient(135deg, 
    var(--quiz-primary), 
    var(--quiz-neon-pink), 
    var(--quiz-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 40px rgba(0, 255, 255, 0.5);
  position: relative;
}

/* ==========================
   MCQ GRID - SINGLE COLUMN
   ========================== */
.mcq-grid {
  display: flex;
  flex-direction: column;
  gap: 35px;
  margin: 0 auto;
  max-width: 900px;
  padding: 0 20px;
}

/* ==========================
   INDIVIDUAL MCQ CARD - NEON STYLE
   ========================== */
.mcq {
  background: linear-gradient(135deg,
    rgba(18, 18, 26, 0.9),
    rgba(10, 10, 15, 0.9));
  border-radius: 20px;
  padding: 35px;
  border: 1px solid rgba(0, 255, 255, 0.3);
  transition: transform 0.2s ease, border-color 0.2s ease;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  overflow: visible;
  will-change: transform;
  contain: layout style paint;
}

.mcq:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 255, 255, 0.15);
  border-color: var(--quiz-primary);
}

/* Correct answer state */
.mcq.correct {
  background: linear-gradient(135deg,
    rgba(0, 255, 136, 0.1),
    rgba(0, 255, 136, 0.05));
  border-color: var(--quiz-success);
  box-shadow: 0 4px 20px rgba(0, 255, 136, 0.2);
}

/* Wrong answer state */
.mcq.wrong {
  background: linear-gradient(135deg,
    rgba(255, 0, 85, 0.1),
    rgba(255, 0, 85, 0.05));
  border-color: var(--quiz-error);
  box-shadow: 0 4px 20px rgba(255, 0, 85, 0.2);
}

/* ==========================
   QUESTION HEADER - NEON STYLE
   ========================== */
.mcq h3 {
  color: var(--quiz-text);
  font-weight: 600;
  margin-bottom: 28px;
  font-size: 1.2rem;
  line-height: 1.8;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(0, 255, 255, 0.2);
  letter-spacing: 0.5px;
  position: relative;
}

.mcq h3::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--quiz-primary), transparent);
}

/* ==========================
   HIDE RADIO BUTTONS - KEEPING ORIGINAL
   ========================== */
input[type="radio"],
.mcq input[type="radio"],
#mcqSection input[type="radio"],
#quiz-container input[type="radio"] {
  position: absolute !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  left: -9999px !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  overflow: hidden !important;
}

/* ==========================
   OPTION LABELS - NEON REDESIGN
   ========================== */
.mcq label {
  display: flex;
  align-items: center;
  padding: 20px 26px;
  margin: 16px 0;
  background: rgba(30, 30, 45, 0.85);
  border: 1px solid rgba(0, 255, 255, 0.15);
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  color: var(--quiz-text-muted);
  font-size: 1.05rem;
  user-select: none;
  position: relative;
  line-height: 1.6;
  overflow: hidden;
  will-change: transform;
}

/* Option indicator */
.mcq label::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 20px;
  width: 8px;
  height: 8px;
  background: var(--quiz-text-muted);
  border-radius: 50%;
  transition: background 0.2s ease, width 0.2s ease, height 0.2s ease;
  transform: translateY(-50%);
}

/* Option text padding */
.mcq label {
  padding-left: 45px;
}

/* Hover effect */
.mcq label:hover {
  background: linear-gradient(135deg,
    rgba(0, 255, 255, 0.08),
    rgba(0, 255, 255, 0.04));
  border-color: rgba(0, 255, 255, 0.4);
  color: var(--quiz-text);
  transform: translateX(3px);
}

.mcq label:hover::before {
  background: var(--quiz-primary);
  width: 10px;
  height: 10px;
}

/* Selected state */
.mcq input[type="radio"]:checked + label {
  background: linear-gradient(135deg,
    rgba(0, 255, 255, 0.15),
    rgba(255, 0, 255, 0.08));
  border-color: var(--quiz-primary);
  color: var(--quiz-text);
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 255, 255, 0.2);
}

.mcq input[type="radio"]:checked + label::before {
  background: var(--quiz-primary);
  width: 12px;
  height: 12px;
}

/* Checkmark for selected */
.mcq input[type="radio"]:checked + label::after {
  content: '';
  position: absolute;
  right: 26px;
  color: var(--quiz-primary);
  font-weight: bold;
  font-size: 1.4rem;
}

/* Disabled state */
.mcq input[type="radio"]:disabled + label {
  cursor: not-allowed;
  opacity: 0.6;
}

.mcq input[type="radio"]:disabled + label:hover {
  background: linear-gradient(135deg, 
    rgba(42, 42, 62, 0.4), 
    rgba(18, 18, 26, 0.4));
  border-color: rgba(0, 255, 255, 0.15);
  color: var(--quiz-text-muted);
  transform: translateX(0);
  box-shadow: none;
}

/* Correct answer highlight */
.mcq label.correct-answer {
  background: linear-gradient(135deg,
    rgba(0, 255, 136, 0.2),
    rgba(0, 255, 136, 0.1));
  border-color: var(--quiz-success);
  color: var(--quiz-text);
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 255, 136, 0.2);
}

.mcq label.correct-answer::before {
  background: var(--quiz-success);
}

.mcq label.correct-answer::after {
  content: '';
  position: absolute;
  right: 26px;
  color: var(--quiz-success);
  font-weight: bold;
  font-size: 1.4rem;
}

/* Wrong answer highlight */
.mcq label.wrong-answer {
  background: linear-gradient(135deg,
    rgba(255, 0, 85, 0.2),
    rgba(255, 0, 85, 0.1));
  border-color: var(--quiz-error);
  color: var(--quiz-text);
  box-shadow: 0 4px 15px rgba(255, 0, 85, 0.2);
}

.mcq label.wrong-answer::before {
  background: var(--quiz-error);
}

.mcq label.wrong-answer::after {
  content: '';
  position: absolute;
  right: 26px;
  color: var(--quiz-error);
  font-weight: bold;
  font-size: 1.4rem;
}

/* ==========================
   PROGRESS BAR
   ========================== */
#quiz-progress {
  margin: 35px auto;
  padding: 28px 32px;
  background: linear-gradient(135deg,
    rgba(18, 18, 26, 0.9),
    rgba(10, 10, 15, 0.9));
  border-radius: 16px;
  border: 1px solid rgba(0, 255, 255, 0.2);
  max-width: 900px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.progress-info {
  text-align: center;
  margin-bottom: 16px;
  color: var(--quiz-text);
  font-size: 1.1rem;
  font-weight: 600;
}

.progress-bar {
  background: rgba(10, 10, 15, 0.8);
  border-radius: 50px;
  height: 28px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(0, 255, 255, 0.2);
}

.progress-bar-inner {
  background: linear-gradient(90deg,
    var(--quiz-neon-blue),
    var(--quiz-primary),
    var(--quiz-neon-pink));
  height: 100%;
  border-radius: 50px;
  transition: width 0.3s ease;
  position: relative;
}

/* ==========================
   SUBMIT BUTTON
   ========================== */
#submitQuiz {
  background: linear-gradient(135deg,
    var(--quiz-primary),
    var(--quiz-neon-blue));
  color: #0a0a0f;
  border: 2px solid var(--quiz-primary);
  padding: 20px 50px;
  border-radius: 50px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-size: 1.1rem;
  margin: 45px auto;
  display: block;
  text-transform: uppercase;
  letter-spacing: 2px;
  box-shadow: 0 4px 20px rgba(0, 255, 255, 0.3);
}

#submitQuiz:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 255, 255, 0.4);
}

#submitQuiz:active {
  transform: translateY(-1px);
}

#submitQuiz:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ==========================
   QUIZ RESULT
   ========================== */
#quizResult {
  background: linear-gradient(135deg,
    rgba(18, 18, 26, 0.95),
    rgba(10, 10, 15, 0.95));
  border-radius: 20px;
  padding: 36px;
  margin: 35px auto;
  border: 2px solid var(--quiz-primary);
  text-align: center;
  font-size: 1.3rem;
  font-weight: 600;
  box-shadow: 0 4px 30px rgba(0, 255, 255, 0.2);
  color: var(--quiz-text);
  max-width: 900px;
}

/* ==========================
   RETRY BUTTON
   ========================== */
#retry-btn {
  background: linear-gradient(135deg,
    var(--quiz-accent),
    #ff9900);
  color: #0a0a0f;
  border: 2px solid var(--quiz-accent);
  padding: 18px 45px;
  border-radius: 50px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-size: 1.05rem;
  margin: 26px auto;
  display: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  box-shadow: 0 4px 20px rgba(255, 255, 0, 0.3);
}

#retry-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(255, 255, 0, 0.4);
}

/* ==========================
   BUTTON CONTAINER
   ========================== */
.button-container {
  text-align: center;
  margin: 45px 0;
}

/* ==========================
   QUIZ PROGRESS STYLES - NEON
   ========================== */
.quiz-progress-container {
  padding: 18px;
  background: rgba(0, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 255, 0.1);
}

.quiz-progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--quiz-text-muted);
}

.quiz-progress-count {
  color: var(--quiz-primary);
  font-weight: bold;
}

.quiz-progress-bar {
  width: 100%;
  height: 10px;
  background: rgba(10, 10, 15, 0.6);
  border-radius: 50px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg,
    var(--quiz-neon-blue),
    var(--quiz-primary));
  transition: width 0.3s ease;
}

/* ==========================
   QUIZ RESULT STYLES
   ========================== */
.quiz-result-loading {
  padding: 24px;
  margin-top: 24px;
  background: rgba(0, 255, 255, 0.05);
  border-radius: 14px;
  text-align: center;
  border: 1px solid rgba(0, 255, 255, 0.2);
}

.quiz-result-loading-text {
  font-size: 1.25rem;
  color: var(--quiz-primary);
}

.quiz-result-success {
  padding: 24px;
  margin-top: 24px;
  background: linear-gradient(135deg,
    rgba(0, 255, 136, 0.15),
    rgba(0, 255, 136, 0.05));
  border-radius: 14px;
  border: 2px solid var(--quiz-success);
}

.quiz-result-warning {
  padding: 24px;
  margin-top: 24px;
  background: linear-gradient(135deg,
    rgba(255, 255, 0, 0.15),
    rgba(255, 255, 0, 0.05));
  border-radius: 14px;
  border: 2px solid var(--quiz-accent);
}

.quiz-result-default {
  padding: 24px;
  margin-top: 24px;
  background: linear-gradient(135deg,
    rgba(0, 255, 255, 0.15),
    rgba(0, 255, 255, 0.05));
  border-radius: 14px;
  border: 2px solid var(--quiz-primary);
}

.quiz-result-title {
  font-size: 1.6rem;
  font-weight: bold;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.quiz-result-success .quiz-result-title {
  color: var(--quiz-success);
}

.quiz-result-warning .quiz-result-title {
  color: var(--quiz-accent);
}

.quiz-result-default .quiz-result-title {
  color: var(--quiz-primary);
}

.quiz-result-score {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--quiz-text);
}

.quiz-result-best {
  font-size: 1.15rem;
  margin-bottom: 12px;
  color: var(--quiz-success);
}

.quiz-result-info {
  color: var(--quiz-text-muted);
  font-size: 0.95rem;
}

.quiz-result-saved {
  color: var(--quiz-text-muted);
  font-size: 0.9rem;
  margin-top: 12px;
}

.quiz-result-tip {
  color: var(--quiz-text-muted);
  font-size: 0.9rem;
  margin-top: 12px;
}

.quiz-result-error {
  color: var(--quiz-accent);
  font-size: 0.9rem;
  margin-top: 12px;
}

.quiz-result-critical {
  color: var(--quiz-error);
  font-size: 0.9rem;
  margin-top: 12px;
}

.quiz-result-debug {
  color: var(--quiz-text-muted);
  font-size: 0.85rem;
  margin-top: 6px;
}

/* ==========================
   RESPONSIVE DESIGN
   ========================== */
@media (max-width: 768px) {
  #mcqSection {
    padding: 45px 20px;
    width: 98%;
  }

  .mcq-grid {
    padding: 0 10px;
    gap: 28px;
  }

  .mcq {
    padding: 28px;
  }

  .mcq h3 {
    font-size: 1.1rem;
  }

  .mcq label {
    padding: 18px 22px;
    padding-left: 40px;
    font-size: 1rem;
  }

  #submitQuiz {
    width: 90%;
    padding: 18px 40px;
  }

  #quiz-progress {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  #mcqSection {
    padding: 35px 15px;
  }

  .mcq {
    padding: 24px;
  }

  .mcq label {
    padding: 16px 20px;
    padding-left: 38px;
  }

  #submitQuiz {
    width: 100%;
    padding: 16px 30px;
    font-size: 1rem;
  }
}

/* ===============================
   FOOTER STYLES
   =============================== */

.lesson-footer {
  position: relative;
  margin-top: 100px;
  padding: 60px 20px 40px;
  background: linear-gradient(180deg, transparent, rgba(10, 10, 15, 0.5));
  border-top: 1px solid rgba(168, 85, 247, 0.1);
  text-align: center;
  z-index: 10;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
}

.footer-copyright {
  color: var(--text-dim, #a0a0b8);
  font-size: 0.95rem;
  margin-bottom: 25px;
  opacity: 0.8;
}

#lesson-title {
  color: var(--neon-cyan, #00ffff);
  font-weight: 600;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  color: var(--text-dim, #a0a0b8);
  text-decoration: none;
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 50px;
  background: rgba(13, 20, 37, 0.5);
  transition: all 0.3s ease;
  font-size: 0.95rem;
  font-weight: 500;
}

.footer-link:hover {
  color: var(--neon-cyan, #00ffff);
  border-color: var(--neon-cyan, #00ffff);
  background: rgba(0, 255, 255, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 255, 255, 0.2);
}

.footer-link i {
  font-size: 1.1rem;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--neon-purple, #a855f7), var(--neon-cyan, #00ffff));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 5px 20px rgba(168, 85, 247, 0.4);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 10px 30px rgba(168, 85, 247, 0.6);
}

.back-to-top i {
  color: white;
  font-size: 1.2rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .footer-links {
    flex-direction: column;
    gap: 15px;
  }
  
  .footer-link {
    width: 80%;
    max-width: 300px;
    justify-content: center;
  }
  
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}