:root {
  --purple: #7c3aed;
  --purple-light: #a78bfa;
  --pink: #ec4899;
  --ink: #1f2937;
  --ink-soft: #4b5563;
  --border: #e5e7eb;
  --bg-soft: #f9fafb;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  overflow-x: hidden;
  position: relative;
}

/* =================== Background hidup: blob mengambang pelan =================== */
.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}
.blob-1 {
  width: 420px; height: 420px;
  top: -140px; left: -100px;
  background: radial-gradient(circle, rgba(167,139,250,0.35), transparent 70%);
  animation: floatSlow 16s ease-in-out infinite;
}
.blob-2 {
  width: 480px; height: 480px;
  bottom: -180px; right: -140px;
  background: radial-gradient(circle, rgba(236,72,153,0.22), transparent 70%);
  animation: floatSlow 20s ease-in-out infinite reverse;
}
.blob-3 {
  width: 320px; height: 320px;
  top: 40%; left: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.14), transparent 70%);
  animation: floatSlow 24s ease-in-out infinite;
  animation-delay: -8s;
}

@keyframes floatSlow {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(30px, -24px) scale(1.06); }
  66%  { transform: translate(-20px, 18px) scale(0.96); }
  100% { transform: translate(0, 0) scale(1); }
}

/* =================== Layout: desktop lebar, mobile compact =================== */
main {
  width: 100%;
  max-width: 720px;
  position: relative;
  z-index: 1;
}

.card {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 36px 32px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 12px 32px rgba(124, 58, 237, 0.08);
  animation: cardIn 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.card-inner {
  display: flex;
  flex-direction: column;
}

h1 {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 800;
  background: linear-gradient(120deg, var(--purple), var(--pink), var(--purple));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientShift 4s linear infinite, titleFloat 3s ease-in-out infinite;
  display: flex;
  align-items: center;
  gap: 8px;
}

.title-icon {
  display: inline-block;
  animation: wiggle 3.2s ease-in-out infinite;
  -webkit-text-fill-color: initial;
  filter: none;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

@keyframes titleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg) scale(1); }
  10% { transform: rotate(-10deg) scale(1.08); }
  20% { transform: rotate(8deg) scale(1.05); }
  30% { transform: rotate(0deg) scale(1); }
}

.subtitle {
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-size: 15px;
}

h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
}

.hint {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 13.5px;
}

.select-row {
  display: flex;
  gap: 10px;
}

.select-wrap {
  position: relative;
  flex: 1;
}

select {
  width: 100%;
  appearance: none;
  padding: 12px 38px 12px 15px;
  border-radius: 11px;
  border: 1.5px solid var(--border);
  background: var(--bg-soft);
  font-size: 14.5px;
  font-family: inherit;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

select:hover {
  border-color: var(--purple-light);
  background: #fff;
}

select:focus {
  outline: none;
  border-color: var(--purple);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.14);
}

select:active {
  transform: scale(0.995);
}

.select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--purple);
  border-bottom: 2px solid var(--purple);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
  transition: transform 0.2s ease;
}

.select-wrap:has(select:focus) .select-arrow {
  transform: translateY(-30%) rotate(225deg);
}

.btn-outline {
  padding: 12px 22px;
  border-radius: 11px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s ease, transform 0.15s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-outline:hover {
  background: linear-gradient(135deg, rgba(124,58,237,0.06), rgba(236,72,153,0.06));
  border-color: var(--purple-light);
  color: var(--purple);
}

.btn-outline:hover .reset-icon {
  animation: spinOnce 0.5s ease;
}

@keyframes spinOnce {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

.btn-outline:active {
  transform: scale(0.95);
}

.reset-icon { transition: transform 0.2s ease; }

/* Konten hasil pilih produk: HANYA jadi grid ketika .is-visible (fix lama
   dipertahankan) — sekarang juga desktop-aware: card melebar & 2 kolom
   dapat ruang proporsional, TIDAK sekadar versi mobile yang di-scale. */
.content {
  display: none;
  gap: 24px;
  opacity: 0;
  transform: translateY(6px);
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), margin-top 0.22s ease;
}

.content.is-visible {
  display: grid;
  grid-template-columns: 1fr;
  opacity: 1;
  transform: translateY(0);
  max-height: none;
  overflow: visible;
  margin-top: 26px;
  padding-top: 26px;
  border-top: 1px dashed var(--border);
}

.content-col h4 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--purple-light);
  display: inline-block;
  position: relative;
}

.content-col:nth-child(1) h4::after {
  content: '';
}

.content ul {
  margin: 12px 0 0;
  padding: 0 0 0 18px;
  list-style: none;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.content ul li {
  position: relative;
  padding-left: 4px;
  animation: liIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.content ul li::before {
  content: '';
  position: absolute;
  left: -18px;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--purple-light);
}

.content ul li:nth-child(1) { animation-delay: 0.02s; }
.content ul li:nth-child(2) { animation-delay: 0.04s; }
.content ul li:nth-child(3) { animation-delay: 0.06s; }
.content ul li:nth-child(4) { animation-delay: 0.08s; }
.content ul li:nth-child(5) { animation-delay: 0.10s; }
.content ul li:nth-child(6) { animation-delay: 0.12s; }
.content ul li:nth-child(7) { animation-delay: 0.14s; }
.content ul li:nth-child(8) { animation-delay: 0.16s; }

@keyframes liIn {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}

.content ul li strong {
  color: var(--ink);
  font-weight: 700;
}

.empty-state {
  margin-top: 20px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
  padding: 24px;
  border: 1px dashed var(--border);
  border-radius: 12px;
}

footer {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: var(--ink-soft);
  position: relative;
  z-index: 1;
}

.heart {
  display: inline-block;
  color: var(--pink);
  animation: heartbeat 1.6s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.3); }
  30% { transform: scale(1); }
  45% { transform: scale(1.2); }
  60% { transform: scale(1); }
}

footer a {
  color: var(--purple);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover { color: var(--pink); text-decoration: underline; }

/* =================== Breakpoints =================== */

/* Tablet ke atas: konten 2 kolom berdampingan (bukan cuma di layar sangat lebar) */
@media (min-width: 640px) {
  .content.is-visible {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

/* Desktop: manfaatkan ruang lebar SUNGGUHAN — bukan cuma card kecil yang
   di tengah dengan margin kosong besar kiri-kanan. Card melebar signifikan,
   padding & tipografi naik proporsional, dan konten 2 kolom dapat ruang
   napas jauh lebih lega dibanding versi mobile yang di-scale up. */
@media (min-width: 900px) {
  body { padding: 56px 24px; }

  main { max-width: 1100px; }

  .card {
    padding: 56px 72px;
    border-radius: 28px;
  }

  h1 { font-size: 38px; }
  .subtitle { font-size: 17px; margin-bottom: 34px; }
  h3 { font-size: 20px; }
  .hint { font-size: 14.5px; }

  .select-row { max-width: 640px; }

  select, .btn-outline { font-size: 15.5px; padding-top: 14px; padding-bottom: 14px; }

  .content.is-visible {
    gap: 64px;
    margin-top: 38px;
    padding-top: 38px;
  }

  .content-col h4 { font-size: 17.5px; }
  .content ul { font-size: 15px; line-height: 1.9; }
}

@media (min-width: 1280px) {
  main { max-width: 1280px; }

  .card { padding: 64px 96px; }

  h1 { font-size: 42px; }
  .content.is-visible { gap: 88px; }
}

/* Mobile kecil: rapatkan padding supaya tetap nyaman & tidak sesak,
   TANPA mengecilkan semuanya sampai sulit dibaca/disentuh (tombol &
   dropdown tetap ukuran nyaman minimal 44px tinggi buat tap target). */
@media (max-width: 420px) {
  body { padding: 20px 12px; }

  .card { padding: 26px 20px; border-radius: 18px; }

  h1 { font-size: 22px; }
  .subtitle { font-size: 13.5px; margin-bottom: 20px; }

  .select-row {
    flex-direction: column;
  }

  .btn-outline {
    justify-content: center;
  }

  select, .btn-outline {
    min-height: 46px;
  }

  .content.is-visible {
    gap: 22px;
    margin-top: 20px;
    padding-top: 20px;
  }

  .bg-blob { filter: blur(40px); opacity: 0.4; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .content, .content ul li, .bg-blob, h1, .title-icon, .heart, .reset-icon {
    animation: none !important;
    transition: none !important;
  }
}
