body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
 
}

#loading {
  text-align: center;
  padding: 20px;
  font-size: 18px;
  color: #444;
}

#flipbook-wrapper {
  display: none;
  overflow: auto;
  text-align: center;
  padding: 20px;
  background-color: #fff;
  min-height: 80vh;
  position: relative;
}

/* FlipBook container */
#magazine {
  display: inline-block;
  margin: auto;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
  background-color: white;
  transform-origin: center top;
  transition: transform 0.2s ease;
}

.turn-page {
  background: white;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.turn-page img {
  max-width: 100%;
  max-height: 100%;
  display: block;
  margin: 0 auto;
}

/* Navigation Controls */
#navigation-controls {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  background-color: #ffffff;
  border-top: 1px solid #ccc;
  position: sticky;
  bottom: 0;
  z-index: 100;
}

#navigation-controls button {
  padding: 6px 14px;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  background-color: #007bff;
  color: white;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#navigation-controls button:hover:not(:disabled) {
  background-color: #0056b3;
}

#navigation-controls button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#zoom-level {
  font-weight: bold;
  color: #333;
}

/* Hide last page button if accidentally left in HTML */
#lastPageBtn {
  display: none !important;
}

/* Responsive design */
@media screen and (max-width: 768px) {
  #navigation-controls {
    flex-wrap: wrap;
    gap: 6px;
  }

  #navigation-controls button {
    font-size: 13px;
    padding: 5px 12px;
  }

  #zoom-level {
    font-size: 13px;
  }
}