body{background:#f5f7fa;color:#333}
.top-bar{background:#fff;border-bottom:1px solid #eef1f5;padding:12px 0;position:sticky;top:0;z-index:10}
.top-bar-inner{max-width:1200px;margin:0 auto;padding:0 16px;display:flex;align-items:center;justify-content:space-between}
.brand{display:flex;align-items:center;gap:10px}
.brand-icon{width:34px;height:34px;background:#1890ff;border-radius:8px;display:flex;align-items:center;justify-content:center;flex:0 0 34px}
.brand-icon svg{width:20px;height:20px;color:#fff}
.brand-text{font-size:18px;font-weight:600;color:#1890ff;letter-spacing:1px}
.top-nav{display:flex;align-items:center;gap:6px}
.top-nav a{padding:8px 14px;border-radius:6px;font-size:14px;color:#555;white-space:nowrap}
.top-nav a:hover{color:#1890ff;background:#f2f7ff}
.top-nav a.active{color:#1890ff;background:#e8f3ff;font-weight:600}
.nav-more{display:none;align-items:center;padding:6px 10px;border-radius:6px;font-size:14px;color:#555;cursor:pointer;user-select:none;white-space:nowrap}
.nav-more:active{background:#f2f7ff;color:#1890ff}
.page-wrap{max-width:1200px;margin:20px auto 40px;padding:0 16px}
.page-card{background:#fff;border-radius:8px;padding:24px}
.page-title{font-size:22px;font-weight:700;color:#222;margin-bottom:10px}
.page-subtitle{font-size:14px;color:#1890ff;margin-bottom:20px}
.filter-panel{background:#f7f8fa;border:1px solid #eef1f5;border-radius:8px;padding:16px 20px;margin-bottom:20px}
.filter-title{font-size:15px;font-weight:700;margin-bottom:14px}
.filter-row{display:flex;align-items:flex-start;margin-bottom:12px}
.filter-row:last-child{margin-bottom:0}
.filter-label{flex:0 0 44px;font-size:14px;color:#666;line-height:28px}
.filter-tags{flex:1;display:flex;flex-wrap:wrap;gap:8px}
.filter-tag{padding:5px 14px;background:#fff;border:1px solid #e3e6eb;border-radius:16px;font-size:13px;color:#444;cursor:pointer;transition:all .2s;user-select:none}
.filter-tag:hover{border-color:#1890ff;color:#1890ff}
.filter-tag.active{background:#1890ff;border-color:#1890ff;color:#fff}
.search-row{display:flex;gap:10px;margin-bottom:20px}
.search-input{flex:1;height:44px;padding:0 16px;border:1px solid #dcdfe6;border-radius:6px;font-size:14px;outline:none;transition:border-color .2s}
.search-input:focus{border-color:#1890ff}
.btn{height:44px;padding:0 22px;border:none;border-radius:6px;font-size:14px;cursor:pointer;transition:all .2s}
.btn-primary{background:#1890ff;color:#fff}
.btn-primary:hover{background:#096dd9}
.btn-plain{background:#fff;color:#333;border:1px solid #dcdfe6}
.btn-plain:hover{color:#1890ff;border-color:#1890ff}
.book-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:16px}
.book-card{background:#fff;border:1px solid #eef1f5;border-radius:8px;overflow:hidden;display:flex;flex-direction:column;transition:box-shadow .2s,transform .2s}
.book-card:hover{box-shadow:0 4px 16px rgba(24,144,255,.15);transform:translateY(-2px)}
.book-cover{width:100%;aspect-ratio:3/4;object-fit:cover;background:#f0f2f5;display:block}
.book-info{padding:10px 12px 12px;display:flex;flex-direction:column;gap:6px;flex:1}
.book-title{font-size:14px;font-weight:700;color:#222;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.clickable{cursor:pointer}
.book-title.clickable:hover{color:#1890ff}
.book-author{font-size:12px;color:#999;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.book-meta{font-size:12px;color:#b0b6bf;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.book-actions{margin-top:auto;display:flex;gap:8px;align-items:center}
.book-get{font-size:13px;color:#1890ff;cursor:pointer;background:none;border:none;text-align:left;padding:0}
.book-get:hover{color:#096dd9}
.book-preview{font-size:13px;color:#52c41a;cursor:pointer;background:none;border:none;text-align:left;padding:0}
.book-preview:hover{color:#389e0d}
.book-grid.book-list{display:flex;flex-direction:column;gap:12px}
.book-list .book-card{flex-direction:row;align-items:center;padding:12px;gap:14px}
.book-list .book-cover{width:72px;flex:0 0 72px;aspect-ratio:3/4;border-radius:6px}
.book-list .book-info{padding:0;gap:4px}
.book-list .book-title{font-size:15px;-webkit-line-clamp:1}
.book-list .book-get{margin-top:2px}
.book-list .book-actions{margin-top:2px}
.state-box{text-align:center;color:#999;font-size:14px;padding:30px 0 10px}
.spinner{display:inline-block;width:18px;height:18px;border:2px solid #d6e8ff;border-top-color:#1890ff;border-radius:50%;animation:nspin .8s linear infinite;vertical-align:-4px;margin-right:8px}
@keyframes nspin{to{transform:rotate(360deg)}}
.mask{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:100;display:flex;align-items:center;justify-content:center;padding:20px}
.modal{background:#fff;border-radius:10px;width:100%;max-width:460px;padding:24px;position:relative}
.modal-close{position:absolute;top:12px;right:16px;font-size:22px;color:#999;cursor:pointer;background:none;border:none;line-height:1}
.modal-close:hover{color:#333}
.modal h3{font-size:17px;margin-bottom:6px;padding-right:24px}
.modal .modal-sub{font-size:13px;color:#999;margin-bottom:16px}
.pcode-box{background:#f5f7fa;border:1px dashed #c9d6e8;border-radius:8px;padding:14px;font-size:14px;line-height:1.7;color:#333;word-break:break-all;max-height:180px;overflow:auto;margin-bottom:16px}
.pcode-box .pcode-main{color:#1890ff;font-weight:700}
.modal-actions{display:flex;gap:10px}
.modal-actions .btn{flex:1}
.preview-modal{max-width:560px;max-height:80vh;overflow-y:auto}
.preview-header{display:flex;gap:16px;margin-bottom:16px}
.preview-cover{width:100px;flex:0 0 100px;aspect-ratio:3/4;object-fit:cover;border-radius:6px;background:#f0f2f5}
.preview-info{flex:1;min-width:0}
.preview-info h3{font-size:17px;margin-bottom:6px;padding-right:24px;line-height:1.3}
.preview-meta{font-size:13px;color:#999;margin-bottom:4px}
.preview-meta span{margin-right:12px}
.preview-score{color:#fa8c16;font-weight:600}
.preview-intro{background:#f9fafb;border-radius:6px;padding:12px;font-size:14px;line-height:1.7;color:#555;margin-bottom:14px;max-height:160px;overflow-y:auto;white-space:pre-wrap}
.preview-intro:empty{display:none}
.preview-chapters-title{font-size:14px;font-weight:600;color:#333;margin-bottom:8px}
.preview-chapters{display:flex;flex-wrap:wrap;gap:6px;max-height:200px;overflow-y:auto;margin-bottom:14px}
.preview-chapter-tag{padding:4px 10px;background:#f0f5ff;border:1px solid #d6e4ff;border-radius:4px;font-size:12px;color:#1890ff;cursor:default;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.preview-text{background:#fafafa;border:1px solid #eef1f5;border-radius:6px;padding:14px;font-size:14px;line-height:1.8;color:#333;max-height:300px;overflow-y:auto;white-space:pre-wrap;margin-bottom:14px}
.preview-text:empty{display:none}
.preview-empty{text-align:center;color:#bbb;font-size:13px;padding:20px 0}
.preview-chapters-content{max-height:50vh;overflow-y:auto;padding:4px 0}
.preview-chapter{margin-bottom:20px}
.preview-chapter-title{font-size:15px;font-weight:700;color:#222;margin-bottom:10px;padding-bottom:6px;border-bottom:1px solid #eef1f5}
.preview-chapter-text{font-size:14px;line-height:1.9;color:#444;white-space:pre-wrap;text-indent:2em}
.toast{position:fixed;top:70px;left:50%;transform:translateX(-50%);background:rgba(0,0,0,.75);color:#fff;font-size:14px;padding:10px 20px;border-radius:6px;z-index:200;max-width:90%}
@media(max-width:768px){
.page-card{padding:16px}
.nav-more{display:inline-flex}
.top-nav{display:none;position:absolute;top:100%;left:0;right:0;background:#fff;border-bottom:1px solid #eef1f5;box-shadow:0 8px 16px rgba(0,0,0,.06);flex-direction:column;align-items:stretch;gap:2px;padding:8px 12px}
.top-nav.nav-open{display:flex}
.top-nav a{padding:10px 12px;font-size:14px;border-radius:0}
.brand-text{font-size:16px}
.book-grid{grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:10px}
.search-row{flex-wrap:wrap}
.search-input{flex:1 1 100%}
.preview-modal{max-width:95vw;max-height:85vh}
.preview-header{flex-direction:column;align-items:center;text-align:center}
.preview-cover{width:80px;flex:0 0 80px}
.preview-info h3{padding-right:0}
}
