.wrapper {
  padding: 0 4rem;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

main {
  margin-top: 6rem;
  padding: 1.5rem 0;
}

h1 {
  font-size: 2.5rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  margin-inline-start: 0px;
  margin-inline-end: 0px;
  font-family: 'Georgia', serif;
}

.album-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.title-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.album-info {
  width: 100%;  
}

.date-badge {
  padding: 0.3rem 0.8rem;
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  font-family: 'Space Mono', monospace;
  align-self: center; /* Keep the date badge aligned with title baseline */
  margin-top: 0.3rem; /* Fine-tune position */
}

.album-action-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  width: 100%;
}

.album-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  font-family: 'Space Mono', monospace;
  margin-bottom: 1rem;
}

.stats-toggle {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  position: relative;
  margin-bottom: -2px;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
}

.stats-toggle:hover {
  color: rgba(255, 255, 255, 1);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.stats-toggle::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0.5em;
  right: 0.5em;
  height: 1px;
  display:invisible;
}

.stats-toggle::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0.5em;
  right: 0.5em;
  height: 1px;
  background-color: currentColor;
}

.stats-toggle:hover {
  color: rgba(255, 255, 255, 1);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.stats-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
  text-align: center;
}

.stat-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  font-family: 'Space Mono', monospace;
  font-weight: 500;
}

.control-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.filters {
  display: flex;
  gap: 0.5rem;
}

@media (max-width: 420px) {
  .hide-mobile {
    display: none;
  }
}

.filter-btn {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.05);
}

.filter-btn.active {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 1);
  border-color: rgba(255, 255, 255, 0.3);
}

.filter-count {
  opacity: 0.6;
  font-size: 0.75rem;
}

.view-controls {
  display: flex;
  gap: 0.5rem;
}

.view-btn {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.view-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.05);
}

.view-btn.active {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 1);
  border-color: rgba(255, 255, 255, 0.3);
}

.view-btn svg {
  width: 16px;
  height: 16px;
}

.photo-grid {
  margin-bottom: 4rem;
}

.photo-grid.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.photo-grid.masonry {
  column-count: 3;
  column-gap: 2rem;
  column-fill: balance;
}

.photo-item {
  overflow: hidden;
  padding: 0;
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.4s ease;
  background: rgba(255, 255, 255, 0.05);
  position: relative;
  opacity: 0;
  transform: translateY(30px);
}

.photo-grid.grid .photo-item {
  aspect-ratio: 3/2;
}

.photo-grid.masonry .photo-item {
  break-inside: avoid;
  margin-bottom: 2rem;
  display: block;
  width: 100%;
}

.photo-grid.masonry .photo-item picture {
  display: block;
  width: 100%;
}


.photo-grid.masonry .photo-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.4s ease;
  border-radius: 12px;
  display: block; /* Remove inline spacing */
}

.photo-grid.grid .photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.photo-grid.mounted .photo-item {
  animation: fadeInUp 0.6s ease-out forwards;
  animation-delay: var(--delay);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.photo-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

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

/* Photo overlay styles */
.photo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0) 60%,
    rgba(0, 0, 0, 0.8) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding: 1rem;
  border-radius: 12px;
}

.photo-item:hover .photo-overlay {
  opacity: 1;
}

.photo-info {
  margin-top: auto;
}

.photo-title {
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: 'Space Mono', monospace;
  text-align: start;
  margin-bottom: 0.3rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.photo-meta {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.75rem;
  font-family: 'Space Mono', monospace;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

.meta-divider {
  opacity: 0.5;
}

.photo-actions {
  align-self: flex-end;
}

.action-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1) translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

.action-btn svg {
  width: 16px;
  height: 16px;
}

/* Responsive columns for masonry */
@media (max-width: 1200px) {
  .photo-grid.masonry {
    column-count: 2;
  }
}

@media (max-width: 768px) {
  .photo-grid.masonry {
    column-count: 1;
  }
  
  .photo-grid.grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

/* Keep all the existing styles for other elements */
.photo-count {
  font-weight: 500;
}

/* Hide photo count on small screens */
@media (max-width: 600px) {
  .photo-count {
    display: none;
  }
}

@media (max-width: 600px) {
  .divider {
    display: none;
  }
}

.color-type {
  font-size: 0.65rem;
  opacity: 0.8;
  font-weight: 500;
}

.photo-item.monochrome {
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.photo-item.monochrome::before {
  content: 'B&W';
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.6rem;
  font-family: 'Space Mono', monospace;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.photo-item.monochrome:hover::before {
  opacity: 1;
}

.no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: rgba(255, 255, 255, 0.6);
}

.no-results p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.reset-filter {
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.reset-filter:hover {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 1);
}

.back-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px; /* Add border radius */
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  text-decoration: none;
}

.back-button:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.05);
}

.back-button svg {
  width: 18px; /* Reduce from default size */
  height: 18px; /* Reduce from default size */
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .back-button {
    padding: 0.5rem 1rem;
  }
}

/* Album Footer Styles */
.album-footer {
  margin-top: 4rem;
  padding: 3rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.location-info h3 {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 1rem 0;
  font-weight: 500;
}

.location-info p {
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
  margin: 0;
  font-size: 0.95rem;
}

.sharing-options h3 {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 1rem 0;
  font-weight: 500;
}

.share-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  text-decoration: none;
  justify-content: center;
}

.share-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 1);
  transform: translateY(-2px);
}

.share-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Responsive footer */
@media (max-width: 768px) {
  .wrapper {
    padding: 1.5rem;
  }

  .album-header {
    flex-direction: column;
    gap: 1.5rem;
  }

  .control-bar {
    flex-direction: column;
    gap: 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .album-footer {
    margin-top: 3rem;
    padding: 2rem 0;
  }
}
