.book-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#prev-btn, #next-btn {
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    padding: 10px;
    transition: 0.3s;
    z-index: 10;
}
#prev-btn, #next-btn {
    border: 2px solid red; /* Thử hiển thị đường viền */
}

#prev-btn {
    left: calc(50% - 450px);
    
}

#next-btn {
    right: calc(50% - 450px);
}

#prev-btn:hover, #next-btn:hover {
    background: rgba(255, 255, 255, 1);
}
/* Book */
.book {
    margin: auto;
    position: relative;
    width: 800px;
    height: 500px;
    transition: transform 0.5s;
}

.paper {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    perspective: 1500px;

}

.front,
.back {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transform-origin: left;
    transition: transform 0.5s;
}

.front {
    z-index: 11;
    backface-visibility: hidden;
    border-left: 3px solid rgb(255, 255, 255);
}

.back {
    z-index: 9;
}

.front-content,
.back-content {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.front-content img{
    position: relative;
    width: 800px;
    height: 500px;
    transition: transform 0.5s;
}

.back-content {
    transform: rotateY(-180deg);
    background-color: #1a1818;
}



/* Paper flip effect */
.flipped .front,
.flipped .back {
    transform: rotateY(-180deg);
}

/* Controller Buttons */
button {
    border: none;
    background-color: transparent;
    cursor: pointer;
    margin: 10px;
    transition: transform 0.5s;
}

button:focus {
    outline: none;
}

button:hover i {
    color: #636363;
}

i {
    font-size: 50px;
    color: gray;
}

/* Paper stack order */
#p1 {
    z-index: 13;
}

#p2 {
    z-index: 12;
}

#p3 {
    z-index: 11;
}

.book-wrapper {
    width: 80%;
    margin: auto;
    text-align: center;
    display: flex;  /* Căn hai phần tử thành một hàng ngang */
    justify-content: center; /* Căn giữa theo chiều ngang */
    align-items: center; /* Căn giữa theo chiều dọc */
    gap: 120px; /* Khoảng cách giữa hai phần tử */
    transition: max-height 0.5s ease-in-out;
    background: rgba(0, 0, 0, 0.719);
    padding: 50px;
    border-radius: 10px;
}

.section1 {
    display: flex;
    position: relative;
    display: inline-block; /* Giúp phần tử chỉ lớn đúng bằng kích thước ảnh */
    right: 10%;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    perspective: 1000px;
    margin-top: 50px;
    margin-left: 15px;
}

.section1 .coverbook {
    position: relative;
    width: 383px;
    height: 567px;
    box-shadow: 20px 20px 20px rgba(0, 0, 0, 0.2);
    transform-style: preserve-3d;
    transition: 0.5s;
}

.section1 .coverbook:hover {
    transform: rotateY(35deg);
    box-shadow: 0px 20px 20px rgba(0, 0, 0, 0.2);
}

.section1 .coverbook:active {
    transform: rotateY(180deg);
}

.section1 .coverbook::before {
    content: '';
    position: absolute;
    width: 60px;
    height: 100%;
    margin-left: -192px;
    transform-origin: left;
    margin-top: 0px;
    background: url("../img/Img_Projects/Cover Story Evangelion/Lề sách.png");
    background-position: center;
    transform: rotateY(90deg);
    background-size: cover;  /* Ảnh sẽ co giãn để lấp đầy */
}

.section1 .coverbook::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    margin-left: -192px;
    transform-origin: center;
    background: url("../img/Img_Projects/Cover Story Evangelion/Bìa cuối.png");
    background-position: center;
    transform: rotateY(180deg) translateZ(60px);
    background-size: cover;  /* Ảnh sẽ co giãn để lấp đầy */
}

.section1 .coverbook img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-cover{
    margin-top: 50px;
    width: 370px;
    height: 567px;
	position: relative;
	box-shadow: -40px 20px 50px rgba(0,0,0,0.4);
	transform-style: preserve-3d;
	transition: 1s;
    left: 10%;
}


.book-cover:before {
	content: '';
	position: absolute;
	left: -20px;
	width: 20px;
	height: 100%;
	background: linear-gradient(90deg, rgb(18, 18, 19), #111);
	transform: skewY(-3deg) rotateY(-50deg);
	transform-origin: right;
}

.book-cover:hover {
	transform: rotate(-5deg);
}

.book-img {
	background: url("../img/Img_Projects/Cover Story Evangelion/Bìa trong.png") no-repeat center;
	background-size: cover;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	transform: perspective(2000px);
	transform-style: preserve-3d;
	transform-origin: left;
	transition: 1s;
}

.book-cover:hover .book-img {
	transform: perspective(2000px) rotateY(-140deg);
}




.book-wrapper1 {
    width: 80%;
    margin: auto;
    text-align: center;
    display: flex;  /* Căn hai phần tử thành một hàng ngang */
    justify-content: center; /* Căn giữa theo chiều ngang */
    align-items: center; /* Căn giữa theo chiều dọc */
    gap: 120px; /* Khoảng cách giữa hai phần tử */
    transition: max-height 0.5s ease-in-out;
    background: rgba(0, 0, 0, 0.719);
    padding: 50px;
    border-radius: 10px;
}

.section2 {
    display: flex;
    position: relative;
    display: inline-block; /* Giúp phần tử chỉ lớn đúng bằng kích thước ảnh */
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    perspective: 1000px;
    margin-top: 50px;
    margin-left: 15px;
}

.section2 .coverbook1 {
    position: relative;
    width: 850px;
    height: 567px;
    box-shadow: 20px 20px 20px rgba(0, 0, 0, 0.2);
    transform-style: preserve-3d;
    transition: 0.5s;
}

.section2 .coverbook1:hover {
    transform: rotateY(35deg);
    box-shadow: 0px 20px 20px rgba(0, 0, 0, 0.2);
}

.section2 .coverbook1:active {
    transform: rotateY(180deg);
}

.section2 .coverbook1::before {
    content: '';
    position: absolute;
    width: 15px;
    height: 100%;
    margin-left: -425px;
    transform-origin: left;
    margin-top: 0px;
    background-color: aliceblue;
    background-position: center;
    transform: rotateY(90deg);
    background-size: cover;  /* Ảnh sẽ co giãn để lấp đầy */
}

.section2 .coverbook1::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    margin-left: -425px;
    transform-origin: center;
    background: url("../img/Img_Projects/Son Tinh Thuy Tinh Comic Design/Cover 2.png");
    background-position: center;
    transform: rotateY(180deg) translateZ(15px);
    background-size: cover;  /* Ảnh sẽ co giãn để lấp đầy */
}

.section2 .coverbook1 img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-cover1{
    margin-top: 50px;
    width: 370px;
    height: 567px;
	position: relative;
	box-shadow: -40px 20px 50px rgba(0,0,0,0.4);
	transform-style: preserve-3d;
	transition: 1s;
    left: 10%;
}


.book-cover1:before {
	content: '';
	position: absolute;
	left: -20px;
	width: 20px;
	height: 100%;
	background: linear-gradient(90deg, rgb(18, 18, 19), #111);
	transform: skewY(-3deg) rotateY(-50deg);
	transform-origin: right;
}

.book-cover1:hover {
	transform: rotate(-5deg);
}

.book-img1 {
	background: url("../img/Img_Projects/Cover Story Evangelion/Bìa trong.png") no-repeat center;
	background-size: cover;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	transform: perspective(2000px);
	transform-style: preserve-3d;
	transform-origin: left;
	transition: 1s;
}

.book-cover1:hover .book-img1 {
	transform: perspective(2000px) rotateY(-140deg);
}





.book-wrapper2 {
    width: 80%;
    margin: auto;
    text-align: center;
    display: flex;  /* Căn hai phần tử thành một hàng ngang */
    justify-content: center; /* Căn giữa theo chiều ngang */
    align-items: center; /* Căn giữa theo chiều dọc */
    gap: 120px; /* Khoảng cách giữa hai phần tử */
    transition: max-height 0.5s ease-in-out;
    background: rgba(0, 0, 0, 0.719);
    padding: 50px;
    border-radius: 10px;
}

.section3 {
    display: flex;
    position: relative;
    display: inline-block; /* Giúp phần tử chỉ lớn đúng bằng kích thước ảnh */
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    perspective: 1000px;
    margin-top: 50px;
    margin-left: -200px;
}

.section3 .coverbook2 {
    position: relative;
    width: 483px;
    height: 667px;
    box-shadow: 20px 20px 20px rgba(0, 0, 0, 0.2);
    transform-style: preserve-3d;
    transition: 0.5s;
}

.section3 .coverbook2:hover {
    transform: rotateY(35deg);
    box-shadow: 0px 20px 20px rgba(0, 0, 0, 0.2);
}

.section3 .coverbook2:active {
    transform: rotateY(180deg);
}

.section3 .coverbook2::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 100%;
    margin-left: -240px;
    transform-origin: left;
    margin-top: 0px;
    background-color: aliceblue;
    background-position: center;
    transform: rotateY(90deg);
    background-size: cover;  /* Ảnh sẽ co giãn để lấp đầy */
}

.section3 .coverbook2::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    margin-left: -240px;
    transform-origin: center;
    background: url("../img/Img_Projects/Mercedes-Benz Press Design/New folder/Picture2.png");
    background-position: center;
    transform: rotateY(180deg) translateZ(15px);
    background-size: cover;  /* Ảnh sẽ co giãn để lấp đầy */
}

.section3 .coverbook2 img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-cover2{
    margin-top: 50px;
    width: 600px;
    height: 600px;
	position: relative;
	box-shadow: -40px 20px 50px rgba(0,0,0,0.4);
	transform-style: preserve-3d;
	transition: 1s;
    left: 15%;
}


.book-cover2:before {
	content: '';
	position: absolute;
	left: -20px;
	width: 20px;
	height: 100%;
	background: linear-gradient(90deg, rgb(77, 228, 255), #81ecfa);
	transform: skewY(-3deg) rotateY(-50deg);
	transform-origin: right;
}

.book-cover2:hover {
	transform: rotate(-5deg);
}

.book-img2 {
	background: url("../img/Img_Projects/Mercedes-Benz Press Design/New folder/Picture1.png") no-repeat center;
	background-size: cover;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	transform: perspective(2000px);
	transform-style: preserve-3d;
	transform-origin: left;
	transition: 1s;
}

.book-cover2:hover .book-img2 {
	transform: perspective(2000px) rotateY(-140deg);
}


.book-wrapper3 {
    width: 80%;
    margin: auto;
    text-align: center;
    display: flex;  /* Căn hai phần tử thành một hàng ngang */
    justify-content: center; /* Căn giữa theo chiều ngang */
    align-items: center; /* Căn giữa theo chiều dọc */
    gap: 120px; /* Khoảng cách giữa hai phần tử */
    transition: max-height 0.5s ease-in-out;
    background: rgba(0, 0, 0, 0.719);
    padding: 50px;
    border-radius: 10px;
}

.section4 {
    display: flex;
    position: relative;
    display: inline-block; /* Giúp phần tử chỉ lớn đúng bằng kích thước ảnh */
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    perspective: 1000px;
    margin-top: 50px;
    margin-left: 0px;
}

.section4 .coverbook3 {
    position: relative;
    width: 600px;
    height: 600px;
    box-shadow: 20px 20px 20px rgba(0, 0, 0, 0.2);
    transform-style: preserve-3d;
    transition: 0.5s;
}

.section4 .coverbook3:hover {
    transform: rotateY(35deg);
    box-shadow: 0px 20px 20px rgba(0, 0, 0, 0.2);
}

.section4 .coverbook3:active {
    transform: rotateY(180deg);
}

.section4 .coverbook3::before {
    content: ''; 
    position: absolute; 
    width: 50px;
    height: 100%;
    margin-left: 0px; 
    transform-origin: left;
    margin-top: 0px;
    background-color: hsl(38, 72%, 74%);
    background-position: center;
    transform: rotateY(90deg);
    background-size: cover;
}

.section4 .coverbook3::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    margin-left: -600px;
    transform-origin: center;
    background: url("../img/Img_Projects/Ablum Pho Co Hoi An/z.png");
    background-position: center;
    transform: rotateY(180deg) translateZ(50px);
    background-size: cover;  /* Ảnh sẽ co giãn để lấp đầy */
}

.section3 .coverbook3 img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-cover3{
    margin-top: 50px;
    width: 600px;
    height: 600px;
	position: relative;
	box-shadow: -40px 20px 50px rgba(0,0,0,0.4);
	transform-style: preserve-3d;
	transition: 1s;
    left: 2%;
}


.book-cover3:before {
	content: '';
	position: absolute;
	left: -20px;
	width: 20px;
	height: 100%;
	background: linear-gradient(90deg, hsl(38, 72%, 74%), #ecc98d);
	transform: skewY(-3deg) rotateY(-50deg);
	transform-origin: right;
}

.book-cover3:hover {
	transform: rotate(-5deg);
}

.book-img3 {
	background: url("../img/Img_Projects/Ablum Pho Co Hoi An/111.png") no-repeat center;
	background-size: cover;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	transform: perspective(2000px);
	transform-style: preserve-3d;
	transform-origin: left;
	transition: 1s;
}

.book-cover3:hover .book-img3 {
	transform: perspective(2000px) rotateY(-140deg);
}


