* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: rgb(253, 244, 227);
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 20px;
}

.book-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 900px;
}

.page-container {
    width: 100%;
    max-width: 700px;
    height: auto;
    background: rgb(253, 244, 227);
    border-radius: 8px;
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-container img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Controls */
.controls {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

button {
    padding: 10px 20px;
    border: none;
    background: #333;
    color: #fff;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

button:hover {
    background: #555;
}

/* Footer */
footer {
    width: 100%;
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #333;
    font-weight: bold;
    padding: 10px 0;
}

/* Page Flip Animation */
.page-flip {
    animation: curlFlip 1s ease forwards;
}

@keyframes curlFlip {
    0% {
        transform: rotateY(0deg);
        transform-origin: right center;
        box-shadow: -5px 0 15px rgba(0,0,0,0.3);
    }
    50% {
        transform: rotateY(-120deg);
        transform-origin: right center;
        box-shadow: -15px 0 20px rgba(0,0,0,0.4);
    }
    100% {
        transform: rotateY(0deg);
        transform-origin: left center;
        box-shadow: none;
    }
}

/* Desktop View */
@media (min-width: 1024px) {
    .page-container {
        max-width: 700px;
        height: 90vh; /* Full height for big display */
    }

    .page-container img {
        width: auto;
        height: 100%; /* Fill height without distortion */
    }
}

/* Mobile View */
@media (max-width: 768px) {
    .page-container {
        height: auto;
        max-height: 75vh;
        border-radius: 0;
    }

    .page-container img {
        width: 100%;
        height: auto;
    }
}
