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

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #f5e6d3 0%, #d4c5b9 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.hidden {
    display: none !important;
}

.container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#closed-book {
    animation: fadeIn 1s ease-in;
}

.book-cover {
    cursor: pointer;
    transition: transform 0.3s ease;
    max-width: 500px;
    width: 90%;
}

.book-cover:hover {
    transform: scale(1.05) rotate(-2deg);
}

.book-cover img {
    width: 100%;
    height: auto;
    filter: drop-shadow(15px 15px 25px rgba(0, 0, 0, 0.3));
}

#open-book {
    animation: bookOpen 1s ease-out;
}

.page-display {
    max-width: 95%;
    max-height: 95vh;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.page-display img {
    width: 100%;
    height: auto;
    max-height: 95vh;
    object-fit: contain;
    filter: drop-shadow(10px 10px 20px rgba(0, 0, 0, 0.2));
    transition: opacity 0.3s ease;
}

.page-display:hover img {
    filter: drop-shadow(12px 12px 25px rgba(0, 0, 0, 0.3));
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes bookOpen {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bookClose {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

@media (max-width: 768px) {
    .page-display {
        max-width: 98%;
        max-height: 92vh;
    }

    .page-display img {
        max-height: 92vh;
    }
}