* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 2rem;
  font-family: system-ui, -apple-system, sans-serif;
  background: #111;
  color: #f5f5f5;
}

/* Top Filter Bar */
.gallery-controls {
  max-width: 1100px;
  margin: 0 auto 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.gallery-controls label {
  font-size: 0.95rem;
  color: #ccc;
  margin-right: 0.5rem;
}

.year-select {
  background: #222;
  color: #fff;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 0.5rem 0.9rem;
  font-size: 1rem;
  cursor: pointer;
}

.year-select:focus {
  outline: 2px solid #888;
}

.photo-count {
  font-size: 0.9rem;
  color: #999;
}

/* Main Page Thumbnail Grid */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
}

.thumb {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  background: #222;
  border: none;
  padding: 0;
  cursor: pointer;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.thumb:hover img {
  transform: scale(1.05);
}

.status-msg {
  grid-column: 1 / -1;
  text-align: center;
  color: #aaa;
  padding: 2rem 0;
}

/* Lightbox Overlay */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  z-index: 1000;
  touch-action: pan-y;
}

.lightbox.open {
  display: flex;
}

/* Top Header */
.lb-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.lb-counter {
  font-size: 0.95rem;
  color: #bbb;
}

/* Main Image Stage */
.lb-stage {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  margin: 0.5rem 0;
}

.lb-stage img {
  max-width: 85vw;
  max-height: calc(100vh - 220px);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  user-select: none;
  object-fit: contain;
}

.lb-caption {
  margin-top: 0.75rem;
  font-size: 1rem;
  color: #eee;
  text-align: center;
  max-width: 700px;
}

.lb-date {
  font-size: 0.85rem;
  color: #999;
  margin-top: 0.25rem;
}

/* Navigation Buttons */
.lb-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.35rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lb-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

.lb-prev,
.lb-next {
  position: fixed;
  top: 45%;
  transform: translateY(-50%);
  z-index: 10;
}

.lb-prev {
  left: 1rem;
}

.lb-next {
  right: 1rem;
}

/* Bottom Thumbnail Strip */
.lb-strip {
  display: flex;
  gap: 0.5rem;
  max-width: 100%;
  overflow-x: auto;
  padding: 0.5rem 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: #555 transparent;
}

.lb-strip-item {
  flex: 0 0 64px;
  height: 48px;
  border-radius: 5px;
  overflow: hidden;
  border: 2px solid transparent;
  opacity: 0.5;
  padding: 0;
  background: #222;
  cursor: pointer;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.lb-strip-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lb-strip-item.active {
  border-color: #fff;
  opacity: 1;
}

.lb-strip-item:hover {
  opacity: 0.9;
}

@media (max-width: 600px) {
  .lb-prev,
  .lb-next {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }

  .lb-stage img {
    max-width: 94vw;
  }
}
.thumb {
  position: relative;
}

.video-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
}

.lb-stage video {
  max-width: 85vw;
  max-height: calc(100vh - 220px);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  background: #000;
}

@media (max-width: 600px) {
  .lb-stage video {
    max-width: 94vw;
  }
}

.filter-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.filter-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.filter-group label {
  margin-right: 0;
}

.filter-group label[for="monthSelect"] {
  margin-left: 0;
}

@media (max-width: 600px) {
  body {
    padding: 1rem;
  }

  .filter-group {
    width: 100%;
    gap: 0.5rem 0.75rem;
  }

  .year-select {
    padding: 0.45rem 0.65rem;
    font-size: 0.95rem;
  }
}

.month-nav-btn {
  background: #222;
  color: #f5f5f5;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 0.48rem 0.7rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.month-nav-btn:hover:not(:disabled) {
  background: #2d2d35;
  border-color: #666;
}

.month-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

@media (max-width: 600px) {
  .month-nav-btn {
    padding: 0.42rem 0.55rem;
    font-size: 0.85rem;
  }
}

