/* ===== BASE LAYOUT ===== */
html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background: #000;
  overflow: hidden;
}

/* Outer container fills viewport */
#container1 {
  position: relative;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

/* Inner container centered & scaled by JS (1:1) */
#container {
  position: absolute;
}

/* Mount point for viewer */
#magazine {
  width: 100%;
  height: 100%;
  margin: 0 auto;
}

/* ===== SINGLE PAGE VIEW ===== */
#page-view {
  position: relative;
  width: 100%;
  display: inline-block;
}

/* Maintain 1:1 aspect ratio */
#page-view::after {
  content: "";
  display: block;
  padding-top: 100%;
}

/* The page itself */
.page {
  position: absolute;
  inset: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain; /* fits 500x500 nicely */
}

/* ===== CLICK ZONES (20% each side) ===== */
.grabber-left,
.grabber-right {
  position: absolute;
  top: 0;
  height: 100%;
  width: 20%;
  cursor: pointer;
  z-index: 2;
}

/* Left = back, Right = next */
.grabber-left { left: 0; }
.grabber-right { right: 0; }

/* Disable click when no page */
.disabled {
  pointer-events: none;
  cursor: default;
}

/* ===== LOADER ===== */
.page-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background-color: #333;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ===== VISIBILITY HELPERS ===== */
.none { display: none; }
.block { display: block; }

/* ===== PLACEHOLDER (COVER PAGE) ===== */
.placeholder {
  cursor: pointer;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  background-size: contain;
  background-image: url("/content/a8c9867b99d1e334a786ad9736bb4761289f95adaa15b8c3b93826ae1cb5d76bi0"); /* your cover */
}
