 /* --- PDF Wrapper --- */
        .pdf-wrapper {
            position: relative; 
            width: 100%;
            height: 107vh; /* Full viewport height by default */
            background-color: #d4d4d4;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            transition: background 0.3s;
            overflow: hidden;
        }

        /* --- Fullscreen Mode Styles --- */
        .pdf-wrapper.is-fullscreen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100vh;
            background-color: rgba(0, 0, 0, 0.95); /* Dark transparent background */
            z-index: 19999;
        }

        .pdf-wrapper.is-fullscreen .book-section {
            height: 85vh; /* Increase height in fullscreen */
        }

        /* --- Toolbar (Top Right) --- */
        .toolbar {
            position: absolute;
            top: 20px;
            right: 20px;
            display: flex;
            gap: 10px;
            z-index: 100;
            background: rgba(0, 0, 0, 0.6);
            padding: 10px 15px;
            border-radius: 30px;
            backdrop-filter: blur(5px);
        }

        .tool-btn {
            background: transparent;
            border: 1px solid rgba(255,255,255,0.5);
            color: white;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: 0.3s;
            text-decoration: none;
            font-size: 16px;
        }

        .tool-btn:hover {
            background-color: #ff9800;
            border-color: #ff9800;
            transform: scale(1.1);
        }

        /* --- Book Area --- */
        .book-section {
            width: 50%;
            height: 70vh;
            display: flex;
            justify-content: center;
            align-items: center;
            transition: transform 0.3s ease;
            z-index: 5;
        }

        #flipbook {
            display: none; /* Hidden until initialized */
            box-shadow: 0 20px 40px rgba(0,0,0,0.4);
        }

        .page {
            background-color: white;
            overflow: hidden;
        }

        .page canvas {
            width: 100%;
            height: 100%;
            display: block;
        }

        /* --- Bottom Controls --- */
        .controls-area {
            position: absolute;
            bottom: 10px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            flex-direction: column;
            align-items: center;
            z-index: 100;
            background: rgba(0,0,0,0.7);
            padding: 10px 30px;
            border-radius: 10px;
            backdrop-filter: blur(5px);
        }

        .buttons {
            display: flex;
            gap: 15px;
            margin-bottom: 5px;
        }

        .btn {
            padding: 8px 20px;
            background-color: #ff9800;
            color: white;
            border: none;
            border-radius: 20px;
            cursor: pointer;
            font-size: 14px;
            transition: 0.2s;
        }

        .btn:hover {
            background-color: #e68900;
        }

        .page-info {
            color: white;
            font-size: 13px;
            margin-top: 5px;
        }

        /* --- Loader --- */
        #loader {
            color: #333;
            font-size: 24px;
            font-weight: bold;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            z-index: 20;
            background: rgba(255,255,255,0.8);
            padding: 20px;
            border-radius: 10px;
        }




/* --- Search Bar Style --- */
.search-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 2px 5px 2px 15px;
    transition: 0.3s;
}

.search-container:focus-within {
    background: rgba(255, 255, 255, 0.25);
    border-color: #ff9800;
}

#searchBox {
    width: 100px;
    background: transparent;
    border: none;
    color: white;
    outline: none;
    font-size: 14px;
    padding: 8px 0;
}

#searchBox::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

#searchBox::-webkit-outer-spin-button,
#searchBox::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#goBtn {
    background: #ff9800;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

#goBtn:hover {
    background: #e68900;
    transform: scale(1.1);
}

/* --- Custom Popup Modal --- */
#customAlert {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 30000;
    text-align: center;
    min-width: 280px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -60%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

#customAlert h3 { margin: 0 0 10px; color: #ff9800; }
#customAlert p { margin: 0 0 20px; color: #333; line-height: 1.5; }
#customAlert button {
    background: #333;
    color: white;
    border: none;
    padding: 8px 25px;
    border-radius: 5px;
    cursor: pointer;
}