/* Quiz System frontend — proportions matched to quizdays / wp-quiz-pro (skin-flat).
 * Accent #00b4ff, Poppins, offset card shadow on answers, pill buttons. */

.quiz-app {
	max-width: 720px;
	margin: 0 auto;
	padding: 16px 14px 40px;
	font-family: Poppins, Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: #444;
	box-sizing: border-box;
}
.quiz-app * { box-sizing: border-box; }

.quiz-title-block { margin: 4px 0 14px; }
.quiz-title { font-family: Poppins, Roboto, sans-serif; font-size: 24px; line-height: 1.067; font-weight: 700; letter-spacing: -.05em; margin: 0 0 5px; color: #000; }
.quiz-intro { font-size: 16px; color: #4b5563; margin: 0; }

/* ----------------------------------------------------------- progress */
.quiz-progress { display: flex; align-items: center; gap: 10px; margin: 14px 0 30px; }
.quiz-progress-restart {
	display: inline-flex; align-items: center; gap: 5px;
	height: 36px; padding: 0 14px; border-radius: 25px; border: none;
	background: #00b4ff; color: #fff; font-size: 14px; font-weight: 700; cursor: pointer;
}
.quiz-progress-restart .quiz-restart-icon { font-size: 18px; line-height: 1; }
.quiz-progress-restart .quiz-restart-text { display: none; }
.quiz-progress-track {
	position: relative; flex: 1; height: 36px; border: 3px solid #00b4ff;
	border-radius: 25px; background: #fff; overflow: visible;
}
.quiz-progress-fill {
	position: absolute; top: 0; left: 0; bottom: 0; width: 0; background: #d6efff;
	border-radius: 22px; transition: width .4s ease;
}
.quiz-progress-text {
	position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
	font-weight: 700; color: #1f2937; font-size: 17px; z-index: 2;
}
.quiz-progress-king {
	position: absolute; left: 0; bottom: 0; width: 56px; height: auto;
	transform: translateX(-50%); transition: left .4s ease; z-index: 3; pointer-events: none;
}
.quiz-progress-princess { flex: none; width: 56px; height: auto; }

/* Duplicate progress bar under the hint — mobile only */
.quiz-progress--bottom { display: none; margin: 24px 0 6px; }
@media (max-width: 640px) { .quiz-progress--bottom { display: flex; } }

/* ----------------------------------------------------------- question */
.quiz-question { animation: quizFade .35s ease; }
@keyframes quizFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.quiz-question-image {
	position: relative; width: 100%; border-radius: 14px; overflow: hidden;
	margin-bottom: 15px; background: #e5e7eb; min-height: 60px;
}
.quiz-question-image img { display: block; width: 100%; height: auto; vertical-align: middle; }

.quiz-question-text { font-family: Poppins, Roboto, sans-serif; font-size: 23px; font-weight: 600; line-height: 1.2; letter-spacing: -.025em; text-transform: none; margin: 0 0 14px; color: #000; }

/* ----------------------------------------------------------- answers */
.quiz-answers-grid {
	display: flex; flex-wrap: wrap; justify-content: space-between;
	gap: 5px 0;
}
.quiz-answer {
	position: relative; width: calc(50% - 7px); min-height: 60px;
	display: flex; align-items: center; justify-content: center;
	padding: 14px 10px;
	font-size: 18px; font-weight: 400; line-height: 1.3; text-transform: none; text-align: center;
	background: #fff; color: #444;
	border: 2px solid rgba(20, 34, 81, .25); border-radius: 10px;
	box-shadow: 4px 4px 0 #00b4ff; cursor: pointer;
	transition: transform .1s ease, background .2s ease, color .2s ease, box-shadow .1s ease;
}
.quiz-answer:hover:not(.is-disabled) { transform: translate(1px, 1px); box-shadow: 3px 3px 0 #00b4ff; }
.quiz-answer:active:not(.is-disabled) { transform: translate(4px, 4px); box-shadow: 0 0 0 #00b4ff; }
.quiz-answer.is-disabled { cursor: default; }
.quiz-answer.is-disabled:not(.is-correct):not(.is-incorrect):not(.is-selected) { opacity: .55; }
.quiz-answer.is-correct { background: #00b4ff; color: #fff; border-color: #00b4ff; }
.quiz-answer.is-incorrect { background: #FF7F7F; color: #fff; border-color: #FF7F7F; box-shadow: 4px 4px 0 #e86b6b; }
.quiz-answer.is-selected { background: #00b4ff; color: #fff; border-color: #00b4ff; }
.quiz-answer.is-correct::after,
.quiz-answer.is-incorrect::after {
	content: ""; position: absolute; top: 50%; right: 10px; transform: translateY(-50%);
	width: 28px; height: 28px; border-radius: 50%; background: #fff center/62% no-repeat;
}
.quiz-answer.is-correct::after {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300b4ff'%3E%3Cpath d='M9 16.2l-3.5-3.5L4 14.2 9 19.2 20 8.2l-1.5-1.5z'/%3E%3C/svg%3E");
}
.quiz-answer.is-incorrect::after {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FF7F7F'%3E%3Cpath d='M18.3 5.7L12 12l-6.3-6.3-1.4 1.4L10.6 13.4 4.3 19.7l1.4 1.4L12 14.8l6.3 6.3 1.4-1.4L13.4 13.4l6.3-6.3z'/%3E%3C/svg%3E");
}

/* ----------------------------------------------------------- feedback */
.quiz-feedback {
	margin-top: 16px; padding: 16px 18px; border-radius: 14px; border: 2px solid;
	animation: quizFade .3s ease;
}
.quiz-feedback.is-correct { background: #fff; border-color: transparent; }
.quiz-feedback.is-incorrect { background: #fff; border-color: transparent; }
/* head: dark bold label, only the icon is colored (reference) */
.quiz-feedback-head {
	font-family: Poppins, Roboto, sans-serif; font-size: 22px; font-weight: 700; line-height: 1.05;
	color: #2b2b2b; display: flex; align-items: center; gap: 8px;
	padding-bottom: 9px; margin-bottom: 9px; border-bottom: 1px solid #e5e7eb;
}
.quiz-feedback-icon { font-size: .9em; line-height: 1; }
.quiz-feedback.is-correct .quiz-feedback-icon { color: #3aaa35; }
.quiz-feedback.is-incorrect .quiz-feedback-icon { color: #f5333f; }
.quiz-feedback-body { margin-top: 0; font-family: Poppins, Roboto, sans-serif; font-size: 12px; line-height: 1.5; color: #4b4b4b; }
.quiz-feedback-body p { margin: 0 0 8px; }
.quiz-feedback-body p:last-child { margin-bottom: 0; }

/* Feedback overlaid on top of the question image (reference look): anchored bottom-left */
.quiz-feedback-wrap--overlay {
	position: absolute; inset: 0;
	display: flex; align-items: flex-end; justify-content: flex-start;
	padding: 0; pointer-events: none;
}
.quiz-feedback-wrap--overlay:empty { display: none; }
/* In-flow feedback card (mobile / no-image): below the answers, not overlaid */
.quiz-feedback-wrap--flow:empty { display: none; }
.quiz-feedback-wrap--flow { margin-top: 16px; }
.quiz-feedback-wrap--flow .quiz-feedback {
	border-radius: 16px; box-shadow: 0 4px 16px rgba(0, 0, 0, .12); padding: 20px 22px;
}
.quiz-feedback-wrap--overlay .quiz-feedback {
	margin: 15px; max-width: 70%; max-height: 100%; overflow: auto;
	padding: 16px 20px; border-radius: 18px;
	background: #fff; border: 0;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .16); pointer-events: auto;
}
@media (max-width: 640px) {
	.quiz-feedback-wrap--flow .quiz-feedback { padding: 16px 18px; }
	.quiz-feedback-head { font-size: 26px; padding-bottom: 10px; margin-bottom: 10px; }
	.quiz-feedback-body { font-size: 16px; }
}

/* ----------------------------------------------------------- next button */
.quiz-next-btn {
	display: none; align-items: center; justify-content: center; gap: 10px;
	width: 100%; margin: 30px 0; padding: 5px 23px; border: none; border-radius: 25px;
	background: #00B4FF; color: #fff; font-size: 27px; font-weight: 700; text-transform: capitalize; cursor: pointer;
	text-decoration: none; line-height: 35px;
}
.quiz-next-btn.is-visible { display: flex; }
.quiz-next-btn:active { opacity: .9; }
.quiz-arrow { display: inline-block; animation: quizArrow 1s ease-in-out infinite; }
@keyframes quizArrow { 0%,100% { transform: translateX(0); } 50% { transform: translateX(7px); } }

/* floating next over image — bottom-right, beside the feedback card (reference) */
.quiz-next-float {
	position: absolute; bottom: 22px; right: 22px; transform: scale(.85);
	display: none; align-items: center; gap: 8px; z-index: 2;
	padding: 14px 30px; border: none; border-radius: 28px;
	background: #4eb3f5; color: #fff; font-size: 24px; font-weight: 800; cursor: pointer;
	opacity: 0; transition: opacity .3s ease, transform .3s ease; text-decoration: none;
	box-shadow: 0 6px 16px rgba(0,0,0,.22);
}
.quiz-next-float.is-visible { display: flex; opacity: 1; transform: scale(1); }
@media (max-width: 640px) {
	.quiz-next-float { bottom: 14px; right: 14px; padding: 10px 22px; font-size: 18px; }
}

/* ----------------------------------------------------------- ads */
.quiz-ad { margin: 16px 0; text-align: center; min-height: 60px; }
.quiz-ad-label { display: block; font-size: 12px; color: #9ca3af; margin-bottom: 4px; }

/* ----------------------------------------------------------- hint + back-to-top */
.quiz-hint-block { margin-top: 24px; }
.quiz-btt-btn {
	display: block; width: 100%; padding: 5px 23px; margin: 30px 0; border: none; border-radius: 25px;
	background: #00B4FF; color: #fff; font-size: 27px; font-weight: 700; text-transform: capitalize; cursor: pointer; line-height: 35px;
}
.quiz-btt-btn:active { opacity: .9; }
.quiz-hint { font-size: 17px; line-height: 1.65; color: #444; margin: 16px 0; text-align: justify; white-space: pre-wrap; }

/* ----------------------------------------------------------- result */
.quiz-result { text-align: center; animation: quizFade .4s ease; padding: 6px 0; }
.quiz-result-head { margin-bottom: 14px; }
.quiz-result-score { font-family: Poppins, Roboto, sans-serif; font-size: 44px; font-weight: 700; color: #00b4ff; }
.quiz-result-pct { font-size: 22px; color: #4b5563; font-weight: 700; }
.quiz-result-image { width: 100%; border-radius: 14px; overflow: hidden; margin: 0 auto 14px; }
.quiz-result-image img { width: 100%; height: auto; display: block; }
.quiz-result-title { font-family: Poppins, Roboto, sans-serif; font-size: 23px; font-weight: 600; line-height: 1.2; letter-spacing: -.025em; margin: 0 0 10px; color: #000; }
.quiz-result-desc { font-size: 17px; color: #374151; line-height: 1.5; margin: 0 auto 18px; max-width: 600px; }

.quiz-share { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 18px 0; }
.quiz-share-btn {
	padding: 14px 22px; border: none; border-radius: 25px; background: #00b4ff; color: #fff;
	font-weight: 800; font-size: 18px; cursor: pointer; text-decoration: none;
}
.quiz-share-btn.quiz-restart { background: #00b4ff; }

/* ----------------------------------------------------------- recommended */
.quiz-recommended { margin-top: 26px; }
.quiz-recommended-title { font-family: Poppins, Roboto, sans-serif; font-size: 22px; font-weight: 700; margin: 0 0 14px; text-align: center; }
.quiz-recommended-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quiz-rec-card {
	display: flex; flex-direction: column; border-radius: 12px; overflow: hidden;
	background: #fff; border: 1px solid #e5e7eb; text-decoration: none; color: #1f2937;
}
.quiz-rec-img { display: block; width: 100%; padding-top: 60%; background: #e5e7eb center/cover no-repeat; }
.quiz-rec-title { padding: 10px 12px; font-size: 15px; font-weight: 700; line-height: 1.3; }

/* ----------------------------------------------------------- back to top (floating) */
.quiz-back-to-top {
	position: fixed; right: 16px; bottom: 16px; z-index: 999;
	width: 48px; height: 48px; border-radius: 50%; border: none;
	background: #00b4ff; color: #fff; font-size: 22px; cursor: pointer;
	opacity: 0; pointer-events: none; transition: opacity .3s ease;
	box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.quiz-back-to-top.is-visible { opacity: 1; pointer-events: auto; }

/* ----------------------------------------------------------- desktop */
@media (min-width: 640px) {
	.quiz-progress-king, .quiz-progress-princess { width: 64px; }
	.quiz-progress-restart .quiz-restart-text { display: inline; }
}
