:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #6e6e80;
  --border: #e2e2e8;
  --accent: #4361ee;
  --accent-hover: #3a56d4;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
  --radius: 12px;
  --max-width: 1200px;
  --header-height: 200px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.site-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #fff;
  padding: 48px 20px;
  text-align: center;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 1px;
}

.site-desc {
  font-size: 14px;
  opacity: 0.7;
  margin-top: 8px;
}

/* Breadcrumb */
.breadcrumb {
  max-width: var(--max-width);
  margin: 20px auto;
  padding: 0 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.crumb-link {
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}

.crumb-link:hover {
  text-decoration: underline;
}

.crumb-sep {
  margin: 0 8px;
  opacity: 0.5;
}

/* Album Grid */
.album-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.album-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.album-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.album-card-cover {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #e8e8ed;
  overflow: hidden;
}

.album-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.album-card:hover .album-card-cover img {
  transform: scale(1.05);
}

.album-card-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 48px;
}

.album-card-info {
  padding: 16px;
}

.album-card-name {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}

.album-card-meta {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Photo Grid */
.photo-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.photo-item {
  position: relative;
  aspect-ratio: 1;
  background: #e8e8ed;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s;
}

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

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s;
}

.photo-item img.loaded {
  opacity: 1;
}

.photo-item-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 24px;
  background: linear-gradient(135deg, #e8e8ed, #d8d8de);
}

/* Loading */
.loading-spinner {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
}

.load-more-status {
  text-align: center;
  padding: 20px;
  color: var(--text-secondary);
  font-size: 14px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.92);
}

.lightbox-content {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-info {
  color: #fff;
  font-size: 14px;
  text-align: center;
  padding: 12px;
  max-width: 600px;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 2;
}

.lightbox-close {
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  font-size: 24px;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 28px;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255,255,255,0.25);
}

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  z-index: 2;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 32px 20px;
  color: var(--text-secondary);
  font-size: 13px;
}

/* Responsive */
@media (max-width: 600px) {
  .site-header { padding: 32px 20px; }
  .site-title { font-size: 22px; }
  .album-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
  .album-card-info { padding: 12px; }
  .album-card-name { font-size: 15px; }
  .lightbox-nav { width: 40px; height: 40px; font-size: 22px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}
