nomadro/apps/nomadvip/app/components/content/EbookViewer.module.css
eric 9f8fec1723 Ship portal PC/H5 acceptance, VIP ScrollReader, admin analytics and ops anchors.
Adds /api/health, ntfy notify on config save, /admin/analytics charts, and deploy smoke for miniprogram config/API.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-28 23:52:00 -05:00

394 lines
7.1 KiB
CSS

/* VIP 电子书阅读器 — 深色纸面高对比,不被 github-markdown 白底浅字坑 */
.readerRoot {
min-height: 100vh;
background: #0a0e17;
color: #e8eef7;
}
.readingProgress {
position: fixed;
top: 0;
left: 0;
height: 3px;
background: linear-gradient(90deg, #ff6b6b, #ffe66d, #4ecdc4);
z-index: 201;
transition: width 0.15s linear;
}
.readingTime {
font-size: 12px;
font-weight: 400;
color: #94a3b8;
margin-left: 4px;
}
.headerSpacer {
width: 100%;
height: 56px;
}
.header {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 100;
height: 56px;
background: rgba(10, 14, 23, 0.92);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
display: flex;
align-items: center;
justify-content: space-between;
}
.headerLeft {
width: 48px;
height: 44px;
margin-left: 4px;
display: flex;
align-items: center;
justify-content: center;
color: #f1f5f9;
cursor: pointer;
border-radius: 10px;
}
.headerLeft:hover {
color: #ffe66d;
background: rgba(255, 255, 255, 0.06);
}
.headerMiddle {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 15px;
font-weight: 700;
color: #f8fafc;
letter-spacing: 0.04em;
}
.headerRight {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
min-height: 40px;
min-width: 40px;
padding: 0 12px;
margin-right: 10px;
color: #0a0e17;
cursor: pointer;
background: linear-gradient(135deg, #ffe66d, #ff6b6b);
border: none;
border-radius: 999px;
font-weight: 700;
font-size: 13px;
transition: transform 0.15s ease, opacity 0.15s ease;
}
.headerRight:hover {
opacity: 0.92;
transform: translateY(-1px);
}
.headerRightActive {
background: #4ecdc4 !important;
color: #0a0e17 !important;
}
.headerRightText {
display: inline;
}
.chunkEnter {
animation: chunkAppear 0.45s ease-out both;
}
@keyframes chunkAppear {
from {
opacity: 0;
transform: translateY(12px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.chunkPlaceholder {
background: linear-gradient(
90deg,
rgba(255, 255, 255, 0.04),
rgba(255, 255, 255, 0.1),
rgba(255, 255, 255, 0.04)
);
background-size: 200% 100%;
animation: shimmer 1.8s ease infinite;
border-radius: 12px;
margin: 24px 0;
}
@keyframes shimmer {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
.backToTop {
position: fixed;
bottom: calc(24px + env(safe-area-inset-bottom));
right: 16px;
width: 48px;
height: 48px;
background: rgba(17, 24, 39, 0.95);
border: 1px solid rgba(255, 255, 255, 0.12);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
cursor: pointer;
z-index: 50;
color: #ffe66d;
}
.book {
padding: 20px 16px 96px;
max-width: 820px;
margin: 0 auto;
min-height: calc(100vh - 56px);
background: transparent;
}
/* 强制可读:深色底 + 浅色字,覆盖 github-markdown 白底 */
.markdownBody,
.markdownBody.markdown-body {
font-size: 16px !important;
line-height: 1.85 !important;
color: #e8eef7 !important;
background-color: transparent !important;
word-wrap: break-word;
box-sizing: border-box;
}
.markdownBody h1,
.markdownBody h2,
.markdownBody h3,
.markdownBody h4,
.markdownBody h5,
.markdownBody h6,
.markdownBody p,
.markdownBody li,
.markdownBody td,
.markdownBody th,
.markdownBody strong,
.markdownBody em,
.markdownBody span {
color: #e8eef7 !important;
}
.markdownBody h1 {
font-size: 1.65rem !important;
font-weight: 800;
margin: 1.75rem 0 0.75rem;
letter-spacing: 0.02em;
}
.markdownBody h1::after {
content: "";
display: block;
width: 40px;
height: 3px;
background: linear-gradient(90deg, #ff6b6b, #ffe66d, #4ecdc4);
border-radius: 3px;
margin-top: 10px;
}
.markdownBody h2 {
font-size: 1.3rem !important;
font-weight: 700;
margin: 1.5rem 0 0.65rem;
padding-bottom: 10px;
border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.markdownBody h3 {
font-size: 1.1rem !important;
font-weight: 600;
margin: 1.25rem 0 0.5rem;
}
.markdownBody p {
margin-bottom: 0.85rem;
line-height: 1.9;
}
.markdownBody blockquote {
margin: 1.25rem 0;
padding: 14px 16px 14px 18px;
background: rgba(255, 230, 109, 0.08);
border-radius: 0 12px 12px 0;
color: #cbd5e1 !important;
border-left: 4px solid #ffe66d;
}
.markdownBody blockquote p {
color: #cbd5e1 !important;
margin-bottom: 0.35rem;
}
.markdownBody pre {
margin: 1.25rem 0;
padding: 16px;
background: #0c1220 !important;
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 12px;
overflow-x: auto;
}
.markdownBody pre code {
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
font-size: 13px !important;
color: #e2e8f0 !important;
background: none !important;
}
.markdownBody code {
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
font-size: 0.9em !important;
padding: 2px 6px;
background: rgba(255, 230, 109, 0.12) !important;
color: #ffe66d !important;
border-radius: 6px;
}
.markdownBody a {
color: #4ecdc4 !important;
}
.markdownBody a:hover {
text-decoration: underline;
}
.markdownBody img {
display: block;
margin: 1.25rem auto;
max-width: 100%;
border-radius: 10px;
}
.markdownBody ul,
.markdownBody ol {
margin: 0.85rem 0;
padding-left: 1.5rem;
color: #e8eef7 !important;
}
.markdownBody table {
width: 100%;
margin: 1.25rem 0;
border-collapse: collapse;
}
.markdownBody th {
background: rgba(255, 255, 255, 0.06);
font-weight: 600;
padding: 12px 14px;
border: 1px solid rgba(255, 255, 255, 0.1);
color: #f8fafc !important;
}
.markdownBody td {
padding: 10px 14px;
border: 1px solid rgba(255, 255, 255, 0.1);
color: #e2e8f0 !important;
}
.markdownBody hr {
border: none;
border-top: 1px solid rgba(255, 255, 255, 0.12);
margin: 1.5rem 0;
}
.drawer {
position: fixed;
top: 0;
right: 0;
bottom: 0;
width: 280px;
max-width: 85vw;
background: #111827;
border-left: 1px solid rgba(255, 255, 255, 0.1);
box-shadow: -8px 0 32px rgba(0, 0, 0, 0.45);
z-index: 150;
padding-top: 56px;
overflow-y: auto;
transform: translateX(100%);
transition: transform 0.3s ease;
}
.drawerOpen {
transform: translateX(0);
}
.drawerMask {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.55);
z-index: 140;
opacity: 0;
pointer-events: none;
transition: opacity 0.3s ease;
}
.drawerMaskOpen {
opacity: 1;
pointer-events: auto;
}
.drawerItem {
padding: 14px 18px;
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
color: #e2e8f0;
cursor: pointer;
font-size: 14px;
line-height: 1.4;
min-height: 44px;
}
.drawerItem:hover {
background: rgba(255, 255, 255, 0.06);
color: #ffe66d;
}
@media (min-width: 768px) {
.book {
padding: 28px 32px 96px;
}
.markdownBody {
max-width: 720px;
margin: 0 auto;
}
.markdownBody h1 {
font-size: 1.9rem !important;
}
.markdownBody h2 {
font-size: 1.4rem !important;
}
.drawer {
width: 320px;
}
.backToTop {
right: 28px;
bottom: 36px;
}
}