/* ==========================================================================
   MOUNJARO MORADO JAPONÉS — QUIZ PRINCIPAL CSS (v1.0)
   Clone 100% fiel de receitamonjaroroxo.lovable.app
   ========================================================================== */

:root {
  --background: #f9fafb;
  --foreground: #09090b;
  --card: #ffffff;
  --card-foreground: #09090b;
  --primary: #4f39f6;
  --primary-hover: #432dd7;
  --primary-soft: rgba(79, 57, 246, 0.08);
  --primary-foreground: #fafafa;
  --secondary: #f4f4f5;
  --secondary-foreground: #18181b;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --border: #e4e4e7;
  --input: #e4e4e7;
  --ring: #4f39f6;
  --radius: 0.625rem;
  --comparison-before: #ef4444;
  --comparison-before-soft: #fef2f2;
  --comparison-goal: #0d9488;
  --comparison-goal-soft: #f0fdfa;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  min-height: 100vh;
  background-color: var(--background);
  color: var(--foreground);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Sticky Top Header & Progress Bar */
.quiz-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: var(--background);
}

.progress-track {
  height: 4px;
  width: 100%;
  background-color: var(--muted);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: var(--primary);
  transition: width 500ms ease-out;
  width: 0%;
}

.header-bar {
  max-width: 34rem;
  margin: 0 auto;
  height: 2.5rem;
  padding: 0 1rem;
  display: flex;
  align-items: center;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  transition: color 0.15s, background-color 0.15s;
}

.back-btn:hover {
  color: var(--foreground);
  background-color: var(--secondary);
}

.back-btn.hidden {
  visibility: hidden;
  pointer-events: none;
}

/* Main Quiz Container */
.quiz-container {
  max-width: 34rem;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
}

.layers-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
  animation: fade-in 0.22s ease-out;
}

.layer-item {
  min-width: 0;
  flex-basis: 100%;
  max-width: 100%;
}

.layer-item.basis-50 {
  flex-basis: calc(50% - 0.5rem);
  max-width: calc(50% - 0.5rem);
}

/* Rich Text Layer */
.layer-text h1,
.layer-text h2 {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--foreground);
  margin-bottom: 0.35rem;
}

.layer-text h3 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.layer-text p {
  font-size: 0.975rem;
  line-height: 1.5;
  color: #374151;
}

.layer-text p + p,
.layer-text h2 + p,
.layer-text h3 + p {
  margin-top: 0.35rem;
}

.ql-align-center { text-align: center; }
.ql-align-right { text-align: right; }
.ql-align-justify { text-align: justify; }

/* Image Layer */
.layer-image-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}

.layer-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
  object-fit: contain;
}

/* Options Grid & Cards */
.options-grid {
  display: grid;
  width: 100%;
  gap: 0.75rem;
}

.options-grid.grid-cols-1 {
  grid-template-columns: minmax(0, 1fr);
}

.options-grid.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.option-btn {
  display: flex;
  min-height: 3.5rem;
  width: 100%;
  align-items: center;
  gap: 0.75rem;
  border-radius: 1rem;
  border: 1.5px solid var(--border);
  background-color: var(--card);
  padding: 0.75rem;
  text-align: left;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.option-btn.contrast-bg {
  background-color: #ffffff;
}

.option-btn:hover {
  border-color: var(--primary);
  background-color: var(--primary-soft);
}

.option-btn.selected {
  border-color: var(--primary);
  background-color: var(--primary-soft);
  box-shadow: 0 0 0 2px rgba(79, 57, 246, 0.18);
}

.option-btn.card-vertical {
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  padding: 0.65rem;
}

.option-img-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-radius: 0.75rem;
}

.option-img {
  width: 100%;
  max-height: 170px;
  object-fit: contain;
  display: block;
}

.option-btn.image-only {
  padding: 0.35rem;
}

.option-btn.image-only .option-img {
  max-height: 240px;
}

.option-img-side {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.65rem;
  object-fit: contain;
  flex-shrink: 0;
}

.option-emoji {
  font-size: 1.45rem;
  line-height: 1;
  flex-shrink: 0;
}

.option-content {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.option-content p {
  margin: 0;
}

.option-content p + p {
  font-size: 0.82rem;
  color: var(--muted-foreground);
  font-weight: 400;
  margin-top: 0.15rem;
}

.option-indicator {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  border: 1.5px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
  background-color: #fff;
  color: transparent;
}

.option-btn.selected .option-indicator {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.option-arrow {
  width: 1.25rem;
  height: 1.25rem;
  color: #94a3b8;
  flex-shrink: 0;
}

/* Input Field Layer */
.field-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--foreground);
}

.field-input {
  width: 100%;
  height: 3.25rem;
  border-radius: 0.875rem;
  border: 1.5px solid var(--border);
  background-color: var(--card);
  padding: 0 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--foreground);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 57, 246, 0.15);
}

/* CTA / Continue Button Layer */
.funnel-cta-btn {
  display: flex;
  height: 3.5rem;
  width: 100%;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background-color: var(--primary);
  padding: 0 1.25rem;
  text-align: center;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-foreground);
  text-decoration: none;
  border: none;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.2s, background-color 0.2s, transform 0.15s;
}

.funnel-cta-btn:hover:not(:disabled) {
  background-color: var(--primary-hover);
}

.funnel-cta-btn:disabled,
.funnel-cta-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

@keyframes soft-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(79, 57, 246, 0.45);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 9px rgba(79, 57, 246, 0);
    transform: scale(1.02);
  }
}

.animate-soft-pulse {
  animation: 1.8s ease-in-out infinite soft-pulse;
}

/* Weight & Height Interactive Slider Card */
.slider-card {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.slider-unit-tabs {
  display: inline-flex;
  background: var(--secondary);
  padding: 0.25rem;
  border-radius: 999px;
  gap: 0.25rem;
}

.slider-unit-tab {
  padding: 0.25rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
}

.slider-value-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.3rem;
}

.slider-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.slider-unit {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--muted-foreground);
}

.slider-controls {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.slider-step-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--secondary);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foreground);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.slider-step-btn:hover {
  background: #e4e4e7;
}

.slider-range {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: 999px;
  background: var(--muted);
  outline: none;
}

.slider-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.slider-ruler {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 0.5rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* Loading Screen Layer */
.loading-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem 0.5rem;
}

.loading-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
  text-align: center;
}

.loading-bar-track {
  width: 100%;
  height: 0.65rem;
  border-radius: 999px;
  background-color: var(--muted);
  overflow: hidden;
}

.loading-bar-fill {
  height: 100%;
  border-radius: 999px;
  background-color: var(--primary);
  transition: width 80ms linear;
  width: 0%;
}

.loading-percent {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

/* Audio Testimonial Player */
.audio-player-card {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.75rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background-color: var(--card);
  padding: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.audio-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
}

.audio-play-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.audio-track-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.audio-bar-bg {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background-color: var(--muted);
  overflow: hidden;
  cursor: pointer;
}

.audio-bar-fill {
  height: 100%;
  background-color: var(--primary);
  width: 0%;
  transition: width 0.1s linear;
}

.audio-time {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
}

/* BMI Metric Card */
.metric-card {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 700;
}

.metric-subtitle {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 700;
}

.metric-bar-container {
  position: relative;
  height: 12px;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6 0%, #22c55e 35%, #eab308 65%, #f97316 82%, #ef4444 100%);
  margin: 0.5rem 0 0.25rem;
}

.metric-dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 4px solid var(--foreground);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
  transition: left 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.metric-legends {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.15rem;
  font-size: 0.68rem;
  color: var(--muted-foreground);
  text-align: center;
  font-weight: 500;
}

/* Alert Box Layer */
.alert-card {
  width: 100%;
  border-radius: 1rem;
  border: 1.5px solid #fcd34d;
  background-color: #fffbeb;
  padding: 1rem 1.1rem;
  font-size: 0.925rem;
  line-height: 1.5;
  color: #1f2937;
}

.alert-card p + p {
  margin-top: 0.45rem;
}

/* Testimonial Quote Card */
.quote-card {
  width: 100%;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background-color: var(--card);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.quote-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.quote-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  object-fit: cover;
}

.quote-meta {
  display: flex;
  flex-direction: column;
}

.quote-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--foreground);
}

.quote-city {
  font-size: 0.8rem;
  color: var(--muted-foreground);
}

.quote-stars {
  color: #facc15;
  font-size: 0.95rem;
  letter-spacing: 1px;
}

.quote-text {
  font-size: 0.92rem;
  color: #374151;
  font-style: italic;
  line-height: 1.5;
}

/* Before / After Comparison Grid */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.comparison-column {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 8px 10px 12px;
  gap: 0.5rem;
}

.comparison-before {
  --comparison-color: var(--comparison-before);
  --comparison-soft: var(--comparison-before-soft);
}

.comparison-goal {
  --comparison-color: var(--comparison-goal);
  --comparison-soft: var(--comparison-goal-soft);
}

.comparison-photo {
  aspect-ratio: 2 / 3;
  object-fit: contain;
  width: 100%;
  border-radius: 12px;
}

.comparison-label {
  display: inline-block;
  align-self: center;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background-color: var(--comparison-soft);
  color: var(--comparison-color);
}

.comparison-description {
  font-size: 0.8rem;
  text-align: center;
  color: #4b5563;
  line-height: 1.35;
}

.comparison-bar-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background-color: var(--muted);
  overflow: hidden;
}

.comparison-bar-fill {
  height: 100%;
  border-radius: 999px;
  background-color: var(--comparison-color);
  transition: width 0.8s ease-out;
}

.comparison-callout {
  font-size: 0.78rem;
  text-align: center;
  background-color: var(--comparison-soft);
  color: #1f2937;
  padding: 0.5rem;
  border-radius: 10px;
  line-height: 1.35;
}

/* Video Wrapper & Unmute Fallback Overlay */
.video-stage-wrap {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  border-radius: 1rem;
  overflow: hidden;
}

.unmute-overlay-btn {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  background: rgba(79, 57, 246, 0.95);
  color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: none;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.unmute-overlay-btn.visible {
  display: inline-flex;
}

@keyframes fade-in {
  0% {
    opacity: 0;
    transform: translateY(4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 420px) {
  .layer-text h2 {
    font-size: 1.25rem;
  }
  .option-btn {
    padding: 0.65rem;
    font-size: 0.9rem;
  }
}
