body {
  margin: 0;
  background: black;
  color: white;
  font-family: sans-serif;
  overflow: hidden;
}

.version-badge {
  position: fixed;
  right: 8px;
  bottom: 8px;
  z-index: 9999;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.75);
  color: #ffd54f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.screen {
  width: 100vw;
  height: 100vh;
}

.hidden {
  display: none;
}

/* ✅ carpetas */
#folders {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  align-content: center;
  gap: 40px;
  width: min(100%, calc(4 * 250px + 3 * 40px));
  margin: 0 auto;
}

.folder {
  width: calc((100% - 3 * 40px) / 4);
  max-width: 250px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.folder img {
  width: 100%;
  /* height: 150px; */
  object-fit: cover;
  border: 4px solid transparent;
  box-sizing: border-box;
}

.folder.selected img {
  border-color: yellow;
}

.folderName {
  margin: 0;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
}

.folderYears {
  margin: 0;
  text-align: center;
  font-size: 1.1rem;
}

/* ✅ visor */
#viewer {
  position: relative;
}

.main {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.25s ease;
  border-radius: 20px;
}

.event-log {
  position: fixed;
  left: 8px;
  bottom: 8px;
  z-index: 99999;
  max-width: min(92vw, 420px);
  max-height: 180px;
  overflow: auto;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  font-family: monospace;
  pointer-events: none;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ✅ thumbnails */
#thumbBand {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 300px;
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scroll-behavior: smooth;
  background: rgba(0,0,0,0.7);
  padding: 10px;
  box-sizing: border-box;
}

figure {
  flex: 0 0 180px;
  margin: 0;
  padding: 8px;
  border: 3px solid transparent;
  background: rgba(255,255,255,0.08);
  opacity: 0.6;
  transition: transform 0.2s, opacity 0.2s, border-color 0.2s;
}

figure img {
  display: block;
  object-fit: contain;
  background: #222;
  border-radius: 12px;
}

figure.selected {
  opacity: 1;
  background: #222;
  z-index: 1;
}

figure p {
  margin: 4px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thumbName {
  margin: 0 0 4px;
  padding: 0;
  background: none;
  font-size: 0.85rem;
  font-weight: 700;
}

.thumbDate {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
}
.thumbInfo {
  position:absolute;bottom:10px;
  font-size: 0.9rem;
  color: rgba(255, 188, 3, 0.8);
}
figure:not(.selected) .thumbInfo {display:none}

#loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 50px;
  display: none;
  z-index: 10;
}
