/* =========================================================
   🎨 COLORS — change the whole look of the site here
   ========================================================= */
:root {
  --bg-top: #fff0f6;        /* page background (top)        */
  --bg-bottom: #f3e8ff;     /* page background (bottom)     */
  --glow-1: #ffc8dd;        /* glowing blob: pink           */
  --glow-2: #cdb4db;        /* glowing blob: lavender       */
  --glow-3: #bde0fe;        /* glowing blob: baby blue      */

  --primary: #f472b6;       /* main pink (buttons, accents) */
  --primary-dark: #db2777;  /* hover / strong accent        */
  --accent: #a78bfa;        /* lavender accent              */

  --text: #4a3a4f;          /* main text color              */
  --text-soft: #7d6b84;     /* secondary text               */
  --card: rgba(255, 255, 255, 0.72); /* card background     */
  --card-border: rgba(244, 114, 182, 0.22);
  --input-bg: #fffafc;

  --radius: 22px;
  --shadow: 0 10px 30px rgba(219, 39, 119, 0.12);

  /* 🔤 FONTS — system fonts, no download needed */
  --font-title: "Georgia", "Palatino Linotype", serif;
  --font-body: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

/* =========================================================
   BASE
   ========================================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.6;
  background: linear-gradient(160deg, var(--bg-top), var(--bg-bottom));
  background-attachment: fixed;
  overflow-x: hidden;
}

.container {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 16px 32px;
}

/* =========================================================
   GLOWING BACKGROUND + FLOATING HEARTS
   ========================================================= */
.bg-glow { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }

.blob {
  position: absolute;
  width: 420px; height: 420px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: drift 18s ease-in-out infinite alternate;
}
.blob-1 { background: var(--glow-1); top: -120px; left: -100px; }
.blob-2 { background: var(--glow-2); bottom: -140px; right: -120px; animation-delay: -6s; }
.blob-3 { background: var(--glow-3); top: 40%; left: 55%; width: 300px; height: 300px; animation-delay: -12s; }

@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, 40px) scale(1.15); }
}

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

.floating-heart {
  position: absolute;
  bottom: -40px;
  opacity: 0;
  animation: floatUp linear forwards;
  user-select: none;
}

@keyframes floatUp {
  0%   { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.75; }
  100% { transform: translateY(-110vh) translateX(var(--sway, 30px)) rotate(25deg); opacity: 0; }
}

/* =========================================================
   HEADER
   ========================================================= */
.hero { text-align: center; margin-bottom: 28px; animation: fadeUp 0.9s ease both; }

.hero-heart {
  font-size: 3rem;
  display: inline-block;
  animation: heartbeat 1.8s ease-in-out infinite;
  filter: drop-shadow(0 6px 14px rgba(244, 114, 182, 0.45));
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15%      { transform: scale(1.15); }
  30%      { transform: scale(1); }
  45%      { transform: scale(1.1); }
}

h1 {
  font-family: var(--font-title);
  font-size: clamp(1.7rem, 6vw, 2.6rem);
  line-height: 1.25;
  margin: 10px 0 14px;
  color: var(--text);
}

h1 .name {
  background: linear-gradient(90deg, var(--primary-dark), var(--accent), var(--primary));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 5s linear infinite;
}

@keyframes shimmer { to { background-position: 200% center; } }

.intro { color: var(--text-soft); max-width: 520px; margin: 0 auto 14px; }

.note {
  display: inline-block;
  background: var(--card);
  border: 1px solid var(--card-border);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.95rem;
  box-shadow: var(--shadow);
}

/* =========================================================
   CARDS & PROGRESS
   ========================================================= */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 22px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.question { opacity: 0; transform: translateY(18px); }
.question.visible { opacity: 1; transform: none; transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s, border-color 0.3s; }
.question:focus-within { border-color: var(--primary); box-shadow: 0 12px 34px rgba(244, 114, 182, 0.25); }
.question.answered { border-color: rgba(167, 139, 250, 0.5); }

.progress-card {
  position: sticky;
  top: 10px;
  z-index: 5;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 10px 18px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.progress-top { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text-soft); margin-bottom: 6px; }

.progress-bar { height: 8px; background: rgba(244, 114, 182, 0.15); border-radius: 999px; overflow: hidden; }

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.5s cubic-bezier(.4, 1.4, .6, 1);
}

/* =========================================================
   FORM FIELDS
   ========================================================= */
label { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; margin-bottom: 12px; }

.num {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  font-size: 0.85rem;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--input-bg);
  border: 1.5px solid rgba(205, 180, 219, 0.6);
  border-radius: 14px;
  padding: 12px 14px;
  resize: vertical;
  min-height: 70px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
textarea::placeholder { color: #b9a8bf; }
textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(244, 114, 182, 0.15); }

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

.feeling {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font: inherit; font-size: 0.9rem;
  color: var(--text);
  background: var(--input-bg);
  border: 1.5px solid rgba(205, 180, 219, 0.6);
  border-radius: 16px;
  padding: 10px 6px;
  cursor: pointer;
  transition: transform 0.2s, background 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.feeling span { font-size: 1.6rem; transition: transform 0.25s; }
.feeling:hover { transform: translateY(-2px); border-color: var(--primary); }
.feeling:hover span { transform: scale(1.15); }
.feeling:focus-visible { outline: 3px solid rgba(244, 114, 182, 0.4); outline-offset: 2px; }
.feeling.selected {
  background: linear-gradient(135deg, #ffe4f1, #efe3ff);
  border-color: var(--primary);
  box-shadow: 0 6px 16px rgba(244, 114, 182, 0.25);
}
.feeling.selected span { animation: pop 0.35s ease; }

@keyframes pop { 50% { transform: scale(1.35); } }

/* =========================================================
   BUTTONS
   ========================================================= */
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 10px; }

.btn {
  font: inherit; font-weight: 600;
  border: none;
  border-radius: 999px;
  padding: 13px 26px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.25s, background 0.25s;
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 3px solid rgba(167, 139, 250, 0.5); outline-offset: 3px; }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 8px 22px rgba(244, 114, 182, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(244, 114, 182, 0.45); }

.btn-soft { color: var(--primary-dark); background: #ffe4f1; }
.btn-soft:hover { background: #ffd6ea; }

.btn-ghost { color: var(--text-soft); background: transparent; border: 1.5px solid rgba(205, 180, 219, 0.8); }
.btn-ghost:hover { color: var(--primary-dark); border-color: var(--primary); }

.privacy { text-align: center; font-size: 0.88rem; color: var(--text-soft); margin: 6px 0 4px; }
.save-status { text-align: center; font-size: 0.82rem; color: var(--accent); min-height: 1.3em; margin-bottom: 8px; transition: opacity 0.4s; }

/* =========================================================
   SCREENS & THANK-YOU
   ========================================================= */
.screen { display: none; }
.screen.active { display: block; animation: fadeUp 0.7s ease both; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

.thank-card { text-align: center; padding: 36px 22px; }
.thank-card h2 { font-family: var(--font-title); font-size: 1.9rem; margin: 10px 0 12px; }
.thank-card p { color: var(--text-soft); max-width: 480px; margin: 0 auto 12px; }
.thank-card .wish { color: var(--primary-dark); font-weight: 600; font-size: 1.1rem; margin-bottom: 22px; }
.love-note { margin: 0 auto 24px; max-width: 480px; padding: 18px 16px; border-radius: 18px; background: rgba(255, 182, 203, 0.18); border: 1px dashed var(--primary-dark); }
.thank-card .love-note .love-big { font-family: var(--font-title); font-size: 1.4rem; color: var(--primary-dark); margin-bottom: 6px; }
.thank-card .love-note .naughty { font-style: italic; margin: 12px auto 0; }

.big-heart { font-size: 4rem; animation: heartbeat 1.6s ease-in-out infinite; }

.footer { text-align: center; color: var(--text-soft); font-size: 0.85rem; margin-top: 26px; }

/* =========================================================
   MOBILE
   ========================================================= */
@media (max-width: 520px) {
  .container { padding-top: 32px; }
  .card { padding: 18px 14px; }
  .feelings { gap: 8px; }
  .feeling { font-size: 0.82rem; padding: 8px 4px; }
  .actions .btn { width: 100%; }
  .blob { width: 280px; height: 280px; }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .question { opacity: 1; transform: none; }
  .hearts { display: none; }
}
