:root {
  --dark:        #1a0802;
  --brown:       #3d1a08;
  --brown-mid:   #6b2d0d;
  --gold:        #c9a227;
  --gold-light:  #e8c96d;
  --gold-dim:    #7a5f10;
  --cream:       #f5e6cc;
  --white:       #ffffff;
  --text-muted:  rgba(255,255,255,0.6);
  --card-bg:     rgba(61,26,8,0.7);
  --radius:      16px;
  --radius-sm:   10px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--dark);
  color: var(--white);
  min-height: 100dvh;
  overflow-x: hidden;
}

/* ── Background texture ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(201,162,39,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(107,45,13,0.3) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ── Layout container ── */
.container {
  position: relative;
  z-index: 1;
  max-width: 540px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── Logo header ── */
.logo-header {
  display: flex;
  justify-content: center;
  padding: 28px 0 16px;
}
.logo-header img {
  height: 72px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

/* ── Screens ── */
.screen {
  display: none;
  flex: 1;
  flex-direction: column;
  padding-bottom: 40px;
}
.screen.active { display: flex; }

/* ══════════════════════════════════
   INTRO SCREEN
══════════════════════════════════ */
.intro-hero {
  text-align: center;
  padding: 16px 0 32px;
}
.intro-tagline {
  font-family: 'Playfair Display', serif;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.intro-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 7vw, 42px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
}
.intro-title span { color: var(--gold); }
.intro-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 380px;
  margin: 0 auto;
}

.name-form { margin-top: 32px; }
.name-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.name-input {
  width: 100%;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gold-dim);
  background: var(--card-bg);
  color: var(--white);
  font-size: 18px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.name-input::placeholder { color: rgba(255,255,255,0.3); }
.name-input:focus { border-color: var(--gold); }

.social-proof {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.social-proof .dot {
  width: 4px; height: 4px;
  background: var(--gold-dim);
  border-radius: 50%;
}

/* ══════════════════════════════════
   QUIZ SCREEN
══════════════════════════════════ */
.quiz-header {
  text-align: center;
  padding: 8px 0 24px;
}
.quiz-greeting {
  font-size: 14px;
  color: var(--gold);
  margin-bottom: 6px;
}
.quiz-instruction {
  font-family: 'Playfair Display', serif;
  font-size: clamp(18px, 5vw, 24px);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
}
.quiz-hint { font-size: 13px; color: var(--text-muted); }

/* Points counter pill */
.points-counter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 24px;
}
.points-pill {
  background: var(--card-bg);
  border: 1.5px solid var(--gold-dim);
  border-radius: 40px;
  padding: 10px 24px;
  font-size: 14px;
  color: var(--text-muted);
}
.points-pill strong {
  font-size: 22px;
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.points-pill.done strong { color: #5cb85c; }

/* Trait cards */
.traits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
}
.trait-card {
  background: var(--card-bg);
  border: 1.5px solid var(--gold-dim);
  border-radius: var(--radius);
  padding: 18px 14px;
  text-align: center;
  transition: border-color 0.2s, transform 0.15s;
  backdrop-filter: blur(8px);
}
.trait-card.active-glow { border-color: var(--gold); }
.trait-emoji { font-size: 32px; margin-bottom: 6px; line-height: 1; }
.trait-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2px;
}
.trait-question { font-size: 11px; color: var(--text-muted); margin-bottom: 14px; line-height: 1.4; }

.trait-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.btn-step {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-dim);
  background: transparent;
  color: var(--gold);
  font-size: 20px;
  font-weight: 300;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn-step:active { transform: scale(0.9); }
.btn-step:hover:not(:disabled) { background: rgba(201,162,39,0.15); border-color: var(--gold); }
.btn-step:disabled { opacity: 0.25; cursor: not-allowed; }
.trait-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--white);
  min-width: 36px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* Progress bar */
.progress-bar-wrap {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  margin-bottom: 28px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  border-radius: 4px;
  transition: width 0.3s ease;
}
.progress-bar-fill.full { background: linear-gradient(90deg, #5cb85c, #7ed321); }

/* ══════════════════════════════════
   LOADING SCREEN
══════════════════════════════════ */
.loading-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 28px;
  padding: 40px 0;
}
.loading-icon {
  font-size: 72px;
  animation: pulse-spin 1.8s ease-in-out infinite;
  line-height: 1;
}
@keyframes pulse-spin {
  0%   { transform: scale(1) rotate(0deg); opacity: 1; }
  25%  { transform: scale(1.15) rotate(-8deg); opacity: 0.9; }
  50%  { transform: scale(0.9) rotate(8deg); opacity: 0.75; }
  75%  { transform: scale(1.1) rotate(-4deg); opacity: 0.9; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.loading-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: var(--gold);
  font-weight: 700;
}
.loading-message {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 320px;
  min-height: 48px;
  transition: opacity 0.4s ease;
}
.loading-dots {
  display: flex; gap: 8px; justify-content: center;
}
.loading-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  animation: dot-bounce 1.4s ease-in-out infinite;
}
.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%            { transform: scale(1.2); opacity: 1; }
}
.loading-about {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  line-height: 1.7;
  max-width: 300px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px;
}

/* ══════════════════════════════════
   RESULT SCREEN
══════════════════════════════════ */
.result-header { text-align: center; padding: 8px 0 20px; }
.result-greeting {
  font-size: 14px;
  color: var(--gold);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.result-tagline {
  font-family: 'Playfair Display', serif;
  font-size: clamp(22px, 6vw, 32px);
  font-weight: 700;
  line-height: 1.2;
}
.result-tagline .name { color: var(--gold); }

/* Product image */
.product-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 320px;
  margin: 0 auto 24px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--gold);
  box-shadow: 0 0 40px rgba(201,162,39,0.3), 0 0 0 6px rgba(201,162,39,0.08);
}
.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.product-image-wrap img:hover { transform: scale(1.05); }
.product-image-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 80px;
  background: var(--card-bg);
}

/* Category badge */
.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(201,162,39,0.15);
  border: 1px solid var(--gold-dim);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 12px;
}

/* Product name */
.product-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(24px, 6.5vw, 36px);
  font-weight: 700;
  margin-bottom: 16px;
  text-align: center;
}

/* Personality text */
.personality-card {
  background: var(--card-bg);
  border: 1.5px solid rgba(201,162,39,0.2);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 28px;
  backdrop-filter: blur(8px);
}
.personality-text {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(255,255,255,0.88);
  text-align: center;
}

/* CTA button */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 18px 24px;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, var(--gold), #a07c1a);
  color: var(--dark);
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  letter-spacing: 0.02em;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(201,162,39,0.4); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gold-dim);
  background: transparent;
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn-secondary:hover { background: rgba(201,162,39,0.1); border-color: var(--gold); }

/* Share section */
.share-section { margin-top: 28px; }
.share-label {
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 14px;
}
.share-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.btn-share {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 8px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gold-dim);
  background: var(--card-bg);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  letter-spacing: 0.03em;
  -webkit-tap-highlight-color: transparent;
}
.btn-share:hover { background: rgba(201,162,39,0.15); border-color: var(--gold); }
.btn-share:active { transform: scale(0.97); }
.btn-share svg { width: 24px; height: 24px; flex-shrink: 0; }
.btn-share.whatsapp svg { fill: #25D366; }
.btn-share.facebook svg { fill: #1877F2; }
.btn-share.copy svg { fill: var(--gold); }
.btn-share.download svg { fill: var(--gold); }

.btn-share-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.replay-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  margin-top: 24px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.replay-btn:hover { color: var(--white); border-color: rgba(255,255,255,0.3); }

/* Würzmeister footer note */
.wm-note {
  margin-top: 32px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: rgba(201,162,39,0.06);
  border: 1px solid rgba(201,162,39,0.12);
  text-align: center;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(255,255,255,0.45);
}
.wm-note strong { color: var(--gold-light); }

/* Toast notification */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #333;
  color: #fff;
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Utilities */
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.text-center { text-align: center; }

/* Divider */
.result-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--gold-dim);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.result-divider::before,
.result-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim));
}
.result-divider::after { background: linear-gradient(270deg, transparent, var(--gold-dim)); }

/* ── Reveal animation ── */
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal { animation: reveal-up 0.5s ease forwards; }
.reveal-1 { animation-delay: 0.05s; opacity: 0; }
.reveal-2 { animation-delay: 0.15s; opacity: 0; }
.reveal-3 { animation-delay: 0.25s; opacity: 0; }
.reveal-4 { animation-delay: 0.35s; opacity: 0; }
.reveal-5 { animation-delay: 0.45s; opacity: 0; }
.reveal-6 { animation-delay: 0.55s; opacity: 0; }

@media (max-width: 380px) {
  .traits-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .trait-card { padding: 14px 10px; }
  .trait-emoji { font-size: 26px; }
  .share-buttons { grid-template-columns: 1fr 1fr 1fr; }
}
