* {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  background: #f2f2f2;
  margin: 0;
  overflow-x: hidden;
}

#flipbook-wrapper {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

#flipbook {
  width: 900px;
  height: 650px;
  position: relative;
  transform-origin: center center;
}


/* TODAS AS PÁGINAS */
#flipbook > div {
  width: 100%;
  height: 100%;
}

/* CAPAS E CONTRACAPAS */
.hard.cover img {
  width: 95%;
  height: 100%;
  object-fit: cover;       /* garante que toda a imagem apareça */
  object-position: center; /* centraliza a imagem */
  display: block;
}

/* PÁGINAS NORMAIS */
.page img {
  width: 100%;
  height: 100%;
  object-position: center;
  display: block;
}

/* LOMBADA CENTRAL */
#flipbook::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  background: rgba(0, 0, 0, 0.25);
  transform: translateX(-50%);
  z-index: 9999;
  pointer-events: none;
}

/* SOMBRA ESFUMAÇADA */
#flipbook::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 40px;
  height: 100%;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at center,
    rgba(0,0,0,0.25) 0%,
    rgba(0,0,0,0.12) 30%,
    rgba(0,0,0,0.05) 50%,
    rgba(0,0,0,0) 75%
  );
  z-index: 9998;
  pointer-events: none;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  /* Container responsivo */
#flipbook {
  width: 95vw;
  height: 80vh;
}


  /* Imagens dentro das páginas */
  #flipbook > div img {
    width: 100%;
    height: 100%;
    object-fit: contain;  /* garante que toda a página apareça */
    object-position: center;
    align-items: center;     /* centraliza verticalmente */
  }

  /* Remove lombada e sombra no mobile */
  #flipbook::before,
  #flipbook::after {
    display: none;
  }
}
