:root {
  --bg-1: #ff7eb3;
  --bg-2: #ff758c;
  --bg-3: #a18cd1;
  --bg-4: #fbc2eb;
  --card: rgba(255, 255, 255, 0.2);
  --text: #2d1639;
  --white: #fff;
  --yes: #ff2e88;
  --no: #5b556d;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Quicksand", system-ui, -apple-system, sans-serif;
  color: var(--text);
}

body {
  overflow-x: hidden;
  overflow-y: auto;
  background: linear-gradient(140deg, var(--bg-1), var(--bg-2), var(--bg-3), var(--bg-4));
  background-size: 250% 250%;
  animation: dreamyGradient 12s ease infinite;
}

#bg-hearts {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}

.app {
  min-height: 100vh;
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 20px 20px 80px;
}

.glass-card {
  width: min(680px, 92vw);
  border-radius: 28px;
  padding: 26px;
  backdrop-filter: blur(12px);
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 20px 50px rgba(62, 8, 47, 0.28);
  text-align: center;
  animation: cardIn 0.65s ease;
}

.hidden {
  display: none;
}

h1,
h2,
h3 {
  font-family: "Baloo 2", system-ui, sans-serif;
  margin: 8px 0 8px;
  line-height: 1.2;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

h2 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.6rem, 3.8vw, 2.3rem);
}

p {
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  margin: 10px auto;
  max-width: 52ch;
}

.chip {
  width: fit-content;
  margin: 0 auto;
  font-weight: 700;
  color: #6d124a;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  background: rgba(255, 255, 255, 0.65);
  padding: 6px 13px;
  border-radius: 999px;
}

.sub {
  opacity: 0.9;
}

.countdown-wrap {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
  color: #5f1450;
}

#countdownValue {
  font-family: "Baloo 2", system-ui, sans-serif;
  font-size: clamp(1.3rem, 3.6vw, 2rem);
  letter-spacing: 0.04em;
  padding: 4px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.45);
  color: #7a0f4e;
}

.buttons {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  position: relative;
  min-height: 70px;
}

.btn {
  border: none;
  border-radius: 999px;
  font-weight: 800;
  font-family: "Baloo 2", system-ui, sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.25s ease;
}

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

.btn:active {
  transform: scale(0.98);
}

.primary,
.secondary,
.yes,
.no,
.ghost {
  padding: 12px 22px;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
}

.primary,
.yes {
  background: var(--yes);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(255, 46, 136, 0.35);
}

.no {
  background: rgba(91, 85, 109, 0.18);
  border: 1px solid rgba(91, 85, 109, 0.3);
  color: #3e3949;
}

.secondary {
  background: #7d5fff;
  color: white;
  box-shadow: 0 10px 24px rgba(71, 47, 177, 0.3);
}

.ghost {
  background: rgba(255, 255, 255, 0.3);
  color: #5f1450;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.music-control {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 4;
}

.tiny-note {
  margin-top: 14px;
  font-weight: 700;
  color: #5f1450;
}

.highlight {
  display: inline-block;
  margin-top: 6px;
  font-weight: 800;
  color: #7a0f4e;
  background: rgba(255, 255, 255, 0.5);
  padding: 7px 14px;
  border-radius: 14px;
}

.gallery {
  margin-top: 18px;
}

.gallery h4 {
  margin: 4px 0 12px;
  font-family: "Baloo 2", system-ui, sans-serif;
  font-size: clamp(1.15rem, 2.8vw, 1.4rem);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.memory-card {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.33);
  border: 1px solid rgba(255, 255, 255, 0.38);
  padding: 10px;
  box-shadow: 0 10px 18px rgba(62, 8, 47, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.memory-card:hover {
  transform: translateY(-4px) rotate(-0.4deg);
  box-shadow: 0 14px 22px rgba(62, 8, 47, 0.22);
}

.memory-card p {
  margin: 8px 0 2px;
  font-size: 0.95rem;
}

.memory-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(140deg, rgba(255, 126, 179, 0.7), rgba(161, 140, 209, 0.55));
}

.memory-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.03);
  transition: transform 0.25s ease;
}

.memory-card:hover .memory-photo img {
  transform: scale(1.03);
}

.shake {
  animation: shake 0.35s linear;
}

@keyframes dreamyGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes cardIn {
  from {
    transform: translateY(12px) scale(0.97);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}

@media (max-width: 600px) {
  .glass-card {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .buttons {
    flex-direction: column;
    min-height: 120px;
  }

  .music-control {
    right: 50%;
    transform: translateX(50%);
    bottom: 12px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
