/* css/style.css — Premium Miss Nosheen's Smart English 9 Design System */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;800&family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Outfit:wght@300;400;500;600;700&display=swap');

/* --- Theme Tokens & Core Declarations --- */
:root {
    /* Imperial Purple & Gold (Default Theme) */
    --primary-color: #72408c;
    --primary-light: #f1eef4;
    --primary-dark: #4b265c;
    --secondary-color: #bd9a5f;
    --secondary-glow: rgba(189, 154, 95, 0.35);
    --accent-red: #bd406b;
    --bg-desk: radial-gradient(circle, #2d1b33 0%, #15091a 100%);
    --bg-wood: #221326;
    --paper-color: #faf6ee;
    --text-color: #2c2530;
    --text-muted: #6e6473;
    --border-color: #dee2e6;
    --shadow-tint: rgba(21, 9, 26, 0.35);
    --glow-effect: 0 0 15px var(--secondary-color);
}

/* Sepia Parchment Theme */
[data-theme="sepia"] {
    --primary-color: #5c4033;
    --primary-light: #f5eedc;
    --primary-dark: #3d2a21;
    --secondary-color: #cd853f;
    --secondary-glow: rgba(205, 133, 63, 0.35);
    --accent-red: #8b0000;
    --bg-desk: radial-gradient(circle, #3d2a21 0%, #1c130e 100%);
    --bg-wood: #261b14;
    --paper-color: #f4ecd8;
    --text-color: #3e2723;
    --text-muted: #795548;
    --border-color: #d7ccc8;
    --shadow-tint: rgba(46, 34, 28, 0.4);
    --glow-effect: 0 0 15px var(--secondary-color);
}

/* Obsidian Dark Theme */
[data-theme="dark"] {
    --primary-color: #bd9a5f;
    --primary-light: #2d2633;
    --primary-dark: #1b1621;
    --secondary-color: #9c27b0;
    --secondary-glow: rgba(156, 39, 176, 0.35);
    --accent-red: #ff4081;
    --bg-desk: radial-gradient(circle, #1a1625 0%, #0a0710 100%);
    --bg-wood: #0d0a14;
    --paper-color: #1e1926;
    --text-color: #f1eef4;
    --text-muted: #a39ca8;
    --border-color: #383042;
    --shadow-tint: rgba(0, 0, 0, 0.6);
    --glow-effect: 0 0 15px var(--primary-color);
}

/* Global Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-desk);
    color: var(--text-color);
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    user-select: none;
    transition: background 0.5s ease;
}

/* Cozy Ambient Light Overlay */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 20%, rgba(255,255,255,0.06) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
}

/* Webkit Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}
::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

/* --- Layout Header & Control Panels --- */
header {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.branding {
    display: flex;
    flex-direction: column;
}

.branding h1 {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary-color);
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
}

.branding span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 2px;
}

/* Top Right Action Dock */
.top-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Floating Search Box */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--border-color);
    padding: 10px 15px 10px 40px;
    border-radius: 30px;
    color: var(--text-color);
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    width: 250px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.search-input:focus {
    width: 320px;
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--secondary-color);
    box-shadow: 0 0 15px var(--secondary-glow);
}

.search-icon-btn {
    position: absolute;
    left: 15px;
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
}

/* Search Dropdown Panel */
.search-results-panel {
    position: absolute;
    top: 48px;
    right: 0;
    width: 380px;
    max-height: 400px;
    background: var(--paper-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    overflow-y: auto;
    display: none;
    z-index: 100;
    padding: 10px;
    backdrop-filter: blur(20px);
}

.search-result-item {
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.05);
}

.search-result-item:hover {
    background: var(--primary-light);
}

.search-result-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.search-result-text {
    font-size: 0.85rem;
    color: var(--text-color);
    line-height: 1.4;
}

.search-match-highlight {
    background: #fff59d;
    color: #000;
    font-weight: 600;
    padding: 1px 3px;
    border-radius: 2px;
}

/* Theme Switcher Button */
.theme-switcher {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
}

.theme-btn {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-btn.active {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* --- The 3D Reading Desk Environment --- */
.desk-container {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 10px;
}

/* Virtual Wood desk backing for tactile feel */
.virtual-desk {
    position: absolute;
    width: 96%;
    height: 85%;
    max-height: 650px;
    background: var(--bg-wood);
    border-radius: 24px;
    box-shadow: 
        inset 0 4px 20px rgba(255,255,255,0.05),
        0 15px 40px rgba(0,0,0,0.5),
        0 40px 100px rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 12px solid rgba(255, 255, 255, 0.02);
}

/* The book container depth edges */
.book-wrapper {
    position: relative;
    padding: 10px;
    /* Simulated 3D spine and stack underlay */
    background: linear-gradient(to right, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0) 45%, rgba(0,0,0,0) 55%, rgba(0,0,0,0.2) 100%);
    border-radius: 8px;
}

/* --- TurnJS Flipbook and Page Canvas --- */
#flipbook {
    width: 900px;
    height: 560px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    border-radius: 6px;
    background: transparent;
}

/* Individual page styles */
#flipbook .page {
    background-color: var(--paper-color);
    width: 450px;
    height: 560px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 40px 35px 35px 35px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

/* Simulated book spine binder gutter folds */
#flipbook .even {
    /* Left side page spine shadow */
    box-shadow: inset -22px 0 25px -12px rgba(0, 0, 0, 0.16);
    border-radius: 6px 0 0 6px;
}

#flipbook .odd {
    /* Right side page spine shadow */
    box-shadow: inset 22px 0 25px -12px rgba(0, 0, 0, 0.16);
    border-radius: 0 6px 6px 0;
}

/* Embossed Hard Covers */
#flipbook .hard {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%) !important;
    color: #fff !important;
    border: 3px double var(--secondary-color);
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.5),
        inset 0 0 5px var(--secondary-color) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Cover textures and borders */
.cover-content {
    width: 90%;
    height: 90%;
    border: 1px solid var(--secondary-color);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    position: relative;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 100%);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.3);
}

/* Cover ornaments */
.cover-ornament {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin: 15px 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.cover-content h2 {
    font-family: 'Cinzel', serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--secondary-color);
    text-align: center;
    letter-spacing: 2px;
    line-height: 1.2;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.6), 0 0 10px rgba(189, 154, 95, 0.3);
}

.cover-content h3 {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-top: 15px;
    letter-spacing: 3px;
    text-align: center;
    opacity: 0.9;
}

.cover-content p {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--secondary-color);
    margin-top: auto;
    font-weight: 500;
}

/* Inner Page Details & Typography */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
    margin-bottom: 18px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary-color);
}

.page-content {
    flex: 1;
    overflow-y: auto;
    font-family: 'Lora', serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-color);
    padding-right: 5px;
    font-size: var(--book-font-size, 17px);
}

.page-footer {
    padding-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    border-top: 1px dashed var(--border-color);
    margin-top: 15px;
}

/* --- Table of Contents Styles (Mirroring extraction) --- */
.toc-title {
    font-family: 'Cinzel', serif;
    text-align: center;
    color: var(--primary-color);
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.table-toc {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    font-size: 0.82em;
    line-height: 1.4;
}

.table-toc th {
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    padding: 6px;
    font-size: 0.8em;
}

.table-toc td {
    padding: 5px 6px;
    vertical-align: middle;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.table-toc-header {
    background-color: var(--primary-color) !important;
    color: #fff !important;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.table-toc-header:hover {
    transform: scale(1.01);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.table-toc-header td {
    border-bottom: none;
    font-size: 0.85em;
}

.col-sno-t {
    width: 10%;
    text-align: center;
    font-weight: bold;
}

.col-page-t {
    width: 12%;
    text-align: center;
    font-weight: bold;
}

.bullet-col-t {
    width: 6%;
    text-align: center;
    color: var(--primary-color);
    font-weight: bold;
}

.toc-link-item {
    cursor: pointer;
    transition: color 0.2s ease;
}

.toc-link-item:hover {
    color: var(--accent-red);
    text-decoration: underline;
}

/* Dynamic CSS Book Spine Stack overlay (page count thickness) */
.page-thickness-left {
    position: absolute;
    left: -10px;
    top: 5px;
    bottom: 5px;
    width: 10px;
    background: linear-gradient(to right, rgba(0,0,0,0.3) 0%, rgba(255,255,255,0.08) 50%, rgba(0,0,0,0.1) 100%), var(--paper-color);
    border-radius: 4px 0 0 4px;
    box-shadow: -2px 0 5px rgba(0,0,0,0.3);
    z-index: -1;
}

.page-thickness-right {
    position: absolute;
    right: -10px;
    top: 5px;
    bottom: 5px;
    width: 10px;
    background: linear-gradient(to left, rgba(0,0,0,0.3) 0%, rgba(255,255,255,0.08) 50%, rgba(0,0,0,0.1) 100%), var(--paper-color);
    border-radius: 0 4px 4px 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.3);
    z-index: -1;
}

/* --- Floating Ribbon Bookmarks --- */
.bookmark-ribbon {
    position: absolute;
    top: -5px;
    right: 30px;
    width: 22px;
    height: 50px;
    background: var(--accent-red);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
    cursor: pointer;
    z-index: 50;
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top center;
    opacity: 0.3;
}

.bookmark-ribbon:hover {
    transform: translateY(4px);
    opacity: 0.85;
}

.bookmark-ribbon.active {
    opacity: 1;
    height: 70px;
    transform: translateY(0);
}

/* Embedded interactive elements & notes */
.grammar-block-box {
    background-color: var(--primary-light);
    border: 2px solid var(--primary-color);
    text-align: center;
    padding: 20px 15px;
    margin-top: 15px;
    border-radius: 8px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.03);
}

.grammar-block-box h4 {
    color: var(--accent-red);
    font-weight: bold;
    font-size: 1em;
    font-family: 'Cinzel', serif;
}

.grammar-block-box h1 {
    color: var(--primary-color);
    font-weight: 800;
    font-size: 1.6em;
    line-height: 1.2;
    margin: 8px 0;
    font-family: 'Cinzel', serif;
}

.grammar-block-box h3 {
    color: var(--accent-red);
    font-weight: bold;
    font-size: 1.1em;
}

.vocab-list {
    margin: 10px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 0.88em;
}

.vocab-item {
    background: rgba(255,255,255,0.5);
    padding: 6px 10px;
    border-radius: 4px;
    border-left: 3px solid var(--secondary-color);
    display: flex;
    justify-content: space-between;
}

.vocab-urdu {
    font-family: 'Noto Nastaliq Urdu', serif;
    color: var(--primary-color);
    font-weight: 600;
}

.question-block {
    margin: 15px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.question-title {
    font-weight: 700;
    font-size: 0.9em;
    margin-bottom: 4px;
    color: var(--primary-dark);
}

.question-answer {
    font-size: 0.88em;
    color: var(--text-color);
}

/* Highlighting searched words in textbook page */
.search-word-highlight {
    background: #fff59d;
    box-shadow: 0 0 8px #fff59d;
    border-radius: 2px;
    animation: pulse-glow-hl 1s infinite alternate;
}

@keyframes pulse-glow-hl {
    0% { background: #fff59d; box-shadow: 0 0 4px #fff59d; }
    100% { background: #ffe082; box-shadow: 0 0 12px #ffe082; }
}

/* --- Floating Bottom Controls Dock --- */
.controls-dock {
    width: 90%;
    max-width: 800px;
    background: rgba(21, 9, 26, 0.65);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 40px;
    padding: 10px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
    margin-bottom: 20px;
    box-shadow: 
        0 10px 30px rgba(0,0,0,0.3),
        inset 0 1px 1px rgba(255,255,255,0.1);
    z-index: 10;
}

.dock-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dock-btn {
    background: none;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.dock-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--secondary-color);
    box-shadow: var(--glow-effect);
}

.dock-btn:active {
    transform: scale(0.92);
}

.dock-btn.active {
    background: var(--primary-color);
    color: #fff;
}

/* Page Scrubber Scrubber */
.page-scrubber-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0 20px;
}

.page-scrubber {
    flex: 1;
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.15);
    outline: none;
    cursor: pointer;
}

.page-scrubber::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--secondary-color);
    cursor: pointer;
    transition: transform 0.1s ease;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.page-scrubber::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.page-badge {
    background: rgba(255,255,255,0.08);
    padding: 6px 12px;
    border-radius: 20px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 70px;
    text-align: center;
}

/* Font Size Selector */
.font-selector-popover {
    position: relative;
}

.font-size-popup {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-dark);
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 10px;
    display: none;
    flex-direction: column;
    gap: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.font-size-btn {
    background: none;
    border: none;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    text-align: center;
    transition: all 0.2s ease;
}

.font-size-btn:hover {
    background: var(--primary-color);
}

/* --- Speech control board --- */
.speech-control-panel {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 4px 10px;
    display: none;
    align-items: center;
    gap: 8px;
    margin-right: 10px;
}

/* --- Interactive Notepad side panel (Tactile Legal Pad) --- */
.notepad-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 350px;
    height: 100vh;
    background: #fdf5e6; /* Creamy yellow legal pad background */
    box-shadow: -10px 0 30px rgba(0,0,0,0.25);
    z-index: 200;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border-left: 8px solid var(--secondary-color);
}

.notepad-drawer.open {
    transform: translateX(0);
}

.notepad-header {
    background: var(--primary-dark);
    color: #fff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.notepad-header h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

.close-notepad-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s ease;
}

.close-notepad-btn:hover {
    color: var(--secondary-color);
}

/* Legal yellow pad lines */
.notepad-body {
    flex: 1;
    position: relative;
    padding: 30px 20px 20px 45px; /* Red margin spacer */
    background: linear-gradient(rgba(0,0,0,0) 0%, rgba(0,0,0,0) 96%, #a1c4fd 97%, #a1c4fd 100%);
    background-size: 100% 28px;
}

/* Red legal vertical margin line */
.notepad-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 35px;
    bottom: 0;
    width: 2px;
    background: rgba(220, 53, 69, 0.4);
}

.notepad-textarea {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    resize: none;
    font-family: 'Lora', serif;
    font-size: 1.05rem;
    line-height: 28px; /* Alignment with blue lines */
    color: #3e2723;
}

.notepad-footer {
    background: #f5eedc;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(0,0,0,0.06);
    font-size: 0.75rem;
    color: #5d4037;
    font-weight: 500;
}

/* Auto-save notification */
.save-status {
    display: flex;
    align-items: center;
    gap: 5px;
}

.save-status .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #28a745;
}

/* --- Responsive Scaling Layer --- */
@media (max-width: 992px) {
    #flipbook {
        width: 450px !important;
        height: 560px !important;
    }
    
    #flipbook .page {
        width: 450px !important;
    }
    
    .nav-arrow {
        display: none !important; /* Hide off-screen arrows on mobile */
    }
    .prominent-pagination {
        top: -38px !important;
        padding: 4px 12px !important;
    }
    .page-num-indicator {
        font-size: 0.75rem !important;
    }
}

/* --- Floating Navigation Arrows & Prominent Pagination --- */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(114, 64, 140, 0.3);
    backdrop-filter: blur(10px);
    border: 2px solid var(--secondary-color);
    color: #fff;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 95;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.prev-arrow {
    left: -70px;
}

.next-arrow {
    right: -70px;
}

.nav-arrow:hover {
    background: var(--primary-color);
    border-color: #fff;
    color: var(--secondary-color);
    box-shadow: var(--glow-effect), 0 8px 30px rgba(0,0,0,0.6);
}

.prev-arrow:hover {
    transform: translateY(-50%) translateX(-4px);
}

.next-arrow:hover {
    transform: translateY(-50%) translateX(4px);
}

.nav-arrow:active {
    transform: translateY(-50%) scale(0.92);
}

.nav-arrow.disabled {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

/* Prominent Top-Center Pagination Badge */
.prominent-pagination {
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(114, 64, 140, 0.35);
    backdrop-filter: blur(10px);
    border: 2px solid var(--secondary-color);
    border-radius: 30px;
    padding: 6px 22px;
    z-index: 90;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.35);
    transition: all 0.3s ease;
}

.page-num-indicator {
    font-family: 'Cinzel', serif;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--secondary-color);
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
