* {
box-sizing: border-box;
}
body {
margin: 0;
padding: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
font-size: 16px;
line-height: 1.6;
color: #333;
}
.font-family-0 { font-family: Georgia, serif; }
.font-family-1 { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.book {
display: flex;
min-height: 100vh;
}
.book-summary {
width: 300px;
min-width: 300px;
background: #fafafa;
border-right: 1px solid #e8e8e8;
overflow-y: auto;
position: fixed;
top: 0;
left: 0;
bottom: 0;
z-index: 100;
}
.book-summary nav {
padding: 20px 0;
}
.search-wrapper {
padding: 15px;
border-bottom: 1px solid #e8e8e8;
position: relative;
}
.search-input {
width: 100%;
padding: 8px 12px;
border: 1px solid #e8e8e8;
border-radius: 4px;
font-size: 14px;
outline: none;
transition: border-color 0.2s;
}
.search-input:focus {
border-color: #008cff;
}
.search-input::placeholder {
color: #999;
}
.search-results {
position: absolute;
top: 100%;
left: 15px;
right: 15px;
background: #fff;
border: 1px solid #e8e8e8;
border-radius: 4px;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
max-height: 400px;
overflow-y: auto;
z-index: 200;
display: none;
}
.search-results.visible {
display: block;
}
.search-result-item {
display: block;
padding: 10px 12px;
border-bottom: 1px solid #f0f0f0;
text-decoration: none;
color: #333;
transition: background 0.2s;
}
.search-result-item:last-child {
border-bottom: none;
}
.search-result-item:hover {
background: #f5f5f5;
}
.search-result-title {
font-weight: 600;
font-size: 14px;
margin-bottom: 4px;
}
.search-result-snippet {
font-size: 12px;
color: #666;
line-height: 1.4;
}
.search-result-item mark {
background: #fff3cd;
padding: 0 2px;
border-radius: 2px;
}
.search-no-results {
padding: 20px;
text-align: center;
color: #666;
font-size: 14px;
}
.book-summary .summary {
list-style: none;
margin: 0;
padding: 0;
}
.book-summary .summary li {
list-style: none;
}
.book-summary .summary li.chapter {
margin: 0;
}
.book-summary .summary li.chapter a,
.book-summary .summary li.chapter .chapter-title {
display: block;
padding: 8px 15px 8px 20px;
color: #364149;
text-decoration: none;
font-size: 14px;
border-left: 3px solid transparent;
}
.book-summary .summary li.chapter a:hover {
background: #f0f0f0;
color: #008cff;
}
.book-summary .summary li.chapter.active > a {
background: #e8e8e8;
border-left-color: #008cff;
color: #008cff;
font-weight: 600;
}
.book-summary .summary li.chapter .chapter-title {
color: #888;
font-weight: 600;
cursor: default;
}
.book-summary .summary .articles {
list-style: none;
margin: 0;
padding: 0;
}
.book-summary .summary .articles li.chapter a,
.book-summary .summary .articles li.chapter .chapter-title {
padding-left: 35px;
}
.book-summary .summary .articles .articles li.chapter a,
.book-summary .summary .articles .articles li.chapter .chapter-title {
padding-left: 50px;
}
.book-summary .summary .articles .articles .articles li.chapter a,
.book-summary .summary .articles .articles .articles li.chapter .chapter-title {
padding-left: 65px;
}
.book-summary .summary .articles .articles .articles .articles li.chapter a,
.book-summary .summary .articles .articles .articles .articles li.chapter .chapter-title {
padding-left: 80px;
}
.book-summary .summary .articles .articles .articles .articles .articles li.chapter a,
.book-summary .summary .articles .articles .articles .articles .articles li.chapter .chapter-title {
padding-left: 95px;
}
.book-summary .summary li.part-title {
margin-top: 20px;
padding: 5px 15px;
}
.book-summary .summary li.part-title span {
font-size: 12px;
font-weight: 700;
text-transform: uppercase;
color: #939da3;
}
.book-summary .summary li.divider {
height: 1px;
margin: 10px 15px;
background: #e8e8e8;
}
.book-body {
margin-left: 300px;
flex: 1;
min-width: 0;
}
.body-inner {
min-height: 100vh;
position: relative;
}
.page-nav {
position: fixed;
top: 50%;
transform: translateY(-50%);
width: 40px;
height: 60px;
display: flex;
align-items: center;
justify-content: center;
background: rgba(0, 0, 0, 0.05);
color: #666;
text-decoration: none;
border-radius: 4px;
transition: background 0.2s, color 0.2s;
z-index: 50;
}
.page-nav:hover {
background: rgba(0, 0, 0, 0.1);
color: #333;
}
.page-nav.prev {
left: 310px;
}
.page-nav.next {
right: 10px;
}
.page-nav svg {
width: 24px;
height: 24px;
}
@media (max-width: 768px) {
.page-nav {
width: 36px;
height: 50px;
top: auto;
bottom: 20px;
transform: none;
}
.page-nav.prev {
left: 10px;
}
.page-nav.next {
right: 10px;
}
}
body.loading .page-nav {
pointer-events: none;
opacity: 0.5;
}
body.loading .markdown-section {
opacity: 0.6;
transition: opacity 0.15s;
}
.page-wrapper {
max-width: 100%;
}
.page-inner {
max-width: none;
margin: 0;
padding: 40px 60px;
}
.markdown-section {
font-size: 16px;
line-height: 1.7;
}
.markdown-section h1 {
font-size: 2em;
margin: 0 0 1em;
padding-bottom: 0.3em;
border-bottom: 1px solid #eee;
}
.markdown-section h2 {
font-size: 1.5em;
margin: 1.5em 0 0.5em;
padding-bottom: 0.3em;
border-bottom: 1px solid #eee;
}
.markdown-section h3 {
font-size: 1.25em;
margin: 1.5em 0 0.5em;
}
.markdown-section h4, .markdown-section h5, .markdown-section h6 {
font-size: 1em;
margin: 1.5em 0 0.5em;
}
.markdown-section p {
margin: 0 0 1em;
}
.markdown-section a {
color: #4183c4;
text-decoration: none;
}
.markdown-section a:hover {
text-decoration: underline;
}
.markdown-section code {
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 0.9em;
background: #f6f8fa;
padding: 0.2em 0.4em;
border-radius: 3px;
}
.markdown-section pre {
background: #f6f8fa;
border-radius: 6px;
padding: 16px;
overflow-x: auto;
margin: 0 0 1em;
}
.markdown-section pre code {
background: none;
padding: 0;
font-size: 0.85em;
line-height: 1.5;
}
.markdown-section table {
border-collapse: collapse;
width: 100%;
margin: 0 0 1em;
display: block;
overflow-x: auto;
}
.markdown-section table th,
.markdown-section table td {
border: 1px solid #dfe2e5;
padding: 8px 12px;
text-align: left;
}
.markdown-section table th {
background: #f6f8fa;
font-weight: 600;
}
.markdown-section table tr:nth-child(even) {
background: #f8f8f8;
}
.markdown-section img {
max-width: 100%;
height: auto;
}
.markdown-section ul,
.markdown-section ol {
margin: 0 0 1em;
padding-left: 2em;
}
.markdown-section li {
margin: 0.25em 0;
}
.markdown-section blockquote {
margin: 0 0 1em;
padding: 0 1em;
color: #6a737d;
border-left: 4px solid #dfe2e5;
}
.mermaid {
text-align: center;
margin: 1em 0;
}
.wsd {
text-align: center;
margin: 1em 0;
overflow-x: auto;
}
.wsd svg {
max-width: 100%;
height: auto;
}
.back-to-top {
position: fixed;
bottom: 30px;
right: 30px;
width: 40px;
height: 40px;
background: #008cff;
color: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
text-decoration: none;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s, visibility 0.3s;
box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.back-to-top.visible {
opacity: 1;
visibility: visible;
}
.back-to-top:hover {
background: #0070cc;
}
.expandable > a::before,
.expandable > .chapter-title::before {
content: "â–¸";
display: inline-block;
margin-right: 5px;
}
.expandable.expanded > a::before,
.expandable.expanded > .chapter-title::before {
transform: rotate(90deg);
}
.expandable:not(.expanded) > .articles {
display: none;
}
.book-summary * {
transition: none !important;
}
.sidebar-toggle {
position: fixed;
top: 10px;
left: 310px;
width: 36px;
height: 36px;
background: #fff;
border: 1px solid #e8e8e8;
border-radius: 4px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
z-index: 101;
transition: left 0.3s, transform 0.3s;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.sidebar-toggle:hover {
background: #f5f5f5;
}
.sidebar-toggle svg {
color: #666;
}
.book.sidebar-hidden .book-summary {
transform: translateX(-100%);
}
.book.sidebar-hidden .book-body {
margin-left: 0;
}
.book.sidebar-hidden .sidebar-toggle {
left: 10px;
}
.book.sidebar-toggling .book-summary {
transition: transform 0.3s ease;
}
.book.sidebar-toggling .book-body {
transition: margin-left 0.3s ease;
}
@media (max-width: 1024px) {
.book-summary {
width: 250px;
min-width: 250px;
}
.book-body {
margin-left: 250px;
}
.sidebar-toggle {
left: 260px;
}
.book.sidebar-hidden .sidebar-toggle {
left: 10px;
}
}
@media (max-width: 768px) {
.book-summary {
transform: translateX(-100%);
transition: transform 0.3s;
width: 280px;
min-width: 280px;
padding-top: 50px;
}
.book-summary.open {
transform: translateX(0);
}
.book-body {
margin-left: 0;
}
.page-inner {
padding: 20px;
padding-top: 60px;
}
.sidebar-toggle {
left: 10px !important;
top: 10px;
z-index: 200;
}
.book-summary.open::after {
content: "";
position: fixed;
top: 0;
left: 280px;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.3);
z-index: 99;
}
}
.page-toc {
position: fixed;
right: 20px;
top: 80px;
width: 220px;
max-height: calc(100vh - 120px);
overflow-y: auto;
background: #fff;
border-left: 1px solid #e8e8e8;
padding: 15px;
z-index: 50;
transition: transform 0.3s ease, opacity 0.3s ease;
}
.page-toc .toc-header {
font-size: 12px;
font-weight: 700;
text-transform: uppercase;
color: #939da3;
margin-bottom: 10px;
padding-bottom: 8px;
border-bottom: 1px solid #e8e8e8;
}
.page-toc .toc-list {
list-style: none;
margin: 0;
padding: 0;
}
.page-toc .toc-list li {
margin: 0;
line-height: 1.4;
}
.page-toc .toc-list li a {
display: block;
padding: 4px 0;
color: #666;
text-decoration: none;
font-size: 13px;
transition: color 0.2s;
}
.page-toc .toc-list li a:hover {
color: #008cff;
}
.page-toc .toc-list li.active a {
color: #008cff;
font-weight: 600;
}
.page-toc .toc-h2 {
padding-left: 0;
}
.page-toc .toc-h3 {
padding-left: 12px;
}
.page-toc .toc-h4 {
padding-left: 24px;
}
.toc-toggle {
position: fixed;
top: 10px;
right: 250px;
width: 36px;
height: 36px;
background: #fff;
border: 1px solid #e8e8e8;
border-radius: 4px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
z-index: 101;
transition: right 0.3s ease;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.toc-toggle:hover {
background: #f5f5f5;
}
.toc-toggle svg {
color: #666;
}
.book.toc-hidden .page-toc {
transform: translateX(100%);
opacity: 0;
pointer-events: none;
}
.book.toc-hidden .toc-toggle {
right: 10px;
}
.book:not(.toc-hidden) .page-nav.next {
right: 260px;
}
@media (max-width: 768px) {
.page-toc,
.toc-toggle {
display: none !important;
}
.book:not(.toc-hidden) .page-nav.next {
right: 10px;
}
}
@media (min-width: 769px) {
.book.sidebar-hidden .page-wrapper {
max-width: calc(100% - 260px);
}
}