* {
  box-sizing: border-box;
}

:root {
  --blue: #1e6aa8;
  --dark-blue: #003664;
  --yellow: #f4b515;
  --cream: #fff9f2;
  --orange: #f47821;
  --green: #31af73;
  --pink: #f5c8c8;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  --radius-xl: 30px;

  --font-heading: "Poppins", sans-serif;
  --font-body: "Nunito", sans-serif;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: radial-gradient(circle at top left, #ffe599 0%, #f4b515 38%, #e9ad00 100%);
  color: var(--dark-blue);
  min-height: 100vh;
}

.intro-copy h1,
.question-card h2,
.result-main h1,
.all-pals-card h2,
.poster-fallback h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--dark-blue);
}

.intro-copy p,
.question-sub,
.option-desc,
.result-main p,
.pal-mini-card span,
.tag,
.ghost-btn,
.start-btn-below,
.primary-btn,
.secondary-btn,
.chip,
.pill,
.progress-label {
  font-family: var(--font-body);
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.shell {
  width: 100%;
  max-width: 1280px;
  min-height: 700px;
  background: rgba(255, 250, 241, 0.96);
  border-radius: 34px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  backdrop-filter: blur(6px);
}

.shell::before,
.shell::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  opacity: 0.18;
  pointer-events: none;
}

.shell::before {
  width: 220px;
  height: 220px;
  background: #4fbf88;
  top: -60px;
  right: -60px;
}

.shell::after {
  width: 180px;
  height: 180px;
  background: #4ba3ff;
  bottom: -50px;
  left: -50px;
}

.app {
  position: relative;
  z-index: 1;
  padding: 28px;
}

.screen {
  animation: fadeUp 0.4s ease;
}

.hidden {
  display: none;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floaty {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--dark-blue);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
}

.ghost-btn {
  border: none;
  background: #f5f5f5;
  color: #0b4a7d;
  padding: 18px 28px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  font-size: 18px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ghost-btn:hover {
  transform: translateY(-1px);
}

.hero-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.hero-card img {
  display: block;
  width: 100%;
  height: auto;
}

.poster-fallback {
  width: 100%;
  min-height: 340px;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #ffefb6, #fff8e8);
}

.poster-fallback h2 {
  margin: 0 0 8px;
  font-size: 2rem;
}

.poster-fallback p {
  margin: 0;
  font-size: 1.1rem;
}

.intro-copy {
  text-align: center;
  margin-top: 20px;
  padding: 0 6px;
}

.intro-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(2.8rem, 5vw, 4.6rem);
  line-height: 1.02;
}

.intro-copy p {
  margin: 0 auto;
  max-width: 620px;
  line-height: 1.6;
  font-size: 1.08rem;
}

.start-btn-wrap {
  margin-top: 18px;
  display: flex;
  justify-content: center;
}

.start-btn-below {
  padding: 15px 28px;
  border: none;
  border-radius: 999px;
  background: #f47821;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(244, 120, 33, 0.32);
}

.info-strip {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  background: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.floating-mascots {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.mini-mascot {
  width: 72px;
  height: 72px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  animation: floaty 3s ease-in-out infinite;
}

.mini-mascot img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.progress-wrap {
  background: #fff;
  padding: 16px;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  margin-bottom: 18px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
  margin-bottom: 10px;
  font-size: 0.96rem;
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: #eee8da;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #31af73, #1e6aa8);
  transition: width 0.35s ease;
}

.question-card,
.result-card,
.all-pals-card {
  background: #f8f8f8;
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
}

.question-card h2 {
  margin: 0 0 10px;
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  line-height: 1.08;
}

.question-sub {
  margin: 0 0 20px;
  color: #4a6480;
  line-height: 1.6;
  font-size: 1.05rem;
}

.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.option-btn {
  width: 100%;
  border: none;
  border-radius: 24px;
  background: #fff9f2;
  padding: 22px;
  text-align: left;
  cursor: pointer;
  transition: 0.22s ease;
  border: 2px solid transparent;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.035);
}

.option-btn:hover {
  transform: translateY(-3px);
  border-color: var(--accent, #1e6aa8);
}

.option-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.option-avatar {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--accent-soft, #eaf4ff);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.option-avatar img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.option-title {
  font-weight: 700;
  color: var(--dark-blue);
  font-size: 1rem;
}

.option-label {
  font-size: 0.85rem;
  color: #54708d;
  margin-top: 2px;
}

.option-desc {
  margin: 0;
  line-height: 1.55;
  color: #264867;
  font-size: 1.02rem;
}

.result-main {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
  align-items: center;
}

.result-figure {
  background: linear-gradient(180deg, #fff6e7, #fff);
  border-radius: 28px;
  padding: 18px;
  text-align: center;
}

.result-figure img {
  width: 100%;
  max-width: 130px;
  object-fit: contain;
  animation: floaty 2.6s ease-in-out infinite;
}

.result-main h1 {
  margin: 0 0 10px;
  font-size: clamp(2.3rem, 4vw, 3.8rem);
  line-height: 1.06;
}

.result-main p {
  margin: 0;
  line-height: 1.6;
  font-size: 1.04rem;
}

.pill {
  display: inline-block;
  margin-top: 14px;
  background: #eef6ff;
  color: var(--dark-blue);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
}

.tip-box {
  margin-top: 18px;
  background: #fff4e8;
  border-left: 6px solid var(--orange);
  border-radius: 18px;
  padding: 16px 18px;
  line-height: 1.55;
}

.score-box {
  margin-top: 18px;
  background: #f4fbff;
  border-left: 6px solid var(--blue);
  border-radius: 18px;
  padding: 16px 18px;
}

.final-score-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.score-row {
  background: white;
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.score-row strong {
  color: var(--dark-blue);
}

.score-row span {
  font-weight: 700;
  color: var(--blue);
}

.result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.primary-btn,
.secondary-btn {
  border: none;
  border-radius: 16px;
  padding: 14px 18px;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 700;
}

.primary-btn {
  background: var(--orange);
  color: white;
}

.secondary-btn {
  background: var(--green);
  color: white;
}

.all-pals-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.pal-mini-card {
  background: #fff9f1;
  border-radius: 22px;
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: center;
}

.pal-mini-card img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  flex-shrink: 0;
}

.pal-mini-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--dark-blue);
  font-family: var(--font-heading);
  font-weight: 700;
}

.pal-mini-card span {
  font-size: 0.92rem;
  line-height: 1.45;
  color: #44607b;
}

@media (max-width: 720px) {
  .app {
    padding: 18px;
  }

  .options,
  .all-pals-grid,
  .result-main {
    grid-template-columns: 1fr;
  }

  .result-figure {
    max-width: 220px;
    margin: 0 auto;
  }
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.quiz-back-btn {
  border: none;
  background: #f5f5f5;
  color: #0b4a7d;
  padding: 18px 28px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  font-size: 18px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.quiz-back-btn:hover {
  transform: translateY(-1px);
}

.hidden {
  display: none;
}