* { box-sizing: border-box; }
:root {
  --bg: #0d0f14;
  --card: rgba(255, 255, 255, .08);
  --card-strong: rgba(255, 255, 255, .14);
  --text: #f5f7fb;
  --muted: rgba(245, 247, 251, .68);
  --line: rgba(255, 255, 255, .12);
  --shadow: 0 18px 60px rgba(0, 0, 0, .35);
}
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(102, 126, 234, .24), transparent 34rem),
    radial-gradient(circle at top right, rgba(240, 147, 251, .18), transparent 30rem),
    var(--bg);
}
body.no-scroll { overflow: hidden; }
button {
  cursor: pointer;
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--card);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 15px;
  transition: .18s ease;
  backdrop-filter: blur(14px);
}
button:hover { background: var(--card-strong); transform: translateY(-1px); }
.hero {
  max-width: 1320px;
  margin: 0 auto;
  padding: 46px 22px 22px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}
.eyebrow {
  margin: 0 0 8px;
  letter-spacing: .32em;
  color: var(--muted);
  font-size: 12px;
}
h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 66px);
  line-height: 1;
  font-weight: 800;
}
.subtitle {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
main { max-width: 1320px; margin: 0 auto; padding: 0 22px 60px; }
.album-info {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  padding: 18px 0 20px;
  border-top: 1px solid var(--line);
}
.gallery {
  columns: 5 220px;
  column-gap: 16px;
}
.photo-card {
  display: block;
  width: 100%;
  margin: 0 0 16px;
  break-inside: avoid;
  border-radius: 20px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
}
.photo-card img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 110px;
  object-fit: cover;
  transition: transform .25s ease, opacity .25s ease;
}
.photo-card:hover img { transform: scale(1.035); }
.photo-index {
  position: absolute;
  left: 10px;
  top: 10px;
  min-width: 30px;
  height: 30px;
  padding: 0 9px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(0, 0, 0, .46);
  color: #fff;
  font-size: 12px;
  backdrop-filter: blur(10px);
}
.empty {
  text-align: center;
  margin-top: 70px;
  padding: 40px 20px;
  border: 1px dashed var(--line);
  border-radius: 24px;
  background: var(--card);
}
.empty p { color: var(--muted); }
.viewer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 70px 70px 56px;
}
.viewer.show { display: flex; }
.viewer-bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .88);
  backdrop-filter: blur(10px);
}
.viewer-top {
  position: absolute;
  z-index: 2;
  left: 22px;
  right: 22px;
  top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
}
#viewerCounter {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
}
#closeBtn {
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 30px;
  line-height: 1;
}
#viewerImg {
  position: relative;
  z-index: 1;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .5);
  user-select: none;
}
.nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  padding: 0;
  font-size: 42px;
  line-height: 42px;
}
.nav:hover { transform: translateY(-50%) scale(1.04); }
.prev { left: 18px; }
.next { right: 18px; }
.caption {
  position: absolute;
  z-index: 2;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 44px);
  padding: 8px 14px;
  border-radius: 999px;
  color: rgba(255,255,255,.82);
  background: rgba(255,255,255,.10);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 760px) {
  .hero { align-items: start; flex-direction: column; padding-top: 30px; }
  .hero-actions { justify-content: flex-start; }
  .gallery { columns: 2 150px; column-gap: 10px; }
  .photo-card { margin-bottom: 10px; border-radius: 14px; }
  .viewer { padding: 66px 0 56px; }
  .nav { width: 46px; height: 46px; font-size: 34px; background: rgba(0,0,0,.24); }
  .prev { left: 8px; }
  .next { right: 8px; }
  #viewerImg { border-radius: 0; }
}
