* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Georgia", serif;
  /* Enhanced animated background with depth and floating particles */
  background: linear-gradient(-45deg, #1a1a2e, #16213e, #0f3460, #533483);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Added animated background gradient */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Added floating particles animation */
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(2px 2px at 20px 30px, #fff, transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1px 1px at 90px 40px, #fff, transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(2px 2px at 160px 30px, #fff, transparent);
  background-repeat: repeat;
  background-size: 200px 100px;
  animation: sparkle 20s linear infinite;
  pointer-events: none;
  opacity: 0.6;
}

@keyframes sparkle {
  from {
    transform: translateY(0px);
  }
  to {
    transform: translateY(-100px);
  }
}

.intro {
  text-align: center;
  font-size: 1.4rem;
  margin-bottom: 30px;
  opacity: 1;
  transition: opacity 1s ease;
  /* Added subtle glow animation */
  animation: softGlow 3s ease-in-out infinite alternate;
}

/* Added soft glow animation for intro text */
@keyframes softGlow {
  from {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  }
  to {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
  }
}

.btn {
  padding: 10px 20px;
  font-size: 1rem;
  background: #f5eeef;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  color: rgb(5, 2, 2);
  transition: 0.3s;
  /* Added subtle pulse animation */
  animation: pulse 2s ease-in-out infinite;
}

/* Added pulse animation for button */
@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(245, 238, 239, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(245, 238, 239, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(245, 238, 239, 0);
  }
}

.btn:hover {
  background: #b1acad;
  /* Enhanced hover effect */
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.letter {
  display: none;
  background: repeating-linear-gradient(to bottom, #fdf6e3 0px, #fdf6e3 27px, #d2d2d2 28px);
  color: #333;
  padding: 30px 30px 30px 70px;
  border-radius: 10px;
  width: 80%;
  max-width: 500px;
  height: 600px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  font-size: 1.1rem;
  line-height: 1.6;
  text-align: left;
  position: relative;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  font-family: "Courier New", monospace;
  overflow: visible;
  /* Added entrance animation */
  animation: letterAppear 1.5s ease-out forwards;
}

/* Added letter appearance animation */
@keyframes letterAppear {
  from {
    opacity: 0;
    transform: translateY(50px) rotateX(10deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

.letter p {
  margin-top: -55px;
  overflow: hidden;
}

.letter::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 25px;
  height: 100%;
  background-image: radial-gradient(circle, #1e1e2f 6px, transparent 7px);
  background-size: 25px 40px;
  background-repeat: repeat-y;
  background-position: center;
  pointer-events: none;
}

.signature {
  position: absolute;
  bottom: -20px;
  right: 6px;
  width: 180px;
  opacity: 0.9;
  pointer-events: none;
  transform: rotate(-2deg);
}
