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

@view-transition {
  navigation: auto;
}

:root {
  --bg-1: #ffe1ec;
  --bg-2: #ffb8d2;
  --bg-3: #d9b8f5;
  --card-bg: rgba(255, 255, 255, 0.82);
  --heading: #7d1f3a;
  --heading-2: #b23763;
  --text-muted: #9a6b78;
  --yes-pink-1: #ff86ac;
  --yes-pink-2: #ee5586;
  --no-purple-1: #c9b1f5;
  --no-purple-2: #a98ee0;
  --accent-border: #ee5586;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2) 45%, var(--bg-3));
  background-size: 240% 240%;
  animation: gradientShift 16s ease infinite;
  overflow-x: hidden;
  padding: 32px 20px;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

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

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  pointer-events: none;
  animation: blobFloat 18s ease-in-out infinite alternate;
}

body::before {
  width: 320px;
  height: 320px;
  background: #ff9fc7;
  top: -90px;
  left: -90px;
}

body::after {
  width: 380px;
  height: 380px;
  background: #b79bef;
  bottom: -110px;
  right: -110px;
  animation-delay: -9s;
}

@keyframes blobFloat {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, 40px) scale(1.18); }
}

.particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  bottom: -40px;
  animation: floatUp linear forwards;
}

@keyframes floatUp {
  to {
    transform: translateY(-115vh) rotate(15deg);
    opacity: 0;
  }
}

.tap-burst {
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 50;
  font-size: 18px;
  animation: tapBurst 0.7s var(--ease) forwards;
}

@keyframes tapBurst {
  to {
    transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.5) rotate(var(--tr));
    opacity: 0;
  }
}

.card {
  position: relative;
  z-index: 1;
  background: var(--card-bg);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 32px;
  padding: 44px 36px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow:
    0 30px 70px -20px rgba(125, 31, 58, 0.35),
    0 2px 8px rgba(125, 31, 58, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  animation: pop-in 0.5s var(--ease);
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(0.92) translateY(14px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  margin: 0 auto 22px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3d6de;
  font-size: 44px;
  box-shadow: 0 12px 26px -8px rgba(125, 31, 58, 0.3);
  transition: transform 0.35s var(--ease);
}

.avatar:hover {
  transform: scale(1.06) rotate(-2deg);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar.no-photo img {
  display: none;
}

.avatar span {
  display: none;
}

.avatar.no-photo span {
  display: block;
}

h1 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 27px;
  color: var(--heading);
  margin: 0 0 8px;
  line-height: 1.35;
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
  h1 {
    background: linear-gradient(135deg, var(--heading), var(--heading-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.ps-text {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.5;
  margin: 14px 0 20px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 24px;
}

.hearts-row {
  font-size: 16px;
  letter-spacing: 8px;
  margin-bottom: 22px;
  color: var(--yes-pink-2);
  animation: heartPulse 1.8s ease-in-out infinite;
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

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

.btn {
  border: none;
  border-radius: 999px;
  padding: 15px 32px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.2px;
  font-family: inherit;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), filter 0.25s var(--ease);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  -webkit-tap-highlight-color: transparent;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 60%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.btn:hover::after {
  opacity: 1;
}

.btn:hover {
  transform: translateY(-3px) scale(1.04);
}

.btn:active {
  transform: translateY(0) scale(0.96);
  transition-duration: 0.12s;
}

.btn-yes {
  background: linear-gradient(135deg, var(--yes-pink-1), var(--yes-pink-2));
  color: #fff;
  box-shadow: 0 12px 28px -6px rgba(238, 85, 134, 0.55);
}

.btn-yes:hover {
  box-shadow: 0 18px 36px -8px rgba(238, 85, 134, 0.6);
}

.btn-no {
  background: linear-gradient(135deg, var(--no-purple-1), var(--no-purple-2));
  color: #fff;
  box-shadow: 0 10px 22px -6px rgba(169, 142, 224, 0.55);
}

#noBtn {
  transition: left 0.3s var(--ease), top 0.3s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease), filter 0.25s var(--ease);
}

.btn-block {
  display: flex;
  width: 100%;
  margin-top: 4px;
}

.btn[disabled],
.btn.btn-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  transform: none !important;
  box-shadow: none;
}

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

.food-option {
  background: rgba(247, 238, 240, 0.85);
  border: 2px solid transparent;
  border-radius: 18px;
  padding: 18px 8px 14px;
  cursor: pointer;
  font-family: inherit;
  position: relative;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.food-option:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 12px 22px -10px rgba(125, 31, 58, 0.3);
}

.food-option:active {
  transform: translateY(-1px) scale(0.98);
}

.food-option.selected {
  border-color: var(--accent-border);
  background: #fdeaf0;
  box-shadow: 0 10px 22px -8px rgba(238, 85, 134, 0.4);
}

.food-option.selected::after {
  content: "✓";
  position: absolute;
  top: 6px;
  right: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-border);
  color: #fff;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pop-in 0.25s var(--ease);
}

.food-emoji {
  font-size: 30px;
  display: block;
  margin-bottom: 8px;
  transition: transform 0.3s var(--ease);
}

.food-option:hover .food-emoji {
  transform: scale(1.15) rotate(-6deg);
}

.food-label {
  font-size: 13px;
  color: #5a3a42;
  font-weight: 500;
}

/* date/time form */
.field {
  text-align: left;
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 6px;
}

.field input,
.field select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  -webkit-min-logical-width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1.5px solid #ecc9d3;
  font-size: 16px;
  font-family: inherit;
  color: #5a3a42;
  background: #fff;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent-border);
  box-shadow: 0 0 0 4px rgba(238, 85, 134, 0.15);
}

.icon-row {
  font-size: 30px;
  margin-bottom: 6px;
}

.summary {
  background: rgba(247, 238, 240, 0.85);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 14px;
  color: #5a3a42;
  margin-bottom: 22px;
  text-align: left;
}

.summary strong {
  color: var(--heading);
}

@media (max-width: 420px) {
  .card {
    padding: 34px 22px;
  }
  h1 {
    font-size: 22px;
  }
  .food-grid {
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
