.wp-lib-reader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.wp-lib-reader.dark {
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);
}

.wp-lib-reader.sepia {
    background: linear-gradient(135deg, #f8f4e8 0%, #f4ecd8 50%, #e8dcc8 100%);
}

.wp-lib-reader-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 100;
}

.wp-lib-reader.dark .wp-lib-reader-header {
    background: rgba(15, 15, 26, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.04);
}

.wp-lib-reader.sepia .wp-lib-reader-header {
    background: rgba(248, 244, 232, 0.95);
    border-bottom-color: rgba(100, 80, 60, 0.08);
}

.wp-lib-reader-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.wp-lib-reader-header-center {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wp-lib-reader-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: flex-end;
}

.wp-lib-reader-title {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
    padding-left: 8px;
}

.wp-lib-reader.dark .wp-lib-reader-title {
    color: #ecf0f1;
}

.wp-lib-reader.sepia .wp-lib-reader-title {
    color: #5c4b37;
}

.wp-lib-reader-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 17px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.wp-lib-reader-btn i {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 1;
    text-align: center;
    color: inherit;
}

.wp-lib-reader-btn:hover {
    background: rgba(0, 123, 255, 0.08);
    color: #007bff;
    transform: translateY(-1px);
}

.wp-lib-reader-btn:active {
    transform: translateY(0);
}

.wp-lib-reader-btn.has-badge::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    background: #dc3545;
    border-radius: 50%;
}

.wp-lib-reader.dark .wp-lib-reader-btn {
    background: rgba(255, 255, 255, 0.04);
    color: #aaa;
}

.wp-lib-reader.dark .wp-lib-reader-btn:hover {
    background: rgba(0, 123, 255, 0.18);
    color: #fff;
}

.wp-lib-reader-btn.active {
    background: rgba(0, 123, 255, 0.14);
    color: #007bff;
}

.wp-lib-reader-btn[data-theme].active {
    background: rgba(0, 123, 255, 0.18);
    color: #007bff;
}

.wp-lib-reader-btn[data-theme="dark"].active {
    background: rgba(255, 255, 255, 0.12);
    color: #ecf0f1;
}

.wp-lib-reader-btn[data-theme="sepia"].active {
    background: rgba(200, 180, 150, 0.2);
    color: #5c4b37;
}

.wp-lib-reader-btn.wp-lib-btn-close:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.wp-lib-page-jump {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.03);
    padding: 6px 12px;
    border-radius: 8px;
}

.wp-lib-reader.dark .wp-lib-page-jump {
    background: rgba(255, 255, 255, 0.03);
}

.wp-lib-page-jump input {
    width: 50px;
    background: transparent;
    border: none;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    outline: none;
    padding: 4px;
}

.wp-lib-reader.dark .wp-lib-page-jump input {
    color: #ecf0f1;
}

.wp-lib-page-jump span {
    font-size: 13px;
    color: #888;
    font-weight: 500;
}

.wp-lib-reader.dark .wp-lib-page-jump span {
    color: #666;
}

.wp-lib-reader-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    transition: padding 0.3s ease;
}

.wp-lib-reader-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.wp-lib-epub-viewer {
    width: 100%;
    max-width: 900px;
    height: 100%;
    overflow-y: auto;
    padding: 40px 32px;
    box-sizing: border-box;
    background: #fff;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    position: relative;
}

.wp-lib-reader.dark .wp-lib-epub-viewer {
    background: #1a1a1a;
}

.wp-lib-reader.sepia .wp-lib-epub-viewer {
    background: #f8f4e8;
}

.wp-lib-epub-viewer::-webkit-scrollbar {
    width: 4px;
}

.wp-lib-epub-viewer::-webkit-scrollbar-track {
    background: transparent;
}

.wp-lib-epub-viewer::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 2px;
}

.wp-lib-reader.dark .wp-lib-epub-viewer::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
}

.wp-lib-epub-viewer .chapter-content {
    font-size: 17px;
    line-height: 1.9;
    color: #333;
    padding: 16px;
}

.wp-lib-reader.dark .wp-lib-epub-viewer .chapter-content {
    color: #e0e0e0;
}

.wp-lib-reader.sepia .wp-lib-epub-viewer .chapter-content {
    color: #5c4b37;
}

.wp-lib-epub-viewer .chapter-content h1,
.wp-lib-epub-viewer .chapter-content h2,
.wp-lib-epub-viewer .chapter-content h3 {
    margin-top: 0;
    margin-bottom: 24px;
    font-weight: 700;
    line-height: 1.4;
}

.wp-lib-epub-viewer .chapter-content h1 {
    font-size: 28px;
}

.wp-lib-epub-viewer .chapter-content h2 {
    font-size: 24px;
}

.wp-lib-epub-viewer .chapter-content h3 {
    font-size: 20px;
}

.wp-lib-epub-viewer .chapter-content p {
    margin-bottom: 20px;
    text-align: justify;
    text-indent: 2em;
}

.wp-lib-epub-viewer .chapter-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    display: block;
    border-radius: 6px;
}

.wp-lib-pdf-viewer {
    width: 100%;
    max-width: 1200px;
    height: 100%;
    position: relative;
    perspective: 2000px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wp-lib-pdf-book {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
}

.wp-lib-pdf-page {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    backface-visibility: hidden;
    transform-origin: left center;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.wp-lib-pdf-page.left {
    left: 0;
    transform-origin: right center;
}

.wp-lib-pdf-page.right {
    right: 0;
    transform-origin: left center;
}

.wp-lib-pdf-page.hidden {
    display: none;
}

.wp-lib-pdf-page.flipping {
    z-index: 10;
}

.wp-lib-pdf-page.flipping.right {
    animation: flipRightPage 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.wp-lib-pdf-page.flipping.left {
    animation: flipLeftPage 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes flipRightPage {
    0% {
        transform: rotateY(0deg) translateX(0);
        z-index: 10;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    }
    25% {
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    }
    50% {
        transform: rotateY(-90deg) translateX(-5%);
        z-index: 10;
        box-shadow: -20px 0 40px rgba(0, 0, 0, 0.25);
    }
    75% {
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    }
    100% {
        transform: rotateY(-180deg) translateX(0);
        z-index: 1;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    }
}

@keyframes flipLeftPage {
    0% {
        transform: rotateY(-180deg) translateX(0);
        z-index: 1;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    }
    25% {
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
    }
    50% {
        transform: rotateY(-90deg) translateX(5%);
        z-index: 10;
        box-shadow: 20px 0 40px rgba(0, 0, 0, 0.25);
    }
    75% {
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
    }
    100% {
        transform: rotateY(0deg) translateX(0);
        z-index: 10;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    }
}

.wp-lib-pdf-page-content {
    width: 100%;
    height: 100%;
    background: #fff;
    box-shadow: 
        inset 0 0 0 1px rgba(0, 0, 0, 0.04),
        0 2px 15px rgba(0, 0, 0, 0.06);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.wp-lib-reader.dark .wp-lib-pdf-page-content {
    background: #1a1a1a;
}

.wp-lib-reader.sepia .wp-lib-pdf-page-content {
    background: #f8f4e8;
}

.wp-lib-pdf-page.left .wp-lib-pdf-page-content {
    border-radius: 4px 0 0 4px;
    box-shadow: 
        inset 0 0 0 1px rgba(0, 0, 0, 0.04),
        -1px 0 15px rgba(0, 0, 0, 0.05),
        0 2px 15px rgba(0, 0, 0, 0.04);
}

.wp-lib-pdf-page.right .wp-lib-pdf-page-content {
    border-radius: 0 4px 4px 0;
    box-shadow: 
        inset 0 0 0 1px rgba(0, 0, 0, 0.04),
        1px 0 15px rgba(0, 0, 0, 0.06),
        0 2px 15px rgba(0, 0, 0, 0.04);
}

.wp-lib-pdf-page.flipping .wp-lib-pdf-page-content {
    box-shadow: 
        0 0 0 1px rgba(0, 0, 0, 0.08),
        -15px 0 30px rgba(0, 0, 0, 0.25);
}

.wp-lib-pdf-canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wp-lib-pdf-page-number {
    position: absolute;
    bottom: 12px;
    right: 16px;
    font-size: 11px;
    color: #999;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.8);
    padding: 3px 8px;
    border-radius: 4px;
}

.wp-lib-reader.dark .wp-lib-pdf-page-number {
    color: #666;
    background: rgba(0, 0, 0, 0.5);
}

.wp-lib-reader.sepia .wp-lib-pdf-page-number {
    color: #99856b;
    background: rgba(255, 255, 255, 0.6);
}

.wp-lib-pdf-page.left .wp-lib-pdf-page-number {
    right: auto;
    left: 16px;
}

.wp-lib-pdf-spine {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 10px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #d4a574 0%, #c4956a 50%, #d4a574 100%);
    box-shadow: 
        inset 2px 0 4px rgba(0, 0, 0, 0.2),
        inset -2px 0 4px rgba(255, 255, 255, 0.1);
    z-index: 5;
}

.wp-lib-reader.dark .wp-lib-pdf-spine {
    background: linear-gradient(90deg, #3a3a3a 0%, #2a2a2a 50%, #3a3a3a 100%);
}

.wp-lib-reader.sepia .wp-lib-pdf-spine {
    background: linear-gradient(90deg, #c4a574 0%, #b4956a 50%, #c4a574 100%);
}

.wp-lib-pdf-shadow {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.02));
    pointer-events: none;
}

.wp-lib-pdf-page.left .wp-lib-pdf-shadow {
    right: 0;
}

.wp-lib-pdf-page.right .wp-lib-pdf-shadow {
    left: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.02), transparent);
}

.wp-lib-reader-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.04);
}

.wp-lib-reader.dark .wp-lib-reader-footer {
    background: rgba(15, 15, 26, 0.95);
    border-top-color: rgba(255, 255, 255, 0.04);
}

.wp-lib-reader.sepia .wp-lib-reader-footer {
    background: rgba(248, 244, 232, 0.95);
    border-top-color: rgba(100, 80, 60, 0.08);
}

.wp-lib-progress-bar-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 20px;
}

.wp-lib-progress-bar {
    flex: 1;
    height: 5px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.wp-lib-reader.dark .wp-lib-progress-bar {
    background: rgba(255, 255, 255, 0.06);
}

.wp-lib-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #6610f2);
    border-radius: 3px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.wp-lib-progress-bar-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.15);
}

.wp-lib-progress-bar:hover .wp-lib-progress-bar-fill {
    background: linear-gradient(90deg, #0056b3, #550bd6);
}

.wp-lib-progress-text {
    font-size: 13px;
    color: #666;
    min-width: 80px;
    text-align: center;
    font-weight: 500;
}

.wp-lib-reader.dark .wp-lib-progress-text {
    color: #888;
}

.wp-lib-reader.sepia .wp-lib-progress-text {
    color: #8a7560;
}

.wp-lib-chapter-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wp-lib-chapter-nav button {
    padding: 8px 16px;
    border: none;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
}

.wp-lib-chapter-nav button:hover {
    background: #007bff;
    color: #fff;
    transform: translateY(-1px);
}

.wp-lib-chapter-nav button:active {
    transform: translateY(0);
}

.wp-lib-reader.dark .wp-lib-chapter-nav button {
    background: rgba(255, 255, 255, 0.04);
    color: #aaa;
}

.wp-lib-reader.dark .wp-lib-chapter-nav button:hover {
    background: #007bff;
    color: #fff;
}

.wp-lib-chapter-nav button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none !important;
}

.wp-lib-reading-info {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: #888;
}

.wp-lib-reader.dark .wp-lib-reading-info {
    color: #666;
}

.wp-lib-reading-info span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.wp-lib-toc-panel {
    position: fixed;
    top: 0;
    left: -340px;
    width: 340px;
    height: 100%;
    background: #fff;
    z-index: 10000;
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: 8px 0 30px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
}

.wp-lib-reader.dark .wp-lib-toc-panel {
    background: #1a1a1a;
}

.wp-lib-toc-panel.open {
    left: 0;
}

.wp-lib-toc-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.01);
    flex-shrink: 0;
}

.wp-lib-reader.dark .wp-lib-toc-header {
    border-bottom-color: rgba(255, 255, 255, 0.04);
    background: rgba(255, 255, 255, 0.01);
}

.wp-lib-toc-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.wp-lib-reader.dark .wp-lib-toc-title {
    color: #ecf0f1;
}

.wp-lib-toc-list {
    padding: 4px 0;
    flex: 1;
    overflow-y: auto;
}

.wp-lib-toc-item {
    padding: 13px 24px;
    cursor: pointer;
    font-size: 14px;
    color: #444;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wp-lib-reader.dark .wp-lib-toc-item {
    color: #bbb;
}

.wp-lib-toc-item:hover {
    background: rgba(0, 123, 255, 0.04);
    padding-left: 28px;
}

.wp-lib-reader.dark .wp-lib-toc-item:hover {
    background: rgba(0, 123, 255, 0.08);
}

.wp-lib-toc-item.active {
    background: rgba(0, 123, 255, 0.06);
    border-left-color: #007bff;
    color: #007bff;
    font-weight: 500;
}

.wp-lib-reader.dark .wp-lib-toc-item.active {
    background: rgba(0, 123, 255, 0.12);
}

.wp-lib-toc-item i {
    font-size: 16px;
    opacity: 0.6;
}

.wp-lib-toc-item.active i {
    opacity: 1;
}

.wp-lib-settings-panel {
    position: fixed;
    top: 0;
    right: -340px;
    width: 340px;
    height: 100%;
    background: #fff;
    z-index: 10000;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
}

.wp-lib-reader.dark .wp-lib-settings-panel {
    background: #1a1a1a;
}

.wp-lib-settings-panel.open {
    right: 0;
}

.wp-lib-settings-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.01);
    flex-shrink: 0;
}

.wp-lib-reader.dark .wp-lib-settings-header {
    border-bottom-color: rgba(255, 255, 255, 0.04);
    background: rgba(255, 255, 255, 0.01);
}

.wp-lib-settings-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.wp-lib-reader.dark .wp-lib-settings-title {
    color: #ecf0f1;
}

.wp-lib-settings-content {
    padding: 24px;
    flex: 1;
}

.wp-lib-settings-section {
    margin-bottom: 36px;
}

.wp-lib-settings-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wp-lib-reader.dark .wp-lib-settings-section-title {
    color: #ecf0f1;
}

.wp-lib-font-size-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: center;
}

.wp-lib-font-size-btn {
    width: 46px;
    height: 46px;
    border: 2px solid rgba(0, 0, 0, 0.06);
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: #555;
}

.wp-lib-font-size-btn:hover {
    border-color: #007bff;
    color: #007bff;
    transform: scale(1.12);
}

.wp-lib-font-size-btn:active {
    transform: scale(0.96);
}

.wp-lib-reader.dark .wp-lib-font-size-btn {
    background: #252525;
    border-color: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.wp-lib-font-size-display {
    min-width: 90px;
    text-align: center;
    font-size: 19px;
    font-weight: 700;
    color: #2c3e50;
    background: rgba(0, 0, 0, 0.02);
    padding: 12px 24px;
    border-radius: 10px;
}

.wp-lib-reader.dark .wp-lib-font-size-display {
    color: #ecf0f1;
    background: rgba(255, 255, 255, 0.02);
}

.wp-lib-theme-options {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.wp-lib-theme-option {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.wp-lib-theme-option:hover {
    transform: scale(1.12);
}

.wp-lib-theme-option.light {
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
    border-color: rgba(0, 0, 0, 0.06);
}

.wp-lib-theme-option.dark {
    background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
}

.wp-lib-theme-option.sepia {
    background: linear-gradient(135deg, #f8f4e8 0%, #f0e6d8 100%);
}

.wp-lib-theme-option.active {
    border-color: #007bff;
    transform: scale(1.18);
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.08);
}

.wp-lib-theme-option.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    background: #007bff;
    border-radius: 50%;
}

.wp-lib-margin-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: center;
}

.wp-lib-margin-btn {
    padding: 10px 20px;
    border: 2px solid rgba(0, 0, 0, 0.06);
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    transition: all 0.25s;
}

.wp-lib-margin-btn:hover {
    border-color: #007bff;
    color: #007bff;
}

.wp-lib-margin-btn.active {
    background: rgba(0, 123, 255, 0.08);
    border-color: #007bff;
    color: #007bff;
}

.wp-lib-reader.dark .wp-lib-margin-btn {
    background: #252525;
    border-color: rgba(255, 255, 255, 0.06);
}

.wp-lib-btn-add-bookmark {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #007bff, #6610f2);
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.wp-lib-btn-add-bookmark:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.wp-lib-btn-add-bookmark:active {
    transform: translateY(0);
}

.wp-lib-bookmark-panel {
    position: fixed;
    top: 0;
    right: -340px;
    width: 340px;
    height: 100%;
    background: #fff;
    z-index: 10000;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
}

.wp-lib-reader.dark .wp-lib-bookmark-panel {
    background: #1a1a1a;
}

.wp-lib-bookmark-panel.open {
    right: 0;
}

.wp-lib-bookmark-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.01);
    flex-shrink: 0;
}

.wp-lib-reader.dark .wp-lib-bookmark-header {
    border-bottom-color: rgba(255, 255, 255, 0.04);
    background: rgba(255, 255, 255, 0.01);
}

.wp-lib-bookmark-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.wp-lib-reader.dark .wp-lib-bookmark-title {
    color: #ecf0f1;
}

.wp-lib-bookmark-list {
    padding: 4px 0;
    flex: 1;
    overflow-y: auto;
}

.wp-lib-bookmark-item {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.02);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wp-lib-reader.dark .wp-lib-bookmark-item {
    border-bottom-color: rgba(255, 255, 255, 0.02);
}

.wp-lib-bookmark-item:hover {
    background: rgba(0, 123, 255, 0.03);
    padding-left: 28px;
}

.wp-lib-reader.dark .wp-lib-bookmark-item:hover {
    background: rgba(0, 123, 255, 0.08);
}

.wp-lib-bookmark-chapter {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wp-lib-reader.dark .wp-lib-bookmark-chapter {
    color: #ecf0f1;
}

.wp-lib-bookmark-note {
    font-size: 13px;
    color: #888;
    line-height: 1.5;
}

.wp-lib-reader.dark .wp-lib-bookmark-note {
    color: #666;
}

.wp-lib-bookmark-time {
    font-size: 11px;
    color: #bbb;
}

.wp-lib-bookmark-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.wp-lib-bookmark-action-btn {
    padding: 7px 16px;
    font-size: 12px;
    font-weight: 500;
    border: none;
    background: rgba(0, 0, 0, 0.02);
    color: #555;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.wp-lib-bookmark-action-btn:hover {
    background: #007bff;
    color: #fff;
}

.wp-lib-reader.dark .wp-lib-bookmark-action-btn {
    background: rgba(255, 255, 255, 0.04);
    color: #aaa;
}

.wp-lib-reader.dark .wp-lib-bookmark-action-btn:hover {
    background: #007bff;
    color: #fff;
}

.wp-lib-bookmark-action-btn.delete {
    color: #dc3545;
}

.wp-lib-bookmark-action-btn.delete:hover {
    background: #dc3545;
    color: #fff;
}

.wp-lib-bookmark-empty {
    padding: 80px 24px;
    text-align: center;
    color: #999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.wp-lib-bookmark-empty i {
    font-size: 56px;
    opacity: 0.25;
}

.wp-lib-reader.dark .wp-lib-bookmark-empty {
    color: #666;
}

.wp-lib-reader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
    backdrop-filter: blur(6px);
}

.wp-lib-reader-overlay.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.wp-lib-reader.hide-ui .wp-lib-reader-header,
.wp-lib-reader.hide-ui .wp-lib-reader-footer {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-100%);
}

.wp-lib-reader.hide-ui .wp-lib-reader-footer {
    transform: translateY(100%);
}

.wp-lib-reader.hide-ui .wp-lib-reader-content {
    padding: 0;
}

.wp-lib-reader.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
}

.wp-lib-reader-fullscreen-hint {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border-radius: 25px;
    font-size: 13px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 10001;
    backdrop-filter: blur(10px);
}

.wp-lib-reader-fullscreen-hint.show {
    opacity: 1;
}

.wp-lib-reader-content-area {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.wp-lib-reader-content-area:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), transparent);
    pointer-events: none;
}

.wp-lib-reader-content-area:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, rgba(0,0,0,0.1), transparent);
    pointer-events: none;
}

.wp-lib-keyboard-hints {
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 25px;
    color: #fff;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 10001;
}

.wp-lib-keyboard-hints.show {
    opacity: 1;
}

.wp-lib-keyboard-hint {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wp-lib-keyboard-key {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    font-weight: 600;
    font-family: monospace;
}

@media (max-width: 992px) {
    .wp-lib-reader-title {
        max-width: 150px;
        font-size: 14px;
    }

    .wp-lib-page-jump {
        display: none;
    }

    .wp-lib-reading-info {
        display: none;
    }

    .wp-lib-reader-btn[data-theme] {
        display: none;
    }

    .wp-lib-reader-btn.wp-lib-btn-font-decrease,
    .wp-lib-reader-btn.wp-lib-btn-font-increase {
        display: none;
    }
}

@media (max-width: 768px) {
    .wp-lib-reader-header {
        padding: 10px 14px;
        backdrop-filter: blur(20px);
    }

    .wp-lib-reader-title {
        max-width: 100px;
        font-size: 13px;
        padding-left: 4px;
    }

    .wp-lib-reader-btn {
        width: 34px;
        height: 34px;
        font-size: 15px;
        border-radius: 8px;
    }

    .wp-lib-reader-btn.wp-lib-btn-fullscreen {
        display: none;
    }

    .wp-lib-reader-footer {
        padding: 8px 14px;
        backdrop-filter: blur(20px);
    }

    .wp-lib-progress-bar-container {
        margin: 0 10px;
        gap: 8px;
    }

    .wp-lib-progress-text {
        font-size: 12px;
        min-width: 60px;
    }

    .wp-lib-chapter-nav button {
        padding: 6px 12px;
        font-size: 12px;
        border-radius: 6px;
    }

    .wp-lib-epub-viewer {
        padding: 20px 12px;
        margin: 8px;
    }

    .wp-lib-epub-viewer .chapter-content {
        font-size: 15px;
        padding: 8px;
        line-height: 1.8;
    }

    .wp-lib-pdf-viewer {
        padding: 4px;
        perspective: 1500px;
    }

    .wp-lib-pdf-spine {
        width: 4px;
    }

    .wp-lib-pdf-page {
        width: calc(50% - 2px);
    }

    .wp-lib-toc-panel,
    .wp-lib-settings-panel,
    .wp-lib-bookmark-panel {
        width: 280px;
    }

    .wp-lib-keyboard-hints {
        display: none;
    }

    .wp-lib-reader-fullscreen-hint {
        display: none;
    }
}

@media (max-width: 480px) {
    .wp-lib-epub-viewer {
        padding: 16px 8px;
        margin: 4px;
        border-radius: 4px;
    }

    .wp-lib-epub-viewer .chapter-content {
        font-size: 14px;
        line-height: 1.7;
        padding: 4px;
    }

    .wp-lib-epub-viewer .chapter-content h1 {
        font-size: 22px;
    }

    .wp-lib-epub-viewer .chapter-content h2 {
        font-size: 20px;
    }

    .wp-lib-epub-viewer .chapter-content h3 {
        font-size: 18px;
    }

    .wp-lib-pdf-page-number {
        font-size: 10px;
        bottom: 8px;
        right: 10px;
        padding: 2px 6px;
    }

    .wp-lib-pdf-viewer {
        perspective: 1200px;
    }

    .wp-lib-progress-text {
        display: none;
    }

    .wp-lib-chapter-nav button {
        padding: 4px 10px;
    }

    .wp-lib-chapter-nav button i {
        font-size: 16px;
    }

    .wp-lib-reader-header {
        padding: 8px 10px;
    }

    .wp-lib-reader-footer {
        padding: 6px 10px;
    }

    .wp-lib-reader-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .wp-lib-reader-title {
        max-width: 80px;
        font-size: 12px;
    }

    .wp-lib-toc-panel,
    .wp-lib-settings-panel,
    .wp-lib-bookmark-panel {
        width: 240px;
    }
}