body {
  background-color: #f1d5da; /* 浅粉色 */
  text-align: center;
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.container {
  width: 90%; /* 适应手机屏幕宽度 */
  max-width: 500px; /* 最大宽度限制 */
}

#mainImage {
  width: 100%; /* 图片宽度自适应容器 */
  max-width: 200px; /* 最大宽度限制 */
  transition: all 0.3s ease;
}

h1 {
  font-size: 5vw; /* 字体大小根据视口宽度变化 */
  color: #68495b;
  margin: 20px 0; /* 增加上下间距 */
}

button {
  font-size: 4vw; /* 字体大小根据视口宽度变化 */
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin: 10px;
  transition: all 0.3s ease;
}

#yes {
  background-color: #d4818e; /* 粉色 */
  color: white;
}

#no {
  background-color: #6784b1; /* 蓝色 */
  color: white;
  position: relative;
}

.yes-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #ffdae0; /* 粉色 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.yes-text {
  font-size: 7vw; /* 字体大小根据视口宽度变化 */
}

.yes-image {
  width: 50%; /* 图片宽度自适应容器 */
  max-width: 300px; /* 最大宽度限制 */
  margin-top: 20px;
}

/* 新增：项目仓库链接样式及图标 */
.repo-link {
  display: inline-flex;
  align-items: center;
  margin-top: 30px;
  font-size: 16px;
  color: #68495b;
  text-decoration: none;
  border: 1px solid #68495b;
  padding: 5px 10px;
  border-radius: 5px;
}

.repo-link i {
  margin-right: 5px;
  font-size: 20px;
}

/* 电脑端样式优化 */
@media (min-width: 768px) {
  body {
    display: block;
  }

  .container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    max-width: none;
  }

  #mainImage {
    width: 200px; /* 固定图片宽度 */
  }

  h1 {
    font-size: 28px; /* 固定字体大小 */
    margin: 20px 0;
  }

  button {
    font-size: 18px; /* 固定字体大小 */
  }

  .yes-text {
    font-size: 36px; /* 固定字体大小 */
  }

  .yes-image {
    width: 300px; /* 固定图片宽度 */
  }

  .repo-link {
    font-size: 18px;
  }
}

/* 新增：心形飘落动画 */
@keyframes fall {
  0% {
    transform: translateY(-100px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

.falling-heart {
  position: fixed;
  top: -50px;
  pointer-events: none;
  animation: fall 5s linear forwards;
}
