* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

body {
  background: linear-gradient(135deg, #ffe6f0, #ffd6eb);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
}

/* Card */
.card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  width: 90%;
  max-width: 600px;
  padding: 40px 30px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(255, 105, 180, 0.2);
  z-index: 2;
  animation: fadeIn 1s ease forwards;
}

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

h1 {
  color: #ff4d88;
  margin-bottom: 10px;
}

.subtitle {
  color: #777;
  margin-bottom: 25px;
}

.chapter {
  display: none;
  animation: fadeChapter 0.6s ease forwards;
}

.chapter.active {
  display: block;
}

@keyframes fadeChapter {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

h2 {
  margin-bottom: 15px;
  color: #ff1a75;
}

p {
  margin-bottom: 20px;
  line-height: 1.6;
}

button {
  background: #ff4d88;
  border: none;
  color: white;
  padding: 10px 18px;
  border-radius: 25px;
  cursor: pointer;
  transition: 0.3s;
}

button:hover {
  background: #ff1a75;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 77, 136, 0.4);
}

button:active {
  transform: scale(0.95);
}

.final-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
}

/* Petals */
.petals {
  position: fixed;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  top: 0;
  left: 0;
}

.petal {
  position: absolute;
  font-size: 20px;
  animation: fall linear forwards;
}

@keyframes fall {
  0% {
    transform: translateY(-10vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) rotate(360deg);
    opacity: 0;
  }
}

#finalMessage {
  margin-top: 20px;
  font-weight: 500;
  color: #ff1a75;
}

/* Responsive */
@media (max-width: 480px) {
  .card {
    padding: 25px 20px;
  }

  button {
    width: 100%;
  }

  .final-buttons {
    flex-direction: column;
  }
}
#typeText {
  white-space: pre-line;
  font-size: 1.1rem;
  line-height: 1.8;
  color: #444;
}
.valentine-message {
  max-width: 650px;
  margin: 20px auto;
  font-size: 18px;
  line-height: 1.7;
  opacity: 0;
  transition: opacity 2s ease;
}

#proposalQuestion,
#finalButtons {
  transition: opacity 2s ease;
}
/* YES BUTTON GLOW */
.final-buttons button:first-child {
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    box-shadow: 0 0 10px #ff4d88;
  }
  to {
    box-shadow: 0 0 25px #ff99cc;
  }
}

/* SPARKLES */
.sparkle {
  position: fixed;
  font-size: 18px;
  animation: sparkleAnim 1.5s ease forwards;
  pointer-events: none;
}

@keyframes sparkleAnim {
  from { transform: scale(0) rotate(0deg); opacity: 1; }
  to { transform: scale(1.5) rotate(180deg); opacity: 0; }
}

/* CONFETTI */
.confetti {
  position: fixed;
  width: 8px;
  height: 8px;
  background: pink;
  top: -10px;
  animation: confettiFall 3s linear forwards;
}

@keyframes confettiFall {
  to {
    transform: translateY(110vh) rotate(720deg);
  }
}
#songBtn {
  margin-top: 20px;
  padding: 12px 25px;
  font-size: 16px;
  cursor: pointer;
}

/* Fullscreen romantic overlay */
.song-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  z-index: 999;
}

/* Center content */
.song-content {
  max-width: 600px;
}

.lyrics {
  font-size: 22px;
  margin-bottom: 40px;
  min-height: 50px;
  transition: opacity 1s ease;
}

.dance-area {
  font-size: 70px;
  animation: dance 1s infinite alternate ease-in-out;
}

@keyframes dance {
  from { transform: translateY(0px) rotate(-5deg); }
  to { transform: translateY(-15px) rotate(5deg); }
}
#lyricsBox {
  font-size: 22px;
  color: white;
  text-align: center;
  min-height: 40px;
  transition: opacity 0.8s ease, transform 0.8s ease;
  opacity: 1;
}

.lyric-hidden {
  opacity: 0;
  transform: translateY(10px);
}

.lyric-visible {
  opacity: 1;
  transform: translateY(0);
}
.dance-container {
  position: absolute;
  bottom: 40px;
  width: 100%;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.dance-svg {
  width: 200px;
  height: 200px;
}

.girl {
  transform-origin: 80px 110px;
  animation: swayGirl 2s ease-in-out infinite alternate;
}

.boy {
  transform-origin: 120px 110px;
  animation: swayBoy 2s ease-in-out infinite alternate;
}

@keyframes swayGirl {
  0% { transform: rotate(-5deg); }
  100% { transform: rotate(5deg); }
}

@keyframes swayBoy {
  0% { transform: rotate(5deg); }
  100% { transform: rotate(-5deg); }
}
.dance-container {
  display: none;
}


