body {
  background: transparent;
  font-family: sans-serif;
  margin: 0;
  padding: 2rem;
  display: flex;
  justify-content: center;
}

.book-3d-viewer {
  position: relative;
  width: 240px;
  perspective: 1200px;
}

.book {
  width: 200px;
  height: 300px;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateY(0deg);
  transition: transform 0.8s ease;
}

.book:hover {
  transform: rotateY(-10deg);
}

.face {
  position: absolute;
  width: 200px;
  height: 300px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

.face::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(145deg, rgba(255,255,255,0.07), transparent 60%);
  pointer-events: none;
}

.front { background-image: url('assets/book-front.jpg'); transform: translateZ(10px); }
.back { background-image: url('assets/book-back.jpg'); transform: rotateY(180deg) translateZ(10px); }
.spine { width: 20px; background-image: url('assets/book-spine.jpg'); transform: rotateY(90deg) translateX(100px); transform-origin: left; }

.book-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.icon-btn {
  background: none;
  border: 1px solid #444;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

.zoom-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.zoom-modal.hidden {
  display: none;
}

.zoom-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.7);
  border-radius: 6px;
  background: #111;
  padding: 1rem;
}

.zoom-content img {
  max-width: 100%;
  max-height: 100%;
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  color: white;
  cursor: pointer;
}