:root {
  --bg-start: #17060b;
  --bg-end: #3b0f14;
  --card: rgba(255, 240, 231, 0.9);
  --text: #3f1a1e;
  --rose: #b83b5e;
  --deep-rose: #8b1e3f;
  --gold: #f5c978;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}

.backdrop {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 15%, rgba(255, 199, 170, 0.3), transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(255, 126, 156, 0.35), transparent 35%),
    radial-gradient(circle at 50% 90%, rgba(245, 201, 120, 0.2), transparent 45%),
    linear-gradient(145deg, var(--bg-start), var(--bg-end));
  z-index: 0;
}

.card,
.message-card {
  position: relative;
  z-index: 2;
  width: min(92vw, 700px);
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  padding: 2rem 1.8rem;
  text-align: center;
  animation: rise 900ms ease both;
}

.card {
  overflow: hidden;
}

.view {
  display: none;
  animation: rise 500ms ease both;
}

.view.active {
  display: block;
}

.eyebrow {
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--deep-rose);
  font-weight: 700;
}

h1 {
  margin: 0.2rem 0 0.8rem;
  font-family: "DM Serif Display", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
}

.subtitle,
p {
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  line-height: 1.7;
}

.signature {
  margin-top: 1rem;
  font-family: "DM Serif Display", serif;
  font-style: italic;
  color: var(--deep-rose);
}

.actions {
  margin-top: 1.4rem;
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  text-decoration: none;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-sorry {
  background: linear-gradient(135deg, #cf5d77, #a62a4d);
  color: #fff;
  box-shadow: 0 10px 20px rgba(166, 42, 77, 0.35);
}

.btn-love {
  background: linear-gradient(135deg, #ff8b5e, #f04e73);
  color: #fff;
  box-shadow: 0 10px 20px rgba(240, 78, 115, 0.35);
}

.btn-ghost {
  color: var(--deep-rose);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(139, 30, 63, 0.22);
}

.music-btn {
  position: absolute;
  right: 1rem;
  top: 1rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}

.hint {
  margin-top: 1rem;
  color: #7c4c57;
  font-size: 0.9rem;
}

.heart {
  position: fixed;
  width: 14px;
  height: 14px;
  background: #ff4d6d;
  transform: rotate(45deg);
  pointer-events: none;
  z-index: 5;
  animation: floatUp 2.8s ease-out forwards;
}

.heart::before,
.heart::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: inherit;
  border-radius: 50%;
}

.heart::before {
  left: -7px;
}

.heart::after {
  top: -7px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes floatUp {
  to {
    transform: translateY(-180px) rotate(45deg) scale(1.4);
    opacity: 0;
  }
}

@media (max-width: 600px) {
  .music-btn {
    position: static;
    margin-bottom: 0.8rem;
  }
}
