/* 01. Upload workspace */
.veeb-upload { --upload-gold:#ffbd32; }
.upload-main-split { display:grid; grid-template-columns:1fr 1fr; gap:40px; align-items:center; }
.upload-main-copy h2 { color:var(--red); }
.veeb-upload-permissions { font-size:12px; padding:15px; border-left:3px solid var(--red); background:#ed142808; }
#dropContainer { display:flex; flex-direction:column; justify-content:center; align-items:center; gap:20px; min-height:270px; padding:35px 25px; background:linear-gradient(135deg,#071a38,#15365e); border:2px dashed var(--upload-gold); border-radius:14px; color:white; text-align:center; transition:box-shadow .2s; cursor:pointer; }
#dropContainer strong { font-size:24px; line-height:1.4; }
#dropContainer em { color:var(--upload-gold); font-style:normal; }
#dropContainer span { font-size:11px; letter-spacing:.15em; color:#bdcce0; }
#dropContainer.drag-over { box-shadow:0 0 0 6px #ffbd3240; }
#browseButton, #serverUploadButton { background:linear-gradient(120deg,#ffe15a,#ff9816); color:#241800; border:1px solid #ffc13b; font-weight:800; }
.upload-url-row { display:flex; gap:10px; margin:18px 0 10px; }
.upload-url-row input { flex:1; min-width:0; }
.upload-main-action small { display:block; font-size:10px; color:var(--muted); }
.upload-settings { display:grid; grid-template-columns:2fr 1fr 1fr; gap:18px; margin:30px 0; }
.upload-settings label { font-size:12px; font-weight:650; display:grid; gap:8px; }
.veeb-upload input:not([type="checkbox"]), .veeb-upload select { padding:12px; border:1px solid var(--line); border-radius:10px; color:var(--text); background:var(--surface); width:100%; }
#conversionProgress { width:100%; height:12px; accent-color:var(--red); }
#progressMessage { font-size:13px; }
.upload-result-actions { display:flex; flex-wrap:wrap; gap:12px; margin:20px 0; }
#thumbnailsContainer { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:20px; margin:30px 0; }
.pdf-page-card { margin:0; padding:12px; border:1px solid #60769a; border-radius:12px; background:#071a38; box-shadow:0 12px 28px #0002; }
.pdf-page-card figcaption { padding:8px; background:linear-gradient(135deg,#f42034,#ff671f); color:white; text-align:center; font-size:11px; font-weight:800; border-radius:7px; margin-bottom:12px; }
.pdf-page-card button { padding:0; border:0; background:none; display:block; width:100%; cursor:pointer; }
.pdf-page-card img { display:block; width:100%; height:auto; border-radius:5px; }
.upload-server-actions { padding:25px; border:1px solid var(--line); border-radius:15px; background:var(--surface); text-align:center; }
#serverUploadButton { padding:20px 25px; margin:25px auto 10px; border-radius:10px; box-shadow:0 8px 25px #ff981630; }
#publicationLink { display:block; color:var(--red); font-weight:700; }
#serverUploadStatus { font-size:13px; }
.veeb-upload button:disabled { opacity:.6; cursor:wait; }
/* 02. Standalone cover and chrome-free publication */
.veeb-reader-only { margin:0; padding:0; background:#10131c; color:#fff; font-family:system-ui,sans-serif; }
.veeb-book-launch { display:flex; min-height:100dvh; align-items:center; justify-content:center; flex-direction:column; gap:20px; text-align:center; padding:30px; }
.veeb-book-launch h1 { font-size:clamp(22px,4vw,35px); max-width:800px; }
.veeb-book-launch p { color:#a6b0c2; font-size:13px; }
.veeb-open-book { border:0; background:none; color:inherit; cursor:pointer; display:grid; gap:20px; }
.veeb-open-book img { width:auto; max-width:70vw; max-height:55vh; box-shadow:0 20px 70px #0008; }
.veeb-open-book span { padding:13px 20px; border-radius:10px; background:#ed1428; color:white; }
/* 03. Full-screen lightbox */
.reader-is-open { overflow:hidden; }
.veeb-reader { position:fixed; inset:0; margin:0; width:100vw; height:100vh; height:100dvh; max-width:none; max-height:none; padding:0; border:0; background:radial-gradient(ellipse at center,#303746,#10131c 75%); color:#fff; font:14px/1.5 system-ui,sans-serif; overflow:hidden; }
.veeb-reader[open] { display:flex; flex-direction:column; }
.veeb-reader::backdrop { background:#080a10ed; }
.veeb-reader * { box-sizing:border-box; }
.veeb-reader [hidden] { display:none!important; }
.reader-toolbar { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:12px 22px; background:#11151ee8; border-bottom:1px solid #ffffff14; flex-shrink:0; }
.reader-title { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; max-width:45vw; font-size:13px; }
.reader-controls { display:flex; gap:8px; align-items:center; }
.veeb-reader button, .reader-download { display:inline-flex; align-items:center; justify-content:center; min-width:38px; min-height:38px; padding:7px 10px; background:#ffffff0d; color:#fff; border:1px solid #ffffff20; border-radius:9px; font:inherit; cursor:pointer; text-decoration:none; }
.veeb-reader button:hover, .reader-download:hover { background:#ed1428; }
.veeb-reader button:focus-visible, .reader-download:focus-visible { outline:3px solid #ffbd32; outline-offset:2px; }
.veeb-reader button:disabled { opacity:.3; cursor:default; }
.reader-stage { flex:1; min-height:0; min-width:0; overflow:auto; display:flex; align-items:center; justify-content:center; padding:25px; perspective:2000px; touch-action:pan-y; }
.reader-book { display:flex; align-items:stretch; justify-content:center; max-width:100%; height:100%; max-height:100%; transform-origin:center; transform-style:preserve-3d; transition:transform .2s; }
.reader-leaf { position:relative; display:flex; align-items:center; justify-content:center; max-width:50%; height:100%; background:#fff; box-shadow:0 15px 45px #0006; backface-visibility:hidden; }
.reader-leaf img { display:block; max-width:100%; height:100%; object-fit:contain; user-select:none; }
.reader-left { transform-origin:right center; }
.reader-right { transform-origin:left center; }
.reader-left::after { content:''; position:absolute; top:0; bottom:0; right:0; width:18px; background:linear-gradient(90deg,transparent,#0003); pointer-events:none; }
.reader-right::after { content:''; position:absolute; top:0; bottom:0; left:0; width:18px; background:linear-gradient(90deg,#0002,transparent); pointer-events:none; }
.reader-leaf.is-empty { background:transparent; box-shadow:none; }
.reader-leaf.is-empty::after { display:none; }
.reader-book.single-page .reader-left { display:none; }
.reader-book.single-page .reader-right { max-width:100%; }
.reader-bottom { display:flex; align-items:center; justify-content:center; gap:30px; padding:10px 20px; background:#11151ee8; flex-shrink:0; }
.reader-counter { min-width:140px; text-align:center; font-size:12px; color:#c4cbd8; }
.reader-thumbnails { display:flex; gap:12px; padding:15px 20px; background:#11151e; overflow-x:auto; flex-shrink:0; max-height:150px; }
.reader-thumbnails button { display:flex; flex-direction:column; min-width:65px; padding:6px; gap:4px; font-size:10px; }
.reader-thumbnails img { height:75px; width:55px; object-fit:contain; }
.reader-thumbnails [aria-current="true"] { border-color:#ed1428; }
@media(max-width:850px) { .upload-main-split { grid-template-columns:1fr; gap:20px; } .upload-settings { grid-template-columns:1fr 1fr; } .upload-settings label:first-child { grid-column:1/-1; } }
@media(max-width:700px) { .reader-toolbar { flex-wrap:wrap; justify-content:center; padding:8px; gap:8px; } .reader-title { max-width:90vw; text-align:center; width:100%; } .reader-controls { gap:5px; } .veeb-reader button,.reader-download { min-width:32px; min-height:32px; padding:5px 8px; font-size:12px; } .reader-stage { padding:12px; } .reader-book { width:100%; height:auto; max-height:100%; } .reader-leaf img { max-height:calc(100dvh - 170px); width:auto; height:auto; } .reader-leaf { height:auto; } .reader-bottom { gap:20px; } #thumbnailsContainer { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; } .upload-url-row { flex-direction:column; } }
@media(prefers-reduced-motion:reduce) { .reader-book { transition:none; } }
