:root {
  --primary: #d63384;
  --primary-dark: #b82c6f;
  --primary-light: #f8b6d2;
  --background: #fff8fb;
  --card: #ffffff;
  --text: #2d2d2d;
  --muted: #777;
  --border: #f0d8e4;
}

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

body {
  font-family: "Georgia", "Playfair Display", serif;
  background: radial-gradient(circle at top, #fff0f7 0%, #ffffff 55%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  overflow-x: hidden;
  padding: 24px 16px;
}

/* Floating hearts background */
.floating-hearts {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-heart {
  position: fixed;
  top: -20px;
  font-size: 18px;
  animation: fall linear infinite;
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}

@keyframes fall {
  from {
    transform: translateY(-20px) rotate(0deg);
  }
  to {
    transform: translateY(110vh) rotate(360deg);
  }
}

/* Progress bar */
.progress-hearts {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 100;
  font-size: 14px;
  letter-spacing: 2px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.progress-hearts.visible {
  opacity: 1;
}

.progress-hearts .heart {
  transition: transform 0.3s ease;
}

.progress-hearts .heart.filled {
  transform: scale(1.15);
}

.progress-hearts .dash {
  color: var(--primary-light);
  font-size: 10px;
}

/* Main card */
.card {
  max-width: 520px;
  width: 90%;
  min-width: 0;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 28px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(214, 51, 132, 0.12);
  text-align: center;
  position: relative;
  z-index: 10;
  backdrop-filter: blur(8px);
  overflow: hidden;
}

@media (max-width: 480px) {
  .card {
    padding: 28px 22px;
    border-radius: 22px;
  }
}

/* Steps */
.step {
  display: none;
  min-width: 0;
}

.step.active {
  display: block;
  animation: fadeInUp 0.45s ease both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Typography */
.step-icon {
  font-size: 52px;
  line-height: 1;
  margin-bottom: 16px;
  display: block;
}

.step-title {
  font-size: clamp(1.5rem, 5vw, 1.85rem);
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.3;
  margin-bottom: 12px;
}

.step-subtitle {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 28px;
  line-height: 1.5;
}

.step-text {
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 28px;
}

.step-text.small {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 20px;
  margin-bottom: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 14px 32px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-yes {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 28px rgba(214, 51, 132, 0.35);
  font-size: 1.1rem;
  padding: 16px 40px;
  margin-bottom: 14px;
  width: 100%;
  max-width: 220px;
}

.btn-yes:hover {
  background: var(--primary-dark);
  box-shadow: 0 12px 32px rgba(214, 51, 132, 0.4);
  transform: translateY(-2px);
}

.btn-no {
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 8px 20px;
  border: 1px solid var(--border);
  touch-action: none;
}

.btn-no:hover {
  background: #fafafa;
}

.btn-no.escaped {
  position: fixed;
  z-index: 200;
  margin: 0;
  transform-origin: center center;
  will-change: left, top;
  transition:
    left 0.45s cubic-bezier(0.34, 1.2, 0.64, 1),
    top 0.45s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.btn-no.escaped.no-transition {
  transition: none !important;
}

.btn-no.escaped:active {
  transform: none;
}

.btn-no.escaped.bouncing {
  animation: noBtnBounce 0.45s ease;
}

@keyframes noBtnBounce {
  0% {
    transform: scale(1) rotate(0deg);
  }
  35% {
    transform: scale(0.94) rotate(-3deg);
  }
  70% {
    transform: scale(1.03) rotate(2deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 28px rgba(214, 51, 132, 0.3);
  width: 100%;
  margin-top: 8px;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-copy {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 28px rgba(214, 51, 132, 0.3);
  width: 100%;
  margin-top: 24px;
}

.btn-copy:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-copy.copied {
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* Intro buttons layout */
.intro-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  position: relative;
}

.no-placeholder {
  display: block;
  visibility: hidden;
  pointer-events: none;
  flex-shrink: 0;
}

/* Form */
.form-group {
  text-align: left;
  margin-bottom: 20px;
  width: 100%;
  min-width: 0;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.input-wrap {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrap:focus-within {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(248, 182, 210, 0.4);
}

input[type="date"],
.input-wrap select {
  display: block;
  flex: 1;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: none;
  border-radius: 0;
  padding: 14px 8px 14px 16px;
  font-size: 16px;
  background: transparent;
  font-family: inherit;
  color: var(--text);
  outline: none;
}

.input-wrap select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23d63384' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.input-wrap select:invalid,
.input-wrap select option[value=""] {
  color: var(--muted);
}

input[type="date"]::-webkit-date-and-time-value {
  text-align: left;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  display: block;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin: 0 10px 0 4px;
  padding: 0;
  opacity: 1;
  cursor: pointer;
  background: transparent;
}

.error-msg {
  color: var(--primary);
  font-size: 0.85rem;
  margin-top: 12px;
  min-height: 20px;
}

/* Food grid */
.food-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}

@media (min-width: 400px) {
  .food-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.food-option {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 16px 8px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  user-select: none;
}

.food-option:hover {
  border-color: var(--primary-light);
  background: #fffafc;
}

.food-option.selected {
  border-color: var(--primary);
  background: #fff0f7;
  box-shadow: 0 8px 24px rgba(214, 51, 132, 0.15);
  transform: scale(1.04);
}

.food-option .emoji {
  font-size: 28px;
  display: block;
  margin-bottom: 6px;
}

.food-option .label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.food-option.selected .label {
  color: var(--primary-dark);
}

/* Final summary ticket */
.date-ticket {
  background: linear-gradient(135deg, #fff0f7 0%, #ffffff 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  margin-top: 20px;
  text-align: left;
}

.ticket-row {
  margin-bottom: 16px;
}

.ticket-row:last-child {
  margin-bottom: 0;
}

.ticket-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.ticket-value {
  font-size: 1rem;
  color: var(--text);
  font-weight: 600;
  white-space: pre-line;
}

/* Reaction step special text */
.reaction-text {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 28px;
}

.reaction-text em {
  display: block;
  font-style: italic;
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 8px;
}
