body {
    margin: 0;
    padding: 0;
    font-family: 'Alegreya', serif;
    background: #f2e8dc;
    color: #3A1A15;
    overflow-x: hidden;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

.room-header {
    width: 100%;
    height: 120px;
    background: url('textures/japanese-roof.jpg') repeat;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    position: relative;
}

.home-button {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    background: url('textures/wood-button.jpg') repeat;
    padding: 10px 20px;
    border-radius: 10px;
    border: 2px solid #D88C44;
    transition: transform 0.2s, box-shadow 0.3s;
    box-shadow: 0 6px 10px rgba(0,0,0,0.5);
}

.home-button img {
    height: 40px;
    width: 40px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #fff;
}

.home-button:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.6);
}

.room-footer {
    width: 100%;
    height: 120px;
    background: url('textures/japanese-floor.jpg') repeat;
    margin-top: auto;
    box-shadow: inset 0 8px 12px rgba(0,0,0,0.3);
}

.room-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: url('textures/japanese-wall.jpg') repeat;
    padding: 40px 0;
}

.bookshelf {
    text-align: center;
    max-width: 1000px;
}

.bookshelf h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #4B2E2B;
    text-shadow: 1px 1px 2px #fff;
}

.blurb {
    margin: 10px 0 40px;
    font-size: 1.2rem;
    color: #5E2B23;
    text-shadow: 1px 1px 1px #fff;
}

.book-list {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.book {
    width: 120px;
    height: 180px;
    perspective: 1000px;
    cursor: pointer;
}

.book-cover {
    width: 100%;
    height: 100%;
    border: 2px solid #D88C44;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    box-shadow: 0 8px 12px rgba(0,0,0,0.5);
    background: url('textures/book.jpg') repeat;
    transition: transform 0.6s;
}

.book:hover .book-cover {
    transform: rotateY(20deg) translateY(-5px);
}

.pdf-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(6px);
    background-color: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
}

.pdf-modal-content {
    position: relative;
    width: 80%;
    max-width: 900px;
    background: url('textures/paper.jpg') repeat;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #8E4B35;
    box-shadow: 0 10px 20px rgba(0,0,0,0.7);
    animation: popUp 0.4s ease;
}

.pdf-modal-content iframe {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 4px;
}

.close-pdf {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #8E4B35;
    font-weight: bold;
    transition: color 0.3s;
}

.close-pdf:hover {
    color: #D88C44;
}

@keyframes popUp {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
