/* assets/flipbook.css */

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #111;
  font-family: system-ui, sans-serif;
  overflow: hidden;
}

#book-frame {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  user-select: none;
  cursor: default;
}

#book-frame.pannable {
  cursor: grab;
}

#book-frame.dragging {
  cursor: grabbing;
}

#book-transform {
  transform-origin: center center;
  position: relative;
  transition: transform 360ms cubic-bezier(0.4, 0, 0.2, 1);
}

#book-frame.dragging #book-transform {
  transition: none !important;
}

#flipbook {
  box-shadow: 0 0 25px rgba(0,0,0,0.6);
  background: transparent;
  margin: 0 auto;
  position: relative;
}

#flipbook .page {
  background: transparent;
  position: relative;
  overflow: hidden;
  border: none;
}

#flipbook .page img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

#flipbook .hard {
  background: #ddd;
  font-weight: bold;
}

/* Toolbar centered at bottom */
#toolbar {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 1000;
}

#toolbar button {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid #666;
  background: #222;
  color: #f0f0f0;
  cursor: pointer;
}

#toolbar button:hover {
  background: #333;
}

/* Back link in top-left */
.back-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 4px 10px;
  font-size: 13px;
  border-radius: 4px;
  border: 1px solid #444;
  background: rgba(0, 0, 0, 0.75);
  color: #f5f5f5;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.back-link:hover {
  background: rgba(30, 30, 30, 0.9);
  border-color: #666;
}
