html, body {
  height: 100vh;
  margin: 0;
  overflow: hidden;
  font-family: Segoe UI, Arial, sans-serif;
  background: #2b2b2b;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  color: white;
  font-size: 18px;
  flex-shrink: 0;
}

.toolbar button, .toolbar a {
  background: #4a4a4a;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  font-size: 16px;
}

.toolbar button:hover, .toolbar a:hover {
  background: #5f5f5f;
}

#viewer {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  box-sizing: border-box;
  padding: 6px;
  overflow-y: auto;
  overflow-x: hidden;
}

#pageImg {
  max-width: 100%;
  max-height: 95vh;
  object-fit: contain;
  background: white;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  transition: transform 0.25s ease;
  backface-visibility: hidden;
}

#pageImg.flipping {
  transform: rotateY(90deg);
}
