/* ==========================================================================
   Quiz Motor — Base + BetterMe-Dark template
   ========================================================================== */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
.qm-body {
	background: var(--qm-bg);
	color: var(--qm-text);
	font-family: var(--qm-font);
	min-height: 100dvh;
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
	font-size: 16px;
	line-height: 1.5;
}
#qm-root { min-height: 100dvh; min-height: 100vh; display: flex; flex-direction: column; }

/* Header ----------------------------------------------------------------- */
.qm-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	gap: 12px;
	position: sticky;
	top: 0;
	background: var(--qm-bg);
	z-index: 10;
}
.qm-header-back, .qm-header-menu {
	width: 40px; height: 40px;
	border-radius: 50%;
	border: 1px solid rgba(255,255,255,.15);
	background: transparent;
	color: var(--qm-text);
	display: flex; align-items: center; justify-content: center;
	cursor: pointer;
	font-size: 18px;
	transition: background .15s;
}
.qm-header-back:hover, .qm-header-menu:hover { background: rgba(255,255,255,.05); }
.qm-header-back.is-hidden { visibility: hidden; }
.qm-header-title {
	flex: 1;
	text-align: center;
	font-size: 14px;
	font-weight: 500;
	color: var(--qm-text);
	letter-spacing: .02em;
}
.qm-header-brand { font-weight: 700; font-size: 18px; }

/* Progress segmentado ---------------------------------------------------- */
.qm-progress { display: flex; gap: 4px; padding: 0 20px 4px; }
.qm-progress-seg {
	flex: 1;
	height: 3px;
	background: rgba(255,255,255,.12);
	border-radius: 2px;
	overflow: hidden;
}
.qm-progress-seg-fill {
	height: 100%;
	background: var(--qm-text);
	width: 0;
	transition: width .4s ease;
}

/* Main area -------------------------------------------------------------- */
.qm-main {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 24px 20px 120px;
	max-width: 720px;
	width: 100%;
	margin: 0 auto;
}
.qm-step { width: 100%; animation: qm-fade-in .35s ease; }
@keyframes qm-fade-in {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: translateY(0); }
}

.qm-title {
	font-size: 28px;
	font-weight: 700;
	text-align: center;
	margin: 24px 0 8px;
	line-height: 1.25;
	letter-spacing: -.01em;
}
.qm-subtitle {
	text-align: center;
	color: var(--qm-muted);
	font-size: 14px;
	margin: 0 0 28px;
	letter-spacing: .02em;
}

/* Options (single/multi choice) ----------------------------------------- */
.qm-options { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.qm-option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px;
	background: var(--qm-card);
	border: 1px solid rgba(255,255,255,.08);
	border-radius: 16px;
	color: var(--qm-text);
	font-size: 16px;
	font-weight: 500;
	cursor: pointer;
	transition: all .15s;
	width: 100%;
	text-align: left;
	font-family: inherit;
}
.qm-option:hover { background: #1c1c1c; border-color: rgba(255,255,255,.18); }
.qm-option.is-selected { border-color: var(--qm-primary); background: rgba(244,236,220,.05); }
.qm-option-radio, .qm-option-check {
	width: 20px; height: 20px;
	border-radius: 50%;
	border: 2px solid rgba(255,255,255,.25);
	flex-shrink: 0;
	position: relative;
}
.qm-option-check { border-radius: 5px; }
.qm-option.is-selected .qm-option-radio { border-color: var(--qm-primary); }
.qm-option.is-selected .qm-option-radio::after {
	content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--qm-primary);
}
.qm-option.is-selected .qm-option-check { border-color: var(--qm-primary); background: var(--qm-primary); }
.qm-option.is-selected .qm-option-check::after {
	content: '✓'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
	color: var(--qm-primary-text); font-size: 14px; font-weight: 700;
}

/* Image choice ----------------------------------------------------------- */
.qm-options-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 12px;
	margin-top: 8px;
}
.qm-option-img {
	background: var(--qm-card);
	border: 1px solid rgba(255,255,255,.08);
	border-radius: 16px;
	overflow: hidden;
	cursor: pointer;
	transition: all .15s;
	font-family: inherit;
	padding: 0;
	color: var(--qm-text);
	display: flex;
	flex-direction: column;
}
.qm-option-img:hover { border-color: rgba(255,255,255,.18); }
.qm-option-img.is-selected { border-color: var(--qm-primary); }
.qm-option-img img { width: 100%; height: 180px; object-fit: cover; display: block; }
.qm-option-img-label {
	display: flex; align-items: center; justify-content: space-between;
	padding: 14px 16px;
	font-size: 14px; font-weight: 600;
}

/* Number input ----------------------------------------------------------- */
.qm-number-wrap {
	background: var(--qm-card);
	border-radius: 20px;
	padding: 32px 24px;
	margin-top: 12px;
	text-align: center;
}
.qm-number-display {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 16px;
	border-bottom: 2px solid var(--qm-text);
	padding-bottom: 12px;
	max-width: 320px;
	margin: 0 auto;
}
.qm-number-value {
	font-size: 56px;
	font-weight: 700;
	background: transparent;
	border: none;
	color: var(--qm-text);
	text-align: right;
	width: 160px;
	font-family: inherit;
	outline: none;
	-moz-appearance: textfield;
}
.qm-number-value::-webkit-outer-spin-button,
.qm-number-value::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qm-number-unit { font-size: 32px; font-weight: 400; color: var(--qm-muted); }

/* Slider ----------------------------------------------------------------- */
.qm-slider-wrap { padding: 24px 8px; }
.qm-slider-value {
	text-align: center;
	font-size: 56px;
	font-weight: 700;
	margin-bottom: 16px;
}
.qm-slider {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 6px;
	background: rgba(255,255,255,.15);
	border-radius: 3px;
	outline: none;
}
.qm-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 28px; height: 28px;
	border-radius: 50%;
	background: var(--qm-primary);
	cursor: pointer;
	border: 4px solid var(--qm-bg);
	box-shadow: 0 0 0 1px var(--qm-primary);
}
.qm-slider::-moz-range-thumb {
	width: 28px; height: 28px;
	border-radius: 50%;
	background: var(--qm-primary);
	cursor: pointer;
	border: 4px solid var(--qm-bg);
}
.qm-slider-marks { display: flex; justify-content: space-between; margin-top: 8px; color: var(--qm-muted); font-size: 12px; }

/* Text input ------------------------------------------------------------- */
.qm-text-wrap { padding: 24px 0; }
.qm-text-input {
	width: 100%;
	background: var(--qm-card);
	border: 1px solid rgba(255,255,255,.1);
	border-radius: 16px;
	padding: 18px 20px;
	font-size: 18px;
	color: var(--qm-text);
	font-family: inherit;
	outline: none;
	transition: border-color .15s;
}
.qm-text-input:focus { border-color: var(--qm-primary); }

/* Info box --------------------------------------------------------------- */
.qm-infobox {
	margin-top: 20px;
	padding: 16px 18px;
	background: var(--qm-card);
	border-radius: 16px;
	display: flex;
	gap: 12px;
	align-items: flex-start;
}
.qm-infobox.is-warning { border: 1px solid rgba(239, 68, 68, .4); background: rgba(239, 68, 68, .08); }
.qm-infobox.is-success { border: 1px solid rgba(34, 197, 94, .4); background: rgba(34, 197, 94, .08); }
.qm-infobox-icon { font-size: 18px; line-height: 1; padding-top: 2px; }
.qm-infobox-icon.is-warning { color: var(--qm-warning); }
.qm-infobox-icon.is-success { color: var(--qm-accent); }
.qm-infobox-title { font-weight: 600; font-size: 14px; margin: 0 0 4px; }
.qm-infobox-body { font-size: 13px; color: var(--qm-muted); margin: 0; line-height: 1.5; }

/* CTA footer ------------------------------------------------------------- */
.qm-footer {
	position: fixed;
	bottom: 0; left: 0; right: 0;
	padding: 16px 20px 24px;
	background: linear-gradient(to top, var(--qm-bg) 70%, transparent);
	display: flex; justify-content: center;
	z-index: 20;
}
.qm-btn-primary {
	background: var(--qm-primary);
	color: var(--qm-primary-text);
	border: none;
	border-radius: var(--qm-radius);
	padding: 18px 48px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	min-width: 240px;
	max-width: 480px;
	width: 100%;
	font-family: inherit;
	letter-spacing: .04em;
	transition: opacity .15s;
}
.qm-btn-primary:disabled { opacity: .4; cursor: not-allowed; }
.qm-btn-primary:not(:disabled):hover { opacity: .9; }

/* Affirmation / transition ----------------------------------------------- */
.qm-affirmation { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 32px 0; }
.qm-affirmation-img { max-width: 360px; width: 100%; border-radius: 16px; margin-bottom: 24px; }
.qm-affirmation-title { font-size: 24px; font-weight: 700; margin: 0 0 12px; }
.qm-affirmation-body { color: var(--qm-muted); font-size: 16px; max-width: 480px; }

/* Analyzing screen ------------------------------------------------------- */
.qm-analyzing { padding: 40px 0; }
.qm-analyzing-title { text-align: center; font-size: 24px; font-weight: 700; margin-bottom: 32px; }
.qm-analyzing-list { display: flex; flex-direction: column; gap: 16px; }
.qm-analyzing-row .qm-analyzing-label { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; font-weight: 600; }
.qm-analyzing-bar { height: 4px; background: rgba(255,255,255,.12); border-radius: 2px; overflow: hidden; }
.qm-analyzing-bar-fill { height: 100%; background: var(--qm-primary); width: 0; transition: width .8s ease; }

/* Result page ------------------------------------------------------------ */
.qm-result { padding: 0; max-width: 720px; width: 100%; margin: 0 auto; }
.qm-result-block { padding: 24px 20px; }

.qm-timer-bar {
	position: sticky;
	top: 0;
	background: var(--qm-warning);
	color: #fff;
	text-align: center;
	padding: 12px 16px;
	font-weight: 600;
	font-size: 14px;
	display: flex; align-items: center; justify-content: center; gap: 8px;
	z-index: 30;
}
.qm-timer-clock { font-variant-numeric: tabular-nums; font-weight: 700; }

.qm-diagnostic { text-align: center; padding: 32px 20px; }
.qm-diagnostic-title { font-size: 28px; font-weight: 700; margin: 0 0 8px; line-height: 1.2; }
.qm-diagnostic-subtitle { color: var(--qm-muted); margin: 0 0 24px; font-size: 14px; }
.qm-diagnostic-stats {
	display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 24px 0;
}
.qm-stat-card { background: var(--qm-card); border-radius: 14px; padding: 16px 12px; text-align: center; }
.qm-stat-card-label { font-size: 11px; color: var(--qm-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.qm-stat-card-value { font-size: 18px; font-weight: 700; }

.qm-feature-list { padding: 32px 20px; }
.qm-feature-list h3 { font-size: 20px; font-weight: 700; margin: 0 0 16px; }
.qm-feature-item {
	display: flex; align-items: center; gap: 12px;
	background: var(--qm-card);
	padding: 14px 16px;
	border-radius: 12px;
	margin-bottom: 8px;
	font-size: 14px;
}
.qm-feature-item-icon { width: 22px; height: 22px; flex-shrink: 0; color: var(--qm-accent); }

.qm-card-grid { padding: 32px 20px; }
.qm-card-grid h3 { font-size: 20px; font-weight: 700; margin: 0 0 16px; text-align: center; }
.qm-card-grid-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.qm-card-grid-card { background: var(--qm-card); border-radius: 16px; padding: 20px 16px; text-align: center; }
.qm-card-grid-card-icon { font-size: 32px; margin-bottom: 12px; }
.qm-card-grid-card-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.qm-card-grid-card-subtitle { font-size: 11px; color: var(--qm-muted); }

.qm-testimonials { padding: 32px 20px; }
.qm-testimonials h3 { font-size: 20px; font-weight: 700; margin: 0 0 16px; text-align: center; }
.qm-testimonial-card { background: var(--qm-card); border-radius: 16px; padding: 16px; margin-bottom: 12px; }
.qm-testimonial-card-rating { color: #fbbf24; font-size: 14px; margin-bottom: 4px; }
.qm-testimonial-card-name { font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.qm-testimonial-card-text { font-size: 14px; color: var(--qm-muted); margin: 0; }

.qm-plans { padding: 32px 20px; }
.qm-plans h3 { font-size: 20px; font-weight: 700; margin: 0 0 20px; text-align: center; }
.qm-plan-card {
	background: var(--qm-card); border-radius: 16px; padding: 20px;
	margin-bottom: 12px; border: 2px solid transparent;
	display: flex; justify-content: space-between; align-items: center;
	cursor: pointer; transition: border-color .15s;
}
.qm-plan-card.is-highlight { border-color: var(--qm-primary); }
.qm-plan-card-badge { position: relative; }
.qm-plan-card-badge::before {
	content: attr(data-badge);
	position: absolute; top: -32px; left: 0;
	background: var(--qm-primary); color: var(--qm-primary-text);
	padding: 4px 10px; border-radius: 6px; font-size: 10px; font-weight: 700; letter-spacing: .05em;
}
.qm-plan-name { font-weight: 700; font-size: 16px; margin: 0 0 4px; }
.qm-plan-savings { font-size: 11px; color: var(--qm-accent); }
.qm-plan-price { font-weight: 700; font-size: 22px; text-align: right; }
.qm-plan-per { font-size: 11px; color: var(--qm-muted); }

.qm-guarantee {
	padding: 32px 20px; text-align: center;
	background: var(--qm-card); margin: 20px;
	border-radius: 20px;
}
.qm-guarantee-icon { font-size: 40px; margin-bottom: 12px; }
.qm-guarantee-title { font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.qm-guarantee-body { font-size: 13px; color: var(--qm-muted); margin: 0; }

.qm-faq { padding: 32px 20px; }
.qm-faq h3 { font-size: 20px; font-weight: 700; margin: 0 0 16px; text-align: center; }
.qm-faq-item {
	background: var(--qm-card); border-radius: 12px; margin-bottom: 8px; overflow: hidden;
}
.qm-faq-q {
	padding: 16px; cursor: pointer; font-weight: 600; font-size: 14px;
	display: flex; justify-content: space-between; align-items: center;
}
.qm-faq-q::after { content: '+'; font-size: 22px; font-weight: 400; transition: transform .2s; }
.qm-faq-item.is-open .qm-faq-q::after { transform: rotate(45deg); }
.qm-faq-a {
	padding: 0 16px; max-height: 0; overflow: hidden; transition: all .25s;
	font-size: 13px; color: var(--qm-muted); line-height: 1.6;
}
.qm-faq-item.is-open .qm-faq-a { max-height: 400px; padding: 0 16px 16px; }

/* Final CTA -------------------------------------------------------------- */
.qm-result-cta { padding: 32px 20px 80px; }
.qm-result-cta .qm-btn-primary { width: 100%; max-width: none; }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 480px) {
	.qm-title { font-size: 24px; }
	.qm-diagnostic-title { font-size: 22px; }
	.qm-number-value { font-size: 44px; width: 130px; }
	.qm-number-unit { font-size: 26px; }
	.qm-slider-value { font-size: 44px; }
}
