@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&display=swap');

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Poppins, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(236, 72, 153, .18), transparent 30%),
    radial-gradient(circle at top right, rgba(139, 92, 246, .18), transparent 30%),
    linear-gradient(135deg, #fff7fb, #f1f7ff, #f7f0ff);
  color: #251f38;
}

.page {
  max-width: 1040px;
  margin: auto;
  padding: 28px 16px 70px;
}

.hero {
  text-align: center;
  padding: 24px 0 18px;
}

.logo {
  font-size: 56px;
}

.logo-button {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

h1 {
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.02;
  margin: 14px auto;
  max-width: 850px;
  letter-spacing: -1.5px;
}

.hero p {
  font-size: 19px;
  color: #635875;
  margin: 0 auto 18px;
  max-width: 770px;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.pill {
  display: inline-block;
  padding: 10px 15px;
  border-radius: 999px;
  background: white;
  box-shadow: 0 8px 28px rgba(100, 80, 140, .12);
  color: #7b5be6;
  font-weight: 800;
  font-size: 14px;
}

.card {
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(150,120,220,.15);
  box-shadow: 0 20px 50px rgba(70, 40, 120, .12);
  border-radius: 30px;
  padding: 24px;
  margin: 22px 0;
  backdrop-filter: blur(10px);
}

label {
  display: block;
  margin: 16px 0 8px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  border: 2px solid #eadfff;
  border-radius: 18px;
  padding: 15px 16px;
  font-size: 16px;
  background: #fff;
  outline: none;
  font-family: inherit;
}

input:focus,
select:focus {
  border-color: #a985ff;
  box-shadow: 0 0 0 4px rgba(169,133,255,.15);
}

button {
  border: 0;
  border-radius: 18px;
  padding: 14px 18px;
  font-weight: 900;
  font-size: 16px;
  cursor: pointer;
  font-family: inherit;
}

.primary {
  width: 100%;
  margin-top: 22px;
  color: white;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  box-shadow: 0 16px 35px rgba(236,72,153,.28);
}

.primary:disabled {
  opacity: .72;
  cursor: not-allowed;
}

.ghost {
  margin-top: 12px;
  background: #f6edff;
  color: #7c3aed;
}

.wide {
  width: 100%;
}

.hidden {
  display: none !important;
}

.advanced {
  padding: 12px;
  margin-top: 16px;
  border-radius: 22px;
  background: linear-gradient(135deg, #fbf5ff, #fff4fa);
}

.progress {
  text-align: center;
}

.giftbox {
  font-size: 72px;
  animation: unwrap 1.1s infinite ease-in-out;
}

@keyframes unwrap {
  0%, 100% {
    transform: scale(1) rotate(-3deg);
  }
  50% {
    transform: scale(1.15) rotate(3deg);
  }
}

.bar {
  height: 14px;
  background: #efe7ff;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 20px;
}

.bar span {
  display: block;
  height: 100%;
  width: 10%;
  background: linear-gradient(90deg, #8b5cf6, #ec4899, #60a5fa);
  border-radius: 999px;
  transition: width .4s ease;
}

.dna-card {
  border: 2px solid rgba(139, 92, 246, .18);
  background:
    radial-gradient(circle at top right, rgba(236,72,153,.12), transparent 30%),
    rgba(255,255,255,.94);
}

.dna-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.dna-title h2 {
  margin: 0;
}

.dna-confidence {
  padding: 9px 13px;
  border-radius: 999px;
  background: #f1e8ff;
  color: #6d28d9;
  font-weight: 900;
}

.dna-summary {
  font-size: 18px;
  color: #4d425f;
  line-height: 1.65;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 10px;
}

.tag {
  padding: 10px 13px;
  background: #fff;
  border-radius: 999px;
  border: 1px solid #eadfff;
  font-weight: 800;
}

.results {
  display: grid;
  gap: 20px;
}

.gift-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 22px;
  background: white;
  border-radius: 30px;
  padding: 19px;
  box-shadow: 0 18px 45px rgba(70, 40, 120, .13);
  border: 1px solid #f1e8ff;
}

.gift-card.hero-pick {
  border: 3px solid #f6c453;
  background:
    linear-gradient(135deg, rgba(255,248,220,.9), white 45%);
}

.gift-card img {
  width: 100%;
  height: 190px;
  object-fit: contain;
  background: #fafafa;
  border-radius: 22px;
}

.angle {
  display: inline-block;
  background: #f3e8ff;
  color: #6d28d9;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 900;
  margin-bottom: 10px;
}

.hero-pick .angle {
  background: #fff3c4;
  color: #7a5200;
}

.gift-card h2 {
  margin: 6px 0 10px;
  line-height: 1.25;
  font-size: 22px;
}

.price {
  font-size: 22px;
  font-weight: 900;
  color: #16a34a;
}

.match {
  font-weight: 900;
  color: #8b5cf6;
}

.clue {
  background: #fbf7ff;
  border-left: 5px solid #a855f7;
  padding: 12px 14px;
  border-radius: 16px;
  margin: 14px 0;
  color: #453952;
}

.gift-card h3 {
  margin: 14px 0 6px;
}

.gift-card p {
  color: #51465f;
  line-height: 1.55;
}

.buy {
  display: inline-block;
  margin-top: 12px;
  background: linear-gradient(135deg, #ff9900, #ff6a00);
  color: white;
  padding: 14px 20px;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 900;
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin: 22px 0;
}

.premium-action {
  background: linear-gradient(135deg, #111827, #7c2d12);
  color: white;
}

.more-action {
  background: #27223a;
  color: white;
}

.secondary-action {
  background: white;
  color: #7c3aed;
  border: 1px solid #eadfff;
}

.disclaimer {
  text-align: center;
  color: #756b86;
  font-size: 13px;
}

.debug-card {
  background: #101010 !important;
  color: #00ff88;
  border: 2px solid #00ff88;
}

.debug-card h2 {
  color: #00ff88;
  margin-top: 0;
}

.debug-card pre {
  white-space: pre-wrap;
  overflow: auto;
  max-height: 650px;
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .gift-card {
    grid-template-columns: 1fr;
  }

  .gift-card img {
    height: 230px;
  }

  .result-actions {
    grid-template-columns: 1fr;
  }
}