*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --pink:      #ff6b9d;
  --pink-lt:   #ffe4f0;
  --purple:    #a855f7;
  --purple-lt: #f3e8ff;
  --navy:      #1e2a4a;
  --gray:      #6b7280;
  --bg:        #fdf8ff;
  --white:     #ffffff;
  --radius:    18px;
  --shadow:    0 8px 32px rgba(168,85,247,0.12);
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--navy);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── AD BANNER ── */
.ad-banner {
  width: 100%;
  max-width: 728px;
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  text-align: center;
  padding: 12px;
  font-size: 12px;
  color: #94a3b8;
  margin: 12px auto;
}
.ad-banner span { display: block; font-size: 11px; margin-bottom: 4px; }

/* ── WRAPPER ── */
#app {
  width: 100%;
  max-width: 680px;
  padding: 0 16px 60px;
}

/* ── SCREEN TRANSITIONS ── */
.screen { display: none; animation: fadeUp .45s ease both; }
.screen.active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── INTRO ── */
.intro-hero {
  text-align: center;
  padding: 32px 0 24px;
}
.intro-hero .badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 18px;
  border-radius: 50px;
  margin-bottom: 20px;
  letter-spacing: .5px;
}
.intro-hero h1 {
  font-size: clamp(26px, 5vw, 38px);
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 14px;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.intro-hero p {
  font-size: 16px;
  color: var(--gray);
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto 28px;
}
.skin-types-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 32px;
}
.skin-chip {
  background: var(--white);
  border: 2px solid var(--pink-lt);
  border-radius: 50px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--pink);
  box-shadow: 0 2px 8px rgba(255,107,157,.1);
}
.skin-chip span { margin-right: 4px; }
.intro-img {
  width: 100%;
  max-width: 340px;
  border-radius: var(--radius);
  margin: 0 auto 28px;
  display: block;
  object-fit: cover;
  height: 200px;
  box-shadow: var(--shadow);
}
.stats-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 32px;
}
.stat { text-align: center; }
.stat-num { font-size: 22px; font-weight: 900; color: var(--purple); }
.stat-lbl { font-size: 12px; color: var(--gray); font-weight: 600; }

/* ── BUTTON ── */
.btn-primary {
  display: block;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--pink) 0%, var(--purple) 100%);
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 18px;
  font-weight: 800;
  padding: 18px 32px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(168,85,247,.35);
  transition: transform .2s, box-shadow .2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(168,85,247,.45); }
.btn-primary:active { transform: translateY(0); }

/* ── QUIZ ── */
.progress-wrap { margin: 24px 0 20px; }
.progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray);
  margin-bottom: 8px;
}
.progress-bar {
  background: var(--pink-lt);
  border-radius: 50px;
  height: 10px;
  overflow: hidden;
}
.progress-fill {
  background: linear-gradient(90deg, var(--pink), var(--purple));
  height: 100%;
  border-radius: 50px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
}

.question-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.q-number {
  font-size: 13px;
  font-weight: 700;
  color: var(--pink);
  margin-bottom: 10px;
  letter-spacing: .5px;
}
.q-text {
  font-size: clamp(17px, 3.5vw, 20px);
  font-weight: 800;
  line-height: 1.45;
  color: var(--navy);
}
.q-icon { font-size: 32px; margin-bottom: 12px; display: block; }

.options-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}
.option-btn {
  background: var(--white);
  border: 2px solid #e9d5ff;
  border-radius: var(--radius);
  padding: 16px 20px;
  text-align: left;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 12px;
}
.option-btn:hover {
  border-color: var(--purple);
  background: var(--purple-lt);
  transform: translateX(4px);
}
.option-btn.selected {
  border-color: var(--pink);
  background: var(--pink-lt);
  color: var(--pink);
}
.option-letter {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--purple-lt);
  color: var(--purple);
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.option-btn.selected .option-letter {
  background: var(--pink);
  color: #fff;
}

/* ── LOADING ── */
#loading-screen {
  text-align: center;
  padding: 60px 20px;
}
.loader-ring {
  width: 80px;
  height: 80px;
  border: 6px solid var(--pink-lt);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 28px;
}
@keyframes spin { to { transform: rotate(360deg); } }
#loading-screen h2 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
#loading-screen p  { color: var(--gray); font-size: 15px; }
.loading-tips {
  margin-top: 32px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  text-align: left;
}
.loading-tips h3 { font-size: 14px; font-weight: 800; color: var(--purple); margin-bottom: 12px; }
.loading-tips li { font-size: 14px; color: var(--gray); margin-bottom: 8px; padding-left: 4px; }

/* ── RESULT ── */
.result-header {
  text-align: center;
  padding: 28px 0 0;
}
.result-badge {
  display: inline-block;
  padding: 8px 22px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}
.result-skin-name {
  font-size: clamp(28px, 6vw, 42px);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 10px;
}
.result-emoji { font-size: 64px; margin-bottom: 12px; display: block; }
.result-tagline {
  font-size: 16px;
  color: var(--gray);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Score bars */
.score-section {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.score-section h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 18px;
  color: var(--navy);
}
.score-item { margin-bottom: 14px; }
.score-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}
.score-track {
  background: #f1f5f9;
  border-radius: 50px;
  height: 10px;
  overflow: hidden;
}
.score-fill {
  height: 100%;
  border-radius: 50px;
  transition: width 1.2s cubic-bezier(.4,0,.2,1);
}

/* Info cards */
.info-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.info-card h3 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.info-card ul { list-style: none; }
.info-card li {
  font-size: 14px;
  color: var(--gray);
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  gap: 8px;
  line-height: 1.5;
}
.info-card li:last-child { border-bottom: none; }

/* Product recommendations */
.products-section {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.products-section h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--navy);
}
.product-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 2px solid var(--pink-lt);
  border-radius: 14px;
  margin-bottom: 12px;
  text-decoration: none;
  color: var(--navy);
  transition: all .2s;
}
.product-card:hover {
  border-color: var(--pink);
  background: var(--pink-lt);
  transform: translateY(-2px);
}
.product-img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: var(--purple-lt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}
.product-info { flex: 1; }
.product-name { font-size: 14px; font-weight: 800; margin-bottom: 4px; }
.product-desc { font-size: 12px; color: var(--gray); line-height: 1.4; }
.product-price {
  font-size: 15px;
  font-weight: 800;
  color: var(--pink);
  white-space: nowrap;
}
.product-arrow { font-size: 18px; color: var(--pink); }

/* Share */
.share-section {
  text-align: center;
  padding: 24px 0;
}
.share-section h3 {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 16px;
}
.share-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.share-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all .2s;
  color: #fff;
}
.share-btn:hover { transform: translateY(-2px); opacity: .9; }
.share-fb   { background: #1877f2; }
.share-zalo { background: #0068ff; }
.share-copy { background: var(--gray); }

.retry-btn {
  display: block;
  width: fit-content;
  margin: 0 auto;
  background: none;
  border: none;
  color: var(--purple);
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  padding: 8px;
}

.disclaimer {
  font-size: 11px;
  color: #9ca3af;
  text-align: center;
  padding: 8px 0 24px;
  line-height: 1.6;
}

footer {
  width: 100%;
  background: var(--white);
  border-top: 1px solid #f1f5f9;
  padding: 20px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--gray);
  margin-top: auto;
}
footer a { color: var(--purple); text-decoration: none; font-weight: 700; }

@media (max-width: 480px) {
  .stats-row { gap: 14px; }
  .question-card { padding: 20px 16px; }
  .share-btn { font-size: 13px; padding: 10px 16px; }
}
