/* Dark mode */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #393E41;
        color: white;
    }

    blockquote {
      background: #393E41;
    }

    a {
      color: #EBC3DB;
    }

    header {
      background: #393E41;
      border-bottom: 2px dotted #EBC3DB;
      margin-bottom: 2rem;
    }

    .article-meta, .menu a {
      background: #393E41;
      color: white;
    }
}


/* Light mode */
@media (prefers-color-scheme: light) {
    body {
      background-color: #000000;
      color: white;
      line-height: 1.8;
      max-width: 900px;
      margin: 0 auto;
      padding: 3rem 1.5rem;
    }

    blockquote {
      background: #000000;
    }

    a {
      color: #ffffff;
      text-decoration: none;
    }

    a:hover {
      text-decoration: underline;
    }

    header {
      background: #000000;
      margin-bottom: 2rem;
      padding-bottom: 1rem;
      border-bottom: 1px solid #1a1a1a;
    }

    .article-meta, .menu a {
      background: #000000;
      color: white;
    }

}


body {
  max-width: 900px;
  margin: auto;
  padding: .2em;
  line-height: 1.5em;
}

/* Typography hierarchy */
h1 { font-size: 1.4rem; margin: 2rem 0 1rem; }
h2 { font-size: 1.2rem; margin: 1.5rem 0 0.8rem; }
h3 { font-size: 1.1rem; }

/* Table of Contents, if wanted

Add to yaml:

output:
  blogdown::html_page:
    toc: true

    */

#TableOfContents, #TOC {
  border: 1px solid #eee;
  border-radius: 5px;
}

/* Header and Footer */
.menu li { display: inline-block; }
.article-meta, .menu a {
  text-decoration: none;
  padding: 5px;
  border-radius: 5px;
  border-style: dotted;
  border-width: 1px;
  margin: 20px 0px 20px 0px;
}

.terms { font-size: .9em; }
.menu, .article-meta, footer { text-align: center; }
.title { font-size: 1.1em; }
footer a { text-decoration: none; }

.pull-left {
    float: left
}
.pull-right {
    float: right
}

a {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Adjust background at your leisure! */
header {
    position: relative;
    width: 100%;
    height: 1.75rem;
    font-size: 1rem;
}

header ul,
header ol {
    margin: 0;
    padding: 0;
    list-style: none
}
header nav {
    padding: 0 0.5rem
}

nav a {
    color: #888;
    font-size: 0.95rem;
    border: none;
    transition: color 0.2s;
}

nav a:hover {
    color: #fff;
    text-decoration: none;
}

nav a[href="/"] {
    color: #fff;
}

header a {
    color: #fff;
    line-height: 1.75rem;
    padding: 0 0.5rem
}
header a:hover,
header .current a {
    color: #fff
}

/* Code blocks */
pre {
    background: #0a0a0a;
    border: 15px solid #1a1a1a;
    padding: 1rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    border-radius: 2px;
}

pre code {
    background: transparent;
    color: #d4d4d4;
    line-height: 1.6;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
}

code {
    background: #1a1a1a;
    color: #d4d4d4;
    padding: 0.2rem 0.4rem;
    border-radius: 2px;
    font-size: 0.9rem;
}

/* Images, tables, misc. */
img, iframe, video {
  max-width: 100%;
  height: auto;
  display: block;
  margin-right: auto;
}

main {
  hyphens: auto;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7em;
  hyphens: auto;
  display: block;
  font-size: 1.1em;
}
main a {
  font-weight: bold;
}

blockquote {
  border-left: 2px solid #333;
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: #888;
  font-style: italic;
}

.content-wrapper {
  padding: 0px 12px 0px 12px;
}
#foxy {
  min-width: 40px;
  float: right;
  padding: 10px;
  display: block;
}

#table-of-contents {
}

/* Small devices, phones */
@media only screen and (min-width : 480px) {
  #foxy {
    min-width: 40px;
    float: center;
    padding: 10px 10px 10px 20px;
    display: block;
  }

}

/* 在大屏幕上应用特定样式 */
@media screen and (min-width: 768px) {
    #table-of-contents {
        position: fixed; /* 固定定位，使其悬浮在页面上 */
        top: 50%; /* 上边距为50% */
        right: 15px; /* 右边距为0，将其放在右侧 */
        transform: translateY(-50%); /* 使用transform来垂直居中 */
        background-color: #f0f0f0; /* 设置背景颜色 */
        padding: 10px; /* 添加一些内边距以增加可读性 */
        box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); /* 添加阴影效果 */
        width: 250px; /* 设置宽度 */
        max-height: 70vh; /* 设置最大高度为视口的70% */
        overflow-y: auto; /* 添加垂直滚动条 */
    }
}

/* Remove borders and backgrounds */
header, footer, nav {
    border: none;
    background: transparent;
}

/* Remove list styling */
ul, ol {
    padding-left: 1.5rem;
}

/* Post metadata */
.meta {
    color: #666;
    font-size: 0.9rem;
}
