@font-face {
  font-family: 'Noto Serif SC';
  src: url('fonts/NotoSerifSC-Regular.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
}

body {
  margin: 0;
  font-family: 'Noto Serif SC', serif;
  background: linear-gradient(rgba(255, 240, 245, 0.6), rgba(255, 240, 245, 0.6)), url('bg.jpg') no-repeat center center fixed;
  background-size: auto;
  background-repeat: repeat;
  animation: gradientBG 15s ease infinite;
  color: #d6336c;
  overflow-x: hidden;
  text-align: center;
}
@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.container {
  padding: 2em;
}

h1 {
  font-size: 2.5em;
  margin-bottom: 1em;
  text-shadow: 1px 1px 3px rgba(255, 192, 203, 0.6);
}

.highlight {
  color: #ff69b4;
  font-weight: bold;
  font-size: 1.2em;
  text-shadow: 1px 1px 2px rgba(255,182,193,0.5);
}

button {
  padding: 1em 2em;
  font-size: 1em;
  background-color: #f8d7da;
  color: #721c24;
  border: none;
  border-radius: 1em;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  animation: fadeInZoom 1.5s ease-out forwards;
}

button:hover {
  background-color: #f1b0b7;
}

.slideshow {
  margin-top: 2em;
  height: 60vh;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeInZoom 1.5s ease-out forwards;
}

.slideshow img {
  max-height: 100%;
  max-width: 90%;
  border-radius: 1.5em;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
  transition: opacity 1s ease-in-out;
  opacity: 0;
}

canvas#petals {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 999;
}

.typewriter {
  width: 100%;
  overflow: hidden;
  border-right: 0.15em solid pink;
  white-space: nowrap;
  animation: typing 3s steps(30, end), blink-caret 0.75s step-end infinite;
  font-size: 1.2em;
  color: #ff6f91;
  margin-top: 1em;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: pink; }
}

@keyframes fadeInZoom {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

#dogAnimation {
  position: relative;
  height: 200px;
  margin-top: 50px;
}

.dog {
  position: absolute;
  bottom: 0;
  width: 100px;
  transition: all 2s ease-in-out;
}

.dog.left {
  left: -120px;
}

.dog.right {
  right: -120px;
}

.dog.left.active {
  left: 50%;
  transform: translateX(-120%);
}

.dog.right.active {
  right: 50%;
  transform: translateX(120%);
}

#dogAnimation {
  margin-top: 5px; /* 减少顶部间距 */
  height: 120px; /* 如有需要，可适当减小高度 */
}