/* quiz button */
/* Minimal presentational styles for quiz UI */
.quiz-container { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;  color:#111; padding:18px; border-radius:8px; box-shadow:0 6px 30px rgba(0,0,0,0.12); }
.quiz-header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.quiz-question { font-size:1.1rem; font-weight:600; margin:12px 0; }
.options { list-style:none; padding:0; margin:8px 0; display:grid; gap:8px; }
.option { border:1px solid #ddd; padding:10px; border-radius:6px; cursor:pointer; display:flex; gap:12px; align-items:center; }
.option.disabled { pointer-events:none; opacity:0.75; }
.option.correct { border-color: #0b9; border: #0b9 solid 3px; }
.option.wrong { border-color: #f33; border: #f33 solid 3px; }
.feedback { margin-top:10px; font-size:0.95rem; }
.controls { margin-top:16px; display:flex; gap:10px; }
.hidden { display:none; }
.score-panel { text-align:center; padding:18px; }
.progress { font-size:0.9rem; color:#666; margin-bottom:8px; }

/* -----------------------
   Quiz visibility & selection visuals
   ----------------------- */



.question-text {
  font-size: 1.1rem;
  font-weight: 500;
  color: #ffffff;
  line-height: 1.6;
}

/* Keep quiz-root hidden until user starts the test */
/* #quiz-root {
  display: none; 
} */

/* Visible state for quiz root when JS sets it */
/* #quiz-root.active {
  display: block;
} */

/* Selected option style (click feedback) */
.option.selected {
  background: #00A1E0;
  border-color: #4f46e5;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.08);
}

/* Make the label stand out when selected */
.option.selected .option-label {
  background: #eef2ff;
  color: #3730a3;
  font-weight: 700;
}

/* Disabled options (after submit) still visible but not clickable) */
.option.disabled {
  pointer-events: none;
  opacity: 0.8;
}

/* Keep correct/wrong more obvious */
/* .option.correct {
  background: #ecfdf5;
  border: 3px solid #10b981;
}
.option.wrong {
  background: #fff1f2;
  border: 3px solid #ef4444;
} */























.sparkle-button {
  --active: 0;
  --bg: radial-gradient(
			40% 50% at center 100%,
			hsl(270 calc(var(--active) * 97%) 72% / var(--active)),
			transparent
		),
		radial-gradient(
			80% 100% at center 120%,
			hsl(260 calc(var(--active) * 97%) 70% / var(--active)),
			transparent
		),
		hsl(260 calc(var(--active) * 97%) calc((var(--active) * 44%) + 12%));
  background: var(--bg);
  font-size: 1.2rem;
  font-weight: 500;
  border: 0;
  cursor: pointer;
  padding: 1em 1em;
  display: flex;
  align-items: center;
  gap: 0.25em;
  white-space: nowrap;
  border-radius: 100px;
  position: relative;
  box-shadow: 0 0 calc(var(--active) * 3em) calc(var(--active) * 1em) hsl(260 97% 61% / 0.75),
		0 0em 0 0 hsl(260 calc(var(--active) * 97%) calc((var(--active) * 50%) + 30%)) inset,
		0 -0.05em 0 0 hsl(260 calc(var(--active) * 97%) calc(var(--active) * 60%)) inset;
  transition: box-shadow var(--transition), scale var(--transition), background var(--transition);
  scale: calc(1 + (var(--active) * 0.1));
  transition: .3s;
}

.sparkle-button:active {
  scale: 1;
  transition: .3s;
}

.sparkle path {
  color: hsl(0 0% calc((var(--active, 0) * 70%) + var(--base)));
  transform-box: fill-box;
  transform-origin: center;
  fill: currentColor;
  stroke: currentColor;
  animation-delay: calc((var(--transition) * 1.5) + (var(--delay) * 1s));
  animation-duration: 0.6s;
  transition: color var(--transition);
}

.sparkle-button:is(:hover, :focus-visible) path {
  animation-name: bounce;
}

@keyframes bounce {
  35%, 65% {
    scale: var(--scale);
  }
}

.sparkle path:nth-of-type(1) {
  --scale: 0.5;
  --delay: 0.1;
  --base: 40%;
}

.sparkle path:nth-of-type(2) {
  --scale: 1.5;
  --delay: 0.2;
  --base: 20%;
}

.sparkle path:nth-of-type(3) {
  --scale: 2.5;
  --delay: 0.35;
  --base: 30%;
}

.sparkle-button:before {
  content: "";
  position: absolute;
  inset: -0.2em;
  z-index: -1;
  border: 0.25em solid hsl(260 97% 50% / 0.5);
  border-radius: 100px;
  opacity: var(--active, 0);
  transition: opacity var(--transition);
}

.spark {
  position: absolute;
  inset: 0;
  border-radius: 100px;
  rotate: 0deg;
  overflow: hidden;
  mask: linear-gradient(white, transparent 50%);
  animation: flip calc(var(--spark) * 2) infinite steps(2, end);
}

@keyframes flip {
  to {
    rotate: 360deg;
  }
}

.spark:before {
  content: "";
  position: absolute;
  width: 200%;
  aspect-ratio: 1;
  top: 0%;
  left: 50%;
  z-index: -1;
  translate: -50% -15%;
  rotate: 0;
  transform: rotate(-90deg);
  opacity: calc((var(--active)) + 0.4);
  background: conic-gradient(
		from 0deg,
		transparent 0 340deg,
		white 360deg
	);
  transition: opacity var(--transition);
  animation: rotate var(--spark) linear infinite both;
}

.spark:after {
  content: "";
  position: absolute;
  inset: var(--cut);
  border-radius: 100px;
}

.backdrop {
  position: absolute;
  inset: var(--cut);
  background: var(--bg);
  border-radius: 100px;
  transition: background var(--transition);
}

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

@supports(selector(:has(:is(+ *)))) {
  body:has(button:is(:hover, :focus-visible)) {
    --active: 1;
    --play-state: running;
  }

  .bodydrop {
    display: none;
  }
}

.sparkle-button:is(:hover, :focus-visible) ~ :is(.bodydrop, .particle-pen) {
  --active: 1;
  --play-state: runnin;
}

.sparkle-button:is(:hover, :focus-visible) {
  --active: 1;
  --play-state: running;
}

.sp {
  position: relative;
}

.particle-pen {
  position: absolute;
  width: 200%;
  aspect-ratio: 1;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  -webkit-mask: radial-gradient(white, transparent 65%);
  z-index: -1;
  opacity: var(--active, 0);
  transition: opacity var(--transition);
}

.particle {
  fill: white;
  width: calc(var(--size, 0.25) * 1rem);
  aspect-ratio: 1;
  position: absolute;
  top: calc(var(--y) * 1%);
  left: calc(var(--x) * 1%);
  opacity: var(--alpha, 1);
  animation: float-out calc(var(--duration, 1) * 1s) calc(var(--delay) * -1s) infinite linear;
  transform-origin: var(--origin-x, 1000%) var(--origin-y, 1000%);
  z-index: -1;
  animation-play-state: var(--play-state, paused);
}

.particle path {
  fill: hsl(0 0% 90%);
  stroke: none;
}

.particle:nth-of-type(even) {
  animation-direction: reverse;
}

@keyframes float-out {
  to {
    rotate: 360deg;
  }
}

.text {
  translate: 2% -6%;
  letter-spacing: 0.01ch;
  background: linear-gradient(90deg, hsl(0 0% calc((var(--active) * 100%) + 65%)), hsl(0 0% calc((var(--active) * 100%) + 26%)));
  -webkit-background-clip: text;
  color: transparent;
  transition: background var(--transition);
}

.sparkle-button svg {
  inline-size: 1.25em;
  translate: -25% -5%;
}
/* second button */
/* From Uiverse.io by cssbuttons-io */ 
button {
 position: relative;
 display: inline-block;
 cursor: pointer;
 outline: none;
 border: 0;
 vertical-align: middle;
 text-decoration: none;
 background: transparent;
 padding: 0;
 font-size: inherit;
 font-family: inherit;
}

button.learn-more {
 width: 12rem;
 height: auto;
}

button.learn-more .circle {
 transition: all 0.45s cubic-bezier(0.65, 0, 0.076, 1);
 position: relative;
 display: block;
 margin: 0;
 width: 3rem;
 height: 3rem;
 background: #282936;
 border-radius: 1.625rem;
}

button.learn-more .circle .icon {
 transition: all 0.45s cubic-bezier(0.65, 0, 0.076, 1);
 position: absolute;
 top: 0;
 bottom: 0;
 margin: auto;
 background: #fff;
}

button.learn-more .circle .icon.arrow {
 transition: all 0.45s cubic-bezier(0.65, 0, 0.076, 1);
 left: 0.625rem;
 width: 1.125rem;
 height: 0.125rem;
 background: none;
}

button.learn-more .circle .icon.arrow::before {
 position: absolute;
 content: "";
 top: -0.29rem;
 right: 0.0625rem;
 width: 0.625rem;
 height: 0.625rem;
 border-top: 0.125rem solid #fff;
 border-right: 0.125rem solid #fff;
 transform: rotate(45deg);
}

button.learn-more .button-text {
 transition: all 0.45s cubic-bezier(0.65, 0, 0.076, 1);
 position: absolute;
 top: 0;
 left: 0;
 right: 0;
 bottom: 0;
 padding: 0.75rem 0;
 margin: 0 0 0 1.85rem;
 color: #282936;
 font-weight: 700;
 line-height: 1.6;
 text-align: center;
 text-transform: uppercase;
}

button:hover .circle {
 width: 100%;
}

button:hover .circle .icon.arrow {
 background: #fff;
 transform: translate(1rem, 0);
}

button:hover .button-text {
 color: #fff;
}

/* model for quiz */
/* Minimal modal styles — adapt to your design system */
/* .quiz-modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 1200; } */
/* .quiz-modal[aria-hidden="false"] { display: flex; } */
.quiz-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.quiz-modal-body { position: relative; background: #1E1E1F; color: #111; max-width: 720px; width: 96%; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); padding: 22px; z-index: 2; }
.quiz-modal-close { position: absolute; top: 10px; right: 10px; background: transparent; border: none; font-size: 18px; cursor: pointer; }
.form-row { margin-bottom: 14px; }
.form-row label { display:block; font-weight:600; margin-bottom:6px; }
.form-row label.terms {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  margin-bottom: 0;
  font-weight: 500;
}
.form-row label.terms input {
  margin: 4px 0 0;
}
.form-row label.terms a {
  white-space: normal;
}
.terms-text {
  display: block;
  line-height: 1.5;
  color: inherit;
}
.form-row input[type="text"] { width:100%; padding:10px; border-radius:6px; border:1px solid #ddd; font-size:14px; }
.helper { font-size:12px; color:#666; margin-top:6px; }
.rules ul { margin: 0 0 6px 18px; color:#222; }
.terms {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  font-size: 14px;
}
.form-actions { display:flex; gap:8px; justify-content:flex-end; margin-top:8px; }
.btn-primary { background:#0b74de; color:white; border:none; padding:10px 14px; border-radius:6px; cursor:pointer; }
.btn-primary:disabled { opacity:0.5; cursor:not-allowed; }
.btn-secondary { background:transparent; border:1px solid #ccc; padding:9px 12px; border-radius:6px; cursor:pointer; }
@media (prefers-color-scheme: dark) {
  .quiz-modal-body { background: #0f1724; color: #e6eef8; }
  .helper { color:#9aa8c3; }
  .rules ul { color:#dbeafe; }
  .btn-primary { background:#2563eb; }
}

/* questions  */

/* Minimal styling - tweak to match your theme */
.quiz-app { max-width: 900px; margin: 18px auto; font-family: Inter, system-ui, Arial; color: #0f1724; }
.quiz-meta { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:8px; }
.section-title {  font-size: 1.25rem;
  font-weight: 600;
  color: #f5f5f5;
  margin-bottom: 8px;}
.scorecard { font-size:14px; }
.question-card { background:#fff; border:1px solid #e6e9ef; border-radius:8px; padding:12px; margin:12px 0; }
.q-text { font-weight:600; margin-bottom:8px; }
.options { display:flex; flex-direction:column; gap:8px; }
.option { border:1px solid #dbe2ee; padding:8px 10px; border-radius:6px; cursor:pointer; display:flex; gap:10px; align-items:center; }
.option input[type="radio"] { margin-right:8px; }
.option.correct {  border-color:#7ad07a; }
.option.wrong {  border-color:#f18787; opacity:0.95; }
.explanation { margin-top:8px; font-size:13px; color:#1f2937; background:#f8fafc; padding:8px; border-radius:6px; border:1px dashed #e2e8f0; }
.controls { display:flex; gap:8px; margin-top:12px; align-items:center; }
.btn { padding:8px 12px; border-radius:6px; border:none; cursor:pointer; }
.btn.primary { background:#0b74de; color:white; }
.btn.ghost { border:1px solid #cbd5e1; background:transparent; }
.results { margin-top:14px; padding:12px; border-radius:8px; background:#f8fafc; border:1px solid #e6eef8; }
.small { font-size:13px; color:#6b7280; }
.hidden { display:none; }

/* Center the CTA buttons on the page */
.quiz-buttons {
  min-height: 60vh;               /* vertically centers within viewport */
  display: flex;
  flex-direction: column;         /* stack "Take Test" over "Mini Test" */
  align-items: center;            /* horizontal center */
  justify-content: center;        /* vertical center */
  gap: 20px;
  text-align: center;
}

/* Keep the quiz block centered and tidy */
.quiz-block {
  max-width: 1000px;
  margin: 24px auto;              /* centers the quiz container */
  display: none;                  /* hidden until test starts */
}

.quiz-block-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

#quiz-root.active,
#mini-quiz-root.active {
  display: block;
}

#mini-quiz-root .quiz-container {
  margin-top: 0;
}

.quiz-loading,
.quiz-error {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  color: #e5e7eb;
}

.quiz-error {
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #fecaca;
}

.mini-final-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* Optional: on wider screens, place buttons side-by-side */
@media (min-width: 600px) {
  .quiz-buttons {
    flex-direction: row;          /* sit next to each other */
  }
}
/* Optional: on smaller screens, make buttons full-width */

/* Always center when visible */
.quiz-modal {
  position: fixed;
  inset: 0;
  display: none;                 /* hidden by default */
  align-items: center;
  justify-content: center;
  z-index: 1200;
}
.quiz-modal[aria-hidden="false"] { display: flex; }  /* flex -> centers */

/* Keep the checkbox row tidy */
.terms {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
}
.terms input {
  margin: 4px 0 0;
}

/* Small utility to control visibility via JS */
.is-hidden { display: none !important; }

/* default state: buttons visible, quiz-block hidden */

/* Always center when visible */
.quiz-modal {
  position: fixed;
  inset: 0;
  display: none;                 /* hidden by default */
  align-items: center;
  justify-content: center;
  z-index: 1200;
}
.quiz-modal[aria-hidden="false"] { display: flex; }  /* flex -> centers */

