:root {
  --bg: #121212;
  --fg: #eee;
  --accent: #4da3ff;
  --card-bg: #1e1e1e;
}

* { box-sizing: border-box; }

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

header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #333;
}

h1 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
}

.breadcrumbs a {
  color: var(--accent);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

main {
  padding: 1.5rem;
}

.up-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--accent);
  text-decoration: none;
}

.folder-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.folder-list li a {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--card-bg);
  border-radius: 8px;
  color: var(--fg);
  text-decoration: none;
}

.folder-list li a:hover {
  background: #2a2a2a;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.thumb-link {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: var(--fg);
  transition: transform 0.15s ease;
}

.thumb-link:hover {
  transform: scale(1.03);
}

.thumb-link img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  background: #000;
}

.caption {
  padding: 0.4rem 0.5rem;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empty {
  color: #888;
}
