.doc-viewer {
  display: flex;
  gap: 20px;
  padding: 40px;
}

/* Sidebar: Thumbnails */
.thumbnail-list {
  width: 100px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 6px;
}

.thumb {
  padding: 10px;
  border: 1px solid #ccc;
  cursor: pointer;
  background: #f9f9f9;
  text-align: center;
  border-radius: 6px;
  transition: background 0.2s, border 0.2s;
}

.thumb:hover {
  background: #e6ebf1;
}

.active-thumb {
  background-color: #dceeff;
  border: 1px solid #0057d9;
}

/* Main Viewer */
.page-viewer {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  border: 1px solid #ddd;
  padding: 20px;
  background: white;
  min-height: 600px;
  overflow-y: auto;
}

/* Individual PDF Pages */
.pdf-page {
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  max-width: 100%;
  height: auto;
}

/* Figure for images */
figure {
  margin: 0;
  text-align: center;
}

figcaption {
  font-size: 14px;
  margin-top: 8px;
  color: #555;
}

/* Download button */
.download-link {
  display: block;
  padding: 6px 12px;
  background: #0057d9;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  margin-top: 10px;
}

.download-link:hover {
  background: #0044aa;
}

@media (max-height: 680px) {
  .thumbnail-list {
    max-height: 100vh;
    overflow-y: auto;
  }

  .doc-viewer {
    flex-direction: column;
    padding: 20px;
  }

  .thumbnail-list {
    flex-direction: row;
    overflow-x: auto;
    width: 100%;
    gap: 8px;
    justify-content: center;
  }

  .thumb {
    min-width: 80px;
    flex-shrink: 0;
    font-size: 14px;
  }

  .page-viewer {
    padding: 10px;
  }

  body {
    font-size: 15px;
  }

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .download-link {
    font-size: 13px;
    padding: 6px 10px;
  }
}
