/* ============================================
   QUIZ STYLES - Modern & Responsive
   ============================================ */

/* ========== START SCREEN ========== */
.quiz-start {
  max-width: 700px;
  margin: 0 auto;
  padding: 20px;
}

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

.quiz-header h2 {
  font-size: 28px;
  color: #1055c9;
  margin-bottom: 8px;
}

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

.quiz-info-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px;
  border-radius: 16px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.quiz-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.stat-item {
  text-align: center;
  background: rgba(255, 255, 255, 0.15);
  padding: 15px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.stat-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 8px;
}

.stat-label {
  display: block;
  font-size: 12px;
  opacity: 0.9;
  margin-bottom: 4px;
}

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: bold;
}

.quiz-instructions {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  border-left: 4px solid #1055c9;
}

.quiz-instructions h3 {
  margin-top: 0;
  color: #1055c9;
  font-size: 18px;
}

.quiz-instructions ul {
  margin: 10px 0 0 20px;
  padding: 0;
}

.quiz-instructions li {
  margin: 8px 0;
  color: #555;
}

.btn-start-quiz {
  width: 100%;
  padding: 18px;
  font-size: 18px;
  font-weight: bold;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

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

/* ========== QUIZ CONTAINER ========== */
.quiz-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

/* Progress Bar */
.quiz-progress-bar {
  height: 8px;
  background: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

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

.progress-text {
  text-align: center;
  color: #666;
  font-size: 14px;
  margin-bottom: 20px;
}

/* Question Card */
.question-card {
  background: white;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 24px;
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
}

.question-number {
  font-size: 16px;
  font-weight: bold;
  color: #1055c9;
}

.question-points {
  background: #ffeaa7;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
  color: #d63031;
}

.question-text {
  font-size: 18px;
  line-height: 1.6;
  color: #2d3436;
  margin-bottom: 24px;
}

.question-image {
  text-align: center;
  margin: 24px 0;
}

.question-image img {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Options */
.question-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-item {
  display: flex;
  align-items: center;
  padding: 16px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
}

.option-item:hover {
  border-color: #667eea;
  background: #f8f9ff;
  transform: translateX(4px);
}

.option-item.selected {
  border-color: #667eea;
  background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
}

.option-item input[type="radio"] {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  cursor: pointer;
  accent-color: #667eea;
}

.option-text {
  flex: 1;
  font-size: 16px;
  color: #2d3436;
}

/* Navigation */
.quiz-navigation {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 30px;
}

.btn-nav {
  flex: 1;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-prev {
  background: #f1f3f5;
  color: #495057;
}

.btn-prev:hover:not(:disabled) {
  background: #e9ecef;
  transform: translateX(-2px);
}

.btn-next {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-next:hover:not(:disabled) {
  transform: translateX(2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-finish {
  background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
}

.btn-finish:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 184, 148, 0.4);
}

.btn-nav:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Quick Navigation */
.quiz-quick-nav {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
}

.quick-nav-title {
  font-weight: 600;
  color: #495057;
  margin-bottom: 12px;
  font-size: 14px;
}

.quick-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
  gap: 8px;
}

.quick-nav-btn {
  padding: 10px;
  border: 2px solid #dee2e6;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.quick-nav-btn:hover {
  border-color: #667eea;
  background: #f8f9ff;
}

.quick-nav-btn.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.quick-nav-btn.answered {
  background: #00b894;
  color: white;
  border-color: #00b894;
}

/* ========== RESULTS ========== */
.quiz-results {
  max-width: 700px;
  margin: 0 auto;
  padding: 20px;
}

.result-header {
  text-align: center;
  padding: 40px 20px;
  border-radius: 16px;
  margin-bottom: 30px;
}

.result-header.passed {
  background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
  color: white;
}

.result-header.failed {
  background: linear-gradient(135deg, #ff7675 0%, #fd79a8 100%);
  color: white;
}

.result-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.result-header h2 {
  margin: 0 0 12px 0;
  font-size: 32px;
}

.result-message {
  font-size: 16px;
  opacity: 0.95;
  margin: 0;
}

/* Score Circle */
.result-score {
  display: flex;
  justify-content: center;
  margin: 40px 0;
}

.score-circle {
  position: relative;
  width: 200px;
  height: 200px;
}

.score-circle svg {
  transform: rotate(-90deg);
}

.score-bg {
  fill: none;
  stroke: #e0e0e0;
  stroke-width: 8;
}

.score-fill {
  fill: none;
  stroke: #667eea;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dasharray 1s ease;
}

.score-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  font-weight: bold;
  color: #2d3436;
}

/* Result Stats */
.result-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 30px;
}

.result-stat {
  text-align: center;
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
}

.result-stat .stat-value {
  font-size: 24px;
  font-weight: bold;
  color: #2d3436;
  margin-bottom: 8px;
}

.result-stat .stat-label {
  font-size: 13px;
  color: #636e72;
}

/* Result Actions */
.result-actions {
  display: flex;
  gap: 12px;
}

.btn-action {
  flex: 1;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-review {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

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

.btn-retry {
  background: #f1f3f5;
  color: #495057;
}

.btn-retry:hover {
  background: #e9ecef;
  transform: translateY(-2px);
}

/* ========== REVIEW ========== */
.quiz-review {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.review-header {
  text-align: center;
  margin-bottom: 30px;
}

.review-header h2 {
  color: #1055c9;
  margin-bottom: 8px;
}

.review-summary {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

.summary-item {
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
}

.summary-item.correct {
  background: #d5f5e3;
  color: #00b894;
}

.summary-item.wrong {
  background: #fadbd8;
  color: #e74c3c;
}

/* Review Items */
.review-list {
  margin-bottom: 30px;
}

.review-item {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  border-left: 4px solid #e0e0e0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.review-item.correct {
  border-left-color: #00b894;
  background: #f0fff4;
}

.review-item.wrong {
  border-left-color: #e74c3c;
  background: #fff5f5;
}

.review-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.review-number {
  font-weight: bold;
  color: #1055c9;
}

.review-status {
  font-weight: 600;
  font-size: 14px;
}

.review-question {
  font-size: 17px;
  font-weight: 600;
  color: #2d3436;
  margin-bottom: 16px;
  line-height: 1.5;
}

.review-your-answer {
  background: rgba(231, 76, 60, 0.1);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  color: #c0392b;
}

.review-correct-answer {
  background: rgba(0, 184, 148, 0.1);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  color: #16a085;
}

.review-explanation {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 8px;
  color: #555;
  line-height: 1.6;
}

.review-actions {
  display: flex;
  gap: 12px;
}

.btn-back {
  background: #f1f3f5;
  color: #495057;
}

.btn-back:hover {
  background: #e9ecef;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .quiz-stats {
    grid-template-columns: 1fr;
  }
  
  .result-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .quiz-navigation {
    flex-direction: column;
  }
  
  .result-actions, .review-actions {
    flex-direction: column;
  }
  
  .quick-nav-grid {
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  }
  
  .score-circle {
    width: 160px;
    height: 160px;
  }
  
  .score-value {
    font-size: 36px;
  }
}
