/* --------------------------------------------------
   Layout & Reset
-------------------------------------------------- */
html, body {
    margin: 0;
    padding: 0;

    background: #fafafa;
    font-family: Arial, sans-serif;
}

.quiz-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    animation: fadeIn 0.4s ease;
    overflow: hidden;

}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

p {
    margin-bottom: 12px;
}

/* --------------------------------------------------
   Score Bar
-------------------------------------------------- */
.score-bar {
    background: #202020;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: bold;
    text-align: center;
}

/* --------------------------------------------------
   Headings & Text
-------------------------------------------------- */
h1, h2 {
    margin-top: 0;
}

p {
    line-height: 1.5;
}

/* --------------------------------------------------
   Buttons
-------------------------------------------------- */
.button,
.answer-btn {
    display: block;
    width: 100%;
    padding: 14px 18px;
    background: #0077dd;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    margin: 10px 0;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease, transform 0.1s ease;

  box-sizing: border-box;
}



.answer-btn:hover,
.button:hover {
    background: #005fb5;
}

.answer-btn:active,
.button:active {
    transform: scale(0.98);
}

/* Prevent layout jumps */
.answer-btn span {
    display: inline-block;
    width: 90%; /* ensures option text doesn't shift layout */
}

/* Keep page compact */
body > *:last-child {
    margin-bottom: 0 !important;
}

/* --------------------------------------------------
   Feedback page (correct / wrong)
-------------------------------------------------- */
.feedback {
    padding: 20px;
    border-radius: 8px;
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
}

.feedback.correct {
    background: #d4f8d4;
    color: #0b660b;
}

.feedback.wrong {
    background: #ffdada;
    color: #7a0000;
}

.progress-container {
    background: #e0e0e0;
    border-radius: 8px;
    height: 14px;
    width: 100%;
    margin: 20px 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0092ff, #006fe0);
    width: 0%;
    border-radius: 8px;
    transition: width 0.4s ease; /* nice animation */
}

/* spinner stuff */
.loading {
  position: relative;
  color: transparent !important;
  pointer-events: none; /* prevents double clicks */
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 3px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

