/* Grundlayout */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Arial, sans-serif;
  overflow: hidden;
  display: flex;
  flex-direction: column; /* Footer immer sichtbar */
}

#toolbar {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  background: #f5f5f5;
  border-bottom: 1px solid #ccc;
  flex-shrink: 0;
}

#toolbar #controls button {
  margin: 0 4px;
  padding: 4px 8px;
  font-size: 16px;
}

#container {
  flex: 1 1 auto; /* flexible Höhe */
  overflow: auto; /* Scrollbar bei Bedarf */
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: #ccc;
  padding: 10px 0;
  box-sizing: border-box;
}

#viewer-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.page {
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.page.back {
  transform: rotateY(180deg);
}

#footer {
  height: 20px;
  text-align: center;
  font-size: 12px;
  padding: 4px;
  background: #f5f5f5;
  border-top: 1px solid #ccc;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  #container {
    padding-bottom: 0; /* Kein unnötiger Abstand unten */
    justify-content: center; /* PDF vertikal mittig, Footer bleibt sichtbar */
    align-items: center;
  }
}
