/* 页面基础 */
body {
  margin: 0;
  padding: 2rem;
  background-color: #f4f4f9;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}


@keyframes rainbow-border {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 400% 0%;
  }
}



/* 照片容器布局 */
.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

/* 单个卡片 */
.photo-card {
  background: white;
  border-radius: 16px;
  width: 320px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color .25s ease;
  animation: fadeIn 0.6s ease forwards;
  opacity: 0;
}

.photo-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 36px rgba(0,0,0,0.16);
}

/* 图像封装容器 */
.image-wrapper {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s ease;
}

.photo-card:hover .image-wrapper img { transform: scale(1.05); }

/* 图片标题 */
.photo-card p {
  padding: 1rem;
  font-size: 1.1rem;
  color: #444;
  text-align: center;
  margin: 0;
}

/* 淡入动画 */
@keyframes fadeIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 响应式适配 */
@media screen and (max-width: 768px) {
  .photo-card {
    width: 90%;
  }
}
