body {
  font-family: "Noto Serif TC", serif;
  color: #eee;
  background: linear-gradient(to bottom, #1a1c2c, #3b5360);
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* 確保不會水平滾動 */
}

main {
  padding: 20px 0;
  margin: 0 auto;
  width: 90%;
  max-width: 800px;
  position: relative;
  z-index: 1; /* 保證主內容位於花瓣上方 */
}

h1 {
  font-size: 3rem;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.poem {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.poem p {
  font-size: 1.5rem;
  margin: 10px 0;
  text-align: center;
  line-height: 1.8;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  width: 100%;
}

@media (min-width: 768px) {
  .poem {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 每行兩句 */
    gap: 10px;
  }
  .poem p {
    width: auto;
  }
}

#flower-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* 不影響滾動 */
  z-index: -1; /* 花瓣保持在背景層 */
}

.flower {
  position: absolute;
  background: radial-gradient(circle, rgba(255, 192, 203, 0.8), rgba(255, 105, 180, 0.4));
  border-radius: 50% 50% 50% 0%; /* 模擬花瓣形狀 */
  transform-origin: center;
  animation: fall 15s linear infinite, sway 3s ease-in-out infinite;
  opacity: 0.8;
}

@keyframes fall {
  0% {
    transform: translate(0, -100px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(20vw, 120vh) rotate(360deg); /* 曲線運動 */
    opacity: 0;
  }
}

@keyframes sway {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(10px); /* 左右搖擺 */
  }
}
