html,
body {
  margin: auto;
  padding: 0;
  /* position: relative; */
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  image-rendering: -webkit-optimize-contrast;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f6f8fa;
} 


.wide {
  width: 90vw;
  margin-left: calc(44% - 42vw);
  display: flex;
}

.wide-single {
  width: 90vw;
  margin-left: calc(44% - 42vw);
}

.column {
  flex: 50%;
  padding: .05px;
}

.fullwidth {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

/*Styling footer text*/
.footer {
  text-align: center;
  font-size: 19px;
  padding: 30px 0;
  background-color: #f7f9fa; /* optional for clarity */
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
}

.footer-links {
  list-style: none;
  padding: 0;
  color: #ccc;
  font-size: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.footer-links li {
  margin: 0;
  padding: 0;
}

.footer-links li::before {
  content: '/';
  color: #888;
  margin: 0 8px;
}

.footer-links li:first-child::before {
  display: none;
}

.footer-link-flex {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: #888;
  transition: color 150ms ease;
}

.footer-link-flex:hover,
.footer-link-flex:focus {
  color: #222;
}

.footer-meta {
  font-size: 18px;
  color: #777;
  line-height: 1.6;
}
/* Navigation container */
/* Outer nav container */
.nav {
  max-width: 1000px;
  margin: 0 auto;
  padding: 12px 15px;
  position: relative;
  min-height: 15px; /* Force nav bar height */
}

/* Logo stays floated to left */
.nav-logo {
  float: left;
  margin-top: -11px;
  transition: transform 150ms ease-out;
}

.nav-logo:hover {
  transform: scale(1.1);
}

.nav-logo img {
  display: block;
  max-height: 40px;
  width: auto;
  border-radius: 50%;
}

/* Nav-right holds both nav-links and language switcher */
.nav-right {
  float: right;
  display: flex;
  align-items: center;
}

/* Navigation links */
.nav-links {
  margin: 0;
  padding: 0;
  font-size: 14px;
  list-style: none;
  display: flex;
}

.nav-links li {
  margin-left: 15px;
}

.nav-links li:first-child {
  margin-left: 0;
}

.nav-links a {
  font-size: 20px !important;
  color: #111;
  text-decoration: none;
}

.nav-links a:hover {
  color: #000;
}

/* Language switcher */
.language-switcher {
  position: relative;
  margin-left: 20px;
}

#language-button {
  /* background-color: #0077b6; */
  /* color: white; */
  color: black;
  border: none;
  padding: 8px 16px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 4px;
}

.language-menu {
  display: none;
  position: absolute;
  background-color: #333;
  min-width: 120px;
  border-radius: 4px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  z-index: 100;
  margin-top: 5px;
  right: 0;
}

.language-menu a {
  color: white;
  padding: 10px 16px;
  display: block;
  text-decoration: none;
}

.language-menu a:hover {
  background-color: #555;
}

.language-menu.show {
  display: block;
}


.content {
  max-width: 900px; 
  margin: 60px auto auto auto;
  padding: 0 15px;
  font-size: 19px;
  line-height: 1.7;
}

.header {
  padding: 20px 0;
  /* position: relative; */
  background: #f5f5f5;
  border-bottom: 1px solid #eaeaea;
}

/* GitHub README-like styling */
/* Headings */
h1, h2, h3, h4, h5, h6 {
  margin: 20px 0;
  line-height: 1.25;
}

/* from https://github.com/CyrusYip/hugo-theme-yue/ */
h1, h2, h3, h4, h5, h6, p, ul, ol {
  overflow-wrap: break-word;
}

h1 {
  font-size: 28px;
  font-weight: bold;
}

h2 {
  font-size: 24px;
  font-weight: bold;
}

h3 {
  font-size: 20px;
}

h4, h5, h6 {
  font-size: 16px;
  color: grey;
}

/* table of contents styling. Based on the blog of Zachary Wade Betz: https://zwbetz.com/ */
.toc {
  border: .25rem solid #757575;
  padding: 1rem; 
  margin-top: 1rem;
  margin-bottom: 1em;
  /* color: #757575; */
}

.toc a,
.toc a:visited {
  text-decoration: none;
  /* color: #757575; */
}

.toc a {
  padding-bottom: 2px;
  border-bottom: 1px solid;
}

/* Style for the copy button */
.copy-code-button {
  position: absolute; /* Position it absolutely within the container */
  top: -16px; /* Adjust as needed */
  right: 10px; /* Adjust as needed */
  background-color: #007bff;
  color: white;
  border: none;
  margin: 5px 0;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 12px;
  border-radius: 3px;
  z-index: 1; /* Ensure it is above other content */
}

.copy-code-button:hover {
  background-color: #0056b3;
}

.code-collapse summary {
  cursor: pointer;
  font-weight: bold;
  color: #007acc;
  margin-bottom: 8px;
}

/* Code block container */
pre {
  position: relative;
  padding: 20px;
  margin-top: 10px;
  border-radius: 6px;
  background-color: #f6f8fa;
  border: 1px solid #e1e4e8;
}

/* Actual code inside the block */
code, .indented-block {
  font-family: 'Source Code Pro', monospace;
  color: #333;
  font-size: 14px;
  line-height: 1.5; /* 保持你觉得舒适的行高 */
  word-wrap: break-word;
}

.indented-block {
  white-space: pre-wrap;
  margin-bottom: 0rem;
  border-left: 3px solid #3b82f6;

  /* 专注于减少上下内边距 */
  padding-top: 0.1em;    /* 显著减少顶部内边距，0.1em 会非常小 */
  padding-bottom: 0.1em; /* 显著减少底部内边距 */
  
  /* 左右内边距可以根据需要调整 */
  padding-left: 2rem;    /* 保持你想要的左侧缩进 */
  padding-right: 0.5em;  /* 右侧可以维持或稍微减少 */
}

/* code, .indented-block {
  font-family: 'Source Code Pro', monospace; 
  color: #333; 
  font-size: 14px; 
  line-height: 1.5;
  word-wrap: break-word; 
}

.indented-block {
  white-space: pre-wrap;
  margin-bottom: 0rem;
  padding: 0.5em;
  padding-left: 2rem;
  border-left: 3px solid #3b82f6;  
} */

blockquote {
  border-left: 4px solid #e1e4e8;
  padding: 0 1em;
  color: #6a737d;
  background-color: #f9f9f9;
}

/*Styling Custome blocks. based on Yihui Xie's Bookdown book's CSS: 
  https://github.com/rstudio/bookdown/blob/master/inst/examples/css/style.css */
  .note,
  .important,
  .tip,
  .info,
  .caution,
  .warning {
    min-height: 2.2em;
    padding: 1em 1em 0.1em 4em;
    background: #f5f5f5 2px top/3em no-repeat;
    font-family: Optima, 'Songti SC', Simsun;
    font-size: 19px;
  } 
  .note {
    background-image: url("/media/blocks/note.png");
  }
  .important {
    background-image: url("/media/blocks/important.png");
  }
  .tip {
    background-image: url("/media/blocks/tip.png");
  }
  .info {
    background-image: url("/media/blocks/tip.png");
  }
  .caution {
    background-image: url("/media/blocks/caution.png");
  }
  .warning {
    background-image: url("/media/blocks/warning.png");
  }
  .reminder {
    min-height: 3.2em;
    padding: 1em 1em 1em 4em;
    background: #f5f5f5 2px center/3em no-repeat;
    font-family: Optima, 'Songti SC', Simsun;
    font-size: 19px;
    background-image: url("/media/blocks/reminder.png");
  }

/* Lists */
ul, ol {
  padding-left: 2em;
}

ul li, ol li {
  font-size: 18px;
}

/* Tables */
table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 16px;
}

th, td {
  padding: 6px 13px;
  border: 1px solid #dfe2e5;
}

th {
  background-color: #f6f8fa;
  font-weight: bold;
}

tr:nth-child(even) {
  background-color: #f6f8fa;
}

/* Hyperlinks */
a {
  color: #0366d6;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Figure styling */
img {
  max-width: 100%; /* Ensures image doesn't overflow its container */
  height: auto;    /* Maintain aspect ratio */
  display: block;
  margin: auto;    /* Center images */
}

figure img {
  max-width: 100%;
  height: auto;
}


figcaption {
  margin-top: 8px;
  text-align: center;
  color: gray;
}

/* Footnotes */
body-text.list-text a[href^="#fn:"],
body-text.list-text a[href^="#fnref:"] {
  text-decoration: none;
  color: #0366d6;
  font-family: monospace;
  font-size: 14px;
}

.pagination {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
}

.pagination a {
  text-decoration: none;
  color: #007BFF;
}

.pagination a:hover {
  text-decoration: underline;
}


/* Responsive design for small screens */
@media only screen and (max-width: 600px) {
  body {
    font-size: 16px;
  }
  h1 {
    font-size: 24px;
  }
  h2 {
    font-size: 20px;
  }
  h3, h4, h5, h6 {
    font-size: 18px;
  }
  pre, code {
    font-size: 12px;
  }
  h1, h2, h3, h4, h5, h6, p, ul, ol {
    overflow-wrap: break-word;
  }
}