body {
  margin: 0;
  background: #111;
  font-family: Arial, sans-serif;
  color: white;
}
header {
  height: 15vh;
  height: 15dvh;
  display: flex;
  justify-content: center;
  align-items: center;
}

header h1 {
  text-align: center;
}

main {
  min-height: 75vh;
  min-height: 75dvh;
  padding: 20px;
}

footer {
  width: 100%;
  text-align: center;
  font-size: 0.75rem;
  height: 5vh;
  height: 5dvh;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

footer a {
  text-decoration: none;
  color: #fff;
}

/* =========================
  BREADCRUMB NAV
========================= */

.breadcrumb {
  margin: 0 auto 20px auto;

  font-size: 16px;
  opacity: 0.85;

  word-break: break-word;
}

.breadcrumb a {
  color: white;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.breadcrumb a:hover {
  opacity: 1;
}

/* optional cleaner separator */
.breadcrumb a + a::before {
  content: "/";
  margin: 0 6px;
  opacity: 0.5;
}

/* =========================
  GALLERY (MASONRY)
========================= */

.gallery {
  position: relative;
  max-width: 950px;
  margin: 0 auto;
}

.gallery-item {
  position: absolute;
  width: 220px;
  transition: transform 0.3s ease;
}

.gallery-item img {
  width: 100%;
  display: block;
  border-radius: 10px;
}

/* =========================
  LIGHTBOX
========================= */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

#lightbox-img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
}

.close {
  position: fixed;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}

.nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-size: 60px;
  color: white;
  cursor: pointer;
  user-select: none;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.nav:hover {
  opacity: 1;
}

.prev { left: 20px; }
.next { right: 20px; }

#sentinel {
  height: 1px;
}

/* =========================
  FOLDER GRID
========================= */

.folder-grid {
  max-width: 900px;
  margin: 0 auto 20px auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

/* =========================
  FOLDER CARD (GLASS + THUMB)
========================= */

.folder-card {
  position: relative;
  overflow: hidden;

  border-radius: 18px;
  min-height: 160px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-decoration: none;
  color: white;

  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.folder-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 50px rgba(0,0,0,0.6);
}

/* =========================
  THUMB BACKGROUND
========================= */

.folder-bg {
  position: absolute;
  inset: 0;

  background-size: cover;
  background-position: center;

  transform: scale(1.1);
  filter: blur(2px) saturate(1.2);
  opacity: 0.35;
}

/* Overlay */
.folder-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
}

/* Content layer */
.folder-content {
  position: relative;
  z-index: 2;

  display: flex;
  flex-direction: column;
  align-items: center;
}

/* =========================
  FOLDER ICON
========================= */

.folder-icon {
  width: 55px;
  height: 55px;
  margin-bottom: 8px;
}

.folder-svg {
  width: 100%;
  height: 100%;
  fill: #f5c542;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.4));
}

/* =========================
  FOLDER NAME
========================= */

.folder-name {
  font-size: 15px;
  text-align: center;
  padding: 0 10px;
  opacity: 0.95;
  word-break: break-word;
}

/* =========================
  END OF PAGE
========================= */

.end-message {
  margin: 40px 0;
  text-align: center;
  color: rgba(255,255,255,0.6);
  font-size: 16px;
  letter-spacing: 0.5px;
  padding: 10px;
  opacity: 0;
  animation: fadeIn 10s ease forwards;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.end-message-item {
  text-align: center;
  width: 33%;
}

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

/* Button */
#scrollTopBtn {
  display: inline-block;
  margin-top: 10px;

  color: white;
  text-decoration: none;

  font-size: 15px;
  opacity: 0.7;

  transition: opacity 0.2s ease, transform 0.2s ease;
}

#scrollTopBtn:hover {
  opacity: 1;
  transform: translateY(-2px);
}