 /* --- PDF Wrapper --- */
        .pdf-wrapper {
            position: relative; 
            width: 100%;
            height: 100vh; /* 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: 20px;
            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;
        }