/* THE BOOK CONTAINER */
#book-container {
    position: relative;
    width: 90%;
    max-width: 850px;
    height: 85vh;
    background: rgba(10, 10, 10, 0.85);
    box-shadow: 0 0 30px var(--shadow);
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    perspective: 1200px;
    backdrop-filter: blur(2px);
}

/* THE TEXT CONTENT */
.page-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 50px;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
    font-weight: 300;
    scrollbar-width: none;
    z-index: 10;
    user-select: text;
}
.page-content::-webkit-scrollbar { display: none; }

.page-content.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 10;
}

/* CORNER CLICK ZONES */
.corner {
    position: absolute;
    width: 70px;
    height: 70px;
    cursor: pointer;
    z-index: 20;
    transition: background 0.4s;
}

.corner:hover { background: rgba(255, 255, 255, 0.08); }

/* Top Right: Next Page */
#next-corner {
    top: 0;
    right: 0;
    border-bottom-left-radius: 25px;
}

/* Bottom Left: Previous Page */
#prev-corner {
    bottom: 0;
    left: 0;
    border-top-right-radius: 25px;
}

/* Triangle Indicators */
.corner::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

/* Top Right Triangle (Points Down-Left) */
#next-corner::after {
    top: 15px;
    right: 15px;
    border-width: 0 18px 18px 0;
    border-color: transparent #777 transparent transparent;
}

/* Bottom Left Triangle (Points Up-Right) */
#prev-corner::after {
    bottom: 15px;
    left: 15px;
    border-width: 18px 0 0 18px;
    border-color: transparent transparent transparent #777;
}

/* GLITCH EFFECT */
.glitch-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.03);
    z-index: 5;
    opacity: 0;
    pointer-events: none;
    mix-blend-mode: overlay;
}