.masonry-grid {
  columns: 2;
  column-gap: 30px;
  padding: 20px;
  max-height: 80vh;
  overflow-y: hidden;
  scrollbar-width: none; /* 隐藏标准滚动条 */
  scrollbar-color: #ff7b89 rgba(255, 255, 255, 0.1);
}

.masonry-grid:hover {
  overflow-y: auto;
  scrollbar-width: thin; /* 显示标准滚动条 */
}

.masonry-grid::-webkit-scrollbar {
  width: 0; /* 初始隐藏WebKit滚动条 */
  height: 8px;
}

.masonry-grid:hover::-webkit-scrollbar {
  width: 8px; /* 悬停时显示WebKit滚动条 */
}

.masonry-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.masonry-grid::-webkit-scrollbar-thumb {
  background-color: #ff7b89;
  border-radius: 4px;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 20px;
  display: inline-block;
  width: 100%;
  transition: all 0.3s ease;
}

.masonry-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.photo-frame {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.photo-frame:hover {
  transform: scale(1.03);
}

.photo-frame img {
  width: 100%;
  height: auto;
  display: block;
}

.photo-caption {
  padding: 10px;
  text-align: center;
  background: #f9f9f9;
  font-size: 14px;
}