/* Minimalist Photo Gallery - Pure Dark Theme */
:root {
  --bg-primary: #1A1A1A;
  --bg-secondary: #242424;
  --bg-tertiary: #2e2e2e;
  --text-primary: #C2C2C2;
  --text-secondary: #949494;
  --text-muted: #6e6e6e;
  --font-sans: Helvetica, Arial, sans-serif;
  --transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: Helvetica, Arial, sans-serif;
  color: #C2C2C2;
  background: #1A1A1A;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Floating Back Button (Album -> Home) */
.floating-back-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 50;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(26, 26, 26, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #C2C2C2;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.floating-back-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transform: scale(1.08);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Album Page Intro (Title + Description) */
.album-intro {
  padding: 8rem 2rem 5rem 2rem;
}

.album-title {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 8px;
}

.album-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 800px;
}

/* Albums List Page (Home) */
.home-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px;
}

.albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.album-card {
  display: flex;
  flex-direction: column;
  background: none;
  overflow: hidden;
  transition: transform var(--transition), opacity var(--transition);
}

.album-card:hover {
  transform: translateY(-4px);
}

.album-cover-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  position: relative;
  background: var(--bg-tertiary);
  overflow: hidden;
}

.album-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

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

.album-card-body {
  padding: 16px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.album-card-title {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.album-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.album-card-footer {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Album Photos: Seamless Masonry (0 padding, 0 border, 0 radius) */
.gallery-wrapper {
  width: 100%;
  padding: 0;
  margin: 0;
  background: #1A1A1A;
}

.gallery-masonry {
  column-count: 4;
  column-gap: 0;
  width: 100%;
  margin: 0;
  padding: 0;
}

@media (max-width: 1600px) { .gallery-masonry { column-count: 4; } }
@media (max-width: 1200px) { .gallery-masonry { column-count: 3; } }
@media (max-width: 768px)  { .gallery-masonry { column-count: 2; } }
@media (max-width: 480px)  { .gallery-masonry { column-count: 1; } }

.photo-item {
  break-inside: avoid;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  outline: none;
  box-shadow: none;
  overflow: hidden;
  cursor: pointer;
  background: #1A1A1A;
  line-height: 0; /* fixes bottom gap */
  display: block;
}

.photo-thumb {
  width: 100%;
  height: auto;
  display: block;
  border: none;
  border-radius: 0;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.photo-item:hover .photo-thumb {
  filter: brightness(1.08);
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(18, 18, 18, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  user-select: none;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  z-index: 10;
  color: #C2C2C2;
}

.lightbox-counter {
  font-size: 0.85rem;
  color: #C2C2C2;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}

.lightbox-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lightbox-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #C2C2C2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: scale(1.05);
}

.lightbox-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 10px 60px;
}

.lightbox-img-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
}

.lightbox-img {
  max-width: 94vw;
  max-height: 88vh;
  object-fit: contain;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: block;
}

.lightbox-img.loading {
  opacity: 0.4;
  transform: scale(0.99);
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #C2C2C2;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  z-index: 10;
}

.lightbox-nav-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  transform: translateY(-50%) scale(1.08);
}

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

@media (max-width: 768px) {
  .home-container { padding: 32px 16px; }
  .floating-back-btn { top: 14px; left: 14px; width: 40px; height: 40px; }
  .lightbox-stage { padding: 10px; }
  .lightbox-nav-btn { width: 40px; height: 40px; }
  .lightbox-nav-prev { left: 10px; }
  .lightbox-nav-next { right: 10px; }
}
