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

body {
  background: #0a0a0f;
  color: #e0e0e8;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
}

header {
  padding: 2rem 2rem 1rem;
  max-width: 1600px;
  margin: 0 auto;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #f0f0f8;
}

#image-count {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #666;
}

#gallery-nav {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

#gallery-nav a {
  color: #888;
  text-decoration: none;
  font-size: 0.875rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
}

#gallery-nav a:hover {
  color: #f0f0f8;
  background: rgba(255, 255, 255, 0.05);
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 1rem 2rem 3rem;
  max-width: 1600px;
  margin: 0 auto;
}

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

@media (max-width: 800px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 1rem 1rem 2rem; }
}

@media (max-width: 500px) {
  .grid { grid-template-columns: 1fr; }
}

.thumbnail {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #141420;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.thumbnail:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

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

.empty {
  text-align: center;
  padding: 4rem 2rem;
  color: #555;
}

.empty svg {
  margin-bottom: 1rem;
  opacity: 0.4;
}

.empty p {
  font-size: 1rem;
}

.hidden {
  display: none !important;
}

/* Photoswipe overrides for dark theme */
.pswp__bg { background: rgba(10, 10, 15, 0.95); }

.pswp__button {
  background: none;
  border: none;
  color: #aaa;
  transition: color 0.15s ease;
}

.pswp__button:hover { color: #fff; }

.pswp__button--close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  z-index: 1;
}

.pswp__button--arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
}

.pswp__button--arrow:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-50%) scale(1.08);
}

.pswp__button--arrow--prev { left: 1rem; }
.pswp__button--arrow--next { right: 1rem; }

.pswp__button--arrow svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pswp__counter { color: #888; font-size: 0.875rem; letter-spacing: 0.05em; }

.pswp__ui { pointer-events: auto; }
