/* 基础样式 */
body,
html {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Great Vibes', cursive;
  overflow: hidden;
  background: #000;
}

.page {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
}

.page.active {
  display: flex;
}

.content {
  z-index: 1;
}

h1 {
  font-size: 4rem;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  font-family: 'Great Vibes', cursive;
}

button {
  padding: 15px 30px;
  font-size: 1.5rem;
  background: #ff6f61;
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: 50px;
  transition: transform 0.3s ease, background 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

button:hover {
  transform: scale(1.1);
  background: #ff4a3d;
}

/* 首页花瓣背景 */
#home {
  background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
  position: relative;
  overflow: hidden;
  animation: gradientShift 10s ease infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* 更新情书页样式 */
#letter {
  background: linear-gradient(135deg, #ffd6e7 0%, #ffc0cb 50%, #ffb6c1 100%);
  position: relative;
  overflow: hidden;
  z-index: 2;
}

/* 优化情书容器样式 */
#love-letter {
  font-size: 1.6rem;
  line-height: 1.8;
  text-align: left;
  max-width: 600px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.15);
  padding: 40px;
  border-radius: 30px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 0 20px rgba(255, 255, 255, 0.3);
  position: relative;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #444;
  font-family: 'Lato', sans-serif;
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* 情书文字动画效果优化 */
#love-letter p {
  opacity: 0;
  transform: translateY(30px) rotateX(20deg);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 20px 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

#love-letter p.show {
  opacity: 1;
  transform: translateY(0) rotateX(0);
}

/* 优化名字样式 */
#name-letter {
  color: #ff4081;
  font-weight: bold;
  font-size: 1.8rem;
  text-shadow: 2px 2px 4px rgba(255, 64, 129, 0.2);
}

/* 优化漂浮爱心效果 */
.floating-hearts {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1;
}

.floating-heart {
  position: absolute;
  font-size: 24px;
  opacity: 0;
  animation: floatingHeart 6s ease-in infinite;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

@keyframes floatingHeart {
  0% {
    transform: translateY(100vh) scale(0.5);
    opacity: 0;
  }

  20% {
    opacity: 0.8;
  }

  80% {
    opacity: 0.8;
  }

  100% {
    transform: translateY(-20vh) scale(1.2);
    opacity: 0;
  }
}

/* 底部爱心容器样式优化 */
#heart-container {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

/* 爱心按钮样式优化 */
.heart {
  font-size: 4rem;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: heartBeat 2s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(255, 64, 129, 0.5));
}

@keyframes heartBeat {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

.heart:hover {
  transform: scale(1.3);
  filter: drop-shadow(0 0 15px rgba(255, 64, 129, 0.8));
}

/* 添加装饰性背景图案 */
#letter::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.2) 0%, transparent 25%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.2) 0%, transparent 25%),
    radial-gradient(circle at 50% 50%, rgba(255, 192, 203, 0.1) 0%, transparent 50%);
  animation: backgroundShimmer 15s ease-in-out infinite;
  z-index: 1;
}

/* 修改动态光效背景 */
#letter::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  right: -50%;
  bottom: -50%;
  background:
    linear-gradient(45deg,
      rgba(255, 255, 255, 0) 45%,
      rgba(255, 255, 255, 0.1) 50%,
      rgba(255, 255, 255, 0) 55%);
  animation: lightMove 8s ease-in-out infinite;
  transform: rotate(45deg);
  z-index: 0;
  /* 降低光效的层级 */
  pointer-events: none;
  /* 确保光效不会影响点击事件 */
}

/* 为每个漂浮爱心设置不同的起始位置和动画延迟 */
.floating-heart:nth-child(3n) {
  left: calc(10% + var(--i, 0) * 20%);
  animation-delay: calc(var(--i, 0) * -2s);
  font-size: 20px;
}

.floating-heart:nth-child(3n + 1) {
  left: calc(20% + var(--i, 0) * 20%);
  animation-delay: calc(var(--i, 0) * -1.5s);
  font-size: 28px;
}

.floating-heart:nth-child(3n + 2) {
  left: calc(30% + var(--i, 0) * 20%);
  animation-delay: calc(var(--i, 0) * -3s);
  font-size: 24px;
}

/* 流星效果优化 */
@keyframes shootingStar {
  0% {
    transform: rotate(-45deg) translateX(0);
    opacity: 0;
  }

  5% {
    opacity: 1;
  }

  70% {
    opacity: 1;
  }

  100% {
    transform: rotate(-45deg) translateX(1500px);
    opacity: 0;
  }
}

.shooting-star {
  position: absolute;
  width: 150px;
  height: 2px;
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0.8),
      rgba(255, 255, 255, 0.4),
      transparent);
  animation: shootingStar 3s ease-in-out infinite;
  opacity: 0;
  box-shadow: 0 0 5px #fff,
    0 0 10px #fff,
    0 0 20px #fff;
}

/* 调整流星出现位置和时间 */
.shooting-star:nth-child(1) {
  top: 15%;
  left: -10%;
  animation-delay: 0s;
}

.shooting-star:nth-child(2) {
  top: 35%;
  left: -5%;
  animation-delay: 4s;
}

.shooting-star:nth-child(3) {
  top: 50%;
  left: -15%;
  animation-delay: 8s;
}

.shooting-star:nth-child(4) {
  top: 65%;
  left: -8%;
  animation-delay: 12s;
}

.shooting-star:nth-child(5) {
  top: 85%;
  left: -12%;
  animation-delay: 16s;
}

/* 首页花瓣背景 */
.petals {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* 花瓣基础样式 */
.petal {
  position: absolute;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  filter: blur(1px);
  animation: fall linear infinite, sway ease-in-out infinite, rotate linear infinite;
}

/* 新增摇摆动画 */
@keyframes sway {

  0%,
  100% {
    transform: rotate(0deg) translateX(0);
  }

  25% {
    transform: rotate(15deg) translateX(15px);
  }

  75% {
    transform: rotate(-15deg) translateX(-15px);
  }
}

/* 修改下落动画 */
@keyframes fall {
  0% {
    top: -10%;
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    top: 110%;
    opacity: 0;
  }
}

/* 添加花瓣旋转动画 */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* 优化首页内容样式 */
#home .content {
  position: relative;
  z-index: 2;
  padding: 40px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: contentFadeIn 1.5s ease-out;
  transform-style: preserve-3d;
  perspective: 1000px;
}

@keyframes contentFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 优化标题样式 */
#home h1 {
  font-size: 5.5rem;
  color: #fff;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2),
    0 0 30px rgba(255, 255, 255, 0.3);
  margin-bottom: 40px;
  animation: titleFloat 3s ease-in-out infinite;
  font-family: 'Great Vibes', cursive;
  letter-spacing: 2px;
}

@keyframes titleFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* 优化进入按钮样式 */
#enter-btn {
  background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
  font-size: 2rem;
  padding: 20px 50px;
  border-radius: 50px;
  box-shadow: 0 5px 20px rgba(255, 107, 107, 0.4);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  font-family: 'Lato', sans-serif;
  letter-spacing: 1px;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

#enter-btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 10px 25px rgba(255, 107, 107, 0.6);
  background: linear-gradient(45deg, #ff8e8e, #ff6b6b);
}

#enter-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(45deg);
  animation: btnShine 3s infinite;
}

@keyframes btnShine {
  from {
    transform: translateX(-100%) rotate(45deg);
  }

  to {
    transform: translateX(100%) rotate(45deg);
  }
}

/* 删除原有的装饰性爱心样式，添加樱花样式 */
.sakura-container {
  position: absolute;
  height: 100%;
  width: 100%;
  pointer-events: none;
  z-index: 1;
  perspective: 1000px;
  perspective-origin: center;
}

.sakura {
  position: absolute;
  background: linear-gradient(120deg,
      rgba(255, 183, 197, 0.9),
      rgba(255, 197, 208, 0.9));
  border-radius: 150% 0 150% 0;
  width: 15px;
  height: 15px;
  filter: drop-shadow(0 0 3px rgba(255, 183, 197, 0.5));
  opacity: 0.8;
  animation:
    sakuraFall var(--fall-duration, 10s) linear infinite,
    sakuraSway var(--sway-duration, 3s) ease-in-out infinite alternate,
    sakuraRotate var(--rotate-duration, 3s) linear infinite,
    sakuraGlow 2s ease-in-out infinite alternate;
}

@keyframes sakuraFall {
  0% {
    top: -10%;
    opacity: 0;
  }

  10% {
    opacity: 0.8;
  }

  90% {
    opacity: 0.8;
  }

  100% {
    top: 100%;
    opacity: 0;
  }
}

@keyframes sakuraSway {
  from {
    transform: translateX(-30px) rotate(-15deg);
  }

  to {
    transform: translateX(30px) rotate(15deg);
  }
}

@keyframes sakuraRotate {
  from {
    transform: rotate(0deg) scale(1);
  }

  50% {
    transform: rotate(180deg) scale(1.1);
  }

  to {
    transform: rotate(360deg) scale(1);
  }
}

@keyframes sakuraGlow {
  from {
    filter: drop-shadow(0 0 3px rgba(255, 183, 197, 0.5));
  }

  to {
    filter: drop-shadow(0 0 8px rgba(255, 183, 197, 0.8));
  }
}

/* 为每个樱花设置不同的大小和动画时间 */
.sakura:nth-child(3n) {
  width: 12px;
  height: 12px;
  --fall-duration: 12s;
  --sway-duration: 2.5s;
  --rotate-duration: 2s;
}

.sakura:nth-child(3n+1) {
  width: 18px;
  height: 18px;
  --fall-duration: 14s;
  --sway-duration: 3.5s;
  --rotate-duration: 3s;
}

.sakura:nth-child(3n+2) {
  width: 15px;
  height: 15px;
  --fall-duration: 16s;
  --sway-duration: 4s;
  --rotate-duration: 4s;
}

/* 为每个樱花设置不同的初始位置和动画延迟 */
.sakura:nth-child(1) {
  left: 5%;
  animation-delay: 0s;
}

.sakura:nth-child(2) {
  left: 15%;
  animation-delay: -2s;
}

.sakura:nth-child(3) {
  left: 25%;
  animation-delay: -4s;
}

.sakura:nth-child(4) {
  left: 35%;
  animation-delay: -6s;
}

.sakura:nth-child(5) {
  left: 45%;
  animation-delay: -1s;
}

.sakura:nth-child(6) {
  left: 55%;
  animation-delay: -3s;
}

.sakura:nth-child(7) {
  left: 65%;
  animation-delay: -5s;
}

.sakura:nth-child(8) {
  left: 75%;
  animation-delay: -7s;
}

.sakura:nth-child(9) {
  left: 85%;
  animation-delay: -2.5s;
}

.sakura:nth-child(10) {
  left: 95%;
  animation-delay: -4.5s;
}

.sakura:nth-child(11) {
  left: 10%;
  animation-delay: -1.5s;
}

.sakura:nth-child(12) {
  left: 30%;
  animation-delay: -3.5s;
}

.sakura:nth-child(13) {
  left: 50%;
  animation-delay: -5.5s;
}

.sakura:nth-child(14) {
  left: 70%;
  animation-delay: -7.5s;
}

.sakura:nth-child(15) {
  left: 90%;
  animation-delay: -6.5s;
}

/* 结束页样式 */
#end {
  background: linear-gradient(to bottom, #090513 0%, #964987 75%, #fdbca3 100%);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#end .stars {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  animation: rotation 360s infinite linear;
}

#end .stars:after,
#end .stars:before {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQAQMAAAC6caSPAAAABlBMVEVHcEz///+flKJDAAAAAXRSTlMAQObYZgAAAIVJREFUeAHt2SEOwkAQhtFJKuqKRRGOgKzgUMgKRI/G0ZDoacNkN/ue/zJ+/ugBcI+01/EEAGBc04FkP58AVFoi7VaSLAEAAPB/j0hbK678AADMkXbZG03mGA0AAKsP3JgAAGDa88knsuZ8Mp1M6gEAPFtNrtEjtkh7lyRb3/PAWpS0BPgC0PMMdOEjXqoAAAAASUVORK5CYII=");
}

#end .stars:after {
  background-size: 100px;
  opacity: 0.4;
}

#end .stars:before {
  background-size: 200px;
  opacity: 0.6;
}

@keyframes rotation {
  0% {
    transform: rotate(0);
  }

  100% {
    transform: rotate(360deg);
  }
}

#end #title {
  font-size: calc(1.5em + 5vw);
  color: #fff;
  font-family: "Caveat", sans-serif;
  text-align: center;
  padding: 0.5em;
  transform: rotate(-4deg) translateY(0);
  z-index: 10;
  position: relative;
  margin-top: 20vh;
}

#end .mountains {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: auto;
  min-width: 100%;
  height: 60px;
  fill: #000022;
}

#end .mountains--layer1 {
  z-index: 2;
}

#end .mountains--layer2 {
  fill: #9D5189;
  z-index: 0;
}

/* 修改返回按钮样式以适应新背景 */
#end #back-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: white;
  font-size: 1.2rem;
  padding: 12px 30px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
}

#end.active #back-btn {
  opacity: 1;
  visibility: visible;
  animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate(-50%, 40px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

#end #back-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateX(-50%) translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 弹窗样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: rgba(255, 255, 255, 0.95);
  padding: 30px;
  border-radius: 20px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  animation: modalAppear 0.3s ease-out;
}

@keyframes modalAppear {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-content h2 {
  color: #ff6f61;
  font-size: 1.8rem;
  margin-bottom: 25px;
}

.modal-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.modal-buttons button {
  padding: 10px 30px;
  font-size: 1.2rem;
  background: #ff6f61;
  border: none;
  color: white;
  border-radius: 25px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.modal-buttons button:hover {
  transform: scale(1.05);
  background: #ff4a3d;
}

/* 在现有的 modal 样式后添加 */
#reminder-modal .modal-content {
  background: rgba(255, 192, 203, 0.95);
  /* 粉色背景 */
}

#reminder-modal h2 {
  color: #ff4757;
  /* 更深的红色 */
  margin-bottom: 20px;
}

#reread-btn {
  background: #ff4757;
  padding: 12px 35px;
  font-size: 1.3rem;
}

#reread-btn:hover {
  background: #ff6b81;
  transform: scale(1.1);
}

/* 在现有的 modal 样式后添加 */
#emotion-modal .modal-content {
  background: rgba(255, 228, 225, 0.95);
  /* 浅粉色背景 */
}

#emotion-modal h2 {
  color: #ff6b81;
  margin-bottom: 20px;
}

#emotion-modal .modal-buttons button {
  background: #ff6b81;
  padding: 12px 35px;
  font-size: 1.3rem;
}

#emotion-modal .modal-buttons button:hover {
  background: #ff4757;
  transform: scale(1.1);
}

/* 在现有的 modal 样式后添加 */
#love-modal .modal-content {
  background: rgba(255, 182, 193, 0.95);
  /* 浅粉红色背景 */
}

#love-modal h2 {
  color: #ff1493;
  /* 深粉红色 */
  margin-bottom: 20px;
}

#love-modal .modal-buttons button {
  background: #ff1493;
  padding: 12px 35px;
  font-size: 1.3rem;
}

#love-modal .modal-buttons button:hover {
  background: #ff69b4;
  transform: scale(1.1);
}

/* 在现有的 modal 样式后添加 */
#proof-modal .modal-content {
  background: rgba(255, 192, 203, 0.98);
  /* 更深的粉色背景 */
}

#proof-modal h2 {
  color: #ff1493;
  margin-bottom: 30px;
}

#proof-modal .subtitle {
  color: #ff69b4;
  font-size: 1.2rem;
  margin-bottom: 15px;
  font-style: italic;
}

#proof-modal .modal-buttons button {
  background: #ff1493;
  padding: 15px 30px;
  font-size: 1.2rem;
  max-width: 400px;
  white-space: normal;
  /* 允许按钮文字换行 */
  line-height: 1.4;
}

#proof-modal .modal-buttons button:hover {
  background: #ff69b4;
  transform: scale(1.05);
}

/* 修改证明弹窗的按钮样式 */
.proof-buttons {
  flex-direction: column;
  gap: 15px;
}

.tease-btn {
  background: #ffd1dc !important;
  /* 更浅的粉色 */
  color: #ff69b4 !important;
  /* 文字颜色更深 */
  font-size: 1rem !important;
  opacity: 0.8;
}

.tease-btn:hover {
  background: #ffc0cb !important;
  opacity: 1;
}

/* 确认弹窗样式 */
#confirm-modal .modal-content {
  background: rgba(255, 182, 193, 0.98);
}

#confirm-modal h2 {
  color: #ff1493;
  margin-bottom: 30px;
}

#confirm-modal .modal-buttons {
  flex-direction: column;
  gap: 15px;
}

#sure-btn {
  background: #ffd1dc;
  color: #ff69b4;
  font-size: 1.1rem;
  opacity: 0.8;
}

#regret-btn {
  background: #ff1493;
  font-size: 1.2rem;
  padding: 15px 30px;
}

#sure-btn:hover {
  background: #ffc0cb;
  opacity: 1;
}

#regret-btn:hover {
  background: #ff69b4;
  transform: scale(1.05);
}

/* 再次确认弹窗样式 */
#final-confirm-modal .modal-content {
  background: rgba(255, 192, 203, 0.98);
}

#final-confirm-modal .modal-buttons {
  flex-direction: column;
  gap: 15px;
}

#really-sure-btn {
  background: #ffd1dc;
  color: #ff69b4;
  font-size: 1.1rem;
  opacity: 0.8;
}

#give-up-btn {
  background: #ff1493;
  font-size: 1.2rem;
  padding: 15px 30px;
}

#really-sure-btn:hover {
  background: #ffc0cb;
  opacity: 1;
}

#give-up-btn:hover {
  background: #ff69b4;
  transform: scale(1.05);
}

/* 伤心弹窗样式 */
#sad-modal .modal-content {
  background: rgba(255, 182, 193, 0.98);
}

#sad-modal h2 {
  color: #ff1493;
  margin-bottom: 20px;
  animation: sadShake 0.5s ease-in-out;
}

@keyframes sadShake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }
}

/* 添加漂浮的泡泡效果 */
.bubble-container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1;
}

.bubble {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  backdrop-filter: blur(1px);
  animation: bubbleFloat 8s ease-in-out infinite;
}

/* 为泡泡设置不同大小和动画延迟 */
.bubble:nth-child(3n) {
  width: 30px;
  height: 30px;
  animation-duration: 10s;
}

.bubble:nth-child(3n + 1) {
  width: 20px;
  height: 20px;
  animation-duration: 8s;
}

.bubble:nth-child(3n + 2) {
  width: 15px;
  height: 15px;
  animation-duration: 6s;
}

/* 背景动画 */
@keyframes backgroundShimmer {

  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }

  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

@keyframes lightMove {
  0% {
    opacity: 0.5;
    transform: scale(1);
  }

  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }

  100% {
    opacity: 0.5;
    transform: scale(1);
  }
}

@keyframes bubbleFloat {
  0% {
    transform: translateY(100vh) scale(0.5);
    opacity: 0;
  }

  20% {
    opacity: 0.8;
  }

  80% {
    opacity: 0.8;
  }

  100% {
    transform: translateY(-20vh) scale(1.2);
    opacity: 0;
  }
}

/* 结束页容器样式 */
.end-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

/* 确保烟花效果只在结束页显示 */
#end:not(.active) .stars,
#end:not(.active) .mountains,
#end:not(.active) #title {
  display: none;
}

/* 惩罚选择弹窗样式 */
#punishment-modal .modal-content {
  background: linear-gradient(135deg, #ffe6e6 0%, #ffb6c1 100%);
  border: 2px solid rgba(255, 182, 193, 0.5);
  box-shadow: 0 8px 32px rgba(255, 105, 180, 0.2);
}

#punishment-modal h2 {
  color: #ff1493;
  font-size: 2rem;
  text-shadow: 1px 1px 2px rgba(255, 20, 147, 0.2);
}

#punishment-modal .modal-buttons button {
  background: linear-gradient(45deg, #ff69b4, #ff1493);
  border: none;
  box-shadow: 0 4px 15px rgba(255, 20, 147, 0.3);
  transition: all 0.3s ease;
}

#punishment-modal .modal-buttons button:hover {
  background: linear-gradient(45deg, #ff1493, #ff69b4);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 20, 147, 0.4);
}

#punishment-modal .tease-btn {
  background: linear-gradient(45deg, #ffd1dc, #ffb6c1) !important;
  color: #ff69b4 !important;
  border: 1px solid rgba(255, 105, 180, 0.3) !important;
}

#punishment-modal .tease-btn:hover {
  background: linear-gradient(45deg, #ffb6c1, #ffd1dc) !important;
}

/* 通过考验弹窗样式 */
#success-modal .modal-content {
  background: linear-gradient(135deg, #fff0f5 0%, #ffc0cb 100%);
  border: 2px solid rgba(255, 182, 193, 0.5);
  box-shadow: 0 8px 32px rgba(255, 105, 180, 0.2);
  animation: successPulse 2s infinite;
}

@keyframes successPulse {
  0% {
    box-shadow: 0 8px 32px rgba(255, 105, 180, 0.2);
  }

  50% {
    box-shadow: 0 8px 32px rgba(255, 105, 180, 0.4);
  }

  100% {
    box-shadow: 0 8px 32px rgba(255, 105, 180, 0.2);
  }
}

#success-modal h2 {
  color: #ff1493;
  font-size: 2.2rem;
  text-shadow: 1px 1px 2px rgba(255, 20, 147, 0.2);
  animation: successTitleGlow 1.5s ease-in-out infinite alternate;
}

#success-modal #reward-btn {
  background: linear-gradient(45deg, #ff69b4, #ff1493);
  border: none;
  box-shadow: 0 4px 15px rgba(255, 20, 147, 0.3);
  padding: 15px 40px;
  font-size: 1.4rem;
  transition: all 0.3s ease;
}

#success-modal #reward-btn:hover {
  background: linear-gradient(45deg, #ff1493, #ff69b4);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(255, 20, 147, 0.4);
}

@keyframes successTitleGlow {
  from {
    text-shadow: 0 0 5px rgba(255, 20, 147, 0.2),
      0 0 10px rgba(255, 20, 147, 0.2);
  }

  to {
    text-shadow: 0 0 10px rgba(255, 20, 147, 0.4),
      0 0 20px rgba(255, 20, 147, 0.4);
  }
}

/* 密码验证弹窗样式 */
#password-modal .modal-content {
  background: linear-gradient(135deg, #fff0f5 0%, #ffc0cb 100%);
  border: 2px solid rgba(255, 182, 193, 0.5);
  box-shadow: 0 8px 32px rgba(255, 105, 180, 0.2);
}

#password-modal h2 {
  color: #ff1493;
  font-size: 2rem;
  text-shadow: 1px 1px 2px rgba(255, 20, 147, 0.2);
  margin-bottom: 20px;
}

#password-input {
  width: 200px;
  padding: 12px 20px;
  margin: 15px 0;
  border: 2px solid rgba(255, 105, 180, 0.3);
  border-radius: 25px;
  font-size: 1.2rem;
  text-align: center;
  outline: none;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
}

#password-input:focus {
  border-color: #ff1493;
  box-shadow: 0 0 10px rgba(255, 20, 147, 0.2);
}

#verify-btn {
  background: linear-gradient(45deg, #ff69b4, #ff1493);
  border: none;
  box-shadow: 0 4px 15px rgba(255, 20, 147, 0.3);
  padding: 12px 35px;
  font-size: 1.3rem;
  transition: all 0.3s ease;
}

#verify-btn:hover {
  background: linear-gradient(45deg, #ff1493, #ff69b4);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 20, 147, 0.4);
}

/* 密码错误时的晃动动画 */
@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-10px);
  }

  75% {
    transform: translateX(10px);
  }
}

.shake {
  animation: shake 0.5s ease-in-out;
}

/* 密码输入框占位符样式 */
#password-input::placeholder {
  color: rgba(255, 105, 180, 0.5);
}

/* 修改隐藏爱心样式，确保只在结束页面显示 */
.secret-heart {
  display: none;
  /* 默认隐藏 */
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 16px;
  color: #ff1493;
  cursor: pointer;
  opacity: 0.5;
  transition: all 0.3s ease;
  z-index: 1000;
}

/* 只在结束页面激活时显示爱心 */
#end.active .secret-heart {
  display: block;
}

.secret-heart:hover {
  opacity: 1;
  transform: scale(1.2);
}

/* 数字弹窗样式 */
#number-modal .modal-content {
  background: linear-gradient(135deg, #fff0f5 0%, #ffc0cb 100%);
  border: 2px solid rgba(255, 182, 193, 0.5);
  box-shadow: 0 8px 32px rgba(255, 105, 180, 0.2);
  padding: 30px 50px;
}

#number-modal h2 {
  color: #ff1493;
  font-size: 3rem;
  text-shadow: 1px 1px 2px rgba(255, 20, 147, 0.2);
  margin: 0 0 20px 0;
  font-family: monospace;
  letter-spacing: 5px;
}

#close-number-btn {
  background: linear-gradient(45deg, #ff69b4, #ff1493);
  border: none;
  box-shadow: 0 4px 15px rgba(255, 20, 147, 0.3);
  padding: 10px 30px;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

#close-number-btn:hover {
  background: linear-gradient(45deg, #ff1493, #ff69b4);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 20, 147, 0.4);
}

/* 响应式：适配手机端 */
@media (max-width: 600px) {

  html,
  body {
    font-size: 14px;
    overflow-x: hidden;
  }

  h1,
  #home h1,
  #end #title {
    font-size: 2.2rem !important;
    margin-bottom: 18px;
  }

  .content,
  #home .content,
  #love-letter,
  .modal-content,
  .end-container {
    padding: 12px !important;
    max-width: 98vw !important;
    border-radius: 16px !important;
    box-sizing: border-box;
  }

  #love-letter {
    font-size: 1.1rem !important;
    padding: 18px !important;
  }

  button,
  .modal-buttons button,
  #enter-btn,
  #back-btn,
  #reward-btn,
  #verify-btn,
  #sure-btn,
  #regret-btn,
  #really-sure-btn,
  #give-up-btn,
  #close-number-btn {
    font-size: 1rem !important;
    padding: 10px 18px !important;
    border-radius: 30px !important;
  }

  .heart {
    font-size: 2.2rem !important;
  }

  .floating-heart {
    font-size: 16px !important;
  }

  .bubble {
    width: 12px !important;
    height: 12px !important;
  }

  .sakura {
    width: 8px !important;
    height: 8px !important;
  }

  .modal-content {
    min-width: 0 !important;
    width: 95vw !important;
    max-width: 98vw !important;
  }

  .modal-content h2 {
    font-size: 1.2rem !important;
  }

  #password-input {
    width: 90vw !important;
    font-size: 1rem !important;
    padding: 8px 10px !important;
  }

  #number-modal h2 {
    font-size: 1.5rem !important;
  }

  .end-container {
    padding: 0 !important;
  }

  #end .mountains {
    width: 100vw !important;
    height: 60px !important;
  }

  #end .stars {
    height: 60px !important;
  }
}