/* ===================================
   CUIDE-SE BEM CEREJA DE FASES - QUIZ
   Mobile-First | O Boticário
   =================================== */

:root {
  --cherry: #C2185B;
  --cherry-dark: #880E4F;
  --cherry-light: #F8BBD0;
  --cherry-bg: #FFF0F3;
  --pink-glow: #F06292;
  --boti-green: #00857e;
  --white: #FFFFFF;
  --gray-100: #F9F9F9;
  --gray-200: #E8E8E8;
  --gray-600: #666;
  --gray-900: #1A1A2E;
  --shadow-sm: 0 2px 8px rgba(194, 24, 91, 0.1);
  --shadow-md: 0 4px 20px rgba(194, 24, 91, 0.15);
  --shadow-lg: 0 8px 40px rgba(194, 24, 91, 0.2);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--cherry-bg);
  color: var(--gray-900);
  -webkit-font-smoothing: antialiased;
}

/* ===== SCREEN SYSTEM ===== */
.screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  z-index: 1;
  background: var(--cherry-bg);
}
.screen.active {
  opacity: 1;
  visibility: visible;
  z-index: 10;
}

/* Subtle background pattern for quiz */
#quiz-screen {
  background: linear-gradient(160deg, #FFF0F3 0%, #FFEEF5 40%, #FFF5F8 100%);
}
#quiz-screen::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(194,24,91,0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
#quiz-screen::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: -40px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(240,98,146,0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* ===== INTRO SCREEN ===== */
.intro-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.cherry-float {
  position: absolute;
  font-size: 28px;
  opacity: 0.3;
  animation: floatCherry 6s ease-in-out infinite;
}
.c1 { top: 8%; left: 10%; animation-delay: 0s; }
.c2 { top: 15%; right: 12%; animation-delay: 1.2s; }
.c3 { bottom: 20%; left: 8%; animation-delay: 2.4s; }
.c4 { top: 40%; right: 5%; animation-delay: 0.8s; }
.c5 { bottom: 10%; right: 20%; animation-delay: 3s; }

@keyframes floatCherry {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(10deg); }
}

.intro-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 24px 20px;
  max-width: 400px;
  width: 100%;
  animation: fadeSlideUp 0.8s ease-out;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.intro-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--cherry), var(--pink-glow));
  color: white;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 5px 16px;
  border-radius: 50px;
  margin-bottom: 16px;
}

.intro-logo img {
  height: 36px;
  margin-bottom: 20px;
  filter: brightness(0) saturate(100%) invert(19%) sepia(82%) saturate(3123%) hue-rotate(322deg) brightness(88%) contrast(93%);
}

.intro-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--gray-900);
  margin-bottom: 12px;
}
.intro-title span {
  background: linear-gradient(135deg, var(--cherry), var(--cherry-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.intro-subtitle {
  font-size: 14px;
  line-height: 1.5;
  color: var(--gray-600);
  margin-bottom: 20px;
  padding: 0 8px;
}
.intro-subtitle strong {
  color: var(--cherry);
}

.intro-features {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.feature {
  display: flex;
  align-items: center;
  gap: 4px;
  background: white;
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-900);
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  font-size: 14px;
}

/* CTA BUTTON */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 320px;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--cherry), var(--cherry-dark));
  color: white;
  border: none;
  border-radius: 50px;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(194, 24, 91, 0.4);
  animation: pulseBtn 2s infinite;
}
.btn-cta:active {
  transform: scale(0.97);
}

@keyframes pulseBtn {
  0%, 100% { box-shadow: 0 4px 20px rgba(194, 24, 91, 0.4); }
  50% { box-shadow: 0 4px 30px rgba(194, 24, 91, 0.6); }
}

.intro-trust {
  margin-top: 16px;
  font-size: 11px;
  color: var(--gray-600);
  opacity: 0.7;
}

/* ===== QUIZ SCREEN ===== */
.quiz-wrapper {
  width: 100%;
  max-width: 420px;
  padding: 12px 16px 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Brand header in quiz */
.quiz-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 0 10px;
}
.quiz-brand-logo {
  height: 24px;
  filter: brightness(0) saturate(100%) invert(19%) sepia(82%) saturate(3123%) hue-rotate(322deg) brightness(88%) contrast(93%);
}
.quiz-brand-line {
  font-size: 12px;
  color: var(--gray-600);
  letter-spacing: 0.3px;
}
.quiz-brand-line strong {
  color: var(--cherry);
  font-weight: 600;
}

.quiz-top-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

/* Small logo at bottom of quiz card */
.quiz-bottom-logo {
  display: flex;
  justify-content: center;
  padding: 16px 0 4px;
}
.quiz-bottom-logo img {
  height: 22px;
  opacity: 0.5;
  filter: brightness(0) saturate(100%) invert(19%) sepia(82%) saturate(3123%) hue-rotate(322deg) brightness(88%) contrast(93%);
}

/* Footer trust in quiz */
.quiz-footer-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 0 4px;
  font-size: 10px;
  color: var(--gray-600);
  opacity: 0.7;
}

.quiz-step {
  font-size: 13px;
  font-weight: 600;
  color: var(--cherry);
  white-space: nowrap;
  min-width: 36px;
}

.quiz-progress-track {
  flex: 1;
  height: 6px;
  background: var(--gray-200);
  border-radius: 50px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cherry), var(--pink-glow));
  border-radius: 50px;
  transition: width 0.5s ease;
}

.quiz-card {
  flex: 1;
  background: white;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 4px 24px rgba(194, 24, 91, 0.1), 0 1px 4px rgba(194, 24, 91, 0.06);
  display: flex;
  flex-direction: column;
  animation: cardIn 0.4s ease-out;
  overflow-y: auto;
  border: 1px solid rgba(248, 187, 208, 0.3);
}

/* ===== QUIZ BANNER ===== */
.quiz-banner {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: 0 2px 12px rgba(194, 24, 91, 0.1);
  flex-shrink: 0;
}
.quiz-banner img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

.quiz-discount-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--cherry-bg);
  color: var(--cherry);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 16px;
  align-self: flex-start;
  border: 1px solid var(--cherry-light);
}

#quiz-discount-value {
  font-weight: 700;
}

.quiz-question {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--gray-900);
  margin-bottom: 20px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: white;
  border: 2px solid #F3E0E8;
  border-radius: 14px;
  font-family: 'Poppins', sans-serif;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--gray-900);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  width: 100%;
  line-height: 1.3;
  box-shadow: 0 1px 4px rgba(194, 24, 91, 0.04);
}
.quiz-option:hover {
  border-color: var(--cherry-light);
  background: #FFF5F8;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(194, 24, 91, 0.08);
}
.quiz-option.selected {
  border-color: var(--cherry);
  background: linear-gradient(135deg, #FFF0F3, #FFEAF0);
  color: var(--cherry-dark);
  font-weight: 500;
  transform: scale(0.98);
  box-shadow: 0 2px 12px rgba(194, 24, 91, 0.12);
}
.quiz-option.selected .option-circle {
  background: linear-gradient(135deg, var(--cherry), var(--pink-glow));
  border-color: var(--cherry);
  box-shadow: 0 2px 8px rgba(194, 24, 91, 0.3);
}
.quiz-option.selected .option-circle::after {
  content: '✓';
  color: white;
  font-size: 12px;
  font-weight: 700;
}

.option-circle {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 50%;
  border: 2px solid #F0D0DC;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

/* ===== LOADING SCREEN ===== */
.loading-content {
  text-align: center;
  padding: 30px;
  animation: fadeSlideUp 0.6s ease-out;
}

.loading-spinner {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
}

.spinner-ring {
  position: absolute;
  inset: 0;
  border: 4px solid var(--cherry-light);
  border-top-color: var(--cherry);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.spinner-emoji {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.loading-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.loading-text {
  font-size: 13px;
  color: var(--gray-600);
  margin-bottom: 24px;
}

.loading-bar-track {
  width: 200px;
  height: 6px;
  background: var(--gray-200);
  border-radius: 50px;
  margin: 0 auto;
  overflow: hidden;
}

.loading-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cherry), var(--pink-glow));
  border-radius: 50px;
  transition: width 0.3s ease;
}

/* ===== RESULT SCREEN ===== */
#result-screen {
  background: linear-gradient(180deg, #880E4F 0%, #C2185B 50%, #880E4F 100%);
}

.result-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 24px 20px;
  max-width: 400px;
  width: 100%;
  animation: fadeSlideUp 0.8s ease-out;
}

.result-confetti {
  font-size: 48px;
  margin-bottom: 8px;
  animation: bounce 1s ease-in-out infinite;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.result-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  padding: 6px 20px;
  border-radius: 50px;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.3);
}

.result-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: white;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.result-discount-box {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: white;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.result-discount-label {
  display: block;
  font-size: 12px;
  opacity: 0.85;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.result-discount-number {
  display: block;
  font-size: 56px;
  font-weight: 700;
  line-height: 1.1;
}

.result-discount-text {
  display: block;
  font-size: 14px;
  opacity: 0.9;
  margin-top: 4px;
}

.result-desc {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255,255,255,0.9);
  margin-bottom: 24px;
  padding: 0 8px;
}
.result-desc strong {
  color: white;
}

.btn-store-cta {
  animation: pulseBtn 1.5s infinite;
  font-size: 16px;
  padding: 18px 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.result-urgency {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 12px;
  color: rgba(255,255,255,0.9);
  font-weight: 500;
}

.urgency-dot {
  width: 8px;
  height: 8px;
  background: #FF6B6B;
  border-radius: 50%;
  animation: blink 1s infinite;
}

.result-trust-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  font-weight: 400;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ===== RESPONSIVE ===== */
@media (max-height: 660px) {
  .intro-title { font-size: 24px; }
  .intro-subtitle { font-size: 13px; margin-bottom: 14px; }
  .intro-features { margin-bottom: 16px; }
  .btn-cta { padding: 14px 20px; font-size: 14px; }
  .quiz-question { font-size: 16px; margin-bottom: 14px; }
  .quiz-option { padding: 11px 14px; font-size: 13px; }
  .result-discount-number { font-size: 44px; }
  .result-title { font-size: 20px; }
}

@media (max-height: 580px) {
  .intro-logo img { height: 28px; margin-bottom: 12px; }
  .intro-badge { margin-bottom: 10px; }
  .intro-title { font-size: 22px; margin-bottom: 8px; }
  .intro-subtitle { font-size: 12px; margin-bottom: 10px; }
  .feature { font-size: 10px; padding: 5px 8px; }
  .intro-trust { margin-top: 10px; }
  .cherry-float { display: none; }
  .quiz-discount-badge { padding: 4px 10px; font-size: 11px; margin-bottom: 10px; }
  .quiz-option { padding: 10px 12px; gap: 8px; }
  .option-circle { width: 20px; height: 20px; min-width: 20px; }
}

@media (min-width: 768px) {
  .intro-title { font-size: 36px; }
  .intro-subtitle { font-size: 16px; }
  .quiz-question { font-size: 20px; }
  .result-title { font-size: 28px; }
}
