/* 动画效果 */
.photo-item {
  transition: transform 0.3s ease;
}

.photo-item:hover {
  transform: translateY(-5px);
}

/* 图片加载动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.photo-item {
  animation: fadeIn 0.5s ease-out;
}

/* 按钮悬停效果 */
.bottom-bar button {
  transition: all 0.3s ease;
}

.bottom-bar button:hover {
  transform: scale(1.05);
}

.bottom-bar button.primary:hover {
  background: #ff5252;
}

/* 加载中动画 */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.loading::after {
  content: "";
  width: 30px;
  height: 30px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #ff6b6b;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 图片查看器样式 */
.image-viewer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.image-viewer.active {
  display: flex;
}

.image-viewer img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
}

.image-viewer .close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 30px;
  cursor: pointer;
}

/* 响应式优化 */
@media (max-width: 768px) {
  .header {
    padding: 0 15px;
  }

  .photo-grid {
    gap: 15px;
  }

  .bottom-bar {
    padding: 0 10px;
  }
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #121212;
    color: #ffffff;
  }

  .header,
  .bottom-bar {
    background-color: #1e1e1e;
  }

  .photo-item {
    background: #2d2d2d;
  }

  .photo-date,
  .photo-description {
    color: #aaaaaa;
  }

  .bottom-bar button {
    color: #ffffff;
  }
}
