/* Flipbook styles */
.abufbe-search { display:flex; gap:8px; margin: 1rem 0; }
.abufbe-search input[type="text"] { flex:1; padding:.5rem; }
.abufbe-search select, .abufbe-search button { padding:.5rem; }

.abufbe-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.abufbe-card { border:1px solid #e5e7eb; border-radius:12px; overflow:hidden; background:#fff; display:flex; flex-direction:column; }
.abufbe-thumb img { width:100%; height:auto; display:block; }
.abufbe-info { padding:12px; display:flex; flex-direction:column; gap:6px; }
.abufbe-title { margin:0; font-size:1.05rem; }
.abufbe-meta { font-size:.9rem; color:#374151; }
.abufbe-actions { margin-top:8px; display:flex; gap:8px; flex-wrap:wrap; }
.abufbe-btn { border:1px solid #111827; border-radius:8px; padding:.4rem .7rem; background:#fff; text-decoration:none; cursor:pointer; }

.abufbe-pagination ul { list-style:none; padding:0; display:flex; gap:6px; flex-wrap:wrap; }
.abufbe-pagination a, .abufbe-pagination span { border:1px solid #d1d5db; padding:.35rem .6rem; border-radius:6px; }

/* Modal */
.abufbe-modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display:none; align-items:center; justify-content:center; padding: 24px; z-index: 9999; }
.abufbe-modal[aria-hidden="false"] { display:flex; }
.abufbe-modal .abufbe-modal-inner { background:#fff; border-radius:12px; overflow:hidden; width: min(100%, 1100px); height: min(92vh, 780px); position:relative; display:flex; flex-direction:column; }
.abufbe-modal .abufbe-close { position:absolute; right:8px; top:6px; border:none; background:transparent; font-size:28px; line-height:1; cursor:pointer; }

/* Viewer */
.abufbe-viewer { display:flex; flex-direction:column; height:100%; }
.abufbe-toolbar { display:flex; align-items:center; justify-content:center; gap:12px; padding:8px; border-bottom:1px solid #e5e7eb; }
.abufbe-page-info { font-weight:600; }
.abufbe-book { flex:1; display:flex; align-items:center; justify-content:center; gap:0; perspective: 2000px; background:#f8fafc; }

.abufbe-canvas { background:#fff; box-shadow: 0 10px 25px rgba(0,0,0,.1); width: 48%; height:auto; max-height: calc(100% - 40px); }
.abufbe-canvas.left { transform-origin: right center; transition: transform .5s ease; }
.abufbe-canvas.right { transform-origin: left center; transition: transform .5s ease; }

/* Flip states applied via JS */
.abufbe-book.flipping .left { transform: rotateY(-12deg); }
.abufbe-book.flipping .right { transform: rotateY(12deg); }
