html, body {
  background: #460114!important;
  height:100vh;
}

.book {
    perspective: 100vw;
    height: 100%;
    background: #460114!important;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 19vh auto;
}

.pages {
    width: 70vw; /* Adjusted to double the page width for better layout */
    height: 35vw; /* Fixed height as per requirement */
    position: relative;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    border-radius: 4px;
}

.page {
    position: absolute;
    top: 0;
    width: 35vw; /* Fixed width */
    height: 35vw; /* Fixed height */
    transform-origin: left center; /* Adjusted for better flip effect */
    transition: transform 1s;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    cursor: pointer;
    user-select: none;
    background-color: #460114; /* Ensuring this is not overridden */
	overflow: hidden;
}

.page img {
    width: 100%;
    height: auto; /* Maintains aspect ratio without exceeding the page size */
}

.page p {
    text-align: center;
    font-size: 18px; /* Adjustable based on your design needs */
}

.page:before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0); /* Transparent overlay initially */
    transition: background 0.7s;
    z-index: 2;
}

.page:nth-child(odd) {
    pointer-events: all;
    transform: rotateY(0deg);
    right: 0;
    border-radius: 0 4px 4px 0;
    background-image: linear-gradient(to right, rgba(0,0,0,.15) 0%, rgba(0,0,0,0) 10%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); /* Adding shadow */
}

.page:nth-child(odd):hover {
    transform: rotateY(-15deg);
}

.page:nth-child(odd):hover:before {
    background: rgba(0, 0, 0, 0.03);
}

.page:nth-child(even) {
    pointer-events: none;
    transform: rotateY(180deg);
    transform-origin: right center; /* Adjusted for better flip effect */
    left: 0;
    border-radius: 4px 0 0 4px;
    background-image: linear-gradient(to left, rgba(0,0,0,.12) 0%, rgba(0,0,0,0) 10%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); /* Adding shadow */
}

.page:nth-child(even):before {
    background: rgba(0, 0, 0, 0.2);
}

.page.flipped:nth-child(odd) {
    pointer-events: none;
    transform: rotateY(-180deg);
}

.page.flipped:nth-child(even) {
    pointer-events: all;
    transform: rotateY(0deg);
}

.page.flipped:nth-child(even):hover {
    transform: rotateY(15deg);
}

.page.flipped:nth-child(even):hover:before {
    background: rgba(0, 0, 0, 0.03);
}
