:root {
  color-scheme: light;
  --text-main: #322243;
  --text-soft: #6d5a7f;
  --card-bg: rgba(255, 255, 255, 0.62);
  --card-border: rgba(255, 255, 255, 0.58);
  --button-shadow: 0 18px 30px rgba(176, 102, 150, 0.24);
  --card-shadow: 0 20px 60px rgba(108, 87, 143, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding-top: max(24px, env(safe-area-inset-top));
  padding-right: max(18px, env(safe-area-inset-right));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  padding-left: max(18px, env(safe-area-inset-left));
  font-family: "Avenir Next", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.8), transparent 28%),
    radial-gradient(circle at 84% 14%, rgba(255, 205, 231, 0.72), transparent 26%),
    radial-gradient(circle at 16% 88%, rgba(203, 229, 255, 0.68), transparent 28%),
    radial-gradient(circle at 78% 82%, rgba(255, 242, 189, 0.4), transparent 24%),
    linear-gradient(160deg, #fff0f5 0%, #f3ecff 46%, #e9f7ff 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.65;
  pointer-events: none;
  animation: drift 14s ease-in-out infinite alternate;
}

body::before {
  width: 240px;
  height: 240px;
  top: 6%;
  left: -4%;
  background: rgba(255, 182, 193, 0.42);
}

body::after {
  width: 280px;
  height: 280px;
  right: -5%;
  bottom: -2%;
  background: rgba(173, 216, 230, 0.42);
  animation-duration: 17s;
}

.sky-glow,
.sparkles {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.sky-glow {
  background:
    radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.52), transparent 22%),
    radial-gradient(circle at 70% 35%, rgba(255, 255, 255, 0.36), transparent 18%);
  animation: breathe 9s ease-in-out infinite;
}

.sparkles {
  opacity: 0.6;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.9) 0 1.2px, transparent 1.8px),
    radial-gradient(circle at 32% 62%, rgba(255, 255, 255, 0.75) 0 1px, transparent 1.6px),
    radial-gradient(circle at 58% 28%, rgba(255, 255, 255, 0.82) 0 1px, transparent 1.6px),
    radial-gradient(circle at 80% 52%, rgba(255, 255, 255, 0.9) 0 1.3px, transparent 1.9px),
    radial-gradient(circle at 66% 82%, rgba(255, 255, 255, 0.72) 0 1.1px, transparent 1.7px),
    radial-gradient(circle at 20% 86%, rgba(255, 255, 255, 0.84) 0 1.2px, transparent 1.8px);
  animation: twinkle 10s linear infinite;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 34rem);
}

.love-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
  padding: clamp(1.5rem, 5vw, 2.25rem);
  border-radius: 28px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(18px);
  box-shadow: var(--card-shadow);
}

.eyebrow {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
}

h1 {
  margin: 0;
  font-size: clamp(1.7rem, 6vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.message-wrap {
  width: 100%;
  min-height: 11rem;
  display: grid;
  place-items: center;
  padding: 0.5rem 0.25rem;
}

.reason {
  margin: 0;
  font-size: clamp(1.45rem, 5.7vw, 2.45rem);
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.new-reason-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.95rem 1.35rem;
  min-width: 12.5rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #ff8bb2 0%, #b084ff 100%);
  box-shadow: var(--button-shadow);
  cursor: pointer;
  transition:
    transform 180ms ease,
    filter 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.new-reason-button:hover,
.new-reason-button:focus-visible {
  transform: translateY(-1px);
  filter: saturate(1.06) brightness(1.03);
  box-shadow: 0 22px 35px rgba(176, 102, 150, 0.28);
}

.new-reason-button:active {
  transform: translateY(1px) scale(0.99);
}

.new-reason-button:focus-visible {
  outline: 3px solid rgba(117, 87, 189, 0.24);
  outline-offset: 4px;
}

.new-reason-button:disabled {
  cursor: default;
  opacity: 0.6;
  filter: grayscale(0.1);
  transform: none;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(10px, -10px, 0) scale(1.06);
  }
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.65;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.03);
  }
}

@keyframes twinkle {
  0% {
    transform: translateY(0);
    opacity: 0.5;
  }
  50% {
    opacity: 0.95;
  }
  100% {
    transform: translateY(-1.25%);
    opacity: 0.55;
  }
}

@media (max-width: 420px) {
  .love-card {
    border-radius: 24px;
    gap: 1rem;
  }

  .message-wrap {
    min-height: 10rem;
  }

  .new-reason-button {
    width: 100%;
  }
}

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