*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --cream: #0f0f0f;
  --ink: #ffffff;
  --ink-muted: #d3d1cf;
  --ink-light: #0f0f0f;
  --accent: #fa271b;
  --accent-bg: #ebebeb;
  --correct: #36c445;
  --correct-bg: #ebf5f0;
  --wrong: #fa271b;
  --wrong-bg: #faede9;
  --border: rgba(26, 23, 20, 0.12);

  --radius: 12px;
  --radius-lg: 20px;
}

html {
  font-size: 100%;
}

body {
  min-height: 100%;
  background: var(--cream);
  color: var(--ink);
  font-size: 1.6rem;
  -webkit-font-smoothing: antialiased;
  width: 100%;
  background: radial-gradient(
    circle,
    rgba(204, 205, 209, 1) 0%,
    rgba(181, 186, 190, 1) 50%,
    rgba(134, 143, 152, 1) 100%
  );
  /* background: url("images/BG.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: 5% 50%;
  backdrop-filter: blur(5px) brightness(70%); */
}

.quiz-title {
  font-size: clamp(2.8rem, 10vw, 3.2rem);
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.quiz-intro {
  width: 50%;
  display: block;
  margin: 0 auto;
  margin-top: 6rem;
  margin-bottom: 1rem;
}

.quiz-description {
  font-size: 1.6rem;
  color: var(--ink);
  line-height: 1.4;
}

/* ── Shell ────────────────────────────────────── */
.quiz-shell {
  position: relative;
  z-index: 1;
  width: 70%;
  /* min-height: 100svh; */
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 3rem;
}

.screen {
  width: 70%;
  max-width: 50rem;
  animation: screenIn 0.35s ease both;
}

.hidden {
  display: none !important;
}

@keyframes screenIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Start screen ─────────────────────────────── */
.start-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  margin-top: 15rem;
}

.start-image {
  width: 30rem;
  height: auto;
}

.start-badge {
  display: inline-block;

  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
}

.start-title {
  font-size: clamp(2.8rem, 8vw, 3rem);
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.start-title em {
  font-style: italic;
  color: var(--accent);
}

.start-sub {
  font-size: 13px;
  color: var(--ink-muted);
  letter-spacing: 0.03em;
  margin-bottom: 2.5rem;
}

.btn-start {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--cream);

  font-size: 1.4rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius);
  padding: 14px 32px;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.15s;
}

.btn-start:hover {
  background: #3a3530;
}
.btn-start:active {
  transform: scale(0.97);
}

.start-description {
  display: block;
  margin: 0 auto;
  text-align: center;
  margin-top: 2rem;
  color: var(--ink);
  font-size: 1.3rem;
}

.start-link {
  color: var(--accent);
  text-decoration: underline;
  font-weight: bold;
}

/* ── Question screen ──────────────────────────── */
.q-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 2.5rem;
}

.q-progress-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.q-progress-bar {
  flex: 1;
  height: 3px;
  background: var(--ink);
  border-radius: 2px;
  overflow: hidden;
}

.q-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.q-counter {
  font-size: 1.4rem;
  color: var(--ink);

  letter-spacing: 0.05em;
  white-space: nowrap;
}

.q-score-badge {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--correct);
  background: var(--correct-bg);
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}

.q-body {
  margin-bottom: 2rem;
  width: 100%;
}

.q-num {
  font-size: 5rem;
  color: #fff;
  line-height: 1;
  margin-bottom: 0.5rem;
  user-select: none;
}

.q-text {
  font-size: 2.8rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--ink);
}

.q-text.fade-in {
  animation: fadeUp 0.3s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.q-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  object-fit: cover;
  margin-top: 1rem;
}

/* .q-question {
  display: flex;
  align-items: center;
  gap: 1.25rem;
} */

/* ── Options ──────────────────────────────────── */
.options {
  width: 80%;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 auto;
}

.options li {
  animation: fadeUp 0.3s ease both;
}

.option-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;

  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px;

  font-size: 13.5px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s,
    transform 0.12s;
}

.option-btn:hover:not(:disabled) {
  border-color: rgba(26, 23, 20, 0.3);
  transform: translateX(3px);
}

.option-btn:disabled {
  cursor: default;
}

.opt-content img {
  width: 100%;
  height: auto;
}

.opt-content {
  font-size: 1.2rem;
}

.opt-label {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--cream);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  flex-shrink: 0;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}

.opt-text {
  color: var(--cream);
}

/* Special Question */
.question-special {
  width: 100%;
  height: 100%;
  padding: 2rem;
  border: 4px solid #dc0510;
  border-radius: 20px;
}

.q-number {
  display: flex;
  align-items: center;
  gap: 12px;
}

.q-hint {
  color: var(--ink);
  background: rgba(220, 5, 16, 0.5);
  padding: 0.3rem 0.6rem;
  border-radius: 10px;
}

.question-tag {
  letter-spacing: 0.12rem;
  color: var(--accent);
  font-weight: bold;
}

.q-image {
  opacity: 1;
  transform: scale(1);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.q-image.revealing {
  animation: revealImage 0.5s ease;
}

@keyframes revealImage {
  0% {
    opacity: 0;
    transform: scale(0.92);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.reveal-text {
  background: #ebebeb;
  padding: 0.6rem 1rem;
  color: var(--ink-light);
  border-radius: 15px;
  animation: revealImage 0.5s ease;
  text-align: justify;
}

/* Correct */
.option-btn.correct {
  border-color: var(--correct);

  background: var(--correct-bg);
}
.option-btn.correct .opt-label {
  background: var(--correct);
  border-color: var(--correct);

  color: #fff;
}

/* Wrong */
.option-btn.wrong {
  border-color: var(--wrong);
  border-width: 3px;
  background: var(--wrong-bg);
}
.option-btn.wrong .opt-label {
  background: var(--wrong);
  border-color: var(--wrong);
  color: #fff;
}

/* Reveal the right answer */
.option-btn.reveal-correct {
  border-color: var(--correct);
  border-width: 3px;
  background: var(--correct-bg);
}
.option-btn.reveal-correct .opt-label {
  background: var(--correct);
  border-color: var(--correct);

  color: #fff;
}

/* ── Next button ──────────────────────────────── */
.btn-next {
  margin: 0 auto;
  margin-top: 1.25rem;
  display: block;
  width: 40%;
  background: var(--ink);
  color: var(--cream);

  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.12s;
  animation: fadeUp 0.25s ease both;
}

.btn-next:hover {
  background: #c4c1bf;
}
.btn-next:active {
  transform: scale(0.98);
}

/* ── Results screen ───────────────────────────── */
.results-inner {
  text-align: center;
  padding: 1rem 0;
}

.results-label {
  font-size: 1.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.results-score {
  font-size: clamp(4rem, 16vw, 7rem);
  line-height: 1;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.score-denom {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  color: var(--accent);
  margin-left: 8px;
}

.btn-restart {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 500;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px 28px;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.12s;
}

.btn-restart:hover {
  background: #fff;
  border-color: rgba(26, 23, 20, 0.3);
}
.btn-restart:active {
  transform: scale(0.97);
}

.results-image {
  border: 1px solid #ebebeb;
}

.results-msg a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}

.link-to-quiz {
  margin: 2rem auto;
  width: 60%;
  text-align: center;
  color: var(--ink);
  font-size: 1.2rem;
}

.link-to-quiz a {
  color: var(--accent);
  font-weight: bold;
  text-decoration: underline;
}

.logo-img {
  width: 40%;
  height: auto;
  display: block;
  margin: 2rem auto;
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 769px) {
  html {
    font-size: 50%;
  }

  /* body {
    background: url(images/BG-mobile.jpg);
    background-position: center top;
    background-size: contain;
    backdrop-filter: brightness(60%) blur(4px);
  } */

  .screen {
    margin-top: 5rem;
    width: 100%;
  }

  .quiz-intro {
    width: 90%;
    margin-top: 4rem;
  }

  .quiz-title {
    line-height: 1.2;
  }

  .start-badge {
    font-size: 1.8rem;
  }

  .start-header {
    margin-top: 1rem;
    flex-direction: column;
    gap: 2rem;
  }

  .start-image {
    width: 100%;
    max-width: 32rem;
  }

  .btn-start {
    display: block;
    margin: 0 auto;
    margin-top: 3rem;
  }

  .quiz-shell {
    align-items: flex-start;

    width: 90%;
  }

  .quiz-title {
    font-size: 4rem;
  }

  .quiz-description {
    font-size: 2.4rem;
  }

  .options {
    margin: 0 0;
    margin-bottom: 2rem;
    width: 100%;
  }

  .opt-text {
    font-size: 1.4rem;
  }

  .q-num {
    font-size: 36px;
  }

  .q-question {
    flex-direction: column;
  }

  .q-image {
    margin-bottom: 1.25rem;
    width: 100%;
  }

  .q-text {
    font-size: 3.6rem;
    line-height: 1.1;
    margin-bottom: 1rem;
  }

  .opt-content {
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  .link-to-quiz {
    width: 90%;
  }

  .link-to-quiz p {
    font-size: 1.6rem;
    line-height: 1.2;
  }
}

@media (min-width: 1500px) {
  .quiz-intro {
    width: 50rem;
  }

  .link-to-quiz {
    width: 50rem;
  }
}
