:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --text: #111216;
  --muted: #666a73;
  --accent: #e11d48; /* red */
  --accent-2: #c1123a;
  --border: #e7e8ec;
  --shadow: rgba(17, 18, 22, 0.08);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px var(--shadow);
}
.brand h1 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: .2px; color: var(--accent); }
.breadcrumbs { margin-top: 4px; color: var(--muted); font-size: 12px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--text); text-decoration: underline; }

.tools input[type="search"] {
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: #fff; color: var(--text); min-width: 220px;
}
.tools input[type="search"]::placeholder { color: #9aa0a6; }

main { padding: 18px; max-width: 1200px; margin: 0 auto; }

.section-title {
  font-size: 14px; color: var(--muted); margin: 0 0 10px 6px; font-weight: 600; letter-spacing: .3px;
}

.albums-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.album-card {
  background: var(--panel);
  border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  box-shadow: 0 4px 16px var(--shadow);
}
.album-card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 10px 24px rgba(225, 29, 72, 0.12); }
.album-thumb { aspect-ratio: 4/3; width: 100%; object-fit: cover; display: block; background: #f3f4f6; }
.album-meta { padding: 10px 12px; }
.album-title { font-size: 14px; margin: 0 0 4px; font-weight: 600; color: var(--text); }
.album-count { color: var(--muted); font-size: 12px; }

.masonry {
  column-count: 1; column-gap: 12px;
}
@media (min-width: 560px) { .masonry { column-count: 2; } }
@media (min-width: 920px) { .masonry { column-count: 3; } }
@media (min-width: 1200px) { .masonry { column-count: 4; } }

.card {
  break-inside: avoid; margin: 0 0 12px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  box-shadow: 0 6px 20px var(--shadow);
}
.card img {
  width: 100%; display: block; background: #f3f4f6; transition: filter .3s ease, transform .4s ease;
  user-select: none;
}
.card .caption {
  padding: 8px 10px; font-size: 12px; color: var(--muted);
  display: flex; align-items: center; justify-content: space-between;
}
.card .caption .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

.loader, .empty {
  text-align: center; color: var(--muted); padding: 20px; font-size: 14px;
}
.hidden { display: none !important; }

.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,0.86); display: flex; align-items: center; justify-content: center;
}
.lb-content { position: relative; max-width: 90vw; max-height: 90vh; }
.lb-content img { max-width: 100%; max-height: 90vh; border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,0.6); }
.lb-caption { text-align: center; margin-top: 10px; color: #f7f7f8; font-size: 13px; }
.lb-btn {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: rgba(225, 29, 72, 0.85); border: 1px solid rgba(255,255,255,0.25);
  color: #fff; width: 42px; height: 42px; border-radius: 50%;
  cursor: pointer; font-size: 22px; line-height: 22px;
  box-shadow: 0 8px 24px rgba(225, 29, 72, 0.4);
}
.lb-prev { left: 18px; }
lb-next { right: 18px; }
.lb-close { top: 18px; right: 18px; transform: none; width: 38px; height: 38px; font-size: 20px; }

.skeleton {
  display: block; width: 100%; aspect-ratio: 4/3; background:
    linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 37%, #f3f4f6 63%);
  background-size: 400% 100%; animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { 0% { background-position: 100% 0 } 100% { background-position: 0 0 } }