* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Segoe UI', sans-serif;
  background: url('img.png') no-repeat center center fixed;
  background-size: cover;
  color: #fff;
  text-align: center;
}

#landing, #main-content {
  position: relative;
  height: 100%;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  overflow-y: auto;
  padding: 2rem;
}

#heart {
  font-size: 90px;
  cursor: pointer;
  animation: pulse 1.5s infinite;
  color: #ff99cc;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.hidden {
  display: none;
}

#birthday-message, .poem {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 15px;
  padding: 2rem;
  max-width: 800px;
  margin: 2rem auto;
  color: #fce4ec;
}

#birthday-message h2 {
  font-size: 1.7rem;
}

#birthday-message p {
  line-height: 1.7;
  white-space: pre-wrap;
}

.poem p {
  text-align: left;
  line-height: 1.6;
  margin: 1.2rem 0;
  font-size: 1rem;
  display: inline-block;
  width: 100%;
}

.typing {
  border-right: 2px solid #fce4ec;
  animation: blink 0.7s steps(1) infinite;
  white-space: pre-wrap;
  overflow: hidden;
}

@keyframes blink {
  50% { border-color: transparent; }
}

/* Heart falling effect */
.heart-fall {
  position: fixed;
  top: -20px;
  font-size: 24px;
  color: #ff99cc;
  animation: fall linear infinite;
  pointer-events: none;
}

@keyframes fall {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(120vh); opacity: 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
  #birthday-message, .poem {
    padding: 1rem;
    font-size: 0.95rem;
  }

  #heart {
    font-size: 70px;
  }
}

@media (max-width: 480px) {
  #birthday-message, .poem {
    padding: 1rem;
    font-size: 0.9rem;
  }

  #heart {
    font-size: 60px;
  }
}
.ending-note {
  margin-top: 3rem;
  font-style: italic;
  color: #fcdde3;
  font-size: 1rem;
  opacity: 0;
  animation: fadeInNote 2s ease forwards;
  animation-delay: 1s;
}

@keyframes fadeInNote {
  to {
    opacity: 1;
  }
}
#open-when-section {
  margin-top: 4rem;
  text-align: center;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInNote 2s ease forwards;
}

#open-when-section h2 {
  color: #fce4ec;
  margin-bottom: 1rem;
}

.envelopes {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.envelope {
  background-color: #add8e6;
  color: #333;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: transform 0.2s;
  font-weight: bold;
}

.envelope:hover {
  transform: scale(1.05);
  background-color: #cfe8f3;
}

.letter-box {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: #fff;
  color: #333;
  border-radius: 10px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.letter-box button {
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
  background-color: #ff99cc;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  color: white;
  cursor: pointer;
}
.memories-button-wrapper {
  text-align: center;
  margin-top: 3rem;
}

#show-memories {
  padding: 1rem 2rem;
  background-color: #bde0fe;
  border: none;
  border-radius: 12px;
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: 0.3s ease;
}

#show-memories:hover {
  background-color: #d0f0ff;
  transform: scale(1.05);
}

#memories-gallery {
  margin-top: 2rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  animation: fadeInMemories 2s ease forwards;
}

.memory-group {
  margin-bottom: 3rem;
  text-align: center;
}

.memory-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.memory-row img {
  width: 180px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
}

.memory-row img:hover {
  transform: scale(1.1);
}

.memory-caption {
  font-style: italic;
  color: #fce4ec;
  margin-top: 1rem;
  font-size: 0.95rem;
}

@keyframes fadeInMemories {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
#close-memories {
  margin-bottom: 1.5rem;
  padding: 0.6rem 1.2rem;
  background-color: #f08080;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#close-memories:hover {
  background-color: #ff9999;
}
#gift-box {
  position: fixed;
  top: 20px;
  right: 20px;
  font-size: 2rem;
  cursor: pointer;
  z-index: 1000;
  animation: bounce 1.5s infinite;
  transition: transform 0.3s ease;
}

#gift-box:hover {
  transform: scale(1.2);
}

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

#gift-message-box {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #ffffffdd;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  text-align: center;
  z-index: 9999;
  color: black;
}

#gift-message-box button {
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
  background-color: #bde0fe;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
}
.fade-out {
  animation: fadeOut 2s forwards;
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.star-quote {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: white;
  font-size: 1.3rem;
  padding: 2rem;
  z-index: 9999;
}

.star-quote button {
  margin-top: 1.5rem;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 12px;
  background: #fff;
  color: #333;
  font-weight: bold;
  cursor: pointer;
}
/* Typewriter effect for the quote */
.star-quote p {
  overflow: hidden;
  white-space: wrap;
  border-right: 2px solid rgba(255, 255, 255, 0.5);
  animation: typing 6s steps(60, end), blink 0.75s step-end infinite;
  font-size: 1.4rem;
  max-width: 90%;
  margin: 0 auto;
  color: white;
  text-shadow: 0 0 5px #fff, 0 0 10px #bde0fe;
}

/* Typing animation */
@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

/* Cursor blink */
@keyframes blink {
  50% { border-color: transparent }
}

/* Go back button styling */
.star-quote button {
  margin-top: 2rem;
  padding: 0.7rem 1.4rem;
  border: none;
  border-radius: 12px;
  background: #ffffffcc;
  color: #222;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

.star-quote button:hover {
  background: #fff;
}
