body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #525659;
}
#toolbar {
    background-color: #323639;
    color: white;
    padding: 10px;
    position: sticky;
    top: 0;
    z-index: 100;
    text-align: center;
}
button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    margin: 0 5px;
}
button.active {
    background-color: #1e7e34;
}
#pdf-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    overflow-x: auto;
}
/* Side by side styling rules */
.dual-page canvas {
    max-width: 45%;
    height: auto !important;
}
.single-page canvas {
    max-width: 90%;
    height: auto !important;
}

.app-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    height: 100vh;
    background: #f4f6fb;
}

.toc-sidebar {
    background: #111827;
    color: white;
    padding: 24px;
    overflow-y: auto;
}

.toc-sidebar h2 {
    margin-bottom: 24px;
    font-size: 22px;
}

.toc-section {
    margin-bottom: 28px;
}

.toc-section h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #93c5fd;
}

.toc-section a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.toc-section a:hover {
    background: #2563eb;
}

.viewer-area {
    padding: 24px;
}

.viewer-area iframe {
    width: 100%;
    height: calc(100vh - 48px);
    border: none;
    border-radius: 18px;
    background: white;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

/* Mobile */
@media (max-width: 800px) {
    .app-layout {
        grid-template-columns: 1fr;
    }

    .toc-sidebar {
        height: auto;
    }

    .viewer-area iframe {
        height: 80vh;
    }
}
#pdf-container {
    touch-action: pan-y;
    overflow-x: hidden;
    outline: none;
}
