/* ═══════════════════════════ INTRO SCREEN ═══════════════════════════ */

.intro-hero {
  text-align: center;
  padding: 32px 0 24px;
}
.intro-hero .badge {
  display: inline-block;
  background: var(--brand-gradient);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 700;
  padding: 6px 18px;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
  letter-spacing: .5px;
}
.intro-hero h1 {
  font-size: clamp(26px, 5vw, 38px);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 14px;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.intro-hero p {
  font-size: var(--text-md);
  color: var(--text-secondary);
  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(--bg-card);
  border: 2px solid var(--brand-pink-light);
  border-radius: var(--radius-full);
  padding: 8px 18px;
  font-size: 14px; font-weight: 700;
  color: var(--brand-pink);
  box-shadow: var(--shadow-1);
}
.skin-chip span { margin-right: 4px; }

.intro-img {
  width: 100%; max-width: var(--container-max);
  border-radius: var(--radius-md);
  margin: 0 auto 28px; display: block;
  object-fit: cover; aspect-ratio: 680 / 400;
  box-shadow: var(--shadow-2);
}

.stats-row { display: flex; justify-content: center; gap: 24px; margin-bottom: 32px; }
.stat { text-align: center; }
.stat-num { font-size: var(--text-xl); font-weight: 900; color: var(--brand-purple); }
.stat-lbl { font-size: var(--text-xs); color: var(--text-secondary); font-weight: 600; }

/* ═══════════════════════════ QUIZ SCREEN ═══════════════════════════ */

#result-screen { min-height: 600px; }

/* Question slide transition */
@keyframes questionEnter {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes questionExit {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-24px); }
}

#question-area {
  animation: questionEnter .4s var(--ease-out-5) both;
}
#question-area.exiting {
  animation: questionExit .2s var(--ease-out-3) both;
}

/* ═══════════════════════════ LOADING SCREEN ═══════════════════════════ */

#loading-screen {
  text-align: center;
  padding: 60px 20px;
  min-height: 100vh;
}
#loading-screen.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.loading-spinner {
  position: relative;
  width: 80px; height: 80px;
  margin: 0 auto 28px;
}
.spinner-ring {
  width: 80px; height: 80px;
  border: 4px solid var(--brand-pink-light);
  border-top-color: var(--brand-pink);
  border-right-color: var(--brand-purple);
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
}
.spinner-emoji {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-title {
  font-size: 20px; font-weight: 700; margin-bottom: 8px;
}
.loading-sub {
  color: var(--text-secondary); font-size: var(--text-base); margin-bottom: 32px;
}

.loading-steps {
  display: flex; flex-direction: column; gap: 12px;
  max-width: 300px; width: 100%;
  text-align: left;
}
.load-step {
  display: flex; align-items: center; gap: 12px;
  font-size: var(--text-base); font-weight: 600;
  color: var(--text-secondary);
  opacity: .3;
  transition: all .4s var(--ease-out-3);
}
.load-step .step-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border-default);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-sm); font-weight: 800;
  flex-shrink: 0;
  transition: all .4s var(--ease-out-3);
}
.load-step.active {
  opacity: 1;
  color: var(--brand-pink);
  font-weight: 700;
}
.load-step.active .step-icon {
  border-color: var(--brand-pink);
  background: var(--brand-pink-light);
  color: var(--brand-pink);
  animation: pulse 1s var(--ease-in-out-2) infinite;
}
.load-step.done { opacity: .6; }
.load-step.done .step-icon {
  background: #4CAF50;
  border-color: #4CAF50;
  color: white;
  font-size: 0;
}
.load-step.done .step-icon::after {
  content: '\2713';
  font-size: var(--text-sm);
}

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

/* ═══════════════════════════ RESULT SCREEN ═══════════════════════════ */

/* Glassmorphism Result Header */
.result-header {
  text-align: center;
  padding: 48px 24px 36px;
  margin: 0 -16px 32px;
  background: var(--skin-gradient);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.result-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.result-header::after {
  content: '';
  position: absolute;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  top: -40px; right: -60px;
  filter: blur(40px);
}
.result-header > * { position: relative; z-index: 1; }

/* Result header text colors for gradient bg */
.result-badge {
  display: inline-block;
  padding: 8px 22px;
  border-radius: var(--radius-full);
  font-size: 14px; font-weight: 700;
  margin-bottom: 16px;
  background: rgba(255,255,255,0.2) !important;
  color: white !important;
}
.result-skin-name {
  font-size: clamp(28px, 6vw, 42px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 10px;
  color: white;
}
.result-char {
  width: 240px; height: 240px;
  border-radius: 20px; object-fit: cover;
  display: block; margin: 0 auto 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.15);
}
.result-emoji { font-size: 64px; margin-bottom: 12px; display: block; color: white; }
.result-tagline {
  font-size: var(--text-md);
  color: rgba(255,255,255,0.85);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Staggered reveal */
@keyframes revealUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.result-header .result-badge     { animation: revealUp 0.5s var(--ease-out-5) 0.1s both; }
.result-header .result-char,
.result-header .result-emoji     { animation: revealUp 0.5s var(--ease-out-5) 0.25s both; }
.result-header .result-skin-name { animation: revealUp 0.6s var(--ease-out-5) 0.5s both; }
.result-header .result-tagline   { animation: revealUp 0.5s var(--ease-out-5) 0.75s both; }

/* ═══════════════════════════ RESPONSIVE ═══════════════════════════ */

@media (max-width: 768px) and (min-width: 481px) {
  .stats-row { gap: 20px; }
  .question-card { padding: 24px 20px; }
  .q-img { width: calc(100% + 40px); margin: -24px -20px 20px; }
  .share-buttons { gap: 10px; }
  .product-card { padding: 14px; }
  .result-header { padding: 40px 20px 28px; }
}

@media (max-width: 480px) {
  .stats-row { gap: 14px; }
  .question-card { padding: 20px 16px; }
  .q-img { width: calc(100% + 32px); margin: -20px -16px 20px; }
  .share-btn { font-size: var(--text-sm); padding: 10px 16px; }
  .routine-grid { grid-template-columns: 1fr; }
  .quiz-nav { gap: 8px; }
  .result-header { padding: 36px 16px 24px; }
  .result-skin-name { font-size: clamp(24px, 6vw, 32px); }
  .result-char { width: 200px; height: 200px; }
  .result-emoji { font-size: 48px; }
  .share-top { padding: 14px 12px; }
  .share-top-text { font-size: 15px; }
  .upsell-card { padding: 18px 14px; }
}
