:root {
  --bg-1: #1a1730;
  --bg-2: #3a1230;
  --card: #ffffff;
  --ink: #1f2030;
  --ink-soft: #6b6b85;
  --accent: #e23636; /* 마블 레드 */
  --accent-soft: #fdecec;
  --gold: #f0b429;
  --radius: 22px;
  --shadow: 0 22px 55px rgba(0, 0, 0, 0.45);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

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

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 10%, rgba(226, 54, 54, 0.35), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(80, 60, 200, 0.35), transparent 45%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
  color: var(--ink);
  padding: 24px 16px;
  -webkit-font-smoothing: antialiased;
}

.app {
  width: 100%;
  max-width: 460px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screen { display: none; width: 100%; }
.screen.active { display: block; animation: fadeIn 0.45s ease; }

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

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 26px;
  text-align: center;
}

/* 인트로 */
.emoji-float { font-size: 64px; animation: float 3s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

h1 {
  font-size: 27px;
  margin: 14px 0 10px;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle { color: var(--ink-soft); line-height: 1.6; font-size: 15px; }

.intro-meta {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 26px 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.disclaimer { margin-top: 18px; font-size: 11.5px; color: #a7a7bd; line-height: 1.5; }

/* 버튼 */
.btn {
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  padding: 15px 22px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
  font-family: inherit;
  width: 100%;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 22px rgba(226, 54, 54, 0.4);
}
.btn-primary:hover { background: #cf2b2b; }

.btn-secondary {
  background: #2a2740;
  color: #fff;
  margin-top: 10px;
}
.btn-secondary:hover { background: #38345a; }

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  font-size: 14px;
  padding: 12px;
  margin-top: 10px;
}
.btn-ghost:hover { color: var(--accent); }

/* 퀴즈 */
.progress-wrap { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.progress-bar {
  flex: 1;
  height: 8px;
  background: var(--accent-soft);
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: 99px;
  transition: width 0.4s ease;
}
.progress-text { font-size: 13px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }

.question {
  font-size: 19px;
  line-height: 1.5;
  margin-bottom: 24px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.4px;
}

.options { display: flex; flex-direction: column; gap: 12px; }
.option {
  background: #f6f6fb;
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  color: var(--ink);
  line-height: 1.45;
}
.option:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateX(4px); }
#btn-prev { margin-top: 22px; }

/* 결과 */
.capture { background: #fff; border-radius: 18px; padding: 6px 4px 14px; }
.result-label { color: var(--ink-soft); font-size: 14px; letter-spacing: 0.5px; }
.result-illust { margin: 10px auto 6px; width: 168px; height: 168px; animation: pop 0.5s ease; }
.result-illust svg { width: 100%; height: 100%; border-radius: 26px; box-shadow: 0 12px 28px rgba(0,0,0,0.22); }
@keyframes pop {
  0%   { transform: scale(0.3); opacity: 0; }
  70%  { transform: scale(1.12); }
  100% { transform: scale(1); opacity: 1; }
}
.result-name { font-size: 27px; letter-spacing: -0.5px; margin-top: 8px; }
.result-real { color: var(--ink-soft); font-size: 13px; margin-top: 2px; }
.result-tagline { color: var(--accent); font-weight: 700; margin: 10px 0 16px; font-size: 15px; }
.result-desc {
  color: var(--ink-soft);
  line-height: 1.7;
  font-size: 14.5px;
  text-align: left;
  background: #f6f6fb;
  padding: 16px 18px;
  border-radius: 14px;
}
.result-traits { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 18px 0; }
.trait-chip {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 99px;
}
.result-match {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f6f6fb;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 14px;
}
.match-label { color: var(--ink-soft); }
.match-value { font-weight: 800; color: var(--ink); }
.capture-brand { margin-top: 16px; font-size: 12px; font-weight: 700; color: #c2c2d2; letter-spacing: 0.5px; }

.result-actions { display: flex; flex-direction: column; margin-top: 20px; }

/* 제작자 브랜드 로고 */
.brand-logo {
  position: fixed;
  top: 16px; right: 18px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  background: rgba(0, 0, 0, 0.22);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 8px 15px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.3px;
  text-decoration: none;
  user-select: none;
}
.brand-logo .heart { color: #ff5d7d; animation: heartbeat 1.4s ease-in-out infinite; }
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  28%      { transform: scale(1.28); }
  45%      { transform: scale(1); }
}

.footer { margin-top: 24px; color: rgba(255, 255, 255, 0.7); font-size: 12.5px; text-align: center; }

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(20, 20, 32, 0.95);
  color: #fff;
  padding: 12px 22px;
  border-radius: 99px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 50;
  max-width: 90vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
