.pbv-container {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
    font-family: Georgia, serif;
    position: relative;
}

.pbv-book-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    background: transparent;
}

.pbv-book-edge {
    width: 100%;
    height: 20px;
    background: #4a2c12;
    flex-shrink: 0;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
}

.pbv-book-top {
    border-bottom: 2px solid #222;
}

.pbv-book-bottom {
    border-top: 2px solid #222;
}

.pbv-book-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.pbv-book-cover {
    width: 40px;
    height: 600px;
    flex-shrink: 0;
    background: #4a2c12;
    box-shadow: inset 2px 0 5px rgba(0, 0, 0, 0.3);
}

.pbv-left-cover {
    border-right: 2px solid #222;
}

.pbv-right-cover {
    border-left: 2px solid #222;
}

.pbv-book {
    width: 100%;
    max-width: 900px;
    height: 600px;
    position: relative;
    box-sizing: border-box;
}

.pbv-page {
    width: 50%;
    height: 100%;
    float: left;
    padding: 2em;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    border: 1px solid #ccc;
    background: url('texture.jpg') no-repeat center center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.pbv-page.blank-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('texture.jpg');
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.pbv-page.blank-page > * {
    position: relative;
    z-index: 1;
}

.pbv-thumb {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    margin-bottom: 1em;
    border-radius: 4px;
}

.pbv-meta h3 {
    font-size: 1.2em;
    margin: 0.3em 0 0.2em;
    line-height: 1.3;
}

.pbv-title-link {
    color: #3c2e00;
    text-decoration: none;
}

.pbv-title-link:hover {
    text-decoration: underline;
}

.pbv-meta-line {
    display: flex;
    justify-content: space-between;
    gap: 1em;
    font-size: 0.9em;
    color: #444;
    margin-bottom: 0.5em;
}

.pbv-meta-line .pbv-author,
.pbv-meta-line .pbv-date {
    white-space: nowrap;
}

.pbv-excerpt {
    margin-top: 0.8em;
    color: #2d2d2d;
    line-height: 1.6;
}

.pbv-button {
    display: inline-block;
    margin-top: 1em;
    padding: 0.6em 1.2em;
    background: #603311;
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
}

.pbv-blank-filler {
    min-height: 1px;
}

.pbv-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#pbv-prev,
#pbv-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    padding: 0.4em 0.6em;
    cursor: pointer;
    z-index: 10;
    pointer-events: auto;
    border-radius: 3px;
    transition: background 0.2s ease;
}

#pbv-prev:hover,
#pbv-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

#pbv-prev {
    left: 0;
}

#pbv-next {
    right: 0;
}

.pbv-page.pbv-left::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.1), transparent);
    z-index: 2;
    pointer-events: none;
}

.pbv-page.pbv-right::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.1), transparent);
    z-index: 2;
    pointer-events: none;
}

/* Debug styling */
.debug-page {
    background-color: #fceabb;
    color: #333;
    font-weight: bold;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pbv-debug-label {
    background: rgba(255, 255, 255, 0.8);
    padding: 1em;
    border: 2px dashed #333;
    border-radius: 8px;
}