:root {
  --bg: #f8f8f8;
  --text: #222;
  --accent: #0066cc;
  --lightbox-bg: rgba(0, 0, 0, 0.9);
  --gap: 1rem;
  --radius: 8px;
}

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

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.site-header {
  text-align: center;
  padding: 2rem 1rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.site-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-header .subtitle {
  color: #666;
  margin-top: 0.5rem;
  font-size: 1.1rem;
}

main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

.gallery {
  column-width: 300px;
  column-gap: var(--gap);
}

.gallery img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: var(--gap);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: #e0e0e0;
}

.gallery img:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.loading,
.error {
  text-align: center;
  padding: 2rem;
  font-size: 1.1rem;
  color: #666;
}

.error {
  color: #c00;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: var(--lightbox-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

.lightbox[hidden] {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  user-select: none;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  cursor: pointer;
  font-size: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  user-select: none;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
}

.lightbox-prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 600px) {
  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }
  .lightbox-close {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }
}