:root {
  --bg: #0f1025;
  --card: rgba(255, 255, 255, 0.85);
  --fg: #1c1c2e;
  --accent: #ff5c8a;
  --accent-2: #ffb3c7;
  --shadow: 0 20px 60px rgba(15, 16, 37, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Serif KR", "Georgia", serif;
  color: var(--fg);
  background:
    radial-gradient(600px 300px at 20% 10%, rgba(255, 92, 138, 0.25), transparent 60%),
    radial-gradient(500px 280px at 80% 20%, rgba(255, 179, 199, 0.25), transparent 60%),
    radial-gradient(700px 320px at 50% 100%, rgba(111, 180, 255, 0.2), transparent 70%),
    linear-gradient(160deg, #111335, #1b163e 50%, #0f0e24 100%);
  display: grid;
  place-items: center;
  padding: 48px 20px;
  overflow: hidden;
}

body::before,
body::after {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent 60%);
  opacity: 0.5;
  animation: shimmer 10s linear infinite;
  pointer-events: none;
}

body::after {
  animation-delay: -5s;
  mix-blend-mode: screen;
}

.wrap {
  width: min(900px, 100%);
  position: relative;
}

.card {
  background: var(--card);
  border-radius: 28px;
  padding: 48px 40px 44px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  text-align: center;
}

h1 {
  margin: 0 0 8px;
  font-size: 2.1rem;
  letter-spacing: 0.03em;
}

.subtitle {
  margin: 0 0 32px;
  color: rgba(28, 28, 46, 0.7);
}

.form {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.field {
  display: grid;
  gap: 10px;
  font-weight: 600;
  text-align: left;
}

.field input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(28, 28, 46, 0.2);
  font-size: 1rem;
  font-family: "Noto Sans KR", "Segoe UI", sans-serif;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 92, 138, 0.2);
}

.heart {
  width: 120px;
  height: 120px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(255, 92, 138, 0.25), rgba(255, 179, 199, 0.35));
  border: 1px solid rgba(255, 92, 138, 0.2);
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.4), 0 0 20px rgba(255, 92, 138, 0.45);
  font-size: 3.5rem;
  color: var(--accent);
  position: relative;
  animation: float 3.2s ease-in-out infinite;
}

.heart::before,
.heart::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  box-shadow:
    0 0 14px rgba(255, 255, 255, 0.6),
    0 0 28px rgba(255, 92, 138, 0.6);
  animation: sparkle 2.4s ease-in-out infinite;
}

.heart::before {
  top: 12px;
  left: 18px;
}

.heart::after {
  bottom: 14px;
  right: 20px;
  animation-delay: -1.2s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes sparkle {
  0%,
  100% {
    transform: scale(0.8);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
  }
}

@keyframes shimmer {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-10%);
  }
}

.btn {
  border: none;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
  box-shadow: 0 12px 26px rgba(255, 92, 138, 0.35);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(255, 92, 138, 0.45);
}

.result {
  margin-top: 22px;
  min-height: 2.2rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: #c32655;
  opacity: 0.9;
  transition: transform 180ms ease, opacity 180ms ease;
}

.result--active {
  transform: scale(1.02);
  opacity: 1;
}

@media (max-width: 720px) {
  .form {
    grid-template-columns: 1fr;
  }

  .heart {
    width: 96px;
    height: 96px;
    font-size: 2.8rem;
    margin: 0 auto;
  }

  .field {
    text-align: center;
  }
}
