:root{--bg:#f5f7fb;--panel:#fff;--accent:#2b8cff;--muted:#778;--marker-border:#e33;--active-green:#07c160;--text-gray:#666}
body,html{margin:0;font-family:Helvetica,Arial,sans-serif;background:var(--bg);color:#222;-webkit-overflow-scrolling:touch}
.app-wrapper{min-height:100vh;display:flex;flex-direction:column;touch-action:pan-y;width:100%;margin:0}
.app{width:100%;max-width:100%;margin:0;padding:0;flex-shrink:0;box-sizing:border-box}
.viewer{background:var(--panel);min-height:560px;display:flex;flex-direction:column;position:relative;flex:1}
.image-wrap{background:#eee;overflow:hidden;flex:1;display:flex;align-items:center;justify-content:center;position:relative}
.book-image{max-width:100%;height:auto;display:block;user-select:none;-webkit-user-drag:none}
a{text-decoration:none;color:inherit}
.hot-marker{position:absolute;border-radius:6px;border:2px dashed var(--marker-border);background:rgba(255,255,255,.02);display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 6px 14px rgba(0,0,0,.06);overflow:visible;transition:transform .08s,opacity .18s}
.hot-marker .marker-label{display:none}
.hot-marker .speaker{position:absolute;right:-10px;top:-10px;font-size:16px;background:0 0;color:var(--marker-border);padding:0;line-height:1;pointer-events:none;display:none}
.hot-marker.with-speaker .speaker{display:block}
.hot-marker.hidden{opacity:0;transform:scale(.98)}
.hot-marker.flash{animation:blinkThree .9s linear 1}
@keyframes blinkThree{0%{opacity:1}
16%{opacity:.15}
33%{opacity:1}
49%{opacity:.15}
66%{opacity:1}
83%{opacity:.15}
100%{opacity:1}
}
.bottom-thumbs{height:72px;background:var(--panel);box-shadow:0 2px 8px rgba(0,0,0,.05);display:flex;align-items:center;padding:0;box-sizing:border-box;width:100%;margin:0;background:#f2f2f2}
.thumb-scroll{overflow-x:auto;display:flex;gap:8px;align-items:center;padding:0 14px 2px 14px;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.thumb-scroll::-webkit-scrollbar{display:none}
.thumb-item{position:relative;flex:0 0 auto;height:60px;line-height:60px;margin-right:5px;border-radius:6px;overflow:hidden;cursor:pointer;border:2px solid transparent}
.thumb-item img{width:2.5rem;height:100%;object-fit:cover;display:block}
.thumb-item.active{border-color:var(--accent);box-shadow:0 6px 18px rgba(43,140,255,.12)}
.thumb-badge{position:absolute;top:0;left:0;z-index:10;display:none;width:20px;height:9px;border-radius:20%;color:#fff;font-size:8px;text-align:center;line-height:8px;box-sizing:border-box;display:block;background-color:#ff4500}
.title{font-weight:700;font-size:14px;position:absolute;top:0;background:rgba(170 245 149 / 70%);color:#737373;padding:1px 1px;border-radius:6px;cursor:pointer;user-select:none;z-index:20}
.zoom-btn{position:absolute;right:10px;bottom:10px;background:rgb(0 0 0 / 38%);color:#fff;padding:0 5px;border-radius:6px;cursor:pointer;font-size:30px;user-select:none;z-index:20}
.fullscreen-layer{position:fixed;top:0;left:0;right:0;bottom:0;width:100vw;width:100dvw;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.88);z-index:3000;visibility:hidden;pointer-events:none}
.fullscreen-layer.show{visibility:visible;pointer-events:auto}
.fullscreen-layer img{max-width:95%;max-height:95%;border-radius:6px;user-select:none;touch-action:none}
.video-modal{position:fixed;top:0;left:0;right:0;bottom:0;width:100vw;width:100dvw;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.6);z-index:4000;padding:20px;box-sizing:border-box;visibility:hidden;pointer-events:none}
.video-modal.show{visibility:visible;pointer-events:auto}
.video-modal .video-card{max-width:100%;width:min(500px,98%);background:0 0;border-radius:8px;overflow:hidden;position:relative}
.video-modal video{width:100%;height:auto;display:block;background:#000;border-radius:6px}
.video-modal .video-close{position:absolute;top:0px;right:0px;width:36px;height:36px;background:rgba(244,200,67,.92);border-radius:50%;border:none;padding:0;font-size:20px;line-height:36px;text-align:center;cursor:pointer;z-index:10;}
#popupVideo{position:relative;z-index:1;pointer-events:auto;object-fit:contain;background:#000}
.tishikuan{position:absolute;bottom:0;background:rgb(255 0 0);color:#fff;padding:6px 10px;border-radius:6px;cursor:pointer;font-size:14px;user-select:none;z-index:9999999}
.app-content-padding{padding:5px 5px;background:#fff;border-bottom:1px solid #f0f0f0;position:relative;z-index:100}
.nav-row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.nav-btn{background:0 0;border:none;padding:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;color:var(--text-gray);border-radius:8px;transition:background .2s;position:relative;font-size:12px}
.nav-btn:active{background:#f0f0f0}
.nav-btn svg{width:24px;height:24px;fill:currentColor;margin-bottom:2px}
.page-btn-group{display:flex;align-items:center;background:#f5f7fa;padding:2px 2px;border-radius:20px;color:#333;font-weight:600;font-size:14px;cursor:pointer}
.page-btn-group svg{width:18px;height:18px;margin-right:6px;fill:var(--accent)}
.auto-guide-btn{position:relative}
.auto-guide-btn.active{color:var(--active-green)}
.guide-badge{position:absolute;top:30px;background:var(--active-green);color:#fff;font-size:8px;padding:1px 4px;border-radius:6px;display:none;pointer-events:none}
.auto-guide-btn.active .guide-badge{display:block}
.custom-modal{position:fixed;top:0;left:0;right:0;bottom:0;width:100vw;width:100dvw;height:100vh;height:100dvh;background:rgba(0,0,0,.5);z-index:2500;display:flex;align-items:center;justify-content:center;visibility:hidden}
.custom-modal.open{visibility:visible}
.custom-modal-card{width:min(500px,90%);background:#fff;border-radius:12px;padding:24px 20px;box-sizing:border-box;transform:scale(.95);transition:transform .2s cubic-bezier(.2,.8,.2,1);max-height:85vh;overflow-y:auto;box-shadow:0 8px 30px rgba(0,0,0,.2)}
.custom-modal.open .custom-modal-card{transform:scale(1)}
.modal-title{font-size:18px;font-weight:700;margin-bottom:20px;text-align:center;color:#333}
.modal-close-bar{display:none}
.demo-content{padding:40px;text-align:center;color:#999;background:#f9f9f9;border-radius:8px}
.setting-item{display:flex;align-items:center;justify-content:space-between;padding:16px 0;border-bottom:1px solid #eee}
.setting-item:last-child{border-bottom:none}
.setting-label{font-size:15px;color:#333;font-weight:500}
.switch{position:relative;display:inline-block;width:50px;height:28px}
.switch input{opacity:0;width:0;height:0}
.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:.4s;border-radius:34px}
.slider:before{position:absolute;content:"";height:22px;width:22px;left:3px;bottom:3px;background-color:#fff;transition:.4s;border-radius:50%}
input:checked+.slider{background-color:var(--active-green)}
input:checked+.slider:before{transform:translateX(22px)}
.range-container{width:60%;display:flex;flex-direction:column;align-items:flex-end}
.range-input{-webkit-appearance:none;width:100%;height:6px;border-radius:5px;background:#e6e6e6;outline:0}
.range-input::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;border-radius:50%;background:var(--accent);cursor:pointer;border:2px solid #fff;box-shadow:0 2px 5px rgba(0,0,0,.2)}
.range-value{font-size:12px;color:var(--accent);margin-top:6px;font-weight:600}
.page-modal{position:fixed;top:0;left:0;right:0;bottom:0;width:100vw;width:100dvw;height:100vh;height:100dvh;background:rgba(0,0,0,.5);z-index:2500;display:flex;align-items:center;justify-content:center;visibility:hidden}
.page-modal.open{visibility:visible}
.modal-card{width:min(600px,95%);max-height:70vh;background:#fff;border-radius:12px;padding:0;display:flex;flex-direction:column;overflow:hidden;position:relative}
.modal-header-fixed{padding:12px;border-bottom:1px solid #eee;z-index:10;background:var(--panel);font-weight:700;text-align:center}
.modal-scroll-content{flex-grow:1;overflow-y:auto;padding:12px;-ms-overflow-style:none;scrollbar-width:none}
.modal-scroll-content::-webkit-scrollbar{display:none}
.page-grid{display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-start}
.page-cell{flex:0 0 auto;width:calc((100% - 16px)/ 3);height:40px;border-radius:8px;background:#f7f9fc;display:flex;align-items:center;justify-content:center;cursor:pointer;font-weight:500;font-size:14px;border:1px solid #e3e8f0;transition:background .1s}
.page-cell:hover{background:#e6eefc}
.close-x{position:absolute;top:8px;right:8px;background:0 0;border:none;font-size:30px;font-weight:300;cursor:pointer;color:#666;line-height:1;padding:6px 10px;border-radius:50%;z-index:20}
.custom-modal-card{width:min(500px,90%);background:#fff;border-radius:12px;padding:10px;box-sizing:border-box;transform:scale(.95);transition:transform .2s cubic-bezier(.2,.8,.2,1);height:60vh;max-height:85vh;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 8px 30px rgba(0,0,0,.2)}
.custom-modal.open .custom-modal-card{transform:scale(1)}
.modal-title{font-size:18px;font-weight:700;margin-bottom:1px;text-align:center;color:#333;flex-shrink:0}
.search-container{display:flex;flex-direction:column;flex:1;overflow:hidden;min-height:0}
.search-row{display:flex;align-items:center;gap:8px;margin-bottom:10px;flex-shrink:0}
.search-results{flex:1;overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}
.search-results::-webkit-scrollbar{display:none}
.search-input{flex:1;margin-bottom:0;padding:12px 16px;background:#f7f9fc;border:1px solid #eee;border-radius:8px;outline:0}
.search-action-btn{background:var(--accent);color:#fff;border:none;padding:0 20px;height:44px;border-radius:8px;font-weight:600;cursor:pointer}
.search-item{padding:14px 10px;border-bottom:1px solid #f5f5f5;cursor:pointer}
.search-item-title{font-size:15px;font-weight:600;color:#333}
.search-item-desc{font-size:12px;color:#999;margin-top:4px}
.search-empty{padding:20px;text-align:center;color:#ccc;font-size:14px}
.search-total-footer{padding:8px 0;font-size:12px;color:#666;background:#f5f5f5;border-top:1px solid #eee;text-align:center;flex-shrink:0;margin:0 -20px -20px;border-bottom-left-radius:12px;border-bottom-right-radius:12px}
.user-center-container{padding:0 10px;max-height:70vh;overflow-y:auto;overflow-x:hidden}
.user-center-container::-webkit-scrollbar{width:0;height:0}
.user-center-container{-ms-overflow-style:none;scrollbar-width:none}
.custom-modal-card{width:95%;max-width:400px;background:var(--panel);border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,.15);transform:translateY(50px);transition:transform .3s ease-out,opacity .3s ease-out}
@media (min-width:640px){.custom-modal-card{max-width:500px}
}
.user-info-section{margin-top:15px;padding:10px 10px;background:var(--bg);border-radius:8px;color:var(--muted);font-size:14px;display:flex;justify-content:space-between}
.user-info-section div{margin-bottom:0}
.password-section{margin-top:20px;padding-top:15px;border-top:1px solid #eee}
.password-section label{display:block;margin-bottom:5px;font-weight:600}
.password-section input{width:100%;padding:10px;margin-bottom:10px;border:1px solid #ddd;border-radius:6px;box-sizing:border-box}
.password-section button{width:100%;padding:10px;background-color:var(--accent);color:#fff;border:none;border-radius:6px;cursor:pointer;transition:background-color .2s}
.password-section button:active{background-color:#1a6ac9}
.modal-tabs{display:flex;justify-content:space-around;padding:10px 0;border-bottom:2px solid #eee;margin-bottom:10px;padding-bottom:0}
.tab-btn{flex-grow:1;padding:10px 15px;background:0 0;border:none;border-bottom:3px solid transparent;cursor:pointer;font-weight:500;color:var(--muted);transition:transform .3s ease-out,opacity .3s ease-out}
.tab-btn.active{color:var(--accent);border-bottom-color:var(--accent);font-weight:600}
.tab-content.hidden{display:none}
.collection-list{margin-top:10px;min-height:50px}
.collection-item{display:flex;justify-content:space-between;align-items:center;padding:10px 0;border-bottom:1px solid #f5f5f5;transition:background-color .1s}
.collection-item:last-child{border-bottom:none}
.collection-title-link{flex-grow:1;display:block;padding-right:10px;cursor:pointer}
.collection-id{font-weight:700;color:var(--accent);margin-right:5px}
.collection-title{color:#333;font-size:15px}
.delete-btn{background-color:#f44336;color:#fff;border:none;padding:5px 10px;border-radius:4px;cursor:pointer;font-size:13px;flex-shrink:0}
.delete-btn:active{background-color:#d32f2f}
.collection-empty{text-align:center;padding:20px;color:var(--muted)}
.login-container{max-width:800px;margin:50px auto;padding:30px;background-color:#fff;border-radius:15px;box-shadow:0 5px 15px rgba(0,0,0,.15)}
.login-modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(173,216,230,.9);display:flex;justify-content:center;align-items:center;z-index:1000}
.login-modal-content{background-color:#fff;padding:20px 30px 30px 30px;border-radius:20px;box-shadow:0 8px 0 #ff7043,0 12px 20px rgba(0,0,0,.2);border:3px solid #ff7043;width:350px;max-width:90%;position:relative;animation:bounceIn .5s ease-out}
@keyframes bounceIn{0%{transform:scale(.5);opacity:0}
100%{transform:scale(1);opacity:1}
}
.login-header-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;padding-bottom:10px;border-bottom:1px solid #ffccbc}
.login-temp-link{font-size:16px;font-weight:700;cursor:pointer;color:#000;padding:8px 12px;border-radius:20px;background:#ffc107;border:2px solid #ff9800;animation:pulse 1.5s infinite;text-decoration:none;white-space:nowrap}
.login-temp-link:hover{background:#ff9800}
@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(255,152,0,.7)}
70%{box-shadow:0 0 0 8px rgba(255,152,0,0)}
100%{box-shadow:0 0 0 0 rgba(255,152,0,0)}
}
.login-title{color:#329735;margin:0;font-size:22px;white-space:nowrap}
.login-form-group{margin-bottom:15px}
.login-form-group label{display:block;margin-bottom:5px;font-weight:700;color:#555}
.login-form-input{width:100%;padding:10px;border:2px solid #aed581;border-radius:8px;box-sizing:border-box;font-size:16px}
.login-message{margin-top:10px;text-align:center;font-weight:700;min-height:20px}
.login-info-display{margin-top:25px;padding:15px;border:1px solid #4caf50;border-radius:8px;background-color:#e8f5e9}
.login-info-list{list-style:none;padding:0}
.login-info-list li{padding:5px 0;border-bottom:1px dashed #ccc}
.login-button-row{display:flex;justify-content:center;gap:10px;margin-top:20px}
.login-btn{width:100%;padding:10px;background-color:#007bff;color:#fff;border:none;border-radius:8px;cursor:pointer;font-size:16px;transition:background-color .3s,transform .1s}
.login-btn:active{transform:scale(.98)}
.login-submit-btn-wrapper{width:100%}
.login-msm{display:flex;justify-content:center;align-items:center;height:40px;font-weight:700;font-size:18px;color:#f6f6f6;font-family:"Microsoft YaHei","微软雅黑",sans-serif;animation:blink 1.5s infinite}
@keyframes blink{0%,100%{opacity:1}
50%{opacity:.3}
}
.login-msm{animation:neonBlink 4s infinite}
@keyframes neonBlink{0%,100%{opacity:1;text-shadow:0 0 10px #f90000,0 0 20px #626eff,0 0 30px #e5e500}
50%{opacity:.6;text-shadow:none}
}
.login-modal-overlay{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0!important}
.login-logo-section{width:350px;max-width:90%;text-align:center;margin-bottom:-1px}
.login-logo{width:130px;height:130px;border-radius:20%;border:6px solid #fff;box-shadow:0 6px 15px rgba(0,0,0,.25);background:#fff}
#qrOverlay{display:none;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.6);justify-content:center;align-items:center;z-index:9999}
#qrContainer{background:#fff;padding:30px;border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,.3);text-align:center;max-width:90%}
#qrContainer img{width:260px;height:260px;border:8px solid #fff;box-shadow:0 4px 15px rgba(0,0,0,.2)}
#qrContainer p{margin-top:15px;color:#666;font-size:16px}
