* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f5f5f5;
  color: #222;
}

/* 顶部 */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px 18px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
}

nav {
  display: flex;
  gap: 10px;
  overflow-x: auto;
}

nav button {
  border: none;
  padding: 8px 14px;
  border-radius: 999px;
  background: #eee;
  cursor: pointer;
  transition: 0.2s;
}

nav button:hover {
  background: #111;
  color: #fff;
}

/* 瀑布流 */
#grid {
  column-count: 4;
  column-gap: 12px;
  padding: 12px;
}

@media (max-width: 1200px) {
  #grid {
    column-count: 3;
  }
}

@media (max-width: 768px) {
  #grid {
    column-count: 2;
  }
}

.item {
  break-inside: avoid;
  margin-bottom: 12px;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
}

.item img {
  width: 100%;
  display: block;
  border-radius: 10px;
  transition: transform 0.25s ease;
  background: #eee;
}

.item:hover img {
  transform: scale(1.02);
}

/* Lightbox */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 999;
  padding: 20px;
}

/* 左右按钮 */
#prev,
#next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  font-size: 42px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

#prev {
  left: 20px;
}

#next {
  right: 20px;
}

#prev:hover,
#next:hover {
  background: rgba(255,255,255,0.28);
}

#lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#lightbox img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 10px;
  opacity: 1;
  transition: opacity 0.25s ease;
}


#exif {
  margin-top: 14px;
  color: #fff;
  font-size: 14px;
  text-align: center;
}


/* 当前导航高亮 */
nav button.active {
  background: #111;
  color: white;
}

/* Lightbox 图片淡入动画 */
#lightbox img {
  opacity: 1;
  transition: opacity 0.25s ease;
}

/* EXIF 信息样式 */
#exif {
  margin-top: 16px;
  color: #fff;
  text-align: center;
  line-height: 1.6;
}

.photo-index {
  font-size: 14px;
  opacity: 0.8;
}

.photo-name {
  font-size: 16px;
  font-weight: 600;
}

.photo-date {
  font-size: 14px;
  opacity: 0.8;
}

.photo-meta {
  font-size: 14px;
  opacity: 0.9;
}