/* === DESIGN SYSTEM === */
:root {
  --bg: #111111;
  --bg-surface: #1a1a1a;
  --bg-elevated: #222222;
  --text-primary: #F4F4F4;
  --text-secondary: #999999;
  --text-muted: #666666;
  --accent: #F4F4F4;
  --border: #333333;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, sans-serif;
  --radius: 8px;
  --radius-lg: 16px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* === SCREENS === */
.screen {
  display: none;
  min-height: 100vh;
  width: 100%;
}

.screen.active {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.5s ease;
}

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

/* === BUTTONS === */
.btn {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 14px 36px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.02em;
}

.btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg);
}

.btn-primary:hover:not(:disabled) {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(244, 244, 244, 0.15);
}

.btn-share {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 20px;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.btn-share:hover {
  border-color: var(--text-primary);
}

/* === LANDING === */
.landing-container {
  text-align: center;
  max-width: 600px;
  padding: 40px 24px;
}

.brand-name {
  font-family: var(--font-sans);
  font-size: 3rem;
  font-weight: 300;
  letter-spacing: 0.4em;
  margin-bottom: 8px;
}

.brand-line {
  width: 60px;
  height: 1px;
  background: var(--text-muted);
  margin: 0 auto 48px;
}

.landing-subtitle {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.landing-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 48px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.landing-fine {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 20px;
}

/* === QUIZ === */
.quiz-container {
  width: 100%;
  max-width: 640px;
  min-height: 100vh;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.quiz-logo {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  color: var(--text-muted);
}

.quiz-counter {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.progress-bar {
  width: 100%;
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  margin-bottom: 60px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--text-primary);
  border-radius: 1px;
  width: 0%;
  transition: width 0.4s ease;
}

.question-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 100px;
}

.question-text {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 48px;
  animation: slideUp 0.3s ease;
}

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

.answer-input {
  animation: slideUp 0.3s ease;
  animation-delay: 0.1s;
  animation-fill-mode: both;
}

/* Choice input */
.input-choice {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.choice-option {
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.choice-option:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.choice-option.selected {
  border-color: var(--text-primary);
  color: var(--text-primary);
  background: var(--bg-elevated);
}

/* Quiz nav */
.quiz-nav {
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-back {
  min-width: 100px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-back:hover:not(:disabled) {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.btn-next {
  min-width: 120px;
}

/* === SUSPENSE === */
.suspense-container {
  text-align: center;
  padding: 40px 24px;
}

.suspense-logo {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  margin-bottom: 80px;
}

.suspense-animation {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 60px;
}

.pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 1px solid var(--text-muted);
  border-radius: 50%;
  animation: pulse 2s ease-out infinite;
}

.pulse-ring.delay-1 { animation-delay: 0.5s; }
.pulse-ring.delay-2 { animation-delay: 1s; }

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(3); opacity: 0; }
}

.suspense-text {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.suspense-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.suspense-steps {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.suspense-steps .step {
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
}

.suspense-steps .step.visible {
  opacity: 1;
  transform: translateY(0);
  color: var(--text-secondary);
}

.suspense-steps .step.done {
  color: var(--text-muted);
  opacity: 0.5;
}

/* === TEASER === */
.teaser-container {
  width: 100%;
  max-width: 640px;
  padding: 40px 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.teaser-header {
  margin-bottom: 48px;
}

.teaser-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 40px;
}

.teaser-insights {
  margin-bottom: 48px;
}

.teaser-insight {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  font-size: 1.05rem;
  color: var(--text-primary);
  line-height: 1.5;
  animation: slideUp 0.4s ease both;
}

.teaser-insight:first-child {
  border-top: 1px solid var(--border);
}

.teaser-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.archetype-blur {
  padding: 24px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  text-align: center;
  margin-bottom: 48px;
}

.archetype-name-blurred {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  filter: blur(8px);
  user-select: none;
}

/* Preview slides */
.preview-slides {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 48px;
}

.preview-slide {
  aspect-ratio: 3/4;
  background: var(--bg-surface);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  padding: 8px;
}

.preview-slide.blurred {
  filter: blur(4px);
  user-select: none;
}

/* Paywall */
.paywall {
  text-align: center;
  margin-top: auto;
  padding: 40px 0;
}

.btn-unlock {
  width: 100%;
  max-width: 400px;
  font-size: 1rem;
  padding: 18px 36px;
}

.paywall-detail {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 16px;
}

/* === REPORT / SLIDESHOW === */
.report-container {
  width: 100%;
  max-width: 640px;
  min-height: 100vh;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.slideshow {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.slide {
  display: none;
  padding: 20px 0;
  animation: fadeIn 0.4s ease;
}

.slide.active {
  display: block;
}

.slide-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 8px;
}

.slide-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 32px;
}

.slide-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.slide-content p {
  margin-bottom: 16px;
}

.slide-content strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* Trait bars */
.trait-bar {
  margin-bottom: 24px;
}

.trait-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.trait-bar-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
}

.trait-bar-value {
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.trait-bar-track {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.trait-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1s ease;
  width: 0%;
}

.trait-bar-interpretation {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Slide navigation */
.slide-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px 0;
}

.slide-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

.slide-btn:hover:not(:disabled) {
  background: var(--bg-elevated);
}

.slide-dots {
  display: flex;
  gap: 8px;
}

.slide-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: var(--transition);
}

.slide-dot.active {
  background: var(--text-primary);
  transform: scale(1.2);
}

/* === ERROR TOAST === */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 14px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  z-index: 1000;
  transition: transform 0.3s ease;
  max-width: 90vw;
}

.toast.visible {
  transform: translateX(-50%) translateY(0);
}

/* === RESPONSIVE === */
@media (max-width: 480px) {
  .brand-name {
    font-size: 2.2rem;
  }

  .landing-subtitle {
    font-size: 1.25rem;
  }

  .question-text {
    font-size: 1.3rem;
  }

  .slide-title {
    font-size: 1.4rem;
  }

  .preview-slides {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .landing-container {
    padding: 80px 40px;
  }

  .brand-name {
    font-size: 4rem;
  }

  .landing-subtitle {
    font-size: 1.75rem;
  }

  .question-text {
    font-size: 1.8rem;
  }
}

@media (min-width: 1024px) {
  .quiz-container,
  .teaser-container,
  .report-container {
    max-width: 720px;
    margin: 0 auto;
  }
}

/* === SHARE MODAL === */
.share-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.share-modal.visible {
  opacity: 1;
}

.share-modal-inner {
  background: var(--bg-surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%;
  max-width: 640px;
  padding: 24px;
  transform: translateY(40px);
  transition: transform 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.share-modal.visible .share-modal-inner {
  transform: translateY(0);
}

.share-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.share-modal-title {
  font-size: 1rem;
  font-weight: 500;
}

.share-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.share-preview-wrap {
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 20px;
  background: #111;
}

.share-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.share-apps-btn {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 14px;
  background: var(--text-primary);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  margin-bottom: 12px;
  transition: var(--transition);
}

.share-apps-btn:hover {
  background: #ffffff;
}

.share-platforms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.share-platform-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  cursor: pointer;
  transition: var(--transition);
}

.share-platform-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.share-platform-btn svg {
  width: 20px;
  height: 20px;
}

.share-bottom {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.share-download-btn {
  flex: 1;
  text-align: center;
  text-decoration: none;
  display: block;
}

.share-copy-btn {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 14px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.share-copy-btn:hover {
  border-color: var(--text-primary);
}

.share-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}
