/*
 * Comprehensive Stylesheet for the JetsetterGuide Travel Quiz
 * Covers: Start Block, Landing Page, Quiz Player, and Results Page
 */

/* --- General & Typography --- */
.quiz-start-block,
.quiz-landing-page,
.quiz-player,
.quiz-results-page {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol";
  color: #333;
}

/* --- Generic Button Styles --- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background-color: #28a745;
  color: #fff;
}
.btn-primary:hover {
  background-color: #218838;
  color: #fff;
}

.btn-secondary {
  background-color: #6c757d;
  color: #fff;
}
.btn-secondary:hover {
  background-color: #5a6268;
  color: #fff;
}

.btn-outline {
  background-color: #fff;
  color: #495057;
  border-color: #ced4da;
}
.btn-outline:hover {
  background-color: #f8f9fa;
  border-color: #adb5bd;
}

/* --- Quiz Start Block --- */
.quiz-start-block {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  background: #fff;
  max-width: 800px;
  margin: 2rem auto;
}
.quiz-start-block .quiz-image img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}
.quiz-start-block .quiz-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.quiz-start-block .quiz-description {
  color: #666;
  margin-bottom: 2rem;
  line-height: 1.5;
}
.quiz-start-button {
  font-size: 1.1rem !important;
}

/* --- Quiz Landing Page --- */
.quiz-landing-page {
  max-width: 800px;
  margin: 2rem auto;
  padding: 20px;
}
.quiz-hero-image img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}
.quiz-hero-content {
  text-align: center;
  margin-bottom: 40px;
}
.quiz-hero-content .quiz-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 15px;
}
.quiz-hero-content .quiz-description {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 30px;
  line-height: 1.6;
}
.quiz-landing-body {
  text-align: left;
  margin: 0 auto 30px auto;
  max-width: 700px;
  line-height: 1.7;
}

/* --- Quiz Player --- */
.quiz-player {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}
.quiz-header {
  text-align: center;
  margin-bottom: 2rem;
}
.quiz-header .quiz-title {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 10px;
}
.quiz-header .quiz-subtitle {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 30px;
}
.quiz-progress {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.5rem;
}
.progress-bar {
  width: 100%;
  height: 8px;
  background-color: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 2rem;
}
.progress-fill {
  height: 100%;
  background-color: #28a745;
  transition: width 0.3s ease;
}
.question-container {
  background-color: #f8f9fa;
  padding: 2rem;
  border-radius: 8px;
}
.question-text {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
}
.answer-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.answer-option {
  display: flex;
  align-items: center;
  padding: 1rem;
  border: 2px solid #ced4da;
  border-radius: 8px;
  cursor: pointer;
  background-color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.answer-option:hover {
  border-color: #888;
}
.answer-option.selected {
  border-color: #28a745;
  box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.25);
}
.answer-option input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: #28a745;
  margin-right: 1rem;
}
.answer-text {
  font-size: 1rem;
  flex: 1;
}
.quiz-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e9ecef;
}
.quiz-navigation button {
  border: 1px solid #ced4da;
  background-color: #fff;
  color: #333;
}
.quiz-navigation button:not(:disabled):hover {
  background-color: #f1f1f1;
}
.quiz-navigation button:disabled {
  background-color: #f8f9fa;
  color: #adb5bd;
  cursor: not-allowed;
}

/* --- Results Page Styling (Updated) --- */
.quiz-results-page {
  max-width: 640px;
  margin: 2rem auto;
  padding: 2rem;
  text-align: center;
}
.quiz-results-page .results-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 2rem;
}
.quiz-results-page .score-display {
  width: 140px;
  height: 140px;
  margin: 0 auto 2.5rem;
  border-radius: 50%;
  background-color: #28a745;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}
.quiz-results-page .score {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1;
}
.quiz-results-page .score-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.25rem;
}
.quiz-results-page .result-card {
  background-color: #f8f9fa;
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 2.5rem;
}
.quiz-results-page .result-image img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}
.quiz-results-page .result-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: #212529;
}
.quiz-results-page .result-description {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #6c757d;
}
.quiz-results-page .results-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

/* --- Knowledge Quiz Review Section --- */
.knowledge-review-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e9ecef;
  text-align: left;
}
.knowledge-review-section h3 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  font-weight: 600;
}
.review-item {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  border-left: 5px solid;
}
.review-item.review-correct {
  background-color: #f0fff4;
  border-color: #28a745;
}
.review-item.review-incorrect {
  background-color: #fff5f5;
  border-color: #dc3545;
}
.review-question-text {
  margin-bottom: 0.75rem;
  font-weight: bold;
}
.review-answer-details span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.review-answer-details svg {
  width: 20px;
  height: 20px;
}
.user-answer.correct svg {
  color: #28a745;
}
.user-answer.incorrect svg {
  color: #dc3545;
}
.correct-answer svg {
  color: #28a745;
}
