@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=Dancing+Script:wght@400;600;700&family=Crimson+Text:ital,wght@0,400;0,600;1,400&display=swap");

:root {
  color-scheme: light;
  --bg: linear-gradient(135deg, #ffeef8 0%, #ffe8f0 50%, #fff0f5 100%);
  --card: rgba(255, 255, 255, 0.95);
  --primary: #d4145a;
  --primary-dark: #a01045;
  --secondary: #ffd4e5;
  --accent: #8b2e5f;
  --gold: #d4af37;
  --text: #3d1e2d;
  --shadow: 0 15px 50px rgba(212, 20, 90, 0.25), 0 5px 15px rgba(139, 46, 95, 0.15);
  --glow: 0 0 30px rgba(212, 175, 55, 0.3);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Crimson Text", Georgia, serif;
  background: #ffeef8;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(255, 182, 193, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(221, 160, 221, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(255, 240, 245, 0.4) 0%, transparent 50%);
  color: var(--text);
  display: grid;
  place-items: center;
  padding: 40px 20px;
  overflow-x: hidden;
  line-height: 1.8;
  position: relative;
}

.corner-logo {
  position: fixed;
  top: 18px;
  left: 18px;
  width: 160px;
  max-width: 38vw;
  z-index: 3;
  pointer-events: none;
}

.app {
  width: min(720px, 92vw);
  position: relative;
}

.app.is-hidden {
  display: none;
}

.builder {
  width: min(980px, 96vw);
  background: var(--card);
  border: 3px solid var(--gold);
  border-radius: 30px;
  padding: 50px;
  box-shadow: var(--shadow), var(--glow);
  backdrop-filter: blur(20px);
  animation: floatIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.builder::before {
  content: '♥';
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  color: var(--primary);
  background: white;
  padding: 0 20px;
}

.builder:not(.is-active) {
  display: none;
}

.landing {
  width: min(840px, 94vw);
  background: var(--card);
  border: 4px double var(--gold);
  border-radius: 35px;
  padding: 70px 50px;
  box-shadow: var(--shadow), var(--glow);
  backdrop-filter: blur(20px);
  text-align: center;
  display: grid;
  gap: 35px;
  position: relative;
}

.landing::after {
  content: '❤';
  position: absolute;
  bottom: -20px;
  right: 30px;
  font-size: 2.5rem;
  opacity: 0.6;
  animation: heartbeat 2s ease-in-out infinite;
}

.landing__content {
  display: grid;
  gap: 18px;
  justify-items: center;
}

.landing__badge {
  display: inline-flex;
  align-items: center;
  padding: 12px 30px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: 50px;
  box-shadow: 0 8px 20px rgba(212, 20, 90, 0.4);
  font-family: "Playfair Display", serif;
}

.share-panel {
  margin-top: 35px;
  display: grid;
  gap: 20px;
  background: linear-gradient(135deg, #fff0f5 0%, #ffe8f0 100%);
  border: 3px solid var(--gold);
  border-radius: 25px;
  padding: 35px;
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2);
}

.share-panel[hidden] {
  display: none;
}

.share-panel__row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.share-panel__row input {
  flex: 1 1 260px;
}

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

.builder form {
  display: grid;
  gap: 20px;
}

fieldset {
  border: 2px solid var(--secondary);
  border-radius: 20px;
  padding: 30px;
  display: grid;
  gap: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 240, 245, 0.5) 100%);
}

legend {
  padding: 8px 20px;
  font-weight: 700;
  color: var(--primary);
  font-size: 1.1rem;
  font-family: "Playfair Display", serif;
  font-style: italic;
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(212, 20, 90, 0.15);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  align-items: end;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
  color: var(--accent);
  font-family: "Playfair Display", serif;
}

.toggle {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
}

input,
textarea {
  font: inherit;
  padding: 14px 20px;
  border: 2px solid var(--secondary);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
  font-family: "Crimson Text", serif;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 5px 20px rgba(212, 20, 90, 0.15);
  transform: translateY(-2px);
}

textarea {
  resize: vertical;
}

.preview {
  display: grid;
  gap: 15px;
  background: linear-gradient(135deg, #fff0f5 0%, #ffe8f0 100%);
  padding: 25px;
  border: 2px solid var(--secondary);
  border-radius: 20px;
  box-shadow: inset 0 2px 10px rgba(212, 20, 90, 0.05);
}

.preview__title {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: "Playfair Display", serif;
}

.preview__card {
  display: grid;
  gap: 16px;
  background: white;
  padding: 25px;
  border: 2px solid var(--secondary);
  border-radius: 18px;
  box-shadow: 0 5px 15px rgba(212, 20, 90, 0.1);
}

.preview__card h3 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--primary);
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-style: italic;
}

.preview__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  padding: 10px 24px;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 25px;
  box-shadow: 0 5px 15px rgba(212, 20, 90, 0.25);
  font-family: "Playfair Display", serif;
}

.preview__btn--ghost {
  background: rgba(255, 255, 255, 0.8);
  color: var(--primary);
  border: 2px solid var(--primary);
}

.preview__row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.preview__badge {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  padding: 6px 18px;
  font-weight: 600;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(212, 20, 90, 0.25);
}

.preview__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
}

.preview__chip {
  background: linear-gradient(135deg, white 0%, #fff5f9 100%);
  border: 2px solid var(--secondary);
  border-radius: 12px;
  padding: 10px 14px;
  text-align: center;
  font-weight: 600;
  transition: all 0.3s ease;
}

.preview__list {
  display: grid;
  gap: 8px;
}

.preview__item {
  background: linear-gradient(135deg, white 0%, #fff5f9 100%);
  border: 2px solid var(--secondary);
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 600;
}

.preview__hint {
  color: var(--accent);
  font-weight: 600;
  font-size: 1rem;
  font-family: "Playfair Display", serif;
  font-style: italic;
}

.card {
  display: none;
  background: var(--card);
  border: 4px double var(--gold);
  border-radius: 35px;
  padding: 60px 45px;
  box-shadow: var(--shadow), var(--glow);
  backdrop-filter: blur(20px);
  animation: floatIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.card::before {
  content: '✦';
  position: absolute;
  top: 20px;
  left: 30px;
  font-size: 1.5rem;
  color: var(--gold);
  opacity: 0.5;
}

.card::after {
  content: '✦';
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 1.5rem;
  color: var(--gold);
  opacity: 0.5;
}

.card.is-active {
  display: block;
}

.card.is-disabled {
  display: none;
}

.card__content {
  display: grid;
  gap: 20px;
  text-align: center;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: clamp(3rem, 6vw, 5rem);
  font-family: "Dancing Script", cursive;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-shadow: 2px 2px 8px rgba(212, 20, 90, 0.2);
  position: relative;
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-family: "Playfair Display", serif;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.4;
  font-style: italic;
  position: relative;
}

p {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text);
  font-family: "Crimson Text", serif;
}

.big-question {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  font-family: "Playfair Display", serif;
  color: var(--primary);
  line-height: 1.5;
  font-style: italic;
  text-shadow: 1px 1px 5px rgba(212, 20, 90, 0.1);
}

.btn {
  border: none;
  border-radius: 50px;
  padding: 16px 40px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  font-family: "Playfair Display", serif;
  letter-spacing: 0.05em;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 15px 35px rgba(212, 20, 90, 0.3);
}

.btn:active {
  transform: translateY(-2px) scale(1.02);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  box-shadow: 0 10px 25px rgba(212, 20, 90, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 15px 40px rgba(212, 20, 90, 0.5);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary) 0%, #ffb6d9 100%);
  color: var(--accent);
  box-shadow: 0 8px 20px rgba(255, 182, 217, 0.4);
}

.btn-secondary:hover {
  box-shadow: 0 12px 30px rgba(255, 182, 217, 0.6);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.7);
  color: var(--primary);
  border: 2px solid var(--primary);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--accent);
  color: var(--accent);
}

.row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.row-center {
  justify-content: center;
  position: relative;
  min-height: 72px;
}

.badge {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  padding: 10px 24px;
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  border-radius: 25px;
  box-shadow: 0 8px 20px rgba(212, 20, 90, 0.3);
  font-family: "Playfair Display", serif;
}

.progress {
  background: linear-gradient(to right, #ffd4e5, #ffb6d9);
  height: 20px;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
}

.progress::before {
  content: '♥ ♥ ♥';
  position: absolute;
  width: 100%;
  text-align: center;
  font-size: 0.7rem;
  color: rgba(212, 20, 90, 0.3);
  line-height: 20px;
}

.progress__bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 50%, var(--gold) 100%);
  transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 15px rgba(212, 20, 90, 0.5);
  position: relative;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 14px;
}

.mini-card {
  border: 3px solid var(--secondary);
  border-radius: 20px;
  padding: 24px 18px;
  background: linear-gradient(135deg, white 0%, #fff5f9 100%);
  cursor: pointer;
  font-weight: 600;
  font-family: "Playfair Display", serif;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 5px 15px rgba(212, 20, 90, 0.1);
}

.mini-card:hover {
  border-color: var(--primary);
  background: linear-gradient(135deg, #fff5f9 0%, var(--secondary) 100%);
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 15px 30px rgba(212, 20, 90, 0.25);
}

.reveal {
  font-weight: 600;
  color: var(--primary);
  min-height: 32px;
  letter-spacing: 0.03em;
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 1.15rem;
  text-shadow: 1px 1px 3px rgba(212, 20, 90, 0.1);
}

.quiz {
  display: grid;
  gap: 10px;
  text-align: left;
  padding: 0 12px;
}

.quiz__option {
  display: flex;
  gap: 15px;
  align-items: center;
  background: linear-gradient(135deg, white 0%, #fff5f9 100%);
  padding: 18px 20px;
  border: 2px solid var(--secondary);
  border-radius: 15px;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(212, 20, 90, 0.08);
}

.quiz__option:hover {
  border-color: var(--primary);
  background: linear-gradient(135deg, #fff5f9 0%, var(--secondary) 100%);
  transform: translateX(8px);
  box-shadow: 0 5px 20px rgba(212, 20, 90, 0.2);
}

.emoji-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.emoji-btn {
  font-size: 1.2rem;
}

.range-box {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.range-label {
  font-weight: 600;
  color: var(--accent);
  font-size: 1rem;
  font-family: "Playfair Display", serif;
  font-style: italic;
}

.range-value {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  padding: 8px 20px;
  font-weight: 700;
  font-size: 1.3rem;
  border-radius: 25px;
  box-shadow: 0 5px 15px rgba(212, 20, 90, 0.3);
  font-family: "Playfair Display", serif;
}

input[type="range"] {
  width: min(360px, 80vw);
  height: 10px;
  accent-color: var(--primary);
  cursor: pointer;
}

.select-box select {
  font: inherit;
  padding: 14px 20px;
  border: 2px solid var(--secondary);
  border-radius: 15px;
  background: white;
  min-width: 220px;
  font-family: "Crimson Text", serif;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.select-box select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 5px 20px rgba(212, 20, 90, 0.15);
}

.hearts {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'><path d='M50 85c-1.5 0-3-.6-4.2-1.7L25 62.5C18.8 56.3 18.8 46.2 25 40c6.2-6.2 16.3-6.2 22.5 0l2.5 2.5 2.5-2.5c6.2-6.2 16.3-6.2 22.5 0 6.2 6.2 6.2 16.3 0 22.5L54.2 83.3c-1.2 1.1-2.7 1.7-4.2 1.7z' fill='%23ffb6d9' fill-opacity='0.3'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='150' height='150' viewBox='0 0 150 150'><path d='M75 125c-2 0-4-0.8-5.5-2.2L40 93.5C31 84.5 31 69.8 40 60.8c9-9 23.7-9 32.7 0l2.3 2.3 2.3-2.3c9-9 23.7-9 32.7 0 9 9 9 23.7 0 32.7L80.5 122.8c-1.5 1.4-3.5 2.2-5.5 2.2z' fill='%23ffd4e5' fill-opacity='0.25'/></svg>");
  background-size: 120px, 180px;
  background-position: 0 0, 60px 60px;
  opacity: 0.6;
  animation: floatHearts 30s ease-in-out infinite;
}

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


#yesMessage {
  opacity: 0;
  transition: opacity 0.3s ease;
}

#yesMessage.is-visible {
  opacity: 1;
}

@keyframes floatIn {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.9);
  }
  60% {
    opacity: 1;
    transform: translateY(-10px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes heartbeat {
  0%, 100% {
    transform: scale(1);
  }
  10%, 30% {
    transform: scale(1.1);
  }
  20%, 40% {
    transform: scale(0.9);
  }
}


@media (max-width: 520px) {
  .card {
    padding: 24px;
  }

  .builder {
    padding: 24px;
  }

  .btn {
    width: 100%;
  }
}
