body {
  background-color: #f8f9fa;
}

.polaroid-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
  justify-content: center;
  min-height: 300px;
  padding: 20px;
}

.polaroid {
  width: 100%;
  background-color: white;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 10px 10px 25px 10px;
  cursor: move;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  aspect-ratio: 2 / 3; /* 6:9 aspect ratio */
  max-width: 180px;
  margin: 0 auto;
}

.polaroid:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.polaroid-inner {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.polaroid img {
  width: 100%;
  height: calc(100% - 20px);
  object-fit: cover;
  margin-bottom: 10px;
  transition: transform 0.3s ease;
  border: 1px solid #eee;
}

.polaroid-caption {
  text-align: center;
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 5px;
  display: none; /* Hide the caption area */
}

.polaroid-controls {
  position: absolute;
  top: 5px;
  right: 5px;
  display: none;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 4px;
  padding: 2px;
  z-index: 10;
}

.polaroid:hover .polaroid-controls {
  display: flex;
}

.photo-number {
  position: absolute;
  bottom: 5px;
  right: 5px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 3px;
}

/* Layout styles */
.layout-grid .polaroid {
  margin: 0 auto;
}

.layout-scattered .polaroid {
  position: absolute;
  transform: rotate(var(--random-rotate));
}

.layout-timeline .polaroid {
  width: 100%;
  max-width: 180px;
  margin-bottom: 30px;
}

/* Loading spinner */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  display: none;
}

.spinner-border {
  width: 3rem;
  height: 3rem;
}

/* Pagination styles */
.pagination {
  flex-wrap: wrap;
}

.page-link {
  padding: 0.375rem 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .polaroid-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .polaroid-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .polaroid {
    max-width: 150px;
  }
}

@media (max-width: 576px) {
  .polaroid-container {
    grid-template-columns: repeat(1, 1fr);
  }

  .polaroid {
    max-width: 180px;
  }
}
