/* Quiz Styles - FORCE ROW LAYOUT & LARGER FONT */
.quiz-card {
  max-width: 900px;
  margin: 20px auto;
  padding: 1.5rem;
}

.quiz-question {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin: 1.5rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid #e9ecef;
  text-align: center;
}

.quiz-question h3 {
  color: #666;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.english-question {
  color: #0050ef;
  font-size: 2.5rem !important; /* Force larger size */
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

/* FORCE ROW LAYOUT - 2x2 grid */
.quiz-options {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important; /* Force two columns */
  gap: 1rem !important;
  margin: 2rem 0 !important;
}

.quiz-option {
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  padding: 1.5rem 1rem !important;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  font-size: 1.3rem !important; /* Larger option text */
  font-weight: 600;
  color: #333;
  position: relative;
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 80px !important; /* Taller options */
  width: 100% !important; /* Full width in grid */
  box-sizing: border-box;
}

.quiz-option:hover:not(:disabled) {
  border-color: #0050ef;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 80, 239, 0.15);
}

.quiz-option:disabled {
  cursor: not-allowed;
}

.quiz-option.correct {
  background: #d4edda;
  border-color: #28a745;
  color: #155724;
}

.quiz-option.incorrect {
  background: #f8d7da;
  border-color: #dc3545;
  color: #721c24;
}

.quiz-option.correct-answer {
  background: #d4edda;
  border-color: #28a745;
  color: #155724;
}

.option-text {
  text-align: center;
}

.audio-indicator {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: #0050ef;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: bold;
}

.quiz-feedback {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  font-weight: 600;
  text-align: center;
  display: none;
  font-size: 1.1rem;
}

.quiz-feedback.correct {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}

.quiz-feedback.incorrect {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

.quiz-next-btn {
  background: #0050ef;
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: block;
  margin: 1.5rem auto;
  min-width: 200px;
}

.quiz-next-btn:hover {
  background: #0040c7;
  transform: translateY(-2px);
}

.quiz-progress {
  margin: 2rem 0 1rem 0;
  text-align: center;
}

.progress-text {
  color: #666;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}

.progress-bar {
  width: 100%;
  background: #e9ecef;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
}

.progress {
  background: linear-gradient(90deg, #0050ef, #0040c7);
  height: 100%;
  transition: width 0.5s ease;
}

/* Quiz Completion */
.quiz-completion {
  max-width: 500px;
  margin: 2rem auto;
  text-align: center;
}

.completion-content {
  padding: 2rem;
}

.completion-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.quiz-completion h2 {
  color: #0050ef;
  margin-bottom: 1rem;
  font-size: 2rem;
}

.score {
  font-size: 1.5rem;
  color: #333;
  margin-bottom: 0.5rem;
}

.percentage {
  font-size: 1.3rem;
  color: #666;
  margin-bottom: 2rem;
}

.restart-quiz-btn {
  background: #0050ef;
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.restart-quiz-btn:hover {
  background: #0040c7;
  transform: translateY(-2px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .quiz-card {
    margin: 10px;
    padding: 1rem;
  }
  
  .quiz-question {
    padding: 1.5rem;
    margin: 1rem 0;
  }
  
  .english-question {
    font-size: 2rem !important; /* Still large on mobile */
  }
  
  .quiz-options {
    grid-template-columns: 1fr !important; /* Single column on mobile */
    gap: 0.75rem !important;
    margin: 1.5rem 0 !important;
  }
  
  .quiz-option {
    padding: 1.25rem 1rem !important;
    min-height: 70px !important;
    font-size: 1.2rem !important;
  }
}

@media (max-width: 480px) {
  .quiz-card {
    padding: 0.75rem;
  }
  
  .quiz-question {
    padding: 1.25rem;
  }
  
  .english-question {
    font-size: 1.8rem !important;
  }
  
  .quiz-option {
    padding: 1rem 0.75rem !important;
    min-height: 65px !important;
    font-size: 1.1rem !important;
  }
}

/* Mobile Size Reduction - No Overflow */
@media (max-width: 768px) {
  .quiz-card {
    margin: 0 !important;
    padding: 0.5rem !important;
    min-height: auto !important;
    height: auto !important;
  }
  
  .quiz-question {
    padding: 0.75rem !important;
    margin: 0.5rem 0 !important;
    min-height: auto !important;
  }
  
  .quiz-question h3 {
    font-size: 0.9rem !important;
    margin-bottom: 0.5rem !important;
  }
  
  .english-question {
    font-size: 1.4rem !important; /* Reduced from 2rem */
    line-height: 1.2 !important;
    margin: 0.25rem 0 !important;
  }
  
  .quiz-options {
    margin: 0.75rem 0 !important;
    gap: 0.4rem !important;
    min-height: auto !important;
  }
  
  .quiz-option {
    padding: 0.6rem 0.4rem !important;
    min-height: 45px !important; /* Reduced from 60px */
    font-size: 0.9rem !important; /* Reduced from 1.1rem */
    border-width: 1px !important;
  }
  
  .audio-indicator {
    width: 14px !important;
    height: 14px !important;
    font-size: 0.5rem !important;
    top: 0.25rem !important;
    right: 0.25rem !important;
  }
  
  .quiz-progress {
    margin: 0.5rem 0 !important;
  }
  
  .progress-text {
    font-size: 0.8rem !important;
    margin-bottom: 0.25rem !important;
  }
  
  .progress-bar {
    height: 6px !important;
  }
  
  .quiz-feedback {
    padding: 0.5rem !important;
    margin: 0.5rem 0 !important;
    font-size: 0.9rem !important;
  }
  
  .quiz-next-btn {
    margin: 0.5rem auto !important;
    padding: 0.6rem 1.2rem !important;
    font-size: 0.9rem !important;
    min-width: 140px !important;
  }
  
  /* Reduce ad container margins */
  .ad-container {
    margin: 0.5rem 0 !important;
  }
}

@media (max-width: 480px) {
  .quiz-card {
    padding: 0.25rem !important;
  }
  
  .quiz-question {
    padding: 0.5rem !important;
  }
  
  .english-question {
    font-size: 1.2rem !important; /* Even smaller on very small screens */
  }
  
  .quiz-option {
    padding: 0.5rem 0.3rem !important;
    min-height: 40px !important;
    font-size: 0.85rem !important;
  }
  
  .quiz-options {
    gap: 0.3rem !important;
  }
  
  .quiz-next-btn {
    padding: 0.5rem 1rem !important;
    font-size: 0.85rem !important;
    min-width: 120px !important;
  }
}

/* Ultra-small screens */
@media (max-width: 360px) {
  .english-question {
    font-size: 1.1rem !important;
  }
  
  .quiz-option {
    min-height: 35px !important;
    font-size: 0.8rem !important;
    padding: 0.4rem 0.25rem !important;
  }
  
  .quiz-next-btn {
    padding: 0.4rem 0.8rem !important;
    min-width: 110px !important;
  }
}

/* Ensure content fits without scrolling */
.content {
  overflow-y: auto;
  padding-bottom: 70px;
}

.quiz-card {
  overflow: visible !important;
}

/* Tablet Fix (768px - 1018px) */
@media (min-width: 768px) and (max-width: 1018px) {
  .quiz-card {
    margin: 10px !important;
    padding: 1rem !important;
    transform: scale(0.9);
    transform-origin: top center;
  }
  
  .quiz-question {
    padding: 1rem !important;
    margin: 0.75rem 0 !important;
  }
  
  .quiz-question h3 {
    font-size: 1rem !important;
    margin-bottom: 0.5rem !important;
  }
  
  .english-question {
    font-size: 1.6rem !important; /* Reduced from 2.5rem */
  }
  
  .quiz-options {
    margin: 1rem 0 !important;
    gap: 0.75rem !important;
  }
  
  .quiz-option {
    padding: 1rem 0.75rem !important;
    min-height: 60px !important; /* Reduced from 80px */
    font-size: 1.1rem !important; /* Reduced from 1.3rem */
  }
  
  .quiz-progress {
    margin: 1rem 0 !important;
  }
  
  .progress-text {
    font-size: 0.9rem !important;
  }
  
  .quiz-next-btn {
    margin: 1rem auto !important;
    padding: 0.8rem 1.5rem !important;
    font-size: 1rem !important;
    min-width: 160px !important;
  }
  
  /* Reduce ad container sizes */
  .ad-container {
    margin: 0.75rem 0 !important;
  }
}

/* Large Tablet Fix (900px - 1018px) */
@media (min-width: 900px) and (max-width: 1018px) {
  .quiz-card {
    transform: scale(0.95); /* Slightly less scaling */
  }
  
  .english-question {
    font-size: 1.8rem !important;
  }
  
  .quiz-option {
    min-height: 65px !important;
    font-size: 1.2rem !important;
  }
}

/* Small Tablet Fix (768px - 899px) */
@media (min-width: 768px) and (max-width: 899px) {
  .quiz-card {
    transform: scale(0.85); /* More scaling for smaller tablets */
    margin: 5px !important;
  }
  
  .english-question {
    font-size: 1.4rem !important;
  }
  
  .quiz-option {
    min-height: 55px !important;
    font-size: 1rem !important;
  }
}