:root {
  color-scheme: dark;
  --bg: #14121a;
  --card-bg: #1e1b26;
  --text: #f2eefb;
  --muted: #a79fc0;
  --accent: #ff8a5b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.site-header {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
}

.site-header h1 {
  margin: 0;
  font-size: 2rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  padding: 0 1.5rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.card {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--card-bg);
  cursor: pointer;
  border: none;
  padding: 0;
}

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

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

.card .badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status {
  text-align: center;
  color: var(--muted);
  min-height: 1.5rem;
}

#sentinel {
  height: 1px;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 100;
}

.lightbox.hidden {
  display: none;
}

.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: min(90vw, 900px);
  max-height: 90vh;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-info {
  text-align: center;
  max-width: 700px;
}

.lightbox-info p {
  white-space: pre-wrap;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.lightbox-info a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.lightbox-info a:hover {
  text-decoration: underline;
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}
