body {
    font-family: 'Arial', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #f0f0f0;
}

.book {
    position: relative;
    width: 90%;
    max-width: 600px;
    height: 80%;
    max-height: 800px;
    perspective: 1500px;
    overflow: hidden;
    border-radius: 10px;
}

.cover, .pages {
    width: 100%;
    height: 100%;
    position: absolute;
    backface-visibility: hidden;
    transition: transform 1s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.cover {
    background: linear-gradient(135deg, #6b6b6b, #4b4b4b);
    color: white;
    text-align: center;
}

.cover h1 {
    margin-bottom: 20px;
}

.cover button {
    padding: 10px 20px;
    border: none;
    background: #ff6f61;
    color: white;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
}

.cover button:hover {
    background: #ff3f3f;
}

.pages {
    transform: rotateY(180deg);
    display: none;
}

.page {
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
    box-sizing: border-box;
}

.page .content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.page .media {
    width: 100%;
    max-height: 50%;
    overflow: hidden;
    margin-bottom: 20px;
}

.page .media img, .page .media video {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.page .text {
    width: 100%;
    height: 50%;
    overflow: auto;
    padding: 20px;
    box-sizing: border-box;
    text-align: justify;
}

.carousel {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
}

.carousel-images {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-images img {
    width: 100%;
    max-width: 200px;
    margin: 0 10px;
    border: 2px solid white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: rotate(-5deg);
}

.nav-button {
    position: absolute;
    bottom: 20px;
    background: #ff6f61;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    z-index: 10;
    border-radius: 5px;
    transition: background 0.3s;
    display: none;
}

.nav-button:hover {
    background: #ff3f3f;
}

#prev-button {
    left: 20px;
}

#next-button {
    right: 20px;
}

.nav-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .page {
        padding: 10px;
    }
    .page .text {
        padding: 10px;
    }
}

/* Estilos generales omitidos para brevedad */

.page .heart-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.heart {
    position: relative;
    width: 100px;
    height: 90px;
    transform: scale(0);
    animation: grow 2s ease-in-out forwards;
}

.heart::before,
.heart::after {
    content: "";
    position: absolute;
    top: 0;
    width: 100px;
    height: 150px;
    border-radius: 50px 50px 0 0;
    background: red;
}

.heart::before {
    left: 50px;
    transform: rotate(-45deg);
    transform-origin: 0 100%;
}

.heart::after {
    left: 0;
    transform: rotate(45deg);
    transform-origin: 76% 61%;
}

@keyframes grow {
    0% {
        transform: scale(0);
    }
    100% {
        transform: scale(1);
    }
}

.text-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: black;
    text-align: center;
    font-size: 1.5em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* Media queries and other styles omitted for brevity */

