:root {
  --bg-start: #fff0f3;
  --bg-end: #ffe5eb;
  --card-bg: rgba(255, 255, 255, 0.9);
  --card-stroke: rgba(227, 82, 131, 0.12);
  --text-main: #2f1d26;
  --muted: #7a5566;
  --accent: #e35283;
  --accent-2: #ff9fb7;
  --accent-3: #ffcc8f;
  --shadow: 0 18px 48px rgba(65, 14, 40, 0.16);
  --radius: 24px;
  --transition: 240ms ease;
  --font-family: "Tajawal", "Amiri", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-family);
  background: radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.6), transparent 32%),
    radial-gradient(circle at 74% 16%, rgba(255, 214, 243, 0.6), transparent 30%),
    linear-gradient(135deg, var(--bg-start), var(--bg-end));
  color: var(--text-main);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 18px;
}

.color-accent {
  color: var(--accent);
}

.page {
  width: min(560px, 94vw);
  padding: 10px;
}

.card {
  position: relative;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 26px 36px;
  overflow: hidden;
  border: 1px solid var(--card-stroke);
  backdrop-filter: blur(10px);
  isolation: isolate;
}

.card-top{
  margin-bottom: 10px;
}

.corner-heart {
  position: absolute;
  top: 28px;
  left: 28px;
  color: var(--accent-2);
  font-size: 32px;
  text-shadow: 0 8px 18px rgba(255, 59, 109, 0.3);
  animation: pulse-corner 1.8s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(227, 82, 131, 0.12);
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.2px;
  box-shadow: 0 8px 18px rgba(227, 82, 131, 0.12);
}

.intro {
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.1px;
  position: relative;
  z-index: 1;
}

.question-area {
  text-align: center;
  position: relative;
  z-index: 1;
}

.question {
  margin: 0 0 12px;
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.6;
  color: #2b1621;
  letter-spacing: 0.2px;
}

.step {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 15px;
}

.progress {
  margin: 8px auto 18px;
  max-width: 360px;
  text-align: center;
}

.progress-track {
  position: relative;
  width: 100%;
  height: 7px;
  background: rgba(227, 82, 131, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  position: absolute;
  inset: 0;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  border-radius: inherit;
  transition: width 260ms ease;
}

.progress-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(227, 82, 131, 0.22);
  transition: transform var(--transition), background var(--transition);
}

.progress-dot.active {
  background: var(--accent);
  transform: scale(1.15);
  box-shadow: 0 0 0 3px rgba(227, 82, 131, 0.12);
}

.actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  position: relative;
  height: 140px;
  padding: 12px;
  overflow: visible;
}

.btn-wrap {
  width: 90px;
  display: flex;
  justify-content: center;
}

.btn {
  cursor: pointer;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none;
  width: 100%;
}

.btn:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 2px;
}

.btn-yes {
  background: linear-gradient(135deg, var(--accent), #ff5f9e 45%, var(--accent-3));
  color: #fff;
  box-shadow: 0 12px 26px rgba(227, 82, 131, 0.35);
}

.btn-yes:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 14px 30px rgba(227, 82, 131, 0.4);
}

.btn-no {
  background: #fff;
  color: var(--accent);
  border: 2px solid rgba(227, 82, 131, 0.32);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  z-index: 2;
}

.btn-no.flying {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 90px;
  min-width: 90px;
  transform: translate(-50%, -50%) translate3d(var(--nx, 0px), var(--ny, 0px), 0);
}

.btn-no.escape {
  animation: wiggle 420ms ease;
}

.btn-no .tooltip {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translate(-50%, 6px);
  background: #fff0f6;
  color: #d74a7b;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  white-space: nowrap;
}

.btn-no .tooltip.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.final {
  text-align: center;
  position: relative;
  z-index: 1;
}

.final h2 {
  margin: 0 0 10px;
  font-size: clamp(22px, 4vw, 28px);
  color: #2d1220;
}

.final p {
  margin: 6px 0;
  color: var(--muted);
}

.signature {
  margin-top: 12px;
  font-weight: 700;
  color: var(--accent);
}

.promise {
  background: rgba(227, 82, 131, 0.08);
  padding: 10px 14px;
  border-radius: 14px;
  display: inline-block;
  border: 1px solid rgba(227, 82, 131, 0.16);
}

.btn-replay {
  margin-top: 12px;
  width: auto;
  padding-inline: 26px;
}

.hidden {
  display: none;
}

.fade-enter {
  opacity: 0;
  transform: translateY(12px);
}

.fade-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity var(--transition), transform var(--transition);
}

.background {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hearts {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle 6px at 20% 20%, rgba(227, 82, 131, 0.3), transparent 50%),
    radial-gradient(circle 5px at 70% 30%, rgba(227, 82, 131, 0.22), transparent 55%),
    radial-gradient(circle 4px at 40% 70%, rgba(227, 82, 131, 0.18), transparent 60%);
  opacity: 0.55;
  animation: float 28s linear infinite;
}

.hearts--two {
  animation-duration: 32s;
  animation-direction: reverse;
  opacity: 0.35;
}

.hearts--three {
  animation-duration: 36s;
  opacity: 0.25;
}

.glow {
  position: absolute;
  width: 260px;
  height: 260px;
  filter: blur(60px);
  opacity: 0.6;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 159, 183, 0.4), transparent 60%);
}

.glow--one { top: 18%; left: 12%; }
.glow--two { bottom: 10%; right: 14%; background: radial-gradient(circle, rgba(255, 204, 143, 0.38), transparent 60%); }

.celebrate {
  position: relative;
  width: 100%;
  height: 170px;
  margin-top: 20px;
  overflow: visible;
  display: grid;
  place-items: center;
}

.celebrate::before {
  content: "";
  position: absolute;
  inset: 0px;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.95) 0, rgba(255, 255, 255, 0.4) 45%, rgba(255, 214, 243, 0.2) 70%, transparent 85%);
  filter: blur(0.5px);
  opacity: 0.9;
  pointer-events: none;
}

.celebrate::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(227, 82, 131, 0.16), rgba(255, 143, 184, 0.12));
  mix-blend-mode: screen;
  pointer-events: none;
}

.heart-piece {
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--accent);
  transform: rotate(45deg);
  border-radius: 2px;
  animation: fall var(--fall-speed, 2.6s) ease-in forwards;
  opacity: 0.9;
  filter: drop-shadow(0 6px 8px rgba(227, 82, 131, 0.25));
}

.heart-piece::before,
.heart-piece::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: inherit;
  border-radius: 50%;
}

.heart-piece::before { top: -7px; left: 0; }
.heart-piece::after { top: 0; left: -7px; }

.pop-heart {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--accent);
  transform: rotate(45deg) scale(0.9);
  border-radius: 2px;
  opacity: 0.9;
  animation: pop 620ms ease-out forwards;
  pointer-events: none;
}

.pop-heart::before,
.pop-heart::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  background: inherit;
  border-radius: 50%;
}

.pop-heart::before { top: -6px; left: 0; }
.pop-heart::after { top: 0; left: -6px; }

.celebrate-heart-big {
  position: absolute;
  left: 50%;
  top: 50%;
  color: var(--accent);
  font-size: 72px;
  animation: big-heart-pop 720ms ease-out forwards, big-heart-pulse 2.2s ease-in-out infinite 720ms;
  pointer-events: none;
}

@keyframes shake {
  10% { transform: translate(-3px, -2px) rotate(-3deg); }
  20% { transform: translate(3px, 2px) rotate(3deg); }
  30% { transform: translate(-2px, 2px) rotate(-2deg); }
  40% { transform: translate(2px, -2px) rotate(2deg); }
  50% { transform: translate(-2px, 1px) rotate(-1deg); }
  60% { transform: translate(2px, -1px) rotate(1deg); }
  100% { transform: translate(0, 0) rotate(0); }
}

@keyframes wiggle {
  0% { transform: translate(-50%, -50%) translate3d(var(--nx, 0px), var(--ny, 0px), 0) scale(1); }
  25% { transform: translate(-50%, -50%) translate3d(var(--nx, 0px), var(--ny, 0px), 0) scale(1.06) rotate(-2deg); }
  50% { transform: translate(-50%, -50%) translate3d(var(--nx, 0px), var(--ny, 0px), 0) scale(0.97) rotate(1.5deg); }
  75% { transform: translate(-50%, -50%) translate3d(var(--nx, 0px), var(--ny, 0px), 0) scale(1.03) rotate(-1deg); }
  100% { transform: translate(-50%, -50%) translate3d(var(--nx, 0px), var(--ny, 0px), 0) scale(1); }
}

@keyframes float {
  from { transform: translateY(0); }
  to { transform: translateY(-120px); }
}

@keyframes fall {
  0% { transform: translateY(-10px) scale(0.6) rotate(45deg); opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(120px) scale(0.7) rotate(55deg); opacity: 0; }
}

@keyframes pop {
  0% { transform: translate(-50%, -50%) rotate(45deg) scale(0.6); opacity: 1; }
  60% { transform: translate(-50%, -60%) rotate(42deg) scale(1.05); opacity: 1; }
  100% { transform: translate(-50%, -80%) rotate(48deg) scale(0.85); opacity: 0; }
}

@keyframes heartbeat {
  0%, 100% { transform: scale(0.9); }
  20% { transform: scale(1.05); }
  40% { transform: scale(0.95); }
  60% { transform: scale(1.02); }
}

@keyframes big-heart-pop {
  0% { transform: translate(-50%, -50%) rotate(0deg) scale(0.2); opacity: 0; }
  50% { transform: translate(-50%, -54%) rotate(0deg) scale(1.08); opacity: 1; }
  100% { transform: translate(-50%, -50%) rotate(0deg) scale(1); opacity: 0.96; }
}

@keyframes big-heart-pulse {
  0%, 100% { transform: translate(-50%, -50%) rotate(0deg) scale(1); opacity: 0.92; }
  45% { transform: translate(-50%, -52%) rotate(0deg) scale(1.08); opacity: 1; }
  70% { transform: translate(-50%, -50%) rotate(0deg) scale(0.96); opacity: 0.9; }
}

@keyframes pulse-corner {
  0%, 100% { transform: rotate(0deg) scale(0.96); opacity: 0.9; }
  20% { transform: rotate(0deg) scale(1.08); opacity: 1; }
  50% { transform: rotate(0deg) scale(0.98); opacity: 0.95; }
  70% { transform: rotate(0deg) scale(1.04); opacity: 1; }
}

@media (max-width: 480px) {
  .card { padding: 22px 18px 26px; }
  .actions { height: 160px; flex-direction: column; }
  .btn-wrap { width: 100%; max-width: 200px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .hearts { display: none; }
  .pop-heart { display: none !important; }
}
