/* ============================================================
   Cardiff Bridge Tutors - shared quiz stylesheet
   Used by every quiz. Edit here to restyle all of them at once.
   ============================================================ */

:root {
  --felt: #0f5132;
  --felt-dark: #07331f;
  --gold: #b08d57;
  --ivory: #fffaf0;
  --card-white: #fffdf7;
  --red: #b00020;
  --orange: #f97316;
  --blue: #0f2f66;
  --black: #111111;
  --correct: #1b7f3a;
  --wrong: #b91c1c;
  --text: #222222;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at center, #1d7a4d 0%, var(--felt) 52%, var(--felt-dark) 100%);
}

.quiz-container {
  width: min(100%, 780px);
  overflow: hidden;
  background: var(--ivory);
  border: 5px solid var(--gold);
  border-radius: 22px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.5);
}

.quiz-header {
  padding: 24px;
  text-align: center;
  color: var(--ivory);
  background: linear-gradient(180deg, #7f1d1d, #450a0a);
  border-bottom: 4px solid var(--gold);
}

.quiz-header h1 {
  margin: 0;
  font-size: clamp(1.5rem, 4.5vw, 2.1rem);
  letter-spacing: 0.5px;
}

.quiz-header .subtitle {
  margin: 8px 0 0;
  font-size: 0.95rem;
  opacity: 0.85;
  font-style: italic;
}

.suits {
  margin-top: 12px;
  font-size: 2.25rem;
  letter-spacing: 12px;
  line-height: 1;
}

.spade { color: var(--black); text-shadow: 0 0 2px white; }
.heart { color: var(--red); }
.diamond { color: var(--orange); }
.club { color: var(--blue); }

.status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  font-weight: bold;
}

.progress-bar {
  height: 10px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: var(--gold);
  transition: width 0.3s ease;
}

.quiz-body { padding: 28px; }

.question {
  margin: 0 0 18px;
  font-size: clamp(1.25rem, 4vw, 1.6rem);
  line-height: 1.35;
  text-align: center;
}

.question-image {
  display: block;
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  margin-bottom: 22px;
  border: 4px solid var(--gold);
  border-radius: 14px;
  background: white;
}

.answers {
  display: grid;
  gap: 12px;
}

.answer-btn {
  width: 100%;
  padding: 15px 18px;
  cursor: pointer;
  text-align: left;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-weight: bold;
  color: #222;
  border: 2px solid var(--gold);
  border-radius: 12px;
  background: var(--card-white);
  transition: transform 0.15s ease, background 0.15s ease;
}

.answer-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #f7ecd0;
}

.answer-btn:disabled { cursor: not-allowed; }

.answer-btn.correct {
  color: white;
  background: var(--correct);
  border-color: var(--correct);
}

.answer-btn.incorrect {
  color: white;
  background: var(--wrong);
  border-color: var(--wrong);
}

.feedback {
  display: none;
  margin-top: 20px;
  padding: 15px;
  border-radius: 12px;
  font-weight: bold;
  line-height: 1.45;
}

.feedback.show { display: block; }

.feedback.good {
  color: #14532d;
  background: #dcfce7;
  border: 1px solid #86efac;
}

.feedback.bad {
  color: #7f1d1d;
  background: #fee2e2;
  border: 1px solid #fca5a5;
}

.feedback p { margin: 0.4em 0; }

.actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
}

.primary-btn,
.restart-btn {
  padding: 13px 20px;
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-weight: bold;
  color: white;
  border: 2px solid var(--gold);
  border-radius: 10px;
  background: #7f1d1d;
}

.primary-btn { display: none; }
.primary-btn.show { display: inline-block; }

.primary-btn:hover,
.restart-btn:hover { background: #450a0a; }

.result-screen {
  display: none;
  padding: 42px 28px;
  text-align: center;
}

.result-screen.show { display: block; }

.score-circle {
  display: grid;
  place-items: center;
  width: 135px;
  height: 135px;
  margin: 24px auto;
  border: 9px solid var(--gold);
  border-radius: 50%;
  color: #7f1d1d;
  font-size: 1.9rem;
  font-weight: bold;
  background: white;
}

.final-score {
  font-size: 1.3rem;
  font-weight: bold;
}

.ranking {
  margin: 6px 0 18px;
  font-size: 1.1rem;
}

.ranking strong { color: #7f1d1d; }

.learn-more {
  margin: 22px auto 0;
  max-width: 460px;
  padding: 16px;
  font-size: 0.95rem;
  line-height: 1.5;
  background: white;
  border: 2px solid var(--gold);
  border-radius: 12px;
}

.learn-more a { color: #7f1d1d; }

.credit {
  padding: 14px 24px 22px;
  text-align: center;
  font-size: 0.85rem;
  color: #6b5b3e;
  border-top: 1px solid rgba(176, 141, 87, 0.4);
}

.credit a { color: #7f1d1d; }

@media (max-width: 560px) {
  body { padding: 12px; }
  .quiz-header, .quiz-body { padding: 20px; }
  .suits { letter-spacing: 7px; font-size: 2rem; }
  .status { flex-direction: column; align-items: center; }
}
