@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Brand Palette - Modern Taupe / Sand / Linen */
  --color-brand: #8e7c6f;
  --color-brand-hover: #7b6a5e;
  --color-brand-light: #f7f4f0;
  --color-brand-surface: #f1ede8;
  --color-brand-border: #e2dbd5;

  /* Neutrals */
  --color-dark: #1e1b18;
  --color-dark-subtle: #4a4540;
  --color-muted: #736d67;
  --color-bg: #faf8f5;
  --color-card-bg: #ffffff;
  --color-card-border: rgba(142, 124, 111, 0.16);

  /* Status Colors */
  --color-success-soft: #10b981;
  --color-success-bg: #ecfdf5;
  --color-success-border: #6ee7b7;
  --color-success-text: #065f46;

  --color-danger-soft: #ef4444;
  --color-danger-bg: #fef2f2;
  --color-danger-border: #fca5a5;
  --color-danger-text: #991b1b;

  /* Typography */
  --font-heading: 'Plus Jakarta Sans', 'Montserrat', sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Montserrat', sans-serif;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(30, 27, 24, 0.04);
  --shadow-md: 0 8px 24px rgba(30, 27, 24, 0.06);
  --shadow-lg: 0 16px 40px rgba(30, 27, 24, 0.1);
  --shadow-active: 0 10px 25px rgba(30, 27, 24, 0.18);

  /* Radii */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-user-select: none !important;
  user-select: none !important;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
}

/* ==========================================================================
   TOP HEADER & STEPPER PROGRESS BAR (Kegel Plan Inspired)
   ========================================================================== */
.quiz-header {
  width: 100%;
  background-color: #ffffff;
  border-bottom: 1px solid var(--color-brand-border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  padding: 14px 20px;
}

.quiz-header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  min-height: 42px;
}

/* Logo on Left: Solid flat taupe square with crisp white 'M' */
.brand-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  z-index: 2;
}

.brand-logo-badge {
  width: 40px;
  height: 40px;
  background-color: var(--color-brand) !important;
  background: var(--color-brand) !important;
  color: #ffffff !important;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

/* Product Image Carousel Styling */
.carousel-thumb {
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}
.carousel-thumb:hover {
  opacity: 1 !important;
  transform: translateY(-2px);
}
.carousel-thumb.active {
  opacity: 1 !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.4);
}

/* Stepper Centered & Enhanced Visibility */
.stepper-container {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition-fast);
  z-index: 1;
}

.stepper-container.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

@media (max-width: 580px) {
  .stepper-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    margin-left: 0;
  }
}

.stepper-track-wrapper {
  position: relative;
  width: 100%;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Background connecting line */
.stepper-bg-line {
  position: absolute;
  top: 50%;
  left: 8px;
  right: 8px;
  height: 6px;
  background-color: #e5e0db;
  transform: translateY(-50%);
  border-radius: var(--radius-full);
  z-index: 1;
}

/* Active progress connecting fill */
.stepper-fill-line {
  position: absolute;
  top: 50%;
  left: 8px;
  height: 6px;
  background-color: var(--color-brand);
  transform: translateY(-50%);
  border-radius: var(--radius-full);
  z-index: 2;
  transition: width var(--transition-smooth);
  width: 0%;
}

/* Stepper Step Nodes */
.stepper-step {
  position: relative;
  z-index: 3;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #e5e0db;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 1px #d6cec7;
  transition: all var(--transition-smooth);
}

.stepper-step.completed {
  background-color: var(--color-brand);
  border-color: #ffffff;
  box-shadow: 0 0 0 1px var(--color-brand);
}

.stepper-step.active {
  background-color: var(--color-brand);
  border-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(142, 124, 111, 0.35);
  transform: scale(1.25);
}

/* ==========================================================================
   MAIN LAYOUT & CARD CONTAINER (QUIZ VIEW)
   ========================================================================== */
.main-wrapper {
  width: 100%;
  max-width: 580px;
  padding: 24px 16px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.quiz-card {
  width: 100%;
  background-color: var(--color-card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-card-border);
  box-shadow: var(--shadow-md);
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

@media (max-width: 480px) {
  .quiz-card {
    padding: 22px 18px;
    border-radius: var(--radius-md);
  }
  .main-wrapper {
    padding: 16px 12px 30px;
  }
}

/* ==========================================================================
   SCREENS & QUESTION VIEWS
   ========================================================================== */
.quiz-screen {
  display: flex;
  flex-direction: column;
  animation: screenFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.quiz-screen.hidden {
  display: none !important;
}

@keyframes screenFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================================
   START SCREEN
   ========================================================================== */
.start-hero-image-wrap {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  background-color: var(--color-brand-surface);
}

.start-hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.start-hero-image-wrap:hover .start-hero-image {
  transform: scale(1.02);
}

.start-header-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: var(--color-dark);
  text-align: center;
  line-height: 1.25;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.start-description {
  font-size: 15px;
  color: var(--color-dark-subtle);
  line-height: 1.6;
  text-align: center;
  margin-bottom: 24px;
  background-color: var(--color-brand-light);
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--color-brand-border);
}

/* ==========================================================================
   QUESTION SCREEN ELEMENTS
   ========================================================================== */
.question-eyebrow {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 6px;
  background-color: var(--color-brand-light);
  color: var(--color-brand);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 14px;
  border: 1px solid var(--color-brand-border);
}

.question-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: var(--color-dark);
  text-align: center;
  line-height: 1.35;
  margin-bottom: 24px;
  letter-spacing: -0.3px;
}

@media (max-width: 480px) {
  .question-title {
    font-size: 19px;
    margin-bottom: 20px;
  }
}

/* ==========================================================================
   OPTIONS LIST & BUTTONS
   ========================================================================== */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-bottom: 22px;
}

.option-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 20px;
  background-color: var(--color-brand-light);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  color: var(--color-dark);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  outline: none;
  transition: all var(--transition-fast);
  user-select: none;
  position: relative;
}

.option-card:hover {
  background-color: var(--color-brand-surface);
  border-color: var(--color-brand-border);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.option-text {
  flex: 1;
  padding-right: 12px;
  line-height: 1.35;
}

/* Custom Modern Radio / Checkmark Circle */
.option-indicator {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 2px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.option-indicator svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: scale(0.5);
  transition: all var(--transition-fast);
}

/* Correct Selected Highlight - Soft Light Green */
.option-card.correct-selected {
  background-color: var(--color-success-bg) !important;
  border-color: var(--color-success-border) !important;
  color: var(--color-success-text) !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15) !important;
  transform: translateY(-2px);
}

.option-card.correct-selected .option-indicator {
  background-color: var(--color-success-soft) !important;
  border-color: var(--color-success-soft) !important;
}

.option-card.correct-selected .option-indicator svg {
  stroke: #ffffff !important;
  opacity: 1 !important;
  transform: scale(1) !important;
}

/* Incorrect Selected Highlight - Soft Light Red/Rose */
.option-card.incorrect-selected {
  background-color: var(--color-danger-bg) !important;
  border-color: var(--color-danger-border) !important;
  color: var(--color-danger-text) !important;
}

.option-card.incorrect-selected .option-indicator {
  background-color: var(--color-danger-soft) !important;
  border-color: var(--color-danger-soft) !important;
}

.option-card.incorrect-selected .option-indicator svg {
  stroke: #ffffff !important;
  opacity: 1 !important;
  transform: scale(1) !important;
}

/* ==========================================================================
   DYNAMIC PRICE & DISCOUNT SUMMARY
   ========================================================================== */
.pricing-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-color: var(--color-brand-light);
  border: 1px solid var(--color-brand-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 22px;
}

.valor-desconto {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #dc2626;
  font-size: 14px;
  font-weight: 700;
}

.valor-desconto p {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.valor-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #059669;
  font-size: 15px;
  font-weight: 800;
  border-top: 1px dashed var(--color-brand-border);
  padding-top: 8px;
}

.valor-total p {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

/* ==========================================================================
   ACTION BUTTONS & NAVIGATION
   ========================================================================== */
.quiz-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.btn {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  padding: 15px 22px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: all var(--transition-fast);
  outline: none;
}

/* Default "Selecionar Resposta" State - Black background with White text */
.btn-select-mode {
  background-color: var(--color-dark) !important;
  color: #ffffff !important;
  border: 1.5px solid var(--color-dark) !important;
  flex: 1;
}

.btn-select-mode:hover {
  background-color: #332e29 !important;
  color: #ffffff !important;
  transform: translateY(-2px);
}

/* Green Soft State when Correctly Selected */
.btn-green-soft {
  background-color: var(--color-success-soft) !important;
  color: #ffffff !important;
  border: 1.5px solid #059669 !important;
  flex: 1;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3) !important;
  animation: softButtonPulse 1.8s infinite ease-in-out;
}

.btn-green-soft:hover {
  background-color: #059669 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.38) !important;
}

@keyframes softButtonPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.btn-secondary {
  background-color: var(--color-brand-surface);
  color: var(--color-dark);
  border: 1px solid var(--color-brand-border);
  padding: 15px 18px;
}

.btn-secondary:hover {
  background-color: #e5dfd8;
  transform: translateY(-2px);
}

.btn-start {
  width: 100%;
  font-size: 18px;
  padding: 18px 24px;
  background-color: var(--color-brand);
  color: #ffffff;
  letter-spacing: 0.5px;
}

.btn-start:hover {
  background-color: var(--color-brand-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-resgate {
  width: 100%;
  font-size: 18px;
  padding: 18px 24px;
  background-color: var(--color-success-soft);
  color: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.35);
  animation: pulseGreenButton 2s infinite ease-in-out;
}

.btn-resgate:hover {
  background-color: #059669;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.45);
}

@keyframes pulseGreenButton {
  0% { transform: scale(1); box-shadow: 0 10px 25px rgba(16, 185, 129, 0.35); }
  50% { transform: scale(1.02); box-shadow: 0 14px 30px rgba(16, 185, 129, 0.5); }
  100% { transform: scale(1); box-shadow: 0 10px 25px rgba(16, 185, 129, 0.35); }
}

/* ==========================================================================
   END SCREEN & CELEBRATION
   ========================================================================== */
.end-screen {
  text-align: center;
  padding: 10px 0;
}

.celebration-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #d97706;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.2);
  animation: bounceTrophy 1s ease infinite alternate;
}

.celebration-icon svg {
  width: 38px;
  height: 38px;
}

@keyframes bounceTrophy {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}

.end-title {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.p-resgate {
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-dark-subtle);
  margin-bottom: 24px;
  background-color: var(--color-brand-light);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-brand-border);
}

/* ==========================================================================
   SINGLE CLEAN MODAL (Fixed - No Duplicate Popups)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(18, 15, 13, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.hidden {
  display: none !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal-box {
  background-color: #ffffff;
  width: 100%;
  max-width: 440px;
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-brand-border);
  transform: scale(1);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-overlay.hidden .modal-box {
  transform: scale(0.94);
}

.modal-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.modal-icon.warning {
  background-color: var(--color-danger-bg);
  color: var(--color-danger-soft);
  border: 1px solid var(--color-danger-border);
}

.modal-icon.info {
  background-color: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.modal-icon svg {
  width: 28px;
  height: 28px;
}

.dica-errado {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: #dc2626;
  margin-bottom: 12px;
  line-height: 1.3;
}

.dica-p {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-dark-subtle);
  line-height: 1.55;
  margin-bottom: 22px;
  background-color: var(--color-brand-light);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--color-brand-border);
  text-align: left;
  width: 100%;
}

.dica-p:empty {
  display: none;
}

.btn-modal {
  width: 100%;
  background-color: var(--color-dark);
  color: #ffffff;
}

.btn-modal:hover {
  background-color: #332e29;
}

/* ==========================================================================
   CONFETTI CANVAS (FOR CELEBRATION)
   ========================================================================== */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
}

/* ==========================================================================
   LANDING PAGE DEDICATED STYLES & INTERACTIVITY
   ========================================================================== */
.landing-page-wrapper {
  width: 100%;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.landing-page-wrapper.hidden {
  display: none !important;
}

/* Color swatch active state */
.color-swatch-btn.active {
  border-color: #1e1b18;
  background-color: #f1ede8;
  box-shadow: 0 0 0 2px rgba(142, 124, 111, 0.4);
}

/* Size pill active state */
.size-pill-btn.active {
  background-color: #1e1b18;
  color: #ffffff;
  border-color: #1e1b18;
  box-shadow: 0 4px 10px rgba(30, 27, 24, 0.2);
}

/* FAQ Accordion */
details summary::-webkit-details-marker {
  display: none;
}
details[open] summary .faq-icon {
  transform: rotate(180deg);
}

/* Floating sticky buy bar */
.sticky-buy-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--color-brand-border);
  padding: 12px 20px;
  z-index: 40;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sticky-buy-bar.visible {
  transform: translateY(0);
}