/* Estilos para la Grilla de Mis Libros y el Visor de Lectura Online */

/* Grilla en Mi Cuenta */
.llpdf-my-books-container {
    margin-bottom: 30px;
}

.llpdf-books-header h2 {
    margin-bottom: 5px;
}

.llpdf-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.llpdf-book-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.llpdf-book-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.1);
}

.llpdf-book-cover {
    background: #f7fafc;
    text-align: center;
    padding: 16px;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.llpdf-book-cover img {
    max-height: 200px;
    width: auto;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.llpdf-book-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.llpdf-book-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    line-height: 1.35;
    color: #1a202c;
}

.llpdf-btn-read {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 14px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
}

/* Pantalla del Lector */
.llpdf-reader-wrapper {
    background: #1a202c;
    border-radius: 8px;
    overflow: hidden;
    color: #fff;
    margin: 15px 0;
    position: relative;
}

.llpdf-reader-topbar {
    background: #2d3748;
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #4a5568;
    flex-wrap: wrap;
    gap: 10px;
}

.llpdf-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.llpdf-reader-book-title {
    font-weight: 600;
    font-size: 15px;
    color: #edf2f7;
}

.llpdf-viewer-viewport {
    position: relative;
    min-height: 650px;
    background: #111;
    display: flex;
    justify-content: center;
    overflow: auto;
}

/* Marca de Agua */
.llpdf-watermark-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
    opacity: 0.12;
    user-select: none;
}

.llpdf-watermark-pattern {
    display: flex;
    flex-wrap: wrap;
    transform: rotate(-30deg) scale(1.3);
    width: 150%;
    height: 150%;
    margin-left: -25%;
    margin-top: -25%;
}

.llpdf-watermark-item {
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
    padding: 40px 60px;
    white-space: nowrap;
}

/* Contenedor Real3D Flipbook */
.llpdf-real3d-container {
    width: 100%;
    min-height: 650px;
}

/* Contenedor PDF.js */
.llpdf-pdfjs-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.llpdf-pdfjs-toolbar {
    background: #23272d;
    width: 100%;
    padding: 8px 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    border-bottom: 1px solid #333;
}

.llpdf-canvas-container {
    width: 100%;
    overflow-x: auto;
    display: flex;
    justify-content: center;
    padding: 20px 10px;
}

#llpdf-canvas {
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    background: #fff;
}

/* Modo pantalla completa */
:fullscreen .llpdf-reader-wrapper {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    margin: 0;
}

:fullscreen .llpdf-viewer-viewport {
    height: calc(100vh - 60px);
}

/* Celulares / Responsive */
@media (max-width: 768px) {
    .llpdf-books-grid {
        grid-template-columns: 1fr;
    }

    .llpdf-reader-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .llpdf-topbar-right {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }

    .llpdf-viewer-viewport {
        min-height: 480px;
    }
}
